Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions packages/ui/src/features/canvas/components/ThreadPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,15 @@ function ThreadConversation({
onToggleCollapsed,
onOpenFull,
showTaskSummary,
showAgentComms,
}: {
task: Task;
channelId: string;
onClose?: () => void;
onToggleCollapsed?: () => void;
onOpenFull?: () => void;
showTaskSummary: boolean;
showAgentComms: boolean;
}) {
const taskId = task.id;
const client = useOptionalAuthenticatedClient();
Expand Down Expand Up @@ -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,
Expand All @@ -567,7 +569,7 @@ function ThreadConversation({
value: message,
})),
}),
[promptMsgs, messages, agentMsgs],
[promptMsgs, messages, agentMsgs, showAgentComms],
);

const lastAgentId = agentMsgs[agentMsgs.length - 1]?.id;
Expand Down Expand Up @@ -680,7 +682,9 @@ function ThreadConversation({
/>
</div>

{agentStatus && <AgentStatusLine status={agentStatus} />}
{showAgentComms && agentStatus && (
<AgentStatusLine status={agentStatus} />
)}

<ThreadReplyComposer
draft={draft}
Expand All @@ -704,6 +708,7 @@ export function ThreadPanel({
onToggleCollapsed,
onOpenFull,
showTaskSummary = true,
showAgentComms = true,
}: {
taskId: string;
channelId: string;
Expand All @@ -713,6 +718,7 @@ export function ThreadPanel({
onToggleCollapsed?: () => void;
onOpenFull?: () => void;
showTaskSummary?: boolean;
showAgentComms?: boolean;
}) {
const { data: fetchedTask } = useQuery({
...taskDetailQuery(taskId),
Expand Down Expand Up @@ -747,6 +753,7 @@ export function ThreadPanel({
onToggleCollapsed={onToggleCollapsed}
onOpenFull={onOpenFull}
showTaskSummary={showTaskSummary}
showAgentComms={showAgentComms}
/>
);
}
5 changes: 5 additions & 0 deletions packages/ui/src/features/canvas/components/ThreadSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function ThreadSidebar({
onClose,
onOpenFull,
showTaskSummary,
showAgentComms = true,
}: {
taskId: string;
channelId: string;
Expand All @@ -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);
Expand All @@ -49,6 +52,7 @@ export function ThreadSidebar({
task={task}
collapsed
onToggleCollapsed={() => toggleCollapsed(false)}
showAgentComms={showAgentComms}
/>
);
}
Expand All @@ -70,6 +74,7 @@ export function ThreadSidebar({
onToggleCollapsed={() => toggleCollapsed(true)}
onOpenFull={onOpenFull}
showTaskSummary={showTaskSummary}
showAgentComms={showAgentComms}
/>
</ResizableSidebar>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function ChannelTaskDetailRoute() {
channelId={channelId}
task={task}
showTaskSummary={false}
showAgentComms={false}
/>
</div>
);
Expand Down
Loading