add a slash command to grant sandbox read access to inaccessible directories (#11512)

There is an edge case where a directory is not readable by the sandbox.
In practice, we've seen very little of it, but it can happen so this
slash command unlocks users when it does.

Future idea is to make this a tool that the agent knows about so it can
be more integrated.
This commit is contained in:
iceweasel-oai
2026-02-12 12:48:36 -08:00
committed by GitHub
parent 466be55abc
commit 5c3ca73914
9 changed files with 274 additions and 4 deletions

View File

@@ -218,6 +218,19 @@ pub(crate) enum AppEvent {
preset: ApprovalPreset,
},
/// Begin a non-elevated grant of read access for an additional directory.
#[cfg_attr(not(target_os = "windows"), allow(dead_code))]
BeginWindowsSandboxGrantReadRoot {
path: String,
},
/// Result of attempting to grant read access for an additional directory.
#[cfg_attr(not(target_os = "windows"), allow(dead_code))]
WindowsSandboxGrantReadRootCompleted {
path: PathBuf,
error: Option<String>,
},
/// Enable the Windows sandbox feature and switch to Agent mode.
#[cfg_attr(not(target_os = "windows"), allow(dead_code))]
EnableWindowsSandboxForAgentMode {