mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
chore: readme update
This commit is contained in:
parent
29f2610e4b
commit
d9d0ac06b9
7 changed files with 281 additions and 140 deletions
|
|
@ -479,6 +479,16 @@ export function App({ gw }: { gw: GatewayClient }) {
|
|||
die()
|
||||
}
|
||||
|
||||
if (key.ctrl && ch === 'l') {
|
||||
setStatus('forging session…')
|
||||
newSession()
|
||||
return
|
||||
}
|
||||
|
||||
if (key.ctrl && ch === 'v') {
|
||||
paste()
|
||||
return
|
||||
}
|
||||
|
||||
if (key.ctrl && ch === 'g') {
|
||||
return openEditor()
|
||||
|
|
@ -586,7 +596,6 @@ export function App({ gw }: { gw: GatewayClient }) {
|
|||
case 'tool.start': {
|
||||
const ctx = (p.context as string) || ''
|
||||
setTools(prev => [...prev, { id: p.tool_id, name: p.name, context: ctx }])
|
||||
appendMessage({ role: 'tool', text: `${TOOL_VERBS[p.name] ?? p.name}${ctx ? ' ' + ctx : ''}` })
|
||||
break
|
||||
}
|
||||
|
||||
|
|
@ -595,7 +604,7 @@ export function App({ gw }: { gw: GatewayClient }) {
|
|||
const done = prev.find(t => t.id === p.tool_id)
|
||||
const label = TOOL_VERBS[done?.name ?? p.name] ?? done?.name ?? p.name
|
||||
const ctx = done?.context || ''
|
||||
appendMessage({ role: 'tool', text: `${label}${ctx ? ' ' + ctx : ''} ✓` })
|
||||
appendMessage({ role: 'tool', text: `${label}${ctx ? ': ' + ctx : ''} ✓` })
|
||||
return prev.filter(t => t.id !== p.tool_id)
|
||||
})
|
||||
break
|
||||
|
|
|
|||
|
|
@ -13,11 +13,7 @@ function MdInline({ t, text }: { t: Theme; text: string }) {
|
|||
const i = m.index ?? 0
|
||||
|
||||
if (i > last) {
|
||||
parts.push(
|
||||
<Text color={t.color.cornsilk} key={parts.length}>
|
||||
{text.slice(last, i)}
|
||||
</Text>
|
||||
)
|
||||
parts.push(<Text key={parts.length}>{text.slice(last, i)}</Text>)
|
||||
}
|
||||
|
||||
if (m[2] && m[3]) {
|
||||
|
|
@ -27,11 +23,7 @@ function MdInline({ t, text }: { t: Theme; text: string }) {
|
|||
</Text>
|
||||
)
|
||||
} else if (m[4]) {
|
||||
parts.push(
|
||||
<Text bold color={t.color.cornsilk} key={parts.length}>
|
||||
{m[4]}
|
||||
</Text>
|
||||
)
|
||||
parts.push(<Text bold key={parts.length}>{m[4]}</Text>)
|
||||
} else if (m[5]) {
|
||||
parts.push(
|
||||
<Text color={t.color.amber} dimColor key={parts.length}>
|
||||
|
|
@ -39,11 +31,7 @@ function MdInline({ t, text }: { t: Theme; text: string }) {
|
|||
</Text>
|
||||
)
|
||||
} else if (m[6]) {
|
||||
parts.push(
|
||||
<Text color={t.color.cornsilk} italic key={parts.length}>
|
||||
{m[6]}
|
||||
</Text>
|
||||
)
|
||||
parts.push(<Text italic key={parts.length}>{m[6]}</Text>)
|
||||
} else if (m[7]) {
|
||||
parts.push(
|
||||
<Text color={t.color.amber} key={parts.length} underline>
|
||||
|
|
@ -56,14 +44,10 @@ function MdInline({ t, text }: { t: Theme; text: string }) {
|
|||
}
|
||||
|
||||
if (last < text.length) {
|
||||
parts.push(
|
||||
<Text color={t.color.cornsilk} key={parts.length}>
|
||||
{text.slice(last)}
|
||||
</Text>
|
||||
)
|
||||
parts.push(<Text key={parts.length}>{text.slice(last)}</Text>)
|
||||
}
|
||||
|
||||
return <Text>{parts.length ? parts : <Text color={t.color.cornsilk}>{text}</Text>}</Text>
|
||||
return <Text>{parts.length ? parts : <Text>{text}</Text>}</Text>
|
||||
}
|
||||
|
||||
export function Md({ compact, t, text }: { compact?: boolean; t: Theme; text: string }) {
|
||||
|
|
@ -121,7 +105,7 @@ export function Md({ compact, t, text }: { compact?: boolean; t: Theme; text: st
|
|||
{block.map((l, j) => (
|
||||
<Text
|
||||
color={
|
||||
isDiff && l.startsWith('+') ? '#a6e3a1' : isDiff && l.startsWith('-') ? '#f38ba8' : t.color.cornsilk
|
||||
isDiff && l.startsWith('+') ? '#a6e3a1' : isDiff && l.startsWith('-') ? '#f38ba8' : undefined
|
||||
}
|
||||
dimColor={isDiff && !l.startsWith('+') && !l.startsWith('-') && l.startsWith(' ')}
|
||||
key={j}
|
||||
|
|
@ -227,7 +211,7 @@ export function Md({ compact, t, text }: { compact?: boolean; t: Theme; text: st
|
|||
nodes.push(
|
||||
<Box flexDirection="column" key={key} paddingLeft={2}>
|
||||
{tableRows.map((row, ri) => (
|
||||
<Text color={ri === 0 ? t.color.amber : t.color.cornsilk} key={ri}>
|
||||
<Text color={ri === 0 ? t.color.amber : undefined} key={ri}>
|
||||
{row.map((cell, ci) => cell.padEnd(widths[ci] ?? 0)).join(' ')}
|
||||
</Text>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ export const MessageLine = memo(function MessageLine({ cols, compact, msg, t }:
|
|||
|
||||
if (msg.role === 'tool') {
|
||||
return (
|
||||
<Text color={t.color.dim} wrap="wrap">
|
||||
{' '}{msg.text}
|
||||
</Text>
|
||||
<Box borderColor={t.color.dim} borderStyle="round" marginLeft={3} paddingX={1}>
|
||||
<Text color={t.color.dim}>{msg.text}</Text>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export const Thinking = memo(function Thinking({
|
|||
{tools.map(tool => (
|
||||
<Text color={t.color.dim} key={tool.id}>
|
||||
<Spinner color={t.color.amber} /> {TOOL_VERBS[tool.name] ?? tool.name}
|
||||
{tool.context ? ` ${tool.context}` : ''}
|
||||
{tool.context ? `: ${tool.context}` : ''}
|
||||
</Text>
|
||||
))}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,21 +23,19 @@ export const HOTKEYS: [string, string][] = [
|
|||
['Ctrl+C', 'interrupt / clear / exit'],
|
||||
['Ctrl+D', 'exit'],
|
||||
['Ctrl+G', 'open $EDITOR for prompt'],
|
||||
['Ctrl+L', 'clear screen'],
|
||||
['Ctrl+V', 'paste clipboard image (same as /paste)'],
|
||||
['Tab', 'complete /commands (registry-aware)'],
|
||||
['↑/↓', 'queue edit (if queued) / input history'],
|
||||
['PgUp/PgDn', 'scroll messages'],
|
||||
['Ctrl+L', 'new session (clear)'],
|
||||
['Ctrl+V', 'paste clipboard image'],
|
||||
['Tab', 'apply completion'],
|
||||
['↑/↓', 'completions / queue edit / history'],
|
||||
['Esc', 'clear input'],
|
||||
['Ctrl+A/E', 'home / end of line'],
|
||||
['Ctrl+W', 'delete word'],
|
||||
['Ctrl+U/K', 'delete to start / end'],
|
||||
['Ctrl+←/→', 'jump word'],
|
||||
['Home/End', 'start / end of line'],
|
||||
['\\+Enter', 'multi-line continuation'],
|
||||
['!cmd', 'run shell command'],
|
||||
['{!cmd}', 'interpolate shell output inline'],
|
||||
['/voice record', 'start PTT recording'],
|
||||
['/voice stop', 'stop + transcribe']
|
||||
]
|
||||
|
||||
export const INTERPOLATION_RE = /\{!(.+?)\}/g
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue