From 62f1343c3b7a2f11f35948148de00731be776f87 Mon Sep 17 00:00:00 2001 From: vertoryao Date: Wed, 7 May 2025 17:05:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor(@vben/web-antd):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20word=20=E6=A8=A1=E5=9D=97=E5=8A=9F=E8=83=BD=E5=92=8C?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 authentication.json 中的冗余文本 - 新增 getMessages 接口用于获取消息列表 - 重构 word-history-view 和 word-work-view 组件 - 优化文档预览样式 - 修复聊天窗口的滚动问题 - 增加项目名称验证和错误提示 --- apps/web-antd/src/api/core/chatflow.ts | 16 +++++++-- apps/web-antd/src/views/word/index.vue | 18 +++++----- packages/effects/common-ui/package.json | 1 + .../common-ui/src/ui/ppt/ppt-perview.vue | 6 ++-- .../common-ui/src/ui/ppt/ppt-work-view.vue | 10 +++--- .../src/ui/spider/spider-work-view.vue | 8 ++--- .../effects/common-ui/src/ui/word/typing.ts | 10 +++--- .../src/ui/word/word-history-view.vue | 7 +++- .../common-ui/src/ui/word/word-work-view.vue | 33 ++++++++++++++----- .../src/langs/zh-CN/authentication.json | 4 +-- pnpm-lock.yaml | 3 ++ 11 files changed, 74 insertions(+), 42 deletions(-) diff --git a/apps/web-antd/src/api/core/chatflow.ts b/apps/web-antd/src/api/core/chatflow.ts index 239b8bd..f9a9eb7 100644 --- a/apps/web-antd/src/api/core/chatflow.ts +++ b/apps/web-antd/src/api/core/chatflow.ts @@ -15,6 +15,13 @@ export namespace ChatflowApi { files: []; } + export interface MessagesRequest { + conversationId: string; + userId: string; + firstId: string; + limit: number; + } + export interface ChatListBody { userId: string; lastId: string; @@ -57,9 +64,12 @@ export async function getChatList( }); } -// export function stopChatflow(data){ -// return requestClient.post('/v1/chat/stopMessagesStream', data); -// }; +export async function getMessages( + appId: string, + data: ChatflowApi.MessagesRequest, +) { + return requestClient.post(`/v1/chat/messages/${appId}`, data); +} // // export function getChatflowList(data){ // return requestClient.post('/v1/chat/messages', data); diff --git a/apps/web-antd/src/views/word/index.vue b/apps/web-antd/src/views/word/index.vue index 7494c46..1e1e8c9 100644 --- a/apps/web-antd/src/views/word/index.vue +++ b/apps/web-antd/src/views/word/index.vue @@ -1,13 +1,13 @@