Skip to content

Commit a4d0683

Browse files
jimgqyuclaude
andcommitted
fix: keep result inline after Result: label and use bold Chevron titles
- Result text now follows "Result: " on the same line instead of a new line. - Chevron section titles are bold, giving all tool names (Bash, Glob, Grep, etc.) bold rendering without duplicating them in the detail area. - Successful tool details use muted color for a consistent gray appearance. - Simplified toolCallMatch rendering: tool name in text color, result body always in muted/gray, no separate "Result:" label row. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent d258c5f commit a4d0683

2 files changed

Lines changed: 15 additions & 37 deletions

File tree

packages/cli/src/components/thinking.tsx

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function Chevron({
311311
return (
312312
<Box onClick={(e: any) => onClick(!!e?.shiftKey || !!e?.ctrlKey)}>
313313
<Text color={color}>
314-
{title}
314+
<Text bold>{title}</Text>
315315
{typeof count === 'number' ? ` (${count})` : ''}
316316
{suffix ? (
317317
<Text color={t.color.statusFg} dim>
@@ -872,7 +872,7 @@ export const ToolTrail = memo(function ToolTrail({
872872

873873
if (parsed.detail) {
874874
pushDetail({
875-
color: parsed.mark === '✗' ? t.color.error : t.color.text,
875+
color: parsed.mark === '✗' ? t.color.error : t.color.muted,
876876
content: parsed.detail,
877877
dimColor: parsed.mark !== '✗',
878878
key: `tr-${i}-d`
@@ -1247,51 +1247,29 @@ export const ToolTrail = memo(function ToolTrail({
12471247
const toolName = toolCallMatch[1]!
12481248
const toolArg = toolCallMatch[2]!
12491249
const rest = text.slice(nl + 1)
1250-
const restNl = rest.indexOf('\n')
1251-
const resultLabel = restNl > 0 && rest.startsWith('Result:') ? 'Result:' : ''
1252-
const resultBody = resultLabel ? rest.slice(restNl + 1) : rest
12531250
return (
12541251
<Box flexDirection="column" key={detail.key}>
12551252
<TreeTextRow
1256-
branch={resultLabel || resultBody !== rest ? 'mid' : detailBranch}
1253+
branch="mid"
12571254
color={detail.color}
12581255
content={
12591256
<Text>
1260-
<Text bold color={detail.color}>{toolName}</Text>
1261-
<Text color={detail.color}>({toolArg})</Text>
1257+
<Text bold color={t.color.text}>{toolName}</Text>
1258+
<Text color={t.color.text}>({toolArg})</Text>
12621259
</Text>
12631260
}
12641261
rails={rails}
12651262
t={t}
12661263
/>
1267-
{resultLabel ? (
1268-
<>
1269-
<TreeTextRow
1270-
branch="mid"
1271-
color={detail.color}
1272-
content="Result:"
1273-
rails={rails}
1274-
t={t}
1275-
/>
1276-
<TruncatedResult
1277-
{...detail}
1278-
branch={detailBranch}
1279-
color={t.color.muted}
1280-
content={resultBody}
1281-
dimColor
1282-
rails={rails}
1283-
t={t}
1284-
/>
1285-
</>
1286-
) : (
1287-
<TruncatedResult
1288-
{...detail}
1289-
branch={detailBranch}
1290-
content={rest}
1291-
rails={rails}
1292-
t={t}
1293-
/>
1294-
)}
1264+
<TruncatedResult
1265+
{...detail}
1266+
branch={detailBranch}
1267+
color={t.color.muted}
1268+
content={rest}
1269+
dimColor
1270+
rails={rails}
1271+
t={t}
1272+
/>
12951273
</Box>
12961274
)
12971275
}

packages/cli/src/lib/text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export const buildToolTrailLine = (
283283
const verboseToolBlock = (label: string, text?: string) => {
284284
const body = (text ?? '').trim()
285285

286-
return body ? `${label}:\n${boundedLiveRenderText(body)}` : ''
286+
return body ? `${label}: ${boundedLiveRenderText(body)}` : ''
287287
}
288288

289289
export const buildVerboseToolTrailLine = (

0 commit comments

Comments
 (0)