MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / updateFileHistoryState

Function updateFileHistoryState

source code/screens/REPL.tsx:2444–2456  ·  view source on GitHub ↗
(updater: (prev: FileHistoryState) => FileHistoryState)

Source from the content-addressed store, hash-verified

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