From ea8b8b7f543e170d46ccbc100106f9d42be05e49 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 11 Nov 2025 22:08:20 +0100 Subject: [PATCH] Fix thinking trace styling when text wraps --- packages/coding-agent/src/tui/assistant-message.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/coding-agent/src/tui/assistant-message.ts b/packages/coding-agent/src/tui/assistant-message.ts index a25198b4..4a4af2b4 100644 --- a/packages/coding-agent/src/tui/assistant-message.ts +++ b/packages/coding-agent/src/tui/assistant-message.ts @@ -42,11 +42,10 @@ export class AssistantMessageComponent extends Container { this.contentContainer.addChild(new Markdown(content.text.trim(), undefined, undefined, undefined, 1, 0)); } else if (content.type === "thinking" && content.thinking.trim()) { // Thinking traces in dark gray italic - const thinkingText = content.thinking - .split("\n") - .map((line) => chalk.gray.italic(line)) - .join("\n"); + // Apply styling to entire block so wrapping preserves it + const thinkingText = chalk.gray.italic(content.thinking); this.contentContainer.addChild(new Text(thinkingText, 1, 0)); + this.contentContainer.addChild(new Spacer(1)); } }