(content: string)
| 332 | } |
| 333 | |
| 334 | function removeCodeGraphToolset(content: string): string { |
| 335 | const lines = splitLines(content); |
| 336 | const parent = topLevelRange(lines, 'platform_toolsets'); |
| 337 | const cli = parent ? listChildBlock(lines, parent, 'cli') : null; |
| 338 | if (!cli) return content; |
| 339 | |
| 340 | const hasEntry = lines |
| 341 | .slice(cli.start + 1, cli.end) |
| 342 | .some((line) => line.trim() === '- mcp-codegraph'); |
| 343 | if (!hasEntry) return content; |
| 344 | |
| 345 | const next = lines.filter((line, idx) => { |
| 346 | if (idx <= cli.start || idx >= cli.end) return true; |
| 347 | return line.trim() !== '- mcp-codegraph'; |
| 348 | }); |
| 349 | return joinLines(next); |
| 350 | } |
| 351 | |
| 352 | function arrayEqual(a: string[], b: string[]): boolean { |
| 353 | return a.length === b.length && a.every((value, idx) => value === b[idx]); |
no test coverage detected