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

Function createPathProvider

packages/node-runtime/src/database-manager.test.ts:19–32  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

17}
18
19function createPathProvider(root: string): PathProvider {
20 return {
21 getSystemDir: () => root,
22 getUserDataDir: () => path.join(root, 'data'),
23 getDatabaseDir: () => path.join(root, 'data', 'databases'),
24 getVectorDir: () => path.join(root, 'data', 'vector'),
25 getAiDataDir: () => path.join(root, 'ai'),
26 getSettingsDir: () => path.join(root, 'settings'),
27 getCacheDir: () => path.join(root, 'cache'),
28 getTempDir: () => path.join(root, 'temp'),
29 getLogsDir: () => path.join(root, 'logs'),
30 getDownloadsDir: () => path.join(root, 'downloads'),
31 }
32}
33
34function getIndexNames(db: Database.Database): string[] {
35 const rows = db.prepare("SELECT name FROM sqlite_master WHERE type = 'index' ORDER BY name").all() as Array<{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected