mirror of
https://github.com/openai/codex.git
synced 2026-10-21 09:54:56 +00:00
app-server: keep permission profile roots symbolic
This commit is contained in:
@@ -6,7 +6,6 @@ use codex_protocol::protocol::AdditionalContextKind as CoreAdditionalContextKind
|
||||
use codex_protocol::protocol::MultiAgentVersion;
|
||||
use codex_protocol::protocol::SessionSource;
|
||||
use codex_protocol::protocol::SubAgentSource;
|
||||
use codex_utils_path_uri::PathUri;
|
||||
|
||||
use crate::image_url::REMOTE_IMAGE_URL_ERROR;
|
||||
use crate::image_url::is_remote_image_url;
|
||||
@@ -653,7 +652,6 @@ impl TurnRequestProcessor {
|
||||
|| collaboration_mode.is_some()
|
||||
|| personality.is_some();
|
||||
|
||||
let runtime_workspace_roots = runtime_workspace_roots_request;
|
||||
let approval_policy =
|
||||
approval_policy.map(codex_app_server_protocol::AskForApproval::to_core);
|
||||
let approvals_reviewer =
|
||||
@@ -666,29 +664,10 @@ impl TurnRequestProcessor {
|
||||
"{method} permission selection missing thread snapshot"
|
||||
)));
|
||||
};
|
||||
let workspace_roots = environments
|
||||
.as_ref()
|
||||
.map(|environments| {
|
||||
environments
|
||||
.environments
|
||||
.first()
|
||||
.map(|environment| {
|
||||
environment
|
||||
.workspace_roots
|
||||
.iter()
|
||||
.map(PathUri::to_abs_path)
|
||||
.collect::<std::io::Result<Vec<_>>>()
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.or_else(|| runtime_workspace_roots.clone())
|
||||
.unwrap_or_else(|| snapshot.workspace_roots.clone());
|
||||
let overrides = ConfigOverrides {
|
||||
cwd: environments
|
||||
.as_ref()
|
||||
.map(|environments| environments.legacy_fallback_cwd.to_path_buf()),
|
||||
workspace_roots: Some(workspace_roots),
|
||||
default_permissions: Some(permissions),
|
||||
codex_linux_sandbox_exe: self.arg0_paths.codex_linux_sandbox_exe.clone(),
|
||||
main_execve_wrapper_exe: self.arg0_paths.main_execve_wrapper_exe.clone(),
|
||||
|
||||
@@ -141,6 +141,7 @@ impl TestEnv {
|
||||
Some(_) => TurnEnvironmentSelection {
|
||||
environment_id: codex_exec_server::REMOTE_ENVIRONMENT_ID.to_string(),
|
||||
cwd: PathUri::from_abs_path(&cwd),
|
||||
workspace_roots: vec![PathUri::from_abs_path(&cwd)],
|
||||
},
|
||||
None => local(cwd.clone()),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user