chore: adapt command cwd layer to current APIs

This commit is contained in:
Adam Perry
2026-06-16 17:45:42 +00:00
parent 4a4c8fad12
commit 7da4e6a9ae
11 changed files with 22 additions and 46 deletions
@@ -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]