mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-14 09:11:54 +00:00
feat(desktop): reserve Cmd/Ctrl+Enter strictly for steer
Cmd/Ctrl+Enter now steers when there's a steerable draft and is a no-op otherwise — it never falls through to a send, so the shortcut can't surprise-send. Plain Enter keeps its role (queue while busy, send when idle).
This commit is contained in:
parent
0f45509daf
commit
efa53fb3be
1 changed files with 8 additions and 4 deletions
|
|
@ -797,11 +797,15 @@ export function ChatBar({
|
|||
return
|
||||
}
|
||||
|
||||
// Cmd/Ctrl+Enter steers the draft into the live run (nudge, no interrupt);
|
||||
// plain Enter still queues while busy.
|
||||
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey) && !event.shiftKey && canSteer) {
|
||||
// Cmd/Ctrl+Enter is reserved for steering the live run — never a send.
|
||||
// Steer when there's a steerable draft, otherwise swallow it so it can't
|
||||
// surprise-send. (Plain Enter still queues while busy / sends when idle.)
|
||||
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey) && !event.shiftKey) {
|
||||
event.preventDefault()
|
||||
steerDraft()
|
||||
|
||||
if (canSteer) {
|
||||
steerDraft()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue