From 12fa8bcae98a1ebd019462ae309a28278f4cd83d Mon Sep 17 00:00:00 2001 From: Fahri Gedik Date: Thu, 20 Nov 2025 16:22:17 +0300 Subject: [PATCH] Simplify tool string splitting in ai-config command Refactored the splitting of the 'tool' option to use a single regex for whitespace and commas, removing the need for an explicit trim(). This streamlines parsing and improves code clarity. --- .../packages/schematics/src/commands/ai-config/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/schematics/src/commands/ai-config/index.ts b/npm/ng-packs/packages/schematics/src/commands/ai-config/index.ts index 9f1606c885..1256927a86 100644 --- a/npm/ng-packs/packages/schematics/src/commands/ai-config/index.ts +++ b/npm/ng-packs/packages/schematics/src/commands/ai-config/index.ts @@ -17,8 +17,7 @@ export default function (options: AiConfigSchema): Rule { } const tools = options.tool - .split(/[,\s]+/) - .map(t => t.trim()) + .split(/[\s,]+/) .filter(t => t) as AiTool[]; const validTools: AiTool[] = ['claude', 'copilot', 'cursor', 'gemini', 'junie', 'windsurf'];