diff --git a/apps/desktop/src/app/chat/composer/controls.test.tsx b/apps/desktop/src/app/chat/composer/controls.test.tsx index 15240c80140..d317f9eb190 100644 --- a/apps/desktop/src/app/chat/composer/controls.test.tsx +++ b/apps/desktop/src/app/chat/composer/controls.test.tsx @@ -65,6 +65,12 @@ describe('ComposerControls shortcut tooltips', () => { await expectShortcutTooltip('Send', '↵') }) + it('shows Esc for Stop', async () => { + renderControls({ busy: true, busyAction: 'stop' }) + + await expectShortcutTooltip('Stop', 'Esc') + }) + it('shows Enter for Steer', async () => { renderControls({ busy: true, busyAction: 'steer' }) diff --git a/apps/desktop/src/app/chat/composer/controls.tsx b/apps/desktop/src/app/chat/composer/controls.tsx index ce8482e85f2..7e1acfae754 100644 --- a/apps/desktop/src/app/chat/composer/controls.tsx +++ b/apps/desktop/src/app/chat/composer/controls.tsx @@ -121,8 +121,8 @@ export function ComposerControls({ ? 'composer.steer' : busyAction === 'queue' ? 'composer.queue' - : 'composer.send'} - combo="enter" + : 'composer.stop'} + combo={busyAction === 'stop' ? 'escape' : 'enter'} text={busyLabel} /> ) : ( diff --git a/apps/desktop/src/app/chat/composer/index.tsx b/apps/desktop/src/app/chat/composer/index.tsx index 7e6d97cb5fc..6f39fdc7dd2 100644 --- a/apps/desktop/src/app/chat/composer/index.tsx +++ b/apps/desktop/src/app/chat/composer/index.tsx @@ -107,8 +107,11 @@ export function ChatBar({ // focus-bus key, and awaiting-input edge. Main scope = the legacy globals. const scope = useComposerScope() const { data: configRecord } = useHermesConfigRecord() - const config = configRecord?.config as { display?: { busy_input_mode?: unknown } } | undefined - const busyInputMode = normalizeBusyInputMode(config?.display?.busy_input_mode) + // /api/config returns the config record itself (not wrapped in { config: … }), + // so read display.busy_input_mode directly off the record. + const busyInputMode = normalizeBusyInputMode( + (configRecord as { display?: { busy_input_mode?: unknown } } | undefined)?.display?.busy_input_mode + ) const attachments = useStore(scope.attachments.$attachments) const compacting = useStore($compactionActive) const scrolledUp = useStore($threadScrolledUp)