MCPcopy Create free account
hub / github.com/microsoft/AI-Engineering-Coach / findXcodeDbFiles

Function findXcodeDbFiles

src/core/parser-xcode.ts:46–59  ·  view source on GitHub ↗
(xcodeBase: string)

Source from the content-addressed store, hash-verified

44}
45
46function findXcodeDbFiles(xcodeBase: string): string[] {
47 const dbFiles: string[] = [];
48 try {
49 const machineIds = fs.readdirSync(xcodeBase, { withFileTypes: true })
50 .filter(e => e.isDirectory());
51 for (const mid of machineIds) {
52 const convDir = path.join(xcodeBase, mid.name, 'conversations');
53 collectDbFilesFromDir(convDir, dbFiles);
54 }
55 } catch (e) {
56 console.debug(`Cannot read Xcode dir ${xcodeBase}:`, e instanceof Error ? e.message : e);
57 }
58 return dbFiles;
59}
60
61/** Quote a string as a SQLite literal (doubling embedded quotes) so the
62 * conversation-ID allowlist checks are defence-in-depth rather than the

Callers 2

parseXcodeDatabasesFunction · 0.85
parseXcodeDatabasesAsyncFunction · 0.85

Calls 2

collectDbFilesFromDirFunction · 0.85
filterMethod · 0.80

Tested by

no test coverage detected