Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions apps/web/src/components/chat/MessagesTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3554,7 +3554,7 @@ function LiveActivityRow({
const showShimmer = animated && shimmer;
return (
<div
ref={showShimmer ? observeVisibleAnimation : undefined}
ref={animated ? observeVisibleAnimation : undefined}
className="relative min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed"
>
<LiveActivityContent
Expand Down Expand Up @@ -3620,7 +3620,13 @@ function LiveActivityContent({
) : null
}
label={
<span className={cn("block truncate", (highlighted || active) && "text-foreground")}>
<span
className={cn(
"block truncate",
highlighted && "text-foreground",
active && "live-tool-shine",
)}
>
{label}
</span>
}
Expand Down Expand Up @@ -3756,6 +3762,7 @@ function WorkGroupHeader(props: {
}) {
return (
<WorkLogButton
ref={props.active && !props.failed ? observeVisibleAnimation : undefined}
aria-label={props.failed ? `${props.label}, tool call failed` : props.label}
aria-expanded={props.expanded}
onClick={props.onToggle}
Expand All @@ -3768,7 +3775,7 @@ function WorkGroupHeader(props: {
/>
}
label={
<span className={cn("block truncate", props.active && !props.failed && "text-foreground")}>
<span className={cn("block truncate", props.active && !props.failed && "live-tool-shine")}>
{props.label}
</span>
}
Expand Down
29 changes: 29 additions & 0 deletions apps/web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,35 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
}
}

@keyframes live-tool-shine {
from {
background-position:
-4.5rem 0,
0 0;
}
to {
background-position:
calc(100% + 4.5rem) 0,
0 0;
}
}

@utility live-tool-shine {
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
color: transparent;
background-image:
linear-gradient(to right, transparent, var(--contrast-foreground), transparent),
linear-gradient(var(--contrast-secondary-label), var(--contrast-secondary-label));
background-size:
4.5rem 100%,
100% 100%;
background-repeat: no-repeat;
background-clip: text;
animation: live-tool-shine 2.2s steps(30) infinite;
animation-play-state: var(--visible-animation-state, paused);
}
}

@utility visible-animate-spin {
animation: var(--animate-spin);
animation-play-state: var(--visible-animation-state, paused);
Expand Down
Loading