MCPcopy Index your code
hub / github.com/TanStack/ai / checkpointVersions

Method checkpointVersions

packages/ai-sandbox-sprites/src/client.ts:370–379  ·  view source on GitHub ↗

Numeric ids of the Sprite's non-auto `vN` checkpoints.

(
    name: string,
    signal?: AbortSignal,
  )

Source from the content-addressed store, hash-verified

368
369 /** Numeric ids of the Sprite's non-auto `vN` checkpoints. */
370 private async checkpointVersions(
371 name: string,
372 signal?: AbortSignal,
373 ): Promise<Array<number>> {
374 return (await this.listCheckpoints(name, signal))
375 .filter((c) => !c.isAuto)
376 .map((c) => /^v(\d+)$/.exec(c.id))
377 .filter((m): m is RegExpExecArray => m !== null)
378 .map((m) => Number(m[1]))
379 }
380
381 /**
382 * Restore a checkpoint in place. The Sprite's writable overlay is replaced and

Callers 1

createCheckpointMethod · 0.95

Calls 2

listCheckpointsMethod · 0.95
execMethod · 0.65

Tested by

no test coverage detected