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

Release Notes:

- N/A
This commit is contained in:
Cole Miller 2025-08-12 21:41:00 -04:00 committed by GitHub
parent 32975c4208
commit d78bd8f1d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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