refactor(tools): remove GlobTool

GlobTool is redundant — GrepTool already supports glob-based file
filtering via its `glob` parameter, making a standalone glob-only
tool unnecessary. Removing it simplifies the tool surface and reduces
LLM confusion between glob and grep.
This commit is contained in:
chengyongru
2026-05-15 17:19:00 +08:00
committed by Xubin Ren
parent 45d999ae70
commit fe90edd71f
8 changed files with 9 additions and 220 deletions
+2 -2
View File
@@ -190,7 +190,7 @@ async def test_run_populates_tools_used_across_iterations(tmp_path):
ctx1 = AgentHookContext(iteration=0, messages=messages)
ctx1.tool_calls = [
ToolCallRequest(id="c1", name="read_file", arguments={}),
ToolCallRequest(id="c2", name="glob", arguments={}),
ToolCallRequest(id="c2", name="grep", arguments={}),
]
for h in extras:
await h.after_iteration(ctx1)
@@ -204,7 +204,7 @@ async def test_run_populates_tools_used_across_iterations(tmp_path):
bot._loop.process_direct = fake_process_direct
result = await bot.run("do stuff")
assert result.content == "final"
assert result.tools_used == ["read_file", "glob", "web_fetch"]
assert result.tools_used == ["read_file", "grep", "web_fetch"]
@pytest.mark.asyncio