Skip to content

Commit 2250430

Browse files
committed
refactor(mcp): drop explanatory comments added in the uninstall picker
1 parent e1fcabb commit 2250430

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

packages/cli-core/src/commands/mcp/uninstall.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ mock.module("../../mode.ts", () => ({
1717
let mockHome = realOs.tmpdir();
1818
mock.module("node:os", () => ({ ...realOs, homedir: () => mockHome }));
1919

20-
// The human picker resolves the Clack multiselect lazily from lib/prompts.ts;
21-
// stub it so tests drive which clients get selected without a real prompt.
2220
const mockMultiselect = mock();
2321
mock.module("../../lib/prompts.ts", () => ({
2422
multiselect: (...args: unknown[]) => mockMultiselect(...args),

packages/cli-core/src/commands/mcp/uninstall.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,13 @@ function printResult(client: McpClient, result: RemoveResult): void {
2323
log.info(`${label}: ${result.removed ? green("removed") : yellow("not present")}`);
2424
}
2525

26-
/** Supported clients that currently have the `name` entry registered. */
2726
async function installedClients(name: string, cwd: string): Promise<McpClient[]> {
2827
const present = await Promise.all(
2928
CLIENTS.map(async (client) => (await client.list(cwd)).some((entry) => entry.name === name)),
3029
);
3130
return CLIENTS.filter((_, i) => present[i]);
3231
}
3332

34-
// `--client` targets exactly those; `--all` (and agent mode, which can't
35-
// prompt) targets every client; otherwise the human picks which of the clients
36-
// that actually have the entry to remove it from.
3733
async function chooseClients(options: McpOptions, name: string, cwd: string): Promise<McpClient[]> {
3834
if (options.client && options.client.length > 0) return resolveClients(options.client);
3935
if (options.all || isAgent()) return Array.from(CLIENTS);

0 commit comments

Comments
 (0)