import { Box, Text } from '@hermes/ink' import { HOTKEYS } from '../content/hotkeys.js' import type { Theme } from '../theme.js' const COMMON_COMMANDS: [string, string][] = [ ['/help', 'full list of commands + hotkeys'], ['/clear', 'start a new session'], ['/resume', 'resume a prior session'], ['/details', 'control transcript detail level'], ['/copy', 'copy selection or last assistant message'], ['/quit', 'exit hermes'] ] const HOTKEY_PREVIEW = HOTKEYS.slice(0, 8) export function HelpHint({ t }: { t: Theme }) { const labelW = Math.max( ...COMMON_COMMANDS.map(([k]) => k.length), ...HOTKEY_PREVIEW.map(([k]) => k.length) ) const pad = (s: string) => s + ' '.repeat(Math.max(0, labelW - s.length + 2)) return ( ? quick help {' · type /help for the full panel · backspace to dismiss'} Common commands {COMMON_COMMANDS.map(([k, v]) => ( {pad(k)} {v} ))} Hotkeys {HOTKEY_PREVIEW.map(([k, v]) => ( {pad(k)} {v} ))} ) }