From 7f314537236a13554485ab061481196f39d41d9f Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Tue, 27 Oct 2026 06:17:35 +0800 Subject: [PATCH] fix: startNewChat now always creates new session - Changed startNewChat to async and always create a new session - No longer depends on currentSession existing --- src/views/SearchView.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/SearchView.vue b/src/views/SearchView.vue index def71c6..a980b74 100644 --- a/src/views/SearchView.vue +++ b/src/views/SearchView.vue @@ -711,12 +711,13 @@ function newChat() { localStorage.removeItem(SESSION_STORAGE_KEY) } -function startNewChat() { +async function startNewChat() { newChat() showHistory.value = false - // Create new session if there's a current session - if (currentSession.value) { - handleNewSession() + // Always create a new session + const newSession = await createSession('未命名搜尋', mode.value) + if (newSession) { + setCurrentSession(newSession) } }