MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / writeIncompatibleMeta

Function writeIncompatibleMeta

apps/cli/src/runtime-compat-startup.test.ts:14–28  ·  view source on GitHub ↗
(userDataDir: string)

Source from the content-addressed store, hash-verified

12}
13
14function writeIncompatibleMeta(userDataDir: string): void {
15 fs.mkdirSync(userDataDir, { recursive: true })
16 fs.writeFileSync(
17 path.join(userDataDir, '.chatlab-meta.json'),
18 JSON.stringify({
19 formatVersion: 1,
20 minRuntimeVersion: '999.0.0',
21 dataCompatibilityVersion: 1,
22 reasons: ['segment-schema'],
23 updatedBy: { runtime: 'desktop', module: 'chat-db-migration', version: '999.0.0' },
24 updatedAt: 1780830000,
25 }),
26 'utf-8'
27 )
28}
29
30async function withDataDirEnv<T>(userDataDir: string, fn: () => Promise<T> | T): Promise<T> {
31 const previousDataDir = process.env.CHATLAB_DATA_DIR

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected