refactor: simplify new topic shortcut logic in Inputbar
- Removed loading check in the new topic shortcut to streamline the process of adding a new topic and focusing the textarea.
This commit is contained in:
parent
cbb1173a3d
commit
c527fbdcd2
@ -518,11 +518,9 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
}, [isDragging, handleDrag, handleDragEnd])
|
||||
|
||||
useShortcut('new_topic', () => {
|
||||
if (!loading) {
|
||||
addNewTopic()
|
||||
EventEmitter.emit(EVENT_NAMES.SHOW_TOPIC_SIDEBAR)
|
||||
textareaRef.current?.focus()
|
||||
}
|
||||
addNewTopic()
|
||||
EventEmitter.emit(EVENT_NAMES.SHOW_TOPIC_SIDEBAR)
|
||||
textareaRef.current?.focus()
|
||||
})
|
||||
|
||||
useShortcut('clear_topic', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user