Trust undecided local projects automatically (#36935)

## What changed

- Replace the TUI directory-trust prompt with automatic trust for local projects whose trust level is unset. Keep explicit trust settings and remote workspaces unchanged.
- Persist trust for the resolved Git or configured project root, then reload configuration so project-local settings take effect.
- Fall back to an in-memory trust override and an embedded app server when the config update cannot be persisted.

## Testing

- Cover persisted and in-memory trust, custom project-root markers, and the working directories selected by resume and fork flows.

GitOrigin-RevId: 8fd51eb4cd88267073324bfd7dc4106a56d7c745
This commit is contained in:
Eric Traut authored and copyberry committed 2026-08-04 17:49:54 +00:00
1 parent 90314a9207
commit 1e59dc5bda
12 files changed
+388 -690

No files matched your search

+3
View File
@@ -293,6 +293,7 @@ pub async fn load_config_layers_state(
}
let mut startup_warnings = None;
let mut project_root = None;
if let Some(cwd) = cwd {
let mut merged_so_far = TomlValue::Table(toml::map::Map::new());
for layer in &layers {
@@ -350,6 +351,7 @@ pub async fn load_config_layers_state(
strict_config,
)
.await?;
project_root = Some(project_trust_context.project_root.clone());
layers.extend(project_layers.layers);
startup_warnings = Some(project_layers.startup_warnings);
}
@@ -432,6 +434,7 @@ pub async fn load_config_layers_state(
config_requirements_toml.clone().try_into()?,
config_requirements_toml.into_toml(),
)?
.with_project_root(project_root)
.with_user_and_project_exec_policy_rules_ignored(ignore_user_and_project_exec_policy_rules);
Ok(match startup_warnings {
Some(startup_warnings) => config_layer_stack.with_startup_warnings(startup_warnings),