codex: fix apply_patch CI compile failures

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-05-07 18:57:05 -07:00
parent 9ca0eadc11
commit 709bab3975
2 changed files with 14 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ use crate::exec_approval::handle_exec_approval_request;
use crate::outgoing_message::OutgoingMessageSender;
use crate::outgoing_message::OutgoingNotificationMeta;
use crate::patch_approval::handle_patch_approval_request;
use codex_config::AbsolutePathBuf;
use codex_core::CodexThread;
use codex_core::NewThread;
use codex_core::ThreadManager;
@@ -291,7 +292,7 @@ async fn run_codex_tool_session_inner(
reason,
grant_root,
environment_id,
cwd.map(codex_utils_absolute_path::AbsolutePathBuf::into_path_buf),
cwd.map(AbsolutePathBuf::into_path_buf),
changes,
outgoing.clone(),
thread.clone(),

View File

@@ -244,8 +244,15 @@ impl App {
additional_permissions,
}))
}
ServerRequest::FileChangeRequestApproval { params, .. } => Some(
ThreadInteractiveRequest::Approval(ApprovalRequest::ApplyPatch {
ServerRequest::FileChangeRequestApproval { params, .. } => {
let cwd = match params.cwd.clone() {
Some(cwd) => cwd,
None => self
.thread_cwd(thread_id)
.await
.unwrap_or_else(|| self.config.cwd.clone()),
};
Some(ThreadInteractiveRequest::Approval(ApprovalRequest::ApplyPatch {
thread_id,
thread_label,
id: params.item_id.clone(),
@@ -254,18 +261,14 @@ impl App {
.clone()
.filter(|id| id != codex_exec_server::LOCAL_ENVIRONMENT_ID),
reason: params.reason.clone(),
cwd: params.cwd.clone().unwrap_or_else(|| {
self.thread_cwd(thread_id)
.await
.unwrap_or_else(|| self.config.cwd.clone())
}),
cwd,
changes: self
.thread_file_change_changes(thread_id, &params.turn_id, &params.item_id)
.await
.map(crate::app_server_approval_conversions::file_update_changes_to_display)
.unwrap_or_default(),
}),
),
}))
}
ServerRequest::McpServerElicitationRequest { request_id, params } => {
if let Some(params) = AppLinkViewParams::from_url_app_server_request(
thread_id,