diff --git a/packages/ui/src/features/canvas/components/ThreadPanel.tsx b/packages/ui/src/features/canvas/components/ThreadPanel.tsx index fba801b8f1..0166a4450f 100644 --- a/packages/ui/src/features/canvas/components/ThreadPanel.tsx +++ b/packages/ui/src/features/canvas/components/ThreadPanel.tsx @@ -482,6 +482,7 @@ function ThreadConversation({ onToggleCollapsed, onOpenFull, showTaskSummary, + showAgentComms, }: { task: Task; channelId: string; @@ -489,6 +490,7 @@ function ThreadConversation({ onToggleCollapsed?: () => void; onOpenFull?: () => void; showTaskSummary: boolean; + showAgentComms: boolean; }) { const taskId = task.id; const client = useOptionalAuthenticatedClient(); @@ -557,8 +559,8 @@ function ThreadConversation({ const timeline = useMemo( () => buildThreadTimeline({ - prompts: promptMsgs, - agentMessages: agentMsgs, + prompts: showAgentComms ? promptMsgs : [], + agentMessages: showAgentComms ? agentMsgs : [], humanMessages: messages.map((message) => ({ id: message.id, content: message.content, @@ -567,7 +569,7 @@ function ThreadConversation({ value: message, })), }), - [promptMsgs, messages, agentMsgs], + [promptMsgs, messages, agentMsgs, showAgentComms], ); const lastAgentId = agentMsgs[agentMsgs.length - 1]?.id; @@ -680,7 +682,9 @@ function ThreadConversation({ /> - {agentStatus && } + {showAgentComms && agentStatus && ( + + )} void; onOpenFull?: () => void; showTaskSummary?: boolean; + showAgentComms?: boolean; }) { const { data: fetchedTask } = useQuery({ ...taskDetailQuery(taskId), @@ -747,6 +753,7 @@ export function ThreadPanel({ onToggleCollapsed={onToggleCollapsed} onOpenFull={onOpenFull} showTaskSummary={showTaskSummary} + showAgentComms={showAgentComms} /> ); } diff --git a/packages/ui/src/features/canvas/components/ThreadSidebar.tsx b/packages/ui/src/features/canvas/components/ThreadSidebar.tsx index 4a81cf8700..727c785aa7 100644 --- a/packages/ui/src/features/canvas/components/ThreadSidebar.tsx +++ b/packages/ui/src/features/canvas/components/ThreadSidebar.tsx @@ -17,6 +17,7 @@ export function ThreadSidebar({ onClose, onOpenFull, showTaskSummary, + showAgentComms = true, }: { taskId: string; channelId: string; @@ -25,6 +26,8 @@ export function ThreadSidebar({ onClose?: () => void; onOpenFull?: () => void; showTaskSummary?: boolean; + /** Show agent turns/prompts and the agent status line. Off on the full task view, where the agent session already lives next to the thread. */ + showAgentComms?: boolean; }) { const collapsed = useThreadPanelStore((s) => s.collapsed); const width = useThreadPanelStore((s) => s.width); @@ -49,6 +52,7 @@ export function ThreadSidebar({ task={task} collapsed onToggleCollapsed={() => toggleCollapsed(false)} + showAgentComms={showAgentComms} /> ); } @@ -70,6 +74,7 @@ export function ThreadSidebar({ onToggleCollapsed={() => toggleCollapsed(true)} onOpenFull={onOpenFull} showTaskSummary={showTaskSummary} + showAgentComms={showAgentComms} /> ); diff --git a/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx b/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx index 62ce110a5d..3a2da4b020 100644 --- a/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx +++ b/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx @@ -73,6 +73,7 @@ function ChannelTaskDetailRoute() { channelId={channelId} task={task} showTaskSummary={false} + showAgentComms={false} /> );