mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
feat: Add backspace handling to remove last mentioned model
This commit is contained in:
parent
173e164d2b
commit
f1a9699be4
@ -241,6 +241,11 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic }) => {
|
||||
sendMessage()
|
||||
return event.preventDefault()
|
||||
}
|
||||
|
||||
if (event.key === 'Backspace' && text.trim() === '' && mentionModels.length > 0) {
|
||||
setMentionModels((prev) => prev.slice(0, -1))
|
||||
return event.preventDefault()
|
||||
}
|
||||
}
|
||||
|
||||
const addNewTopic = useCallback(async () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user