Fix build. #10

Merged
drew merged 1 commit from fix into main 2026-03-14 20:40:38 +00:00
Showing only changes of commit 0d5aa42467 - Show all commits

View file

@ -307,13 +307,13 @@ impl<P: ModelProvider> Orchestrator<P> {
/// ///
/// Matches on known tool names to extract structured fields; falls back to /// Matches on known tool names to extract structured fields; falls back to
/// `Generic` with a JSON summary for anything else. /// `Generic` with a JSON summary for anything else.
fn build_tool_display(&self, tool_name: &str, input: &serde_json::Value) -> ToolDisplay { async fn build_tool_display(&self, tool_name: &str, input: &serde_json::Value) -> ToolDisplay {
match tool_name { match tool_name {
"write_file" => { "write_file" => {
let path = input["path"].as_str().unwrap_or("<unknown>").to_string(); let path = input["path"].as_str().unwrap_or("<unknown>").to_string();
let new_content = input["content"].as_str().unwrap_or("").to_string(); let new_content = input["content"].as_str().unwrap_or("").to_string();
// Try to read existing content for diffing. // Try to read existing content for diffing.
let old_content = self.sandbox.read_file(&path).ok(); let old_content = self.sandbox.read_file(&path).await.ok();
ToolDisplay::WriteFile { ToolDisplay::WriteFile {
path, path,
old_content, old_content,
@ -405,7 +405,7 @@ impl<P: ModelProvider> Orchestrator<P> {
} }
}; };
let display = self.build_tool_display(tool_name, input); let display = self.build_tool_display(tool_name, input).await;
// Check approval. // Check approval.
let approved = match risk { let approved = match risk {