mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-02 07:11:49 +00:00
Add a first-class active-session orchestrator for the Ink TUI: - list, activate, close, and launch live process-local TUI sessions - hydrate committed and in-flight output when switching sessions - dispatch a new prompt session from the +new row with session-scoped model picks - expose a clickable live-session count in the status chrome - preserve stable row order while initially focusing the current session - support mouse hit-testing for floating orchestrator overlays - add backend and frontend regression coverage for the lifecycle and UI helpers
37 lines
1.5 KiB
TypeScript
37 lines
1.5 KiB
TypeScript
import { isMac, isRemoteShell } from '../lib/platform.js'
|
|
|
|
const action = isMac ? 'Cmd' : 'Ctrl'
|
|
const paste = isMac ? 'Cmd' : 'Alt'
|
|
|
|
const copyHotkeys: [string, string][] = isMac
|
|
? [
|
|
['Cmd+C', 'copy selection'],
|
|
['Ctrl+C', 'interrupt / clear draft / exit']
|
|
]
|
|
: isRemoteShell()
|
|
? [
|
|
['Cmd+C', 'copy selection when forwarded by the terminal'],
|
|
['Ctrl+C', 'copy selection / interrupt / clear draft / exit']
|
|
]
|
|
: [['Ctrl+C', 'copy selection / interrupt / clear draft / exit']]
|
|
|
|
export const HOTKEYS: [string, string][] = [
|
|
...copyHotkeys,
|
|
[action + '+D', 'exit'],
|
|
[action + '+G / Alt+G', 'open $EDITOR (Alt+G fallback for VSCode/Cursor)'],
|
|
[action + '+L', 'redraw / repaint'],
|
|
[paste + '+V / /paste', 'paste text; /paste attaches clipboard image'],
|
|
['Tab', 'apply completion'],
|
|
['↑/↓', 'completions / queue edit / history'],
|
|
['Ctrl+X', 'open live session switcher (deletes queued message while editing)'],
|
|
[action + '+A/E', 'home / end of line'],
|
|
[action + '+Z / ' + action + '+Y', 'undo / redo input edits'],
|
|
[action + '+W', 'delete word'],
|
|
[action + '+U/K', 'delete to start / end'],
|
|
[action + '+←/→', 'jump word'],
|
|
['Home/End', 'start / end of line'],
|
|
['Shift+Enter / Alt+Enter', 'insert newline'],
|
|
['\\+Enter', 'multi-line continuation (fallback)'],
|
|
['!<cmd>', 'run a shell command (e.g. !ls, !git status)'],
|
|
['{!<cmd>}', 'interpolate shell output inline (e.g. "branch is {!git branch --show-current}")']
|
|
]
|