mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 06:04:51 +00:00
Fix thinking trace styling when text wraps
This commit is contained in:
parent
3fcae75e93
commit
ea8b8b7f54
1 changed files with 3 additions and 4 deletions
|
|
@ -42,11 +42,10 @@ export class AssistantMessageComponent extends Container {
|
||||||
this.contentContainer.addChild(new Markdown(content.text.trim(), undefined, undefined, undefined, 1, 0));
|
this.contentContainer.addChild(new Markdown(content.text.trim(), undefined, undefined, undefined, 1, 0));
|
||||||
} else if (content.type === "thinking" && content.thinking.trim()) {
|
} else if (content.type === "thinking" && content.thinking.trim()) {
|
||||||
// Thinking traces in dark gray italic
|
// Thinking traces in dark gray italic
|
||||||
const thinkingText = content.thinking
|
// Apply styling to entire block so wrapping preserves it
|
||||||
.split("\n")
|
const thinkingText = chalk.gray.italic(content.thinking);
|
||||||
.map((line) => chalk.gray.italic(line))
|
|
||||||
.join("\n");
|
|
||||||
this.contentContainer.addChild(new Text(thinkingText, 1, 0));
|
this.contentContainer.addChild(new Text(thinkingText, 1, 0));
|
||||||
|
this.contentContainer.addChild(new Spacer(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue