diff --git a/desktop/src/features/agents/ui/AgentSessionTranscriptList.tsx b/desktop/src/features/agents/ui/AgentSessionTranscriptList.tsx index a7f406ab4..a39d6a01e 100644 --- a/desktop/src/features/agents/ui/AgentSessionTranscriptList.tsx +++ b/desktop/src/features/agents/ui/AgentSessionTranscriptList.tsx @@ -1,15 +1,18 @@ -import { Bot, Brain, ChevronDown, Radio, TerminalSquare } from "lucide-react"; +import { Brain, ChevronDown, Radio, TerminalSquare } from "lucide-react"; import { cn } from "@/shared/lib/cn"; import { Markdown } from "@/shared/ui/markdown"; +import { UserAvatar } from "@/shared/ui/UserAvatar"; import type { TranscriptItem } from "./agentSessionTypes"; import { ToolItem } from "./AgentSessionToolItem"; export function AgentSessionTranscriptList({ + agentAvatarUrl, agentName, emptyDescription, items, }: { + agentAvatarUrl: string | null; agentName: string; emptyDescription: string; items: TranscriptItem[]; @@ -33,7 +36,11 @@ export function AgentSessionTranscriptList({ > {items.map((item) => (
- +
))} @@ -41,14 +48,22 @@ export function AgentSessionTranscriptList({ } function TranscriptItemView({ + agentAvatarUrl, agentName, item, }: { + agentAvatarUrl: string | null; agentName: string; item: TranscriptItem; }) { if (item.type === "message") { - return ; + return ( + + ); } if (item.type === "tool") { return ; @@ -63,9 +78,11 @@ function TranscriptItemView({ } function MessageItem({ + agentAvatarUrl, agentName, item, }: { + agentAvatarUrl: string | null; agentName: string; item: Extract; }) { @@ -80,9 +97,12 @@ function MessageItem({
{isAssistant ? ( - - - + ) : null} {label}
diff --git a/desktop/src/features/agents/ui/ManagedAgentSessionPanel.tsx b/desktop/src/features/agents/ui/ManagedAgentSessionPanel.tsx index eecfd7e75..080043507 100644 --- a/desktop/src/features/agents/ui/ManagedAgentSessionPanel.tsx +++ b/desktop/src/features/agents/ui/ManagedAgentSessionPanel.tsx @@ -25,6 +25,7 @@ import { useObserverEvents } from "./useObserverEvents"; type ManagedAgentSessionPanelProps = { agent: ManagedAgent; + agentAvatarUrl?: string | null; channelId?: string | null; className?: string; emptyDescription?: string; @@ -34,6 +35,7 @@ type ManagedAgentSessionPanelProps = { export function ManagedAgentSessionPanel({ agent, + agentAvatarUrl = null, channelId = null, className, emptyDescription = "Mention this agent in a channel to watch the next turn.", @@ -78,6 +80,7 @@ export function ManagedAgentSessionPanel({ ) : null} void; onResetWidth: () => void; onResizeStart: (event: React.PointerEvent) => void; + profiles?: UserProfileLookup; widthPx: number; }; @@ -29,10 +32,13 @@ export function AgentSessionThreadPanel({ onClose, onResetWidth, onResizeStart, + profiles, widthPx, }: AgentSessionThreadPanelProps) { const isLive = agent.status === "running"; const { ref: scrollRef, onScroll } = useStickToBottom(); + const agentAvatarUrl = + profiles?.[agent.pubkey.toLowerCase()]?.avatarUrl ?? null; async function handleInterruptTurn() { try { @@ -74,7 +80,12 @@ export function AgentSessionThreadPanel({
- +

{agent.name} @@ -141,6 +152,7 @@ export function AgentSessionThreadPanel({ channelId={channel.id} className="border-0 bg-transparent p-0 shadow-none" emptyDescription={`Mention ${agent.name} in the channel to see its work here.`} + agentAvatarUrl={agentAvatarUrl} showHeader={false} showRaw={false} /> diff --git a/desktop/src/features/channels/ui/ChannelPane.tsx b/desktop/src/features/channels/ui/ChannelPane.tsx index 927656007..fa9a5dde3 100644 --- a/desktop/src/features/channels/ui/ChannelPane.tsx +++ b/desktop/src/features/channels/ui/ChannelPane.tsx @@ -355,6 +355,7 @@ export const ChannelPane = React.memo(function ChannelPane({ onClose={onCloseAgentSession} onResetWidth={handleThreadPanelWidthReset} onResizeStart={handleThreadPanelResizeStart} + profiles={profiles} widthPx={threadPanelWidthPx} /> ) : null}