chore: bump acp-client to 6cb674a (raw_input support) (#122)

Bump the acp-client crate from block/builderbot to pick up the
raw_input forwarding change (builderbot#495). This updates the
MessageWriter trait to accept optional raw_input parameters on
record_tool_call and update_tool_call_title.

Changes:
- src-tauri/Cargo.toml: update acp-client rev to 6cb674a7
- src-tauri/Cargo.lock: updated lockfile
- writer.rs: adapt TauriMessageWriter to new trait signatures
  (raw_input ignored for now — no frontend consumer yet)
- dispatcher.rs: forward raw_input from ACP notifications to the
  writer, and guard update_tool_call_title on title OR raw_input
  being present
This commit is contained in:
Matt Toohey
2026-04-08 15:51:29 +10:00
committed by GitHub
parent 3fd6c9b01c
commit 6474330faa
4 changed files with 44 additions and 24 deletions
+9 -9
View File
@@ -5,7 +5,7 @@ version = 4
[[package]]
name = "acp-client"
version = "0.1.0"
source = "git+https://github.com/block/builderbot?rev=dbd5bc9c0cd559c7a67ab2d56545dba110f4a4cb#dbd5bc9c0cd559c7a67ab2d56545dba110f4a4cb"
source = "git+https://github.com/block/builderbot?rev=6cb674a704f3a9e402a76e9aeed734144d6cec11#6cb674a704f3a9e402a76e9aeed734144d6cec11"
dependencies = [
"agent-client-protocol",
"anyhow",
@@ -383,7 +383,7 @@ dependencies = [
[[package]]
name = "blox-cli"
version = "0.1.0"
source = "git+https://github.com/block/builderbot?rev=dbd5bc9c0cd559c7a67ab2d56545dba110f4a4cb#dbd5bc9c0cd559c7a67ab2d56545dba110f4a4cb"
source = "git+https://github.com/block/builderbot?rev=6cb674a704f3a9e402a76e9aeed734144d6cec11#6cb674a704f3a9e402a76e9aeed734144d6cec11"
dependencies = [
"log",
"serde",
@@ -919,7 +919,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -1109,7 +1109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -3426,7 +3426,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -3834,7 +3834,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -4435,7 +4435,7 @@ dependencies = [
"getrandom 0.4.2",
"once_cell",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -4871,7 +4871,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
dependencies = [
"memoffset",
"tempfile",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -5316,7 +5316,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
+1 -1
View File
@@ -36,7 +36,7 @@ tokio-util = { version = "0.7", features = ["compat", "rt"] }
async-trait = "0.1"
agent-client-protocol = "0.10.4"
tokio-tungstenite = "0.21.0"
acp-client = { git = "https://github.com/block/builderbot", rev = "dbd5bc9c0cd559c7a67ab2d56545dba110f4a4cb" }
acp-client = { git = "https://github.com/block/builderbot", rev = "6cb674a704f3a9e402a76e9aeed734144d6cec11" }
doctor = { git = "https://github.com/block/builderbot", rev = "bfce29264181236a2e5b4fd903ace6291f6a7594" }
[dev-dependencies]
@@ -268,13 +268,21 @@ impl Client for SessionEventDispatcher {
}
SessionUpdate::ToolCall(tool_call) => {
writer
.record_tool_call(&tool_call.tool_call_id.0, &tool_call.title)
.record_tool_call(
&tool_call.tool_call_id.0,
&tool_call.title,
tool_call.raw_input.as_ref(),
)
.await;
}
SessionUpdate::ToolCallUpdate(update) => {
if let Some(title) = &update.fields.title {
if update.fields.title.is_some() || update.fields.raw_input.is_some() {
writer
.update_tool_call_title(&update.tool_call_id.0, title)
.update_tool_call_title(
&update.tool_call_id.0,
update.fields.title.as_deref(),
update.fields.raw_input.as_ref(),
)
.await;
}
if let Some(content) = &update.fields.content {
+23 -11
View File
@@ -76,7 +76,12 @@ impl MessageWriter for TauriMessageWriter {
);
}
async fn record_tool_call(&self, tool_call_id: &str, title: &str) {
async fn record_tool_call(
&self,
tool_call_id: &str,
title: &str,
_raw_input: Option<&serde_json::Value>,
) {
let _ = self.app_handle.emit(
"acp:tool_call",
ToolCallPayload {
@@ -88,16 +93,23 @@ impl MessageWriter for TauriMessageWriter {
);
}
async fn update_tool_call_title(&self, tool_call_id: &str, title: &str) {
let _ = self.app_handle.emit(
"acp:tool_title",
ToolTitlePayload {
session_id: self.session_id.clone(),
message_id: self.assistant_message_id.clone(),
tool_call_id: tool_call_id.to_string(),
title: title.to_string(),
},
);
async fn update_tool_call_title(
&self,
tool_call_id: &str,
title: Option<&str>,
_raw_input: Option<&serde_json::Value>,
) {
if let Some(title) = title {
let _ = self.app_handle.emit(
"acp:tool_title",
ToolTitlePayload {
session_id: self.session_id.clone(),
message_id: self.assistant_message_id.clone(),
tool_call_id: tool_call_id.to_string(),
title: title.to_string(),
},
);
}
}
async fn record_tool_result(&self, content: &str) {