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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user