MCPcopy Create free account
hub / github.com/MigoXLab/coderio / initializeSqliteSaver

Function initializeSqliteSaver

src/utils/checkpoint.ts:60–70  ·  view source on GitHub ↗
(dbPath: string)

Source from the content-addressed store, hash-verified

58 * Initialize SqliteSaver with the database path
59 */
60export function initializeSqliteSaver(dbPath: string): SqliteSaver {
61 // Ensure the directory exists
62 const dbDir = path.dirname(dbPath);
63 if (!fs.existsSync(dbDir)) {
64 fs.mkdirSync(dbDir, { recursive: true });
65 }
66
67 // SqliteSaver.fromConnString already sets up the database
68 const checkpointer = SqliteSaver.fromConnString(dbPath);
69 return checkpointer;
70}

Callers 2

design2codeFunction · 0.90
checkpoint.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected