()
| 3 | import * as inputHistory from '../lib/history.js' |
| 4 | |
| 5 | export 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 | } |
no test coverage detected