feat(tools): use installed ripgrep for native file search (#5948)

* feat(tools): expose installed ripgrep through exec

* refactor(tools): launch ripgrep with native argument vectors

* refactor(tools): reuse the fresh exec parameter schema

* fix(tools): select search backend in loader and display rg arguments

* fix(ui): simplify rg previews and localize search completion

* docs: simplify ripgrep configuration note

* docs: keep ripgrep note on one line
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-28 13:44:51 +08:00
1 parent b8893aba56
commit e0b8efa0be
33 files changed
+514 -204

No files matched your search

+3 -1
View File
@@ -1,6 +1,7 @@
"""Tests for tool plugin architecture: ToolLoader, ToolContext, metadata."""
from __future__ import annotations
import shutil
from dataclasses import fields
from pathlib import Path
from typing import Any
@@ -445,10 +446,11 @@ def test_loader_registers_same_tools_as_old_hardcoded():
expected = {
"read_file", "write_file", "edit_file", "list_dir",
"find_files", "grep", "exec", "exec_session", "list_exec_sessions",
"exec", "exec_session", "list_exec_sessions",
"web_search", "web_fetch",
"message", "spawn", "cron",
"my",
}
actual = set(registered)
expected.update({"rg"} if shutil.which("rg") else {"find_files", "grep"})
assert expected <= actual, f"Missing tools: {expected - actual}"