agent: Use correct subagent thread entity to get the entries list (#50515)

Was grabbing off the Thread not the AcpThead 🤦

Release Notes:

- N/A
This commit is contained in:
Ben Brandt 2026-03-02 19:27:32 +01:00 committed by GitHub
parent 41a0c63c23
commit 56ae09502a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View file

@ -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>> {

View file

@ -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() {