Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent: Use correct subagent thread entity to get the entries list (#50515)
Ben Brandt56ae09502a4b
diff --git a/crates/agent/src/agent.rs b/crates/agent/src/agent.rsindex f20c7a8f1d5..0bb0f2c8790 100644--- a/crates/agent/src/agent.rs+++ b/crates/agent/src/agent.rs@@ -1749,7 +1749,7 @@ impl SubagentHandle for NativeSubagentHandle {}fn num_entries(&self, cx: &App) -> usize {- self.subagent_thread.read(cx).num_messages()+ self.acp_thread.read(cx).entries().len()}fn send(&self, message: String, cx: &AsyncApp) -> Task<Result<String>> {diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rsindex 2a9e8d3270c..4c43a66fe5b 100644--- a/crates/agent/src/thread.rs+++ b/crates/agent/src/thread.rs@@ -1389,10 +1389,6 @@ impl Thread {self.messages.last()}- pub fn num_messages(&self) -> usize {- self.messages.len()- }-#[cfg(any(test, feature = "test-support"))]pub fn last_received_or_pending_message(&self) -> Option<Message> {if let Some(message) = self.pending_message.clone() {