Skip to content

Build your personal knowledge base with Trilium Notes

fix(llm): maintain focus after chat

Elian Doran27f8265ebb2e
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
index 4699d93a10..ec7fbbc8a2 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
@@ -128,6 +128,7 @@ export default function ChatInputBar({
baseSubmit(e);
if (willSubmit) {
editorApiRef.current?.setText("");
+ editorApiRef.current?.focus();
}
}, [baseSubmit, chat.input, chat.isStreaming]);
submitRef.current = handleSubmit;