MCPcopy Create free account
hub / github.com/Noumena-Network/code / attributionRestoreStateFromLog

Function attributionRestoreStateFromLog

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

Source from the content-addressed store, hash-verified

873 * Restore attribution state from log snapshots on session resume.
874 */
875export function attributionRestoreStateFromLog(
876 attributionSnapshots: AttributionSnapshotMessage[],
877 onUpdateState: (newState: AttributionState) => void,
878): void {
879 const state = restoreAttributionStateFromSnapshots(attributionSnapshots)
880 onUpdateState(state)
881}
882
883/**
884 * Increment promptCount and save an attribution snapshot.

Callers 1

Tested by

no test coverage detected