Move the LoadingLabel component to the UI crate (#33893)

So we can use it in other places and don't require them to depend on the
`agent_ui`. This PR also renames it from `AnimatedLabel` to
`LoadingLabel`.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-07-04 01:49:11 -03:00 committed by GitHub
parent ed7552d3e3
commit 5253702200
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 16 deletions

View file

@ -1,9 +1,7 @@
use crate::context_picker::{ContextPicker, MentionLink};
use crate::context_strip::{ContextStrip, ContextStripEvent, SuggestContextKind};
use crate::message_editor::{extract_message_creases, insert_message_creases};
use crate::ui::{
AddedContext, AgentNotification, AgentNotificationEvent, AnimatedLabel, ContextPill,
};
use crate::ui::{AddedContext, AgentNotification, AgentNotificationEvent, ContextPill};
use crate::{AgentPanel, ModelUsageContext};
use agent::{
ContextStore, LastRestoreCheckpoint, MessageCrease, MessageId, MessageSegment, TextThreadStore,
@ -1820,7 +1818,7 @@ impl ActiveThread {
.my_3()
.mx_5()
.when(is_generating_stale || message.is_hidden, |this| {
this.child(AnimatedLabel::new("").size(LabelSize::Small))
this.child(LoadingLabel::new("").size(LabelSize::Small))
})
});
@ -2586,7 +2584,7 @@ impl ActiveThread {
.size(IconSize::XSmall)
.color(Color::Muted),
)
.child(AnimatedLabel::new("Thinking").size(LabelSize::Small)),
.child(LoadingLabel::new("Thinking").size(LabelSize::Small)),
)
.child(
h_flex()
@ -3155,7 +3153,7 @@ impl ActiveThread {
.border_color(self.tool_card_border_color(cx))
.rounded_b_lg()
.child(
AnimatedLabel::new("Waiting for Confirmation").size(LabelSize::Small)
LoadingLabel::new("Waiting for Confirmation").size(LabelSize::Small)
)
.child(
h_flex()