feat(issues): use ActorAvatar in agent live card header
Replace hand-rolled Bot icon circle with ActorAvatar component so agent custom avatars display correctly, consistent with comment cards and other agent-rendered UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4353340ea6
commit
56b49cb2a6
1 changed files with 11 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ import type { TaskMessagePayload, TaskCompletedPayload, TaskFailedPayload, TaskC
|
||||||
import type { AgentTask } from "@/shared/types/agent";
|
import type { AgentTask } from "@/shared/types/agent";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
import { ActorAvatar } from "@/components/common/actor-avatar";
|
||||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
||||||
import { useActorName } from "@/features/workspace";
|
import { useActorName } from "@/features/workspace";
|
||||||
import { redactSecrets } from "../utils/redact";
|
import { redactSecrets } from "../utils/redact";
|
||||||
|
|
@ -293,12 +294,16 @@ export function AgentLiveCard({ issueId, agentName, scrollContainerRef }: AgentL
|
||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center gap-2 px-3 py-2">
|
<div className="flex items-center gap-2 px-3 py-2">
|
||||||
<div className={cn(
|
{activeTask.agent_id ? (
|
||||||
"flex items-center justify-center h-5 w-5 rounded-full shrink-0",
|
<ActorAvatar actorType="agent" actorId={activeTask.agent_id} size={20} />
|
||||||
isStuck ? "bg-brand/15 text-brand" : "bg-info/10 text-info",
|
) : (
|
||||||
)}>
|
<div className={cn(
|
||||||
<Bot className="h-3 w-3" />
|
"flex items-center justify-center h-5 w-5 rounded-full shrink-0",
|
||||||
</div>
|
isStuck ? "bg-brand/15 text-brand" : "bg-info/10 text-info",
|
||||||
|
)}>
|
||||||
|
<Bot className="h-3 w-3" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="flex items-center gap-1.5 text-xs font-medium min-w-0">
|
<div className="flex items-center gap-1.5 text-xs font-medium min-w-0">
|
||||||
<Loader2 className={cn("h-3 w-3 animate-spin shrink-0", isStuck ? "text-brand" : "text-info")} />
|
<Loader2 className={cn("h-3 w-3 animate-spin shrink-0", isStuck ? "text-brand" : "text-info")} />
|
||||||
<span className="truncate">{name} is working</span>
|
<span className="truncate">{name} is working</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue