fix(cli): support comma separated values for extensions and allowed mcp server names (#9007)

This commit is contained in:
anthony bushong
2025-09-20 12:49:50 -07:00
committed by GitHub
parent 62b49ab14a
commit a1dc7a8f55
2 changed files with 27 additions and 0 deletions

View File

@@ -229,6 +229,11 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
type: 'array',
string: true,
description: 'Allowed MCP server names',
coerce: (mcpServerNames: string[]) =>
// Handle comma-separated values
mcpServerNames.flatMap((mcpServerName) =>
mcpServerName.split(',').map((m) => m.trim()),
),
})
.option('allowed-tools', {
type: 'array',
@@ -244,6 +249,11 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
string: true,
description:
'A list of extensions to use. If not provided, all extensions are used.',
coerce: (extensions: string[]) =>
// Handle comma-separated values
extensions.flatMap((extension) =>
extension.split(',').map((e) => e.trim()),
),
})
.option('list-extensions', {
alias: 'l',