refactor(tools): route file operations through scoped execution

This commit is contained in:
Xubin Ren committed 2026-11-14 22:09:21 +08:00
1 parent c539da9269
commit d2e03d23a0
16 files changed
+721 -513

No files matched your search

+1 -1
View File
@@ -356,7 +356,7 @@ def test_apply_patch_media_dir_is_read_only_by_default(tmp_path, monkeypatch):
media.mkdir()
target = media / "demo.md"
target.write_text("before\n", encoding="utf-8")
monkeypatch.setattr("nanobot.agent.tools.path_utils.get_media_dir", lambda: media)
monkeypatch.setattr("nanobot.config.loader._current_config_path", tmp_path / "config.json")
tool = ApplyPatchTool(workspace=workspace, allowed_dir=workspace)
result = asyncio.run(