MCPcopy
hub / github.com/claude-code-best/claude-code / updateFileHistoryState

Function updateFileHistoryState

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

Source from the content-addressed store, hash-verified

2945 messages,
2946 setMessages,
2947 updateFileHistoryState(updater: (prev: FileHistoryState) => FileHistoryState) {
2948 // Perf: skip the setState when the updater returns the same reference
2949 // (e.g. fileHistoryTrackEdit returns `state` when the file is already
2950 // tracked). Otherwise every no-op call would notify all store listeners.
2951 setAppState(prev => {
2952 const updated = updater(prev.fileHistory);
2953 if (updated === prev.fileHistory) return prev;
2954 return { ...prev, fileHistory: updated };
2955 });
2956 },
2957 updateAttributionState(updater: (prev: AttributionState) => AttributionState) {
2958 setAppState(prev => {
2959 const updated = updater(prev.attribution);

Callers 3

fileHistoryTrackEditFunction · 0.85
fileHistoryMakeSnapshotFunction · 0.85
fileHistoryRewindFunction · 0.85

Calls 1

setAppStateFunction · 0.50

Tested by

no test coverage detected