diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index e74c3af..d2ec890 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -52,5 +52,8 @@ "pinia": "catalog:", "vue": "catalog:", "vue-router": "catalog:" + }, + "devDependencies": { + "@types/markdown-it": "^14.1.2" } } diff --git a/apps/web-antd/src/api/core/chatflow.ts b/apps/web-antd/src/api/core/chatflow.ts index e26edd1..172ee2f 100644 --- a/apps/web-antd/src/api/core/chatflow.ts +++ b/apps/web-antd/src/api/core/chatflow.ts @@ -24,15 +24,21 @@ export namespace ChatflowApi { } export interface ChatListResult { - id: string; - name: string; - inputs: { - [key: string]: any; - }; - status: string; - introduction: string; - createAt: string; - updatedAt: string; + data: [ + { + createAt: string; + id: string; + inputs: { + [key: string]: any; + }; + introduction: string; + name: string; + status: string; + updatedAt: string; + }, + ]; + limit: number; + hasMore: boolean; } export interface deleteParams { @@ -47,6 +53,24 @@ export namespace ChatflowApi { firstId: string; limit: string; } + + export interface ChatMessageResult { + data: [ + { + answer: string; + conversationId: string; + createdAt: string; + id: string; + inputs: { + [key: string]: any; + }; + messageFiles: []; + query: string; + }, + ]; + limit: number; + hasMore: boolean; + } } // 聊天流 @@ -69,7 +93,7 @@ export async function getChatList( const url = params.appid ? `/v1/chat/conversations/${params.appid}` : '/v1/chat/conversations/'; - return requestClient.request(url, { + return requestClient.request(url, { data, method: 'POST', }); @@ -95,5 +119,8 @@ export function getChatflowMessage( appId: string, data: ChatflowApi.ChatMessageParams, ) { - return requestClient.post(`/v1/chat/messages/${appId}`, data); + return requestClient.post( + `/v1/chat/messages/${appId}`, + data, + ); } diff --git a/apps/web-antd/src/views/word/components/word-list-view.vue b/apps/web-antd/src/views/word/components/word-list-view.vue index 8441d78..f381b3b 100644 --- a/apps/web-antd/src/views/word/components/word-list-view.vue +++ b/apps/web-antd/src/views/word/components/word-list-view.vue @@ -1,12 +1,11 @@