Skip to content

Commit 0652e96

Browse files
committed
fix(web): restore the sweeping tool label shine
1 parent 91e7065 commit 0652e96

2 files changed

Lines changed: 33 additions & 7 deletions

File tree

‎apps/web/src/components/chat/MessagesTimeline.tsx‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,18 +1927,14 @@ function LiveActivityRow({
19271927
active?: boolean;
19281928
}) {
19291929
return (
1930-
<div
1931-
className={cn(
1932-
"min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed",
1933-
active && "motion-safe:animate-status-pulse",
1934-
)}
1935-
>
1930+
<div className="min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed">
19361931
<LiveActivityContent
19371932
label={label}
19381933
iconName={iconName}
19391934
toolIcon={toolIcon}
19401935
failed={failed}
19411936
announceFailure={failed}
1937+
active={active}
19421938
/>
19431939
</div>
19441940
);
@@ -1950,12 +1946,14 @@ function LiveActivityContent({
19501946
toolIcon,
19511947
failed = false,
19521948
announceFailure = false,
1949+
active = false,
19531950
}: {
19541951
label: string;
19551952
iconName: WorkEntryIconName | undefined;
19561953
toolIcon?: ToolActivityIcon | undefined;
19571954
failed?: boolean;
19581955
announceFailure?: boolean;
1956+
active?: boolean;
19591957
}) {
19601958
const showTrailingFailureMark =
19611959
failed && iconName !== undefined && !toolIconAcceptsTint(iconName, toolIcon);
@@ -1985,7 +1983,7 @@ function LiveActivityContent({
19851983
/>
19861984
</span>
19871985
) : null}
1988-
<span className="min-w-0 flex-1 truncate">{label}</span>
1986+
<span className={cn("min-w-0 flex-1 truncate", active && "live-tool-shine")}>{label}</span>
19891987
{showTrailingFailureMark ? (
19901988
<XIcon aria-hidden className={cn("size-3 shrink-0", failedToolIconClassName)} />
19911989
) : null}

‎apps/web/src/index.css‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,34 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
425425
}
426426
}
427427

428+
@keyframes live-tool-shine {
429+
from {
430+
background-position:
431+
-4.5rem 0,
432+
0 0;
433+
}
434+
to {
435+
background-position:
436+
calc(100% + 4.5rem) 0,
437+
0 0;
438+
}
439+
}
440+
441+
@utility live-tool-shine {
442+
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
443+
color: transparent;
444+
background-image:
445+
linear-gradient(to right, transparent, var(--foreground), transparent),
446+
linear-gradient(var(--secondary-label), var(--secondary-label));
447+
background-size:
448+
4.5rem 100%,
449+
100% 100%;
450+
background-repeat: no-repeat;
451+
background-clip: text;
452+
animation: live-tool-shine 2.2s steps(30) infinite;
453+
}
454+
}
455+
428456
@property --assistant-citation-highlight-opacity {
429457
syntax: "<number>";
430458
inherits: true;

0 commit comments

Comments
 (0)