mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(tui): keep todo pinned outside transcript
This commit is contained in:
parent
3271ffbd80
commit
cf8439263a
6 changed files with 45 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ import type {
|
|||
} from '../gatewayTypes.js'
|
||||
import { useGitBranch } from '../hooks/useGitBranch.js'
|
||||
import { useVirtualHistory } from '../hooks/useVirtualHistory.js'
|
||||
import { appendTranscriptMessage } from '../lib/messages.js'
|
||||
import { asRpcResult, rpcErrorMessage } from '../lib/rpc.js'
|
||||
import { terminalParityHints } from '../lib/terminalParity.js'
|
||||
import { buildToolTrailLine, sameToolTrailGroup, toolTrailLabel } from '../lib/text.js'
|
||||
|
|
@ -198,7 +199,10 @@ export function useMainApp(gw: GatewayClient) {
|
|||
[selection]
|
||||
)
|
||||
|
||||
const appendMessage = useCallback((msg: Msg) => setHistoryItems(prev => capHistory([...prev, msg])), [])
|
||||
const appendMessage = useCallback(
|
||||
(msg: Msg) => setHistoryItems(prev => capHistory(appendTranscriptMessage(prev, msg))),
|
||||
[]
|
||||
)
|
||||
|
||||
const sys = useCallback((text: string) => appendMessage({ role: 'system', text }), [appendMessage])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue