MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / updateFileHistoryState

Function updateFileHistoryState

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

Source from the content-addressed store, hash-verified

2472 messages,
2473 setMessages,
2474 updateFileHistoryState(updater: (prev: FileHistoryState) => FileHistoryState) {
2475 // Perf: skip the setState when the updater returns the same reference
2476 // (e.g. fileHistoryTrackEdit returns `state` when the file is already
2477 // tracked). Otherwise every no-op call would notify all store listeners.
2478 setAppState(prev => {
2479 const updated = updater(prev.fileHistory);
2480 if (updated === prev.fileHistory) return prev;
2481 return {
2482 ...prev,
2483 fileHistory: updated
2484 };
2485 });
2486 },
2487 updateAttributionState(updater: (prev: AttributionState) => AttributionState) {
2488 setAppState(prev => {
2489 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