Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Add searchlight text animation on active agent steps

Abi Raja72f9aae2b66e
diff --git a/frontend/src/components/agent/AgentActivity.tsx b/frontend/src/components/agent/AgentActivity.tsx
index c1ec40b4..53ae6ea7 100644
--- a/frontend/src/components/agent/AgentActivity.tsx
+++ b/frontend/src/components/agent/AgentActivity.tsx
@@ -387,12 +387,9 @@ function AgentEventCard({
className="w-full flex items-center gap-2 py-1.5 text-left text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
>
{getEventIcon(event.type, event.toolName)}
- <span className="text-sm flex-1">
+ <span className={`text-sm flex-1 ${event.status === "running" ? "active-step-shimmer" : ""}`}>
{getEventTitle(event)}
</span>
- {event.status === "running" && (
- <span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse shrink-0" />
- )}
{isExpanded ? (
<BsChevronDown className="text-xs shrink-0" />
) : (
diff --git a/frontend/src/index.css b/frontend/src/index.css
index c730e0af..5469bc49 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -109,6 +109,47 @@
scrollbar-gutter: stable;
}
+.active-step-shimmer {
+ background: linear-gradient(
+ 90deg,
+ #9ca3af 0%,
+ #9ca3af 46%,
+ #111827 50%,
+ #9ca3af 54%,
+ #9ca3af 100%
+ );
+ background-size: 500% 100%;
+ -webkit-background-clip: text;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ animation: searchlight 2.5s ease-in-out infinite;
+}
+
+:is(.dark) .active-step-shimmer {
+ background: linear-gradient(
+ 90deg,
+ #9ca3af 0%,
+ #9ca3af 46%,
+ #f3f4f6 50%,
+ #9ca3af 54%,
+ #9ca3af 100%
+ );
+ background-size: 500% 100%;
+ -webkit-background-clip: text;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ animation: searchlight 2.5s ease-in-out infinite;
+}
+
+@keyframes searchlight {
+ 0% {
+ background-position: 200% center;
+ }
+ 100% {
+ background-position: -200% center;
+ }
+}
+
@layer base {
* {
@apply border-border;