Skip to content

Commit fda423e

Browse files
committed
fix: turn agent/tool orange when active
1 parent 11ddbf8 commit fda423e

File tree

3 files changed

+45
-23
lines changed

3 files changed

+45
-23
lines changed

cli/src/components/branch-item.tsx

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ export const BranchItem = ({
5050
const toggleTextColor =
5151
(isStreaming ? theme.agentToggleHeaderText : theme.agentToggleText) ??
5252
theme.agentToggleText
53-
const statusSymbol = isStreaming ? '●' : ' '
54-
const toggleLabel = `${isCollapsed ? '▸' : '▾'} ${statusSymbol} `
53+
const toggleLabel = `${isCollapsed ? '▸' : '▾'} `
5554

5655
const isTextRenderable = (value: ReactNode): boolean => {
5756
if (
@@ -193,22 +192,43 @@ export const BranchItem = ({
193192
{finishedPreview}
194193
</text>
195194
)}
196-
{!isCollapsed && content && (
197-
<box
198-
border
199-
borderStyle="single"
200-
borderColor={cornerColor}
201-
customBorderChars={borderCharsWithoutVertical}
202-
style={{
203-
flexDirection: 'column',
204-
gap: 0,
205-
paddingLeft: 1,
206-
paddingRight: 1,
207-
paddingTop: 0,
208-
paddingBottom: 0,
209-
}}
210-
>
211-
{renderExpandedContent(content)}
195+
{!isCollapsed && (
196+
<box style={{ flexDirection: 'column', gap: 1 }}>
197+
{content && (
198+
<box
199+
border
200+
borderStyle="single"
201+
borderColor={cornerColor}
202+
customBorderChars={borderCharsWithoutVertical}
203+
style={{
204+
flexDirection: 'column',
205+
gap: 0,
206+
paddingLeft: 1,
207+
paddingRight: 1,
208+
paddingTop: 0,
209+
paddingBottom: 0,
210+
}}
211+
>
212+
{renderExpandedContent(content)}
213+
</box>
214+
)}
215+
<box
216+
style={{
217+
alignSelf: 'flex-end',
218+
backgroundColor: theme.agentFocusedBg,
219+
paddingLeft: 1,
220+
paddingRight: 1,
221+
paddingTop: 0,
222+
paddingBottom: 0,
223+
}}
224+
onMouseDown={onToggle}
225+
>
226+
<text wrap={false}>
227+
<span fg={toggleTextColor} attributes={TextAttributes.BOLD}>
228+
Collapse
229+
</span>
230+
</text>
231+
</box>
212232
</box>
213233
)}
214234
</box>

cli/src/components/message-block.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ export const MessageBlock = ({
104104
const inputContent = `\`\`\`json\n${JSON.stringify(toolBlock.input, null, 2)}\n\`\`\``
105105
const codeBlockLang =
106106
toolBlock.toolName === 'run_terminal_command' ? '' : 'yaml'
107-
const resultContent = toolBlock.output
108-
? `\n\n**Result:**\n\`\`\`${codeBlockLang}\n${toolBlock.output}\n\`\`\``
109-
: ''
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+
: ''
110112
const fullContent = inputContent + resultContent
111113

112114
const lines = fullContent

cli/src/utils/theme-system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
743743
agentResponseCount: '#9ca3af',
744744
agentFocusedBg: '#334155',
745745
agentContentText: '#ffffff',
746-
agentToggleHeaderBg: '#16a34a',
746+
agentToggleHeaderBg: '#f97316',
747747
agentToggleHeaderText: '#ffffff',
748748
agentToggleText: '#ffffff',
749749
agentContentBg: '#000000',
@@ -796,7 +796,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
796796
agentResponseCount: '#6b7280',
797797
agentFocusedBg: '#f3f4f6',
798798
agentContentText: '#111827',
799-
agentToggleHeaderBg: '#059669',
799+
agentToggleHeaderBg: '#ea580c',
800800
agentToggleHeaderText: '#ffffff',
801801
agentToggleText: '#ffffff',
802802
agentContentBg: '#ffffff',

0 commit comments

Comments
 (0)