mirror of
https://github.com/openai/codex.git
synced 2026-04-26 23:55:25 +00:00
Spread AbsolutePathBuf (#17792)
Mechanical change to promote absolute paths through code.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use codex_app_server_protocol::CollabAgentState as ApiCollabAgentState;
|
||||
use codex_app_server_protocol::CollabAgentStatus as ApiCollabAgentStatus;
|
||||
use codex_app_server_protocol::CollabAgentTool;
|
||||
@@ -34,6 +32,8 @@ use codex_protocol::models::WebSearchAction;
|
||||
use codex_protocol::protocol::AskForApproval;
|
||||
use codex_protocol::protocol::SandboxPolicy;
|
||||
use codex_protocol::protocol::SessionConfiguredEvent;
|
||||
use codex_utils_absolute_path::test_support::PathBufExt;
|
||||
use codex_utils_absolute_path::test_support::test_path_buf;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -115,7 +115,7 @@ fn session_configured_produces_thread_started_event() {
|
||||
approval_policy: AskForApproval::Never,
|
||||
approvals_reviewer: codex_protocol::config_types::ApprovalsReviewer::User,
|
||||
sandbox_policy: SandboxPolicy::new_read_only_policy(),
|
||||
cwd: PathBuf::from("/tmp/project"),
|
||||
cwd: test_path_buf("/tmp/project").abs(),
|
||||
reasoning_effort: None,
|
||||
history_log_id: 0,
|
||||
history_entry_count: 0,
|
||||
@@ -165,7 +165,7 @@ fn command_execution_started_and_completed_translate_to_thread_events() {
|
||||
let command_item = ThreadItem::CommandExecution {
|
||||
id: "cmd-1".to_string(),
|
||||
command: "ls".to_string(),
|
||||
cwd: PathBuf::from("/tmp/project"),
|
||||
cwd: test_path_buf("/tmp/project").abs(),
|
||||
process_id: Some("123".to_string()),
|
||||
source: CommandExecutionSource::UserShell,
|
||||
status: ApiCommandExecutionStatus::InProgress,
|
||||
@@ -204,7 +204,7 @@ fn command_execution_started_and_completed_translate_to_thread_events() {
|
||||
item: ThreadItem::CommandExecution {
|
||||
id: "cmd-1".to_string(),
|
||||
command: "ls".to_string(),
|
||||
cwd: PathBuf::from("/tmp/project"),
|
||||
cwd: test_path_buf("/tmp/project").abs(),
|
||||
process_id: Some("123".to_string()),
|
||||
source: CommandExecutionSource::UserShell,
|
||||
status: ApiCommandExecutionStatus::Completed,
|
||||
@@ -1278,7 +1278,7 @@ fn turn_completion_reconciles_started_items_from_turn_items() {
|
||||
item: ThreadItem::CommandExecution {
|
||||
id: "cmd-1".to_string(),
|
||||
command: "ls".to_string(),
|
||||
cwd: PathBuf::from("/tmp/project"),
|
||||
cwd: test_path_buf("/tmp/project").abs(),
|
||||
process_id: Some("123".to_string()),
|
||||
source: CommandExecutionSource::UserShell,
|
||||
status: ApiCommandExecutionStatus::InProgress,
|
||||
@@ -1316,7 +1316,7 @@ fn turn_completion_reconciles_started_items_from_turn_items() {
|
||||
items: vec![ThreadItem::CommandExecution {
|
||||
id: "cmd-1".to_string(),
|
||||
command: "ls".to_string(),
|
||||
cwd: PathBuf::from("/tmp/project"),
|
||||
cwd: test_path_buf("/tmp/project").abs(),
|
||||
process_id: Some("123".to_string()),
|
||||
source: CommandExecutionSource::UserShell,
|
||||
status: ApiCommandExecutionStatus::Completed,
|
||||
|
||||
Reference in New Issue
Block a user