()
| 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected