acp: Update to agent-client-protocol rust sdk v0.9.0 (#44373)

Release Notes:

- N/A
This commit is contained in:
Ben Brandt
2025-12-08 11:11:05 +00:00
committed by GitHub
parent 9364d39487
commit 03cf7ddb53
13 changed files with 81 additions and 90 deletions
+1 -5
View File
@@ -384,11 +384,7 @@ impl AgentTool for EditFileTool {
range.start.to_point(&buffer.snapshot()).row
}).ok();
if let Some(abs_path) = abs_path.clone() {
let mut location = ToolCallLocation::new(abs_path);
if let Some(line) = line {
location = location.line(line);
}
event_stream.update_fields(ToolCallUpdateFields::new().locations(vec![location]));
event_stream.update_fields(ToolCallUpdateFields::new().locations(vec![ToolCallLocation::new(abs_path).line(line)]));
}
emitted_location = true;
}
+1 -1
View File
@@ -138,7 +138,7 @@ impl AgentTool for FindPathTool {
)),
))
})
.collect(),
.collect::<Vec<_>>(),
),
);
+4 -5
View File
@@ -152,12 +152,11 @@ impl AgentTool for ReadFileTool {
}
let file_path = input.path.clone();
let mut location = acp::ToolCallLocation::new(&abs_path);
if let Some(line) = input.start_line {
location = location.line(line.saturating_sub(1));
}
event_stream.update_fields(ToolCallUpdateFields::new().locations(vec![location]));
event_stream.update_fields(ToolCallUpdateFields::new().locations(vec![
acp::ToolCallLocation::new(&abs_path)
.line(input.start_line.map(|line| line.saturating_sub(1))),
]));
if image_store::is_image_file(&self.project, &project_path, cx) {
return cx.spawn(async move |cx| {
+1 -1
View File
@@ -121,7 +121,7 @@ fn emit_update(response: &WebSearchResponse, event_stream: &ToolCallEventStream)
),
))
})
.collect(),
.collect::<Vec<_>>(),
),
);
}