mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
Refactor shortcut handling for regenerate response
This commit is contained in:
parent
64194f255c
commit
a4ad6bead6
1 changed files with 4 additions and 1 deletions
|
|
@ -246,7 +246,10 @@
|
|||
console.log('Shortcut triggered: GENERATE_MESSAGE_PAIR');
|
||||
event.preventDefault();
|
||||
document.getElementById('generate-message-pair-button')?.click();
|
||||
} else if (isShortcutMatch(event, shortcuts[Shortcut.REGENERATE_RESPONSE]) && document.activeElement?.id === 'chat-input') {
|
||||
} else if (
|
||||
isShortcutMatch(event, shortcuts[Shortcut.REGENERATE_RESPONSE]) &&
|
||||
document.activeElement?.id === 'chat-input'
|
||||
) {
|
||||
console.log('Shortcut triggered: REGENERATE_RESPONSE');
|
||||
event.preventDefault();
|
||||
[...document.getElementsByClassName('regenerate-response-button')]?.at(-1)?.click();
|
||||
|
|
|
|||
Loading…
Reference in a new issue