diff --git a/codex-rs/mcp-server/src/mock_data.rs b/codex-rs/mcp-server/src/mock_data.rs index bc7a877b8d..392de2e0b2 100644 --- a/codex-rs/mcp-server/src/mock_data.rs +++ b/codex-rs/mcp-server/src/mock_data.rs @@ -109,7 +109,7 @@ fn review_findings_from_unified_diff(cwd: &Path, diff: &str) -> Vec { body, confidence_score: confidence_for_index(template_index), code_location: CodeLocation { - absolute_file_path: path.display().to_string(), + absolute_file_path: to_forward_slashes(path), line_range: LineRange { start: new_line, end: new_line, @@ -151,6 +151,10 @@ fn parse_start_count(text: &str) -> (u32, u32) { } } +fn to_forward_slashes(path: &Path) -> String { + path.to_string_lossy().replace('\\', "/") +} + #[cfg(test)] mod tests { use super::*;