Skip to content

Commit 5a347f3

Browse files
committed
fix: hide end_turn tool output
1 parent fda423e commit 5a347f3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cli/src/components/message-block.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,20 @@ export const MessageBlock = ({
9797
isLastBranch: boolean,
9898
keyPrefix: string,
9999
): React.ReactNode => {
100+
if (toolBlock.toolName === 'end_turn') {
101+
return null
102+
}
103+
100104
const displayInfo = getToolDisplayInfo(toolBlock.toolName)
101105
const isCollapsed = collapsedAgents.has(toolBlock.toolCallId)
102106
const isStreaming = streamingAgents.has(toolBlock.toolCallId)
103107

104108
const inputContent = `\`\`\`json\n${JSON.stringify(toolBlock.input, null, 2)}\n\`\`\``
105109
const codeBlockLang =
106110
toolBlock.toolName === 'run_terminal_command' ? '' : 'yaml'
107-
const shouldRenderResult = toolBlock.toolName !== 'end_turn'
108-
const resultContent =
109-
shouldRenderResult && toolBlock.output
110-
? `\n\n**Result:**\n\`\`\`${codeBlockLang}\n${toolBlock.output}\n\`\`\``
111-
: ''
111+
const resultContent = toolBlock.output
112+
? `\n\n**Result:**\n\`\`\`${codeBlockLang}\n${toolBlock.output}\n\`\`\``
113+
: ''
112114
const fullContent = inputContent + resultContent
113115

114116
const lines = fullContent

0 commit comments

Comments
 (0)