Fix agent reading and editing files over SSH (#30144)
Release Notes: - Fixed a bug that would prevent the agent from working over SSH. --------- Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Richard Feldman <oss@rtfeldman.com> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
parent
582ad845b9
commit
89430a019c
31 changed files with 321 additions and 1780 deletions
|
@ -1,7 +1,7 @@
|
|||
use crate::example::{Example, ExampleContext, ExampleMetadata, JudgeAssertion};
|
||||
use anyhow::Result;
|
||||
use assistant_settings::AgentProfileId;
|
||||
use assistant_tools::StreamingEditFileToolInput;
|
||||
use assistant_tools::EditFileToolInput;
|
||||
use async_trait::async_trait;
|
||||
|
||||
pub struct CommentTranslation;
|
||||
|
@ -34,8 +34,7 @@ impl Example for CommentTranslation {
|
|||
for message in thread.messages() {
|
||||
for tool_use in thread.tool_uses_for_message(message.id, cx) {
|
||||
if tool_use.name == "edit_file" {
|
||||
let input: StreamingEditFileToolInput =
|
||||
serde_json::from_value(tool_use.input)?;
|
||||
let input: EditFileToolInput = serde_json::from_value(tool_use.input)?;
|
||||
if input.create_or_overwrite {
|
||||
create_or_overwrite_count += 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue