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

Function initInMemoryDb

apps/desktop/src/main/snapshots-db.ts:88–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88export function initInMemoryDb(): Database {
89 return {
90 kind: 'json-design-store',
91 dataDir: ':memory:',
92 storePath: ':memory:',
93 sessionDir: ':memory:/sessions',
94 memoryData: emptyStore(),
95 close: () => {},
96 };
97}
98
99function readStore(db: Database): StoreData {
100 if (db.memoryData !== undefined) return cloneStore(db.memoryData);

Calls 1

emptyStoreFunction · 0.85

Tested by 2

recordAndReportFunction · 0.72
initTestDbFunction · 0.72