From 18cedb5d14435ebf5cf28cdf56c13f8ed1d080cf Mon Sep 17 00:00:00 2001 From: SuperManTouX <93423476+SuperManTouX@users.noreply.github.com> Date: Mon, 9 Mar 2026 15:53:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=8D=A2=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=87=8D=E7=BD=AE=E6=89=80=E6=9C=89=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/ChatInput.vue | 14 ++++++++++++++ src/components/sidebar/ChatSidebar.vue | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/src/components/input/ChatInput.vue b/src/components/input/ChatInput.vue index 1e78c93..9418a52 100644 --- a/src/components/input/ChatInput.vue +++ b/src/components/input/ChatInput.vue @@ -173,6 +173,8 @@ import AttachmentPreview from "./AttachmentPreview.vue"; import { generateId } from "@/utils/helpers"; import type { Attachment } from "@/types/chat"; import { chatApi } from "@/services/api"; +import { useAuthStore } from "@/stores/auth"; +import { useSettingsStore } from "@/stores/settings"; interface AttachmentWithProgress extends Attachment { uploading?: boolean; @@ -216,6 +218,9 @@ const emit = defineEmits<{ }>(); // 响应式状态 +const authStore = useAuthStore(); +const settingsStore = useSettingsStore(); + const inputText = ref(""); const attachments = ref([]); const isFocused = ref(false); @@ -467,6 +472,15 @@ watch(inputText, () => { autoResize(); }); }); +// 监听模型变化,重置选项功能 +watch( + () => settingsStore.settings.defaultModel, + () => { + isDeepSearch.value = false; + isDeepThinking.value = false; + isWebSearch.value = false; + }, +); onMounted(() => { autoResize(); diff --git a/src/components/sidebar/ChatSidebar.vue b/src/components/sidebar/ChatSidebar.vue index 2b9ad7b..c656ec1 100644 --- a/src/components/sidebar/ChatSidebar.vue +++ b/src/components/sidebar/ChatSidebar.vue @@ -212,6 +212,11 @@ function selectModel(modelId: string, modelName: string) { localStorage.setItem("modelSelect", modelName); settingsStore.setSelectedModelId(modelId); // 更新选中的模型 ID showModelMenu.value = false; + + // 切换模型时重置搜索和思考参数 + localStorage.setItem("isDeepSearch", "false"); + localStorage.setItem("isDeepThinking", "false"); + localStorage.setItem("isWebSearch", "false"); } // 方法