Tighten Escape agent interrupt shortcut
This commit is contained in:
@@ -280,11 +280,10 @@ describe("keyboard-shortcuts", () => {
|
||||
payload: { kind: "voice-mute-toggle" },
|
||||
},
|
||||
{
|
||||
name: "lets Escape continue to local handlers while routing dictation cancel",
|
||||
name: "routes Escape to agent interrupt outside terminal focus",
|
||||
event: { key: "Escape", code: "Escape" },
|
||||
context: { focusScope: "message-input" },
|
||||
action: "message-input.action",
|
||||
payload: { kind: "dictation-cancel" },
|
||||
action: "agent.interrupt",
|
||||
preventDefault: false,
|
||||
stopPropagation: false,
|
||||
},
|
||||
@@ -353,6 +352,16 @@ describe("keyboard-shortcuts", () => {
|
||||
event: { key: "d", code: "KeyD", metaKey: true },
|
||||
context: { isMac: true, focusScope: "terminal" },
|
||||
},
|
||||
{
|
||||
name: "does not interrupt agent when terminal is focused",
|
||||
event: { key: "Escape", code: "Escape" },
|
||||
context: { focusScope: "terminal" },
|
||||
},
|
||||
{
|
||||
name: "does not interrupt agent when command center is open",
|
||||
event: { key: "Escape", code: "Escape" },
|
||||
context: { commandCenterOpen: true },
|
||||
},
|
||||
{
|
||||
name: "does not bind pane shortcuts on non-mac platforms",
|
||||
event: { key: "\\", code: "Backslash", ctrlKey: true },
|
||||
|
||||
Reference in New Issue
Block a user