Remove unused code

Ben Brandt created

Change summary

crates/acp_thread/src/acp_thread.rs      |   4 
crates/agent_servers/src/claude/tools.rs | 104 --------------------------
2 files changed, 2 insertions(+), 106 deletions(-)

Detailed changes

crates/acp_thread/src/acp_thread.rs 🔗

@@ -916,7 +916,7 @@ impl AcpThread {
         &mut self,
         message: &str,
         cx: &mut Context<Self>,
-    ) -> BoxFuture<'static, Result<(), acp_old::Error>> {
+    ) -> BoxFuture<'static, Result<()>> {
         self.send(
             vec![acp::ContentBlock::Text(acp::TextContent {
                 text: message.to_string(),
@@ -930,7 +930,7 @@ impl AcpThread {
         &mut self,
         message: Vec<acp::ContentBlock>,
         cx: &mut Context<Self>,
-    ) -> BoxFuture<'static, Result<(), acp_old::Error>> {
+    ) -> BoxFuture<'static, Result<()>> {
         let block = ContentBlock::new_combined(
             message.clone(),
             self.project.read(cx).languages().clone(),

crates/agent_servers/src/claude/tools.rs 🔗

@@ -1,7 +1,6 @@
 use std::path::PathBuf;
 
 use agent_client_protocol as acp;
-use agentic_coding_protocol as acp_old;
 use itertools::Itertools;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
@@ -233,109 +232,6 @@ impl ClaudeTool {
         }
     }
 
-    pub fn confirmation(&self, description: Option<String>) -> acp_old::ToolCallConfirmation {
-        match &self {
-            Self::Edit(_) | Self::Write(_) | Self::NotebookEdit(_) | Self::MultiEdit(_) => {
-                acp_old::ToolCallConfirmation::Edit { description }
-            }
-            Self::WebFetch(params) => acp_old::ToolCallConfirmation::Fetch {
-                urls: params
-                    .as_ref()
-                    .map(|p| vec![p.url.clone()])
-                    .unwrap_or_default(),
-                description,
-            },
-            Self::Terminal(Some(BashToolParams {
-                description,
-                command,
-                ..
-            })) => acp_old::ToolCallConfirmation::Execute {
-                command: command.clone(),
-                root_command: command.clone(),
-                description: description.clone(),
-            },
-            Self::ExitPlanMode(Some(params)) => acp_old::ToolCallConfirmation::Other {
-                description: if let Some(description) = description {
-                    format!("{description} {}", params.plan)
-                } else {
-                    params.plan.clone()
-                },
-            },
-            Self::Task(Some(params)) => acp_old::ToolCallConfirmation::Other {
-                description: if let Some(description) = description {
-                    format!("{description} {}", params.description)
-                } else {
-                    params.description.clone()
-                },
-            },
-            Self::Ls(Some(LsToolParams { path, .. }))
-            | Self::ReadFile(Some(ReadToolParams { abs_path: path, .. })) => {
-                let path = path.display();
-                acp_old::ToolCallConfirmation::Other {
-                    description: if let Some(description) = description {
-                        format!("{description} {path}")
-                    } else {
-                        path.to_string()
-                    },
-                }
-            }
-            Self::NotebookRead(Some(NotebookReadToolParams { notebook_path, .. })) => {
-                let path = notebook_path.display();
-                acp_old::ToolCallConfirmation::Other {
-                    description: if let Some(description) = description {
-                        format!("{description} {path}")
-                    } else {
-                        path.to_string()
-                    },
-                }
-            }
-            Self::Glob(Some(params)) => acp_old::ToolCallConfirmation::Other {
-                description: if let Some(description) = description {
-                    format!("{description} {params}")
-                } else {
-                    params.to_string()
-                },
-            },
-            Self::Grep(Some(params)) => acp_old::ToolCallConfirmation::Other {
-                description: if let Some(description) = description {
-                    format!("{description} {params}")
-                } else {
-                    params.to_string()
-                },
-            },
-            Self::WebSearch(Some(params)) => acp_old::ToolCallConfirmation::Other {
-                description: if let Some(description) = description {
-                    format!("{description} {params}")
-                } else {
-                    params.to_string()
-                },
-            },
-            Self::TodoWrite(Some(params)) => {
-                let params = params.todos.iter().map(|todo| &todo.content).join(", ");
-                acp_old::ToolCallConfirmation::Other {
-                    description: if let Some(description) = description {
-                        format!("{description} {params}")
-                    } else {
-                        params
-                    },
-                }
-            }
-            Self::Terminal(None)
-            | Self::Task(None)
-            | Self::NotebookRead(None)
-            | Self::ExitPlanMode(None)
-            | Self::Ls(None)
-            | Self::Glob(None)
-            | Self::Grep(None)
-            | Self::ReadFile(None)
-            | Self::WebSearch(None)
-            | Self::TodoWrite(None)
-            | Self::Other { .. } => acp_old::ToolCallConfirmation::Other {
-                description: description.unwrap_or("".to_string()),
-            },
-        }
-    }
-
     pub fn locations(&self) -> Vec<acp::ToolCallLocation> {
         match &self {
             Self::Edit(Some(EditToolParams { abs_path, .. })) => vec![acp::ToolCallLocation {