Fix external agent still being marked as generating after error response (#35992)

Cole Miller created

Release Notes:

- N/A

Change summary

crates/acp_thread/src/acp_thread.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Detailed changes

crates/acp_thread/src/acp_thread.rs 🔗

@@ -1072,8 +1072,11 @@ impl AcpThread {
 
         cx.spawn(async move |this, cx| match rx.await {
             Ok(Err(e)) => {
-                this.update(cx, |_, cx| cx.emit(AcpThreadEvent::Error))
-                    .log_err();
+                this.update(cx, |this, cx| {
+                    this.send_task.take();
+                    cx.emit(AcpThreadEvent::Error)
+                })
+                .log_err();
                 Err(e)?
             }
             result => {