fix: Improve search result processing and error handling

- Refactor core plugin and Omnisearch result processing to use a shared helper function findLineDetails.
- Update error handling in core plugin and Omnisearch search functions to return a "No results found" string instead of throwing an error when no results are found.
This commit is contained in:
travertexg
2025-06-09 16:46:38 +00:00
parent 9984527e85
commit c2dfb48e22
7 changed files with 90 additions and 85 deletions

View File

@@ -96,7 +96,7 @@ export async function regexSearchFilesWithRipgrep(
output = await execRipgrep(rgPath, args)
} catch (error) {
console.error("Error executing ripgrep:", error)
return "No results found"
return "No results found."
}
const results: SearchResult[] = []
let currentResult: Partial<SearchResult> | null = null