MCPcopy
hub / github.com/codeaashu/claude-code / fileHistoryCanRestore

Function fileHistoryCanRestore

src/utils/fileHistory.ts:399–408  ·  view source on GitHub ↗
(
  state: FileHistoryState,
  messageId: UUID,
)

Source from the content-addressed store, hash-verified

397}
398
399export function fileHistoryCanRestore(
400 state: FileHistoryState,
401 messageId: UUID,
402): boolean {
403 if (!fileHistoryEnabled()) {
404 return false
405 }
406
407 return state.snapshots.some(snapshot => snapshot.messageId === messageId)
408}
409
410/**
411 * Computes diff stats for a file snapshot by counting the number of files that would be changed

Callers 2

loadFileHistoryMetadataFunction · 0.85
handleRewindFilesFunction · 0.85

Calls 1

fileHistoryEnabledFunction · 0.85

Tested by

no test coverage detected