mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
chore: adapt command cwd layer to current APIs
This commit is contained in:
@@ -58,13 +58,8 @@ fn command_cwd_for_api_and_actions(cwd: &PathUri) -> (ApiPathString, AbsolutePat
|
||||
(api_cwd, host_cwd)
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::expect_used,
|
||||
reason = "guardian command paths are native to the app-server host"
|
||||
)]
|
||||
fn api_path_from_host(cwd: &AbsolutePathBuf) -> ApiPathString {
|
||||
ApiPathString::from_abs_path(cwd, PathConvention::native())
|
||||
.expect("guardian command cwd should render using the host path convention")
|
||||
ApiPathString::from_abs_path(cwd)
|
||||
}
|
||||
|
||||
pub fn build_file_change_approval_request_item(
|
||||
|
||||
@@ -1279,7 +1279,6 @@ mod tests {
|
||||
use codex_utils_absolute_path::test_support::PathBufExt;
|
||||
use codex_utils_absolute_path::test_support::test_path_buf;
|
||||
use codex_utils_path_uri::ApiPathString;
|
||||
use codex_utils_path_uri::PathConvention;
|
||||
use codex_utils_path_uri::PathUri;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::path::PathBuf;
|
||||
@@ -1287,8 +1286,7 @@ mod tests {
|
||||
use uuid::Uuid;
|
||||
|
||||
fn test_api_path(path: &str) -> ApiPathString {
|
||||
ApiPathString::from_abs_path(&test_path_buf(path).abs(), PathConvention::native())
|
||||
.expect("API path")
|
||||
ApiPathString::from_abs_path(&test_path_buf(path).abs())
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user