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

Function attributionRestoreStateFromLog

src/utils/commitAttribution.ts:934–940  ·  view source on GitHub ↗
(
  attributionSnapshots: AttributionSnapshotMessage[],
  onUpdateState: (newState: AttributionState) => void,
)

Source from the content-addressed store, hash-verified

932 * Restore attribution state from log snapshots on session resume.
933 */
934export function attributionRestoreStateFromLog(
935 attributionSnapshots: AttributionSnapshotMessage[],
936 onUpdateState: (newState: AttributionState) => void,
937): void {
938 const state = restoreAttributionStateFromSnapshots(attributionSnapshots)
939 onUpdateState(state)
940}
941
942/**
943 * Increment promptCount and save an attribution snapshot.

Callers 1

Tested by

no test coverage detected