(file: string)
| 285 | } |
| 286 | |
| 287 | function removeCodegraphFromFile(file: string): WriteResult['files'][number] { |
| 288 | if (!fs.existsSync(file)) return { path: file, action: 'not-found' }; |
| 289 | const config = readJsonFile(file); |
| 290 | if (!config.mcpServers?.codegraph) return { path: file, action: 'not-found' }; |
| 291 | delete config.mcpServers.codegraph; |
| 292 | if (Object.keys(config.mcpServers).length === 0) { |
| 293 | delete config.mcpServers; |
| 294 | } |
| 295 | // Leave a now-empty `{}` in place — Antigravity manages this file and |
| 296 | // a stray empty file is less surprising than a deletion. |
| 297 | writeJsonFile(file, config); |
| 298 | return { path: file, action: 'removed' }; |
| 299 | } |
| 300 | |
| 301 | export const antigravityTarget: AgentTarget = new AntigravityTarget(); |
no test coverage detected