windows: Fix inconsistent separators in buffer headers and breadcrumbs (#38898)
Make `resolve_full_path` use the appropriate separators, and return a `String`. As part of fixing the fallout from that type change, this also fixes a bunch of places in the agent code that were using `std::path::Path` operations on paths that could be non-local, by changing them to operate instead on strings and use the project's `PathStyle`. This clears the way a bit for making `full_path` also return a string instead of a `PathBuf`, but I've left that for a follow-up. Release Notes: - N/A
This commit is contained in:
@@ -261,9 +261,8 @@ impl Tool for ReadFileTool {
|
||||
Ok(result)
|
||||
} else {
|
||||
// No line ranges specified, so check file size to see if it's too big.
|
||||
let path_buf = std::path::PathBuf::from(&file_path);
|
||||
let buffer_content =
|
||||
outline::get_buffer_content_or_outline(buffer.clone(), Some(&path_buf), cx)
|
||||
outline::get_buffer_content_or_outline(buffer.clone(), Some(&file_path), cx)
|
||||
.await?;
|
||||
|
||||
action_log.update(cx, |log, cx| {
|
||||
|
||||
Reference in New Issue
Block a user