MCPcopy
hub / github.com/liuup/claude-code-analysis / updateFileHistoryState

Function updateFileHistoryState

src/screens/REPL.tsx:2442–2454  ·  view source on GitHub ↗
(updater: (prev: FileHistoryState) => FileHistoryState)

Source from the content-addressed store, hash-verified

2440 messages,
2441 setMessages,
2442 updateFileHistoryState(updater: (prev: FileHistoryState) => FileHistoryState) {
2443 // Perf: skip the setState when the updater returns the same reference
2444 // (e.g. fileHistoryTrackEdit returns `state` when the file is already
2445 // tracked). Otherwise every no-op call would notify all store listeners.
2446 setAppState(prev => {
2447 const updated = updater(prev.fileHistory);
2448 if (updated === prev.fileHistory) return prev;
2449 return {
2450 ...prev,
2451 fileHistory: updated
2452 };
2453 });
2454 },
2455 updateAttributionState(updater: (prev: AttributionState) => AttributionState) {
2456 setAppState(prev => {
2457 const updated = updater(prev.attribution);

Callers 3

fileHistoryTrackEditFunction · 0.85
fileHistoryMakeSnapshotFunction · 0.85
fileHistoryRewindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected