(options: UninstallOptions)
| 503 | } |
| 504 | |
| 505 | async function removeCommand(options: UninstallOptions): Promise<void> { |
| 506 | trackEvent("command", { name: "remove" }); |
| 507 | |
| 508 | const scope: Scope = options.project ? "project" : "global"; |
| 509 | const agents = await resolveAgents(options, scope); |
| 510 | if (agents.length === 0) return; |
| 511 | const modes = await resolveModes(options, agents, scope); |
| 512 | if (modes.length === 0) return; |
| 513 | |
| 514 | log.blank(); |
| 515 | const spinner = ora("Removing Context7 setup...").start(); |
| 516 | |
| 517 | const results: AgentCleanupResult[] = []; |
| 518 | for (const agentName of agents) { |
| 519 | spinner.text = `Cleaning up ${getAgent(agentName).displayName}...`; |
| 520 | results.push(await uninstallAgent(agentName, scope, modes)); |
| 521 | } |
| 522 | |
| 523 | spinner.succeed("Context7 cleanup complete"); |
| 524 | printResults(results, modes); |
| 525 | |
| 526 | trackEvent("remove", { agents, scope, modes }); |
| 527 | } |
no test coverage detected