mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: improve error handling in extractPatternsFromCommand function
This commit is contained in:
parent
d819ae57b7
commit
ea360590af
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue