MCPcopy Create free account
hub / github.com/Surfer-Org/Protocol / runChromaCommand

Method runChromaCommand

desktop/src/main/helpers/python.ts:582–602  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

580 });
581 }
582 async runChromaCommand() {
583 const userDataPath = app.getPath('userData');
584 const vectorDBsPath = path.join(userDataPath, 'vectorDBs');
585
586 if (!fs.existsSync(vectorDBsPath)) {
587 fs.mkdirSync(vectorDBsPath);
588 console.log('Created vectorDBs directory:', vectorDBsPath);
589 }
590
591 const chromaPath = this.SurferPythonPath.replace(/python3\.11$/, 'chroma');
592 const chromaCommand = `"${chromaPath}" run --path "${vectorDBsPath}" --port 60432`;
593 console.log('Running chroma command:', chromaCommand);
594
595 try {
596 const { stdout, stderr } = await execAsync(chromaCommand);
597 console.log('stdout:', stdout);
598 console.log('stderr:', stderr);
599 } catch (error) {
600 console.error('Error running chroma command:', error);
601 }
602 }
603}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected