feat(ai-chat): focus composer on chat creation

Add autoFocus to the chat composer Textarea so a freshly created chat
(window open, "New chat", chat switch — all remount ChatThread via key)
lands with the cursor ready in the input field, letting the user type
immediately without clicking into it.
This commit is contained in:
vvzvlad
2026-06-18 05:51:24 +03:00
parent cee9f6fb6e
commit 3d9c9daf98

View File

@@ -52,6 +52,10 @@ export default function ChatInput({
minRows={1}
maxRows={6}
disabled={disabled}
// Focus the composer whenever this input mounts. ChatThread is remounted
// via `key` on every chat appearance (window open, "New chat", chat
// switch), so a fresh chat lands with the cursor ready in the field.
autoFocus
/>
{isStreaming ? (
<Tooltip label={t("Stop")} withArrow>