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
@ -797,11 +797,15 @@ export function ChatBar({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cmd/Ctrl+Enter steers the draft into the live run (nudge, no interrupt);
|
// Cmd/Ctrl+Enter is reserved for steering the live run — never a send.
|
||||||
// plain Enter still queues while busy.
|
// Steer when there's a steerable draft, otherwise swallow it so it can't
|
||||||
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey) && !event.shiftKey && canSteer) {
|
// surprise-send. (Plain Enter still queues while busy / sends when idle.)
|
||||||
|
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey) && !event.shiftKey) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
steerDraft()
|
|
||||||
|
if (canSteer) {
|
||||||
|
steerDraft()
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user