mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Stacked on top of #57429. Adds a new `sandboxing` feature flag (off for staff by default) and a single source-of-truth helper `sandboxing_enabled(cx) = cfg!(target_os = "macos") && cx.has_flag::<SandboxingFeatureFlag>()`. When the helper returns true, the agent's system prompt gains a new `## Terminal sandbox` section that: - Lists each worktree's absolute path as a writable directory. - Describes the per-command `$TMPDIR` scratch directory. - States that outbound network access is blocked. - Documents the three per-command flags (`allow_network`, `allow_fs_write`, `unsandboxed`) the model can request to relax the sandbox. - Tells the model the section is stable for the duration of the conversation. When the flag is off, the section is omitted entirely — no mention of sandboxing at all. No behavior change to terminal execution yet; that's the next PR in the stack. Three new tests cover: section omitted when `sandboxing: false`, section rendered with all worktrees + flag docs when `sandboxing: true`, and the zero-worktrees case. Release Notes: - N/A --------- Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com> Co-authored-by: Martin Ye <martin@zed.dev> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||