feat: auto focs input textarea #759

close #759
This commit is contained in:
kangfenmao 2025-01-17 09:50:22 +08:00
parent c46219cd6c
commit 4f44afeec4

View File

@ -388,6 +388,12 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic }) => {
}
}, [])
useEffect(() => {
window.addEventListener('focus', () => {
textareaRef.current?.focus()
})
}, [])
const textareaRows = window.innerHeight >= 1000 || isBubbleStyle ? 2 : 1
const handleKnowledgeBaseSelect = (base?: KnowledgeBase) => {