mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
feat(desktop): show "esc" keyboard shortcut on stop button
This commit is contained in:
parent
742ecb527a
commit
34a72c3683
3 changed files with 13 additions and 4 deletions
|
|
@ -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' })
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
) : (
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue