From 66647802afe99513c52e42532e692c4a09f2dbd7 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 22 Oct 2025 14:52:42 +0800 Subject: [PATCH] feat: ai code --- apps/web-antd/src/router/routes/modules/ai.ts | 2 +- .../conversation/ConversationList.vue | 22 +++++++------- .../src/views/ai/chat/index/index.vue | 8 ++--- .../chat/manager/modules/ChatMessageList.vue | 6 ++-- .../ai/image/index/components/ImageDetail.vue | 28 +++++++++--------- .../src/views/ai/image/index/index.vue | 10 +++---- .../src/views/ai/image/manager/data.ts | 19 ++++++++++-- .../src/views/ai/image/manager/index.vue | 29 ++----------------- .../src/views/ai/image/square/index.vue | 4 +-- .../src/views/ai/knowledge/document/index.vue | 10 +++---- .../src/views/ai/knowledge/segment/index.vue | 7 ++--- .../views/ai/mindmap/index/modules/Left.vue | 2 +- .../views/ai/mindmap/index/modules/Right.vue | 4 +-- .../src/views/ai/mindmap/manager/data.ts | 14 +++++++-- .../src/views/ai/mindmap/manager/index.vue | 26 ++--------------- .../src/views/ai/model/chatRole/data.ts | 23 +++++++++++++-- .../src/views/ai/model/chatRole/index.vue | 13 +-------- .../web-antd/src/views/ai/model/model/data.ts | 16 +++++++++- .../src/views/ai/model/model/index.vue | 18 ------------ .../src/views/ai/music/manager/data.ts | 13 ++++++++- .../src/views/ai/music/manager/index.vue | 14 --------- .../src/views/ai/workflow/form/index.vue | 4 +-- .../workflow/form/modules/workflow-design.vue | 2 +- apps/web-antd/src/views/ai/workflow/index.vue | 5 +--- .../src/views/ai/write/manager/data.ts | 13 ++++++++- .../src/views/ai/write/manager/index.vue | 17 ----------- 26 files changed, 148 insertions(+), 181 deletions(-) diff --git a/apps/web-antd/src/router/routes/modules/ai.ts b/apps/web-antd/src/router/routes/modules/ai.ts index 67f9f69d8..dc66c4927 100644 --- a/apps/web-antd/src/router/routes/modules/ai.ts +++ b/apps/web-antd/src/router/routes/modules/ai.ts @@ -83,7 +83,7 @@ const routes: RouteRecordRaw[] = [ }, }, { - path: 'console/workflow/create', + path: String.raw`workflow/create/:id(\d+)/:type(update|create)`, component: () => import('#/views/ai/workflow/form/index.vue'), name: 'AiWorkflowCreate', meta: { diff --git a/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue b/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue index c0f79bebb..7339c9e5b 100644 --- a/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue +++ b/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue @@ -202,7 +202,8 @@ async function updateConversationTitle( if ( filterConversationList.length > 0 && filterConversationList[0] && // tip:避免切换对话 - activeConversationId.value === filterConversationList[0].id + activeConversationId.value === + (filterConversationList[0].id as number) ) { emits('onConversationClick', filterConversationList[0]); } @@ -306,7 +307,7 @@ onMounted(async () => {