MCPcopy
hub / github.com/OpenCoworkAI/open-codesign / listSnapshots

Function listSnapshots

apps/desktop/src/main/snapshots-db.ts:397–401  ·  view source on GitHub ↗
(db: Database, designId: string)

Source from the content-addressed store, hash-verified

395}
396
397export function listSnapshots(db: Database, designId: string): DesignSnapshot[] {
398 return readStore(db)
399 .snapshots.filter((snapshot) => snapshot.designId === designId)
400 .sort((a, b) => b.createdAt.localeCompare(a.createdAt));
401}
402
403export function getSnapshot(db: Database, id: string): DesignSnapshot | null {
404 return readStore(db).snapshots.find((snapshot) => snapshot.id === id) ?? null;

Callers 3

registerSnapshotsIpcFunction · 0.90

Calls 1

readStoreFunction · 0.85

Tested by

no test coverage detected