From 7df11dd84621ba100e7942185fea4dbb28ef6359 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Mon, 9 Feb 2026 13:36:34 +0800 Subject: [PATCH] Allow text input when not final in text debug --- web/pages/Assistants.tsx | 46 +++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/web/pages/Assistants.tsx b/web/pages/Assistants.tsx index 46be593..d5d048d 100644 --- a/web/pages/Assistants.tsx +++ b/web/pages/Assistants.tsx @@ -1027,6 +1027,27 @@ const BotIcon = ({className}: {className?: string}) => ( ); +// Stable transcription log so the scroll container is not recreated on every render (avoids scroll jumping) +const TranscriptionLog: React.FC<{ + scrollRef: React.RefObject; + messages: { role: 'user' | 'model'; text: string }[]; + isLoading: boolean; + className?: string; +}> = ({ scrollRef, messages, isLoading, className = '' }) => ( +
+ {messages.length === 0 &&
暂无转写记录
} + {messages.map((m, i) => ( +
+
+ {m.role === 'user' ? 'Me' : 'AI'} + {m.text} +
+
+ ))} + {isLoading &&
Thinking...
} +
+); + // --- Debug Drawer Component --- export const DebugDrawer: React.FC<{ isOpen: boolean; @@ -1557,21 +1578,6 @@ export const DebugDrawer: React.FC<{ setResolvedConfigView(JSON.stringify(localResolved, null, 2)); }, [isOpen, assistant, voices, llmModels, asrModels]); - const TranscriptionLog = ({ className = '' }: { className?: string }) => ( -
- {messages.length === 0 &&
暂无转写记录
} - {messages.map((m, i) => ( -
-
- {m.role === 'user' ? 'Me' : 'AI'} - {m.text} -
-
- ))} - {isLoading &&
Thinking...
} -
- ); - const renderLocalVideo = (isSmall: boolean) => (

转写日志

- + ) : (
@@ -1752,7 +1758,7 @@ export const DebugDrawer: React.FC<{
- + )}