assistant panel: Stop animation & show explicit state if canceled (#16200)
This fixes a bug by stopping the animation when a completion is canceled and it also makes the state more explicit, which I think is very valuable. https://github.com/user-attachments/assets/9ede9b25-86ac-4901-8434-7407896bb799 Release Notes: - N/A
This commit is contained in:
parent
97469cd049
commit
8b8335f449
4 changed files with 75 additions and 31 deletions
|
@ -102,6 +102,7 @@ pub enum MessageStatus {
|
|||
Pending,
|
||||
Done,
|
||||
Error(SharedString),
|
||||
Canceled,
|
||||
}
|
||||
|
||||
impl MessageStatus {
|
||||
|
@ -112,6 +113,7 @@ impl MessageStatus {
|
|||
Some(proto::context_message_status::Variant::Error(error)) => {
|
||||
MessageStatus::Error(error.message.into())
|
||||
}
|
||||
Some(proto::context_message_status::Variant::Canceled(_)) => MessageStatus::Canceled,
|
||||
None => MessageStatus::Pending,
|
||||
}
|
||||
}
|
||||
|
@ -135,6 +137,11 @@ impl MessageStatus {
|
|||
},
|
||||
)),
|
||||
},
|
||||
MessageStatus::Canceled => proto::ContextMessageStatus {
|
||||
variant: Some(proto::context_message_status::Variant::Canceled(
|
||||
proto::context_message_status::Canceled {},
|
||||
)),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue