(loc: Location)
| 126 | } |
| 127 | |
| 128 | uninstall(loc: Location): WriteResult { |
| 129 | const files: WriteResult['files'] = []; |
| 130 | |
| 131 | const mcpPath = mcpJsonPath(loc); |
| 132 | const config = readJsonFile(mcpPath); |
| 133 | if (config.mcpServers?.codegraph) { |
| 134 | delete config.mcpServers.codegraph; |
| 135 | if (Object.keys(config.mcpServers).length === 0) { |
| 136 | delete config.mcpServers; |
| 137 | } |
| 138 | writeJsonFile(mcpPath, config); |
| 139 | files.push({ path: mcpPath, action: 'removed' }); |
| 140 | } else { |
| 141 | files.push({ path: mcpPath, action: 'not-found' }); |
| 142 | } |
| 143 | |
| 144 | if (loc === 'local') { |
| 145 | files.push(removeRulesEntry()); |
| 146 | } |
| 147 | |
| 148 | return { files }; |
| 149 | } |
| 150 | |
| 151 | printConfig(loc: Location): string { |
| 152 | const target = mcpJsonPath(loc); |
nothing calls this directly
no test coverage detected