From 779140ef597fa6035f0da750b2778eb401b18e47 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Mon, 1 Jun 2026 21:09:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E6=96=B0=E5=BB=BA=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=97=B6=E9=87=8D=E7=BD=AE=20token=20=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新对话流程(resetNewConversation)清空消息时一并调用 resetTokenStatistics, 避免上一对话的 token 统计残留到新对话。 Co-Authored-By: Claude Opus 4.8 (1M context) --- static/src/app/methods/ui.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/static/src/app/methods/ui.ts b/static/src/app/methods/ui.ts index 7c27fb0..bcde5af 100644 --- a/static/src/app/methods/ui.ts +++ b/static/src/app/methods/ui.ts @@ -1191,6 +1191,7 @@ export const uiMethods = { } this.messages = []; this.currentConversationId = null; + this.resetTokenStatistics?.(); this.currentConversationTitle = '新对话'; this.titleReady = true; this.suppressTitleTyping = false;