mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
chore: adapt command cwd layer to current APIs
This commit is contained in:
@@ -77,6 +77,7 @@ use codex_protocol::models::ImageDetail;
|
||||
use codex_protocol::openai_models::ReasoningEffort;
|
||||
use codex_protocol::user_input::MAX_USER_INPUT_TEXT_CHARS;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use codex_utils_path_uri::ApiPathString;
|
||||
use core_test_support::responses;
|
||||
use core_test_support::skip_if_no_network;
|
||||
use pretty_assertions::assert_eq;
|
||||
@@ -2440,10 +2441,7 @@ async fn turn_start_updates_sandbox_and_cwd_between_turns_v2() -> Result<()> {
|
||||
unreachable!("loop ensures we break on command execution items");
|
||||
};
|
||||
let second_cwd = codex_utils_absolute_path::AbsolutePathBuf::from_absolute_path(second_cwd)?;
|
||||
assert_eq!(
|
||||
cwd,
|
||||
ApiPathString::from_abs_path(&second_cwd, PathConvention::native())?
|
||||
);
|
||||
assert_eq!(cwd, ApiPathString::from_abs_path(&second_cwd));
|
||||
let expected_command = format_with_current_shell_display("echo second turn");
|
||||
assert_eq!(command, expected_command);
|
||||
assert_eq!(status, CommandExecutionStatus::InProgress);
|
||||
|
||||
@@ -34,7 +34,6 @@ use codex_features::FEATURES;
|
||||
use codex_features::Feature;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use codex_utils_path_uri::ApiPathString;
|
||||
use codex_utils_path_uri::PathConvention;
|
||||
use core_test_support::responses;
|
||||
use core_test_support::skip_if_no_network;
|
||||
use pretty_assertions::assert_eq;
|
||||
@@ -171,10 +170,7 @@ async fn turn_start_shell_zsh_fork_executes_command_v2() -> Result<()> {
|
||||
assert!(command.contains("sleep 0.01"));
|
||||
assert!(command.contains(&release_marker.display().to_string()));
|
||||
let workspace = AbsolutePathBuf::try_from(workspace)?;
|
||||
assert_eq!(
|
||||
cwd,
|
||||
ApiPathString::from_abs_path(&workspace, PathConvention::native())?
|
||||
);
|
||||
assert_eq!(cwd, ApiPathString::from_abs_path(&workspace));
|
||||
|
||||
mcp.interrupt_turn_and_wait_for_aborted(thread.id, turn.id, DEFAULT_READ_TIMEOUT)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user