MCPcopy Index your code
hub / github.com/codeaashu/claude-code / initializeFromSnapshot

Function initializeFromSnapshot

src/tools/AgentTool/agentMemorySnapshot.ts:149–159  ·  view source on GitHub ↗
(
  agentType: string,
  scope: AgentMemoryScope,
  snapshotTimestamp: string,
)

Source from the content-addressed store, hash-verified

147 * Initialize local agent memory from a snapshot (first-time setup).
148 */
149export async function initializeFromSnapshot(
150 agentType: string,
151 scope: AgentMemoryScope,
152 snapshotTimestamp: string,
153): Promise<void> {
154 logForDebugging(
155 `Initializing agent memory for ${agentType} from project snapshot`,
156 )
157 await copySnapshotToLocal(agentType, scope)
158 await saveSyncedMeta(agentType, scope, snapshotTimestamp)
159}
160
161/**
162 * Replace local agent memory with the snapshot.

Callers 1

Calls 3

logForDebuggingFunction · 0.85
copySnapshotToLocalFunction · 0.85
saveSyncedMetaFunction · 0.85

Tested by

no test coverage detected