mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
apply-patch: carry paths as PathUri (#28854)
## Why Allows the model to edit files that are hosted on a different OS than where app-server is running. ## What * Use `PathUri` for apply_patch-internal data structures * Limit `PathUri` -> `AbsolutePathBuf` conversion to cases where the inferred path convention matches the host OS, allows requiring valid paths to pass to perms check * Adds `PathConvention::path_segments()` for iterating over path segments regardless of OS * Handle cross-platform relative paths in path filename parsing for sniffing a shell * Ensure we can apply patches in the wine e2e test
This commit is contained in:
committed by
GitHub
Unverified
parent
a52a3b5197
commit
0f89dd768c
@@ -65,6 +65,8 @@ pub fn run_main() -> i32 {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
// TODO(anp): Discover the standalone executable cwd as PathUri directly.
|
||||
let cwd = codex_utils_path_uri::PathUri::from_abs_path(&cwd);
|
||||
match runtime.block_on(crate::apply_patch(
|
||||
&patch_arg,
|
||||
&cwd,
|
||||
|
||||
Reference in New Issue
Block a user