Skip to content

Commit ea36059

Browse files
committed
fix: improve error handling in extractPatternsFromCommand function
1 parent d819ae5 commit ea36059

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webview-ui/src/utils/command-parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export function extractPatternsFromCommand(command: string): string[] {
3131
if (currentTokens.length > 0) {
3232
extractFromTokens(currentTokens, patterns)
3333
}
34-
} catch (_error) {
34+
} catch (error) {
35+
console.warn("Failed to parse command:", error)
3536
// Fallback: just extract the first word
3637
const firstWord = command.trim().split(/\s+/)[0]
3738
if (firstWord) patterns.add(firstWord)

0 commit comments

Comments
 (0)