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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user