MCPcopy Create free account
hub / github.com/anus-dev/ANUS / loadHistory

Function loadHistory

packages/cli/src/ui/hooks/useShellHistory.ts:77–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76 useEffect(() => {
77 async function loadHistory() {
78 const filePath = await getHistoryFilePath(projectRoot);
79 setHistoryFilePath(filePath);
80 const loadedHistory = await readHistoryFile(filePath);
81 setHistory(loadedHistory.reverse()); // Newest first
82 }
83 loadHistory();
84 }, [projectRoot]);
85

Callers 2

restoreActionFunction · 0.85
useShellHistoryFunction · 0.85

Calls 2

getHistoryFilePathFunction · 0.85
readHistoryFileFunction · 0.85

Tested by

no test coverage detected