mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
feat: support ESC key to close slash command panels
This commit is contained in:
parent
e1474b5c30
commit
628c4e16f9
@ -362,6 +362,14 @@ export function ChatInput({ variant = 'default' }: ChatInputProps) {
|
||||
return
|
||||
}
|
||||
|
||||
if (localSlashPanel) {
|
||||
if (event.key === 'Escape') {
|
||||
event.preventDefault()
|
||||
setLocalSlashPanel(null)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (slashMenuOpen && filteredCommands.length > 0) {
|
||||
if (event.key === 'ArrowDown') {
|
||||
event.preventDefault()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user