refactor: rename allowed_mcp_server_names to allowed-mcp-server-names (#3469)

This commit is contained in:
Tyler
2025-07-07 12:47:27 -07:00
committed by GitHub
parent 97a472f2fb
commit 6eccb474c7
3 changed files with 13 additions and 9 deletions

View File

@@ -48,7 +48,7 @@ interface CliArgs {
telemetryTarget: string | undefined;
telemetryOtlpEndpoint: string | undefined;
telemetryLogPrompts: boolean | undefined;
allowed_mcp_server_names: string | undefined;
'allowed-mcp-server-names': string | undefined;
}
async function parseArguments(): Promise<CliArgs> {
@@ -124,7 +124,7 @@ async function parseArguments(): Promise<CliArgs> {
description: 'Enables checkpointing of file edits',
default: false,
})
.option('allowed_mcp_server_names', {
.option('allowed-mcp-server-names', {
type: 'string',
description: 'Allowed MCP server names',
})
@@ -194,9 +194,9 @@ export async function loadCliConfig(
let mcpServers = mergeMcpServers(settings, extensions);
const excludeTools = mergeExcludeTools(settings, extensions);
if (argv.allowed_mcp_server_names) {
if (argv['allowed-mcp-server-names']) {
const allowedNames = new Set(
argv.allowed_mcp_server_names.split(',').filter(Boolean),
argv['allowed-mcp-server-names'].split(',').filter(Boolean),
);
if (allowedNames.size > 0) {
mcpServers = Object.fromEntries(