(options: UninstallOptions, scope: Scope)
| 146 | } |
| 147 | |
| 148 | async function resolveAgents(options: UninstallOptions, scope: Scope): Promise<SetupAgent[]> { |
| 149 | const explicit = getSelectedAgents(options); |
| 150 | if (explicit.length > 0) return explicit; |
| 151 | |
| 152 | const detected = await detectConfiguredAgents(scope); |
| 153 | if (detected.length > 0 && options.yes) return detected; |
| 154 | |
| 155 | if (detected.length === 0) { |
| 156 | log.warn( |
| 157 | "No Context7 setup detected. Pass --claude, --cursor, --opencode, --codex, --antigravity, or --gemini." |
| 158 | ); |
| 159 | return []; |
| 160 | } |
| 161 | |
| 162 | log.blank(); |
| 163 | const selected = await promptAgents(detected); |
| 164 | if (!selected) { |
| 165 | log.warn("Remove cancelled"); |
| 166 | return []; |
| 167 | } |
| 168 | |
| 169 | return selected; |
| 170 | } |
| 171 | |
| 172 | function resolveFlagModes(options: UninstallOptions): UninstallMode[] { |
| 173 | if (options.all) return ["mcp", "cli"]; |
no test coverage detected