perf(agent): trim workspace access context without changing scope

This commit is contained in:
Xubin Ren committed 2026-10-11 17:06:39 +08:00
1 parent da02daaa1d
commit a27f294f52
4 files changed
+15 -15

No files matched your search

+4 -4
View File
@@ -190,15 +190,15 @@ class AgentRuntimeControl:
lines = [
f"Current project (JSON path): {root}",
(
"File access: limited to this project, plus tool-specific allowed paths."
"File access: project and tool-specific allowed paths only."
if status.restrict_to_workspace
else "File access: not restricted to this project."
else "File access: no workspace restriction."
),
"OS permissions and tool-specific rules still apply.",
"OS permissions and tool rules still apply.",
]
if self.__target.exec_config.sandbox:
lines.append(
"A shell sandbox is configured. Extra shell binds do not grant file-tool access."
"Shell sandbox configured; extra binds do not grant file-tool access."
)
return RuntimeContextBlock(source="workspace_access", content=wrap_runtime_context_lines(lines))