(file: string)
| 63 | * runs this for every agent on every install (#1870). |
| 64 | */ |
| 65 | export function hasCodegraphServer(file: string): boolean { |
| 66 | try { |
| 67 | return !!parseConfig(fs.readFileSync(file, 'utf-8')).config.mcpServers?.codegraph; |
| 68 | } catch { |
| 69 | return false; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Add CodeGraph's server to `file`, or the keys of `entry` an existing one is |