MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / useInputHistory

Function useInputHistory

ui-tui/src/hooks/useInputHistory.ts:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import * as inputHistory from '../lib/history.js'
4
5export function useInputHistory() {
6 const historyRef = useRef<string[]>(inputHistory.load())
7 const [historyIdx, setHistoryIdx] = useState<number | null>(null)
8 const historyDraftRef = useRef('')
9
10 return { historyRef, historyIdx, setHistoryIdx, historyDraftRef, pushHistory: inputHistory.append }
11}

Callers 1

useComposerStateFunction · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected