From ea360590af2e8e33393a4f7da883e8152de28d99 Mon Sep 17 00:00:00 2001 From: Daniel Riccio Date: Thu, 24 Jul 2025 12:57:51 -0500 Subject: [PATCH] fix: improve error handling in extractPatternsFromCommand function --- webview-ui/src/utils/command-parser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webview-ui/src/utils/command-parser.ts b/webview-ui/src/utils/command-parser.ts index 14a83313ba..14a4480ae7 100644 --- a/webview-ui/src/utils/command-parser.ts +++ b/webview-ui/src/utils/command-parser.ts @@ -31,7 +31,8 @@ export function extractPatternsFromCommand(command: string): string[] { if (currentTokens.length > 0) { extractFromTokens(currentTokens, patterns) } - } catch (_error) { + } catch (error) { + console.warn("Failed to parse command:", error) // Fallback: just extract the first word const firstWord = command.trim().split(/\s+/)[0] if (firstWord) patterns.add(firstWord)