MCPcopy Create free account
hub / github.com/cortexkit/magic-context / writeDb

Function writeDb

packages/e2e-tests/tests/long-running-session.test.ts:200–207  ·  view source on GitHub ↗
(fn: (db: Database) => void)

Source from the content-addressed store, hash-verified

198}
199
200function writeDb(fn: (db: Database) => void): void {
201 const db = openTestDb(contextDbPath(), { readwrite: true });
202 try {
203 fn(db);
204 } finally {
205 db.close();
206 }
207}
208
209function seedMemory(content: string): void {
210 const projectIdentity = resolveProjectIdentity(realpathSync(pathResolve(h.opencode.env.workdir)));

Callers 1

seedMemoryFunction · 0.70

Calls 3

openTestDbFunction · 0.90
contextDbPathFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected