diff --git a/src/components/conversations/sidebar-conversation-card.tsx b/src/components/conversations/sidebar-conversation-card.tsx index 4828153..375a7d7 100644 --- a/src/components/conversations/sidebar-conversation-card.tsx +++ b/src/components/conversations/sidebar-conversation-card.tsx @@ -67,6 +67,7 @@ const STATUS_ICON_COLORS: Record = { interface SidebarConversationCardProps { conversation: DbConversationSummary isSelected: boolean + isOpenInTab?: boolean timeLabel?: string onSelect: (id: number, agentType: string) => void onDoubleClick?: (id: number, agentType: string) => void @@ -79,6 +80,7 @@ interface SidebarConversationCardProps { export const SidebarConversationCard = memo(function SidebarConversationCard({ conversation, isSelected, + isOpenInTab = false, timeLabel, onSelect, onDoubleClick, @@ -146,14 +148,18 @@ export const SidebarConversationCard = memo(function SidebarConversationCard({ > - + { + const set = new Set() + for (const tab of tabs) { + if (tab.conversationId != null) { + set.add(`${tab.agentType}:${tab.conversationId}`) + } + } + return set + }, [tabs]) + const [importing, setImporting] = useState(false) const [folderExpanded, setFolderExpanded] = useState>( {} @@ -814,6 +824,9 @@ export function SidebarConversationList({ selectedConversation?.agentType === conv.agent_type && selectedConversation?.id === conv.id } + isOpenInTab={openTabConversationKeys.has( + `${conv.agent_type}:${conv.id}` + )} timeLabel={formatRelative(conv.updated_at)} onSelect={handleSelect} onDoubleClick={handleDoubleClick} diff --git a/src/components/conversations/sidebar-status-icon.tsx b/src/components/conversations/sidebar-status-icon.tsx index e6eee3d..571a387 100644 --- a/src/components/conversations/sidebar-status-icon.tsx +++ b/src/components/conversations/sidebar-status-icon.tsx @@ -6,6 +6,7 @@ export type SidebarBeadStatus = "done" | "active" | "running" | "failed" interface SidebarStatusIconProps { status: SidebarBeadStatus + emphasized?: boolean className?: string } @@ -21,15 +22,15 @@ function IconFrame({ return (
+ @@ -116,20 +125,25 @@ export function SidebarStatusIcon({ if (status === "active") { return ( - + @@ -139,14 +153,34 @@ export function SidebarStatusIcon({ } return ( - + - + + )