mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
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
75f07f4b1c
commit
8b558d0266
@ -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…
Reference in New Issue
Block a user