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:
Brooklyn Nicholson 2026-06-05 21:01:20 -05:00
parent 0f45509daf
commit efa53fb3be

View file

@ -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
}