From fbec7088c62f56799b6f6e9286a961930dba9066 Mon Sep 17 00:00:00 2001 From: DEV_DSW <562304744@qq.com> Date: Tue, 14 Apr 2026 20:54:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=87=AA=E5=8A=A8=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A8=A1=E5=9E=8B=E8=B4=A6=E6=88=B7=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/model-chat-migration-plan.md | 5 +++- index.html | 2 +- src/constant/taskCenterList.ts | 23 ++++--------------- src/pages/home/ChatBox.vue | 14 ++--------- src/pages/home/ChatHistory.vue | 4 ++-- src/pages/home/TaskCenter.vue | 7 ++---- src/pages/home/components/chat/ChatEmpty.vue | 2 +- .../home/components/chat/ChatMessage.vue | 2 +- src/pages/home/index.vue | 16 ++++++++----- src/store/chat.ts | 5 ++-- src/store/providers.ts | 9 ++++++++ 11 files changed, 39 insertions(+), 50 deletions(-) diff --git a/docs/model-chat-migration-plan.md b/docs/model-chat-migration-plan.md index e43c525..09e7e3a 100644 --- a/docs/model-chat-migration-plan.md +++ b/docs/model-chat-migration-plan.md @@ -550,7 +550,10 @@ contextBridge.exposeInMainWorld('api', { #### 4.5.2 Chat 页面移除模型选择器 - 从 `ChatBox.vue` 中移除 `ModelSelector` 组件及其引用; - 对话功能直接使用 provider 管理中「设置为默认」的模型账户; -- 若未设置默认模型,提示用户前往模型管理页面配置。 +- 对话页面 `onMounted` 时主动调用 `providerStore.init()` 加载模型配置。 + +#### 4.5.3 自动默认模型兜底 +当 `providerStore.init()` 初始化后发现用户已存在 provider accounts 但未设置 `defaultAccountId` 时,自动将第一个 account 设为默认,确保用户无需手动点击"设为默认"即可直接开始对话。若用户没有任何账户,则保持原有提示行为。 --- diff --git a/index.html b/index.html index ec44c7c..b6dd11d 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ diff --git a/src/constant/taskCenterList.ts b/src/constant/taskCenterList.ts index 6abb32a..37523e3 100644 --- a/src/constant/taskCenterList.ts +++ b/src/constant/taskCenterList.ts @@ -5,17 +5,10 @@ export interface taskCenterItem { desc: string, id: string, icon: string, - type: 'sale' | 'close' | 'open' | 'channel' + type?: 'channel' } export const taskCenterList: taskCenterItem[] = [ - { - title: '每日销售数据', - desc: '分析用于销售渠道每日数据汇总及简要展示', - id: uuidv4(), - icon: '销', - type: 'sale' - }, { title: '一键打开各渠道', desc: '人工账号登录,为自动化操作做好准备', @@ -24,17 +17,9 @@ export const taskCenterList: taskCenterItem[] = [ type: 'channel' }, { - title: '关渠道房型', - desc: '关闭销售渠道下的指定房型', + title: '渠道房型', + desc: '销售渠道下的指定房型,管理开关房型', id: uuidv4(), - icon: '关', - type: 'close' - }, - { - title: '开渠道房型', - desc: '开启销售渠道下的指定房型', - id: uuidv4(), - icon: '开', - type: 'open' + icon: '房' }, ] \ No newline at end of file diff --git a/src/pages/home/ChatBox.vue b/src/pages/home/ChatBox.vue index 8d432a0..49c7dad 100644 --- a/src/pages/home/ChatBox.vue +++ b/src/pages/home/ChatBox.vue @@ -1,12 +1,8 @@