mirror of
https://github.com/open-webui/computer.git
synced 2026-11-27 07:39:21 -05:00
refac
This commit is contained in:
1 parent
0734aba613
commit
054b528fad
2 files changed
+9
-7
No files matched your search
+4
-2
@@ -194,10 +194,12 @@ async def search_files(
|
||||
|
||||
# Try ripgrep first
|
||||
try:
|
||||
return await _search_rg(query, full, regex, case_insensitive, include, filenames_only)
|
||||
res = await _search_rg(query, full, regex, case_insensitive, include, filenames_only)
|
||||
except FileNotFoundError:
|
||||
# ripgrep not installed, fall back to Python
|
||||
return await _search_python(query, full, case_insensitive)
|
||||
res = await _search_python(query, full, case_insensitive)
|
||||
|
||||
return _truncate_output(res, max_chars=30_000)
|
||||
|
||||
|
||||
async def _search_rg(
|
||||
|
||||
Reference in new issue
Block a user