fix (tui): keep assistant text contrast theme-adaptive

This commit is contained in:
Vignesh Natarajan
2026-02-14 19:08:15 -08:00
parent 70cf0e4d42
commit 2c962ef8fc
2 changed files with 4 additions and 1 deletions

View File

@@ -7,7 +7,9 @@ export class AssistantMessageComponent extends Container {
constructor(text: string) {
super();
this.body = new Markdown(text, 1, 0, markdownTheme, {
color: (line) => theme.fg(line),
// Keep assistant body text in terminal default foreground so contrast
// follows the user's terminal theme (dark or light).
color: (line) => theme.assistantText(line),
});
this.addChild(new Spacer(1));
this.addChild(this.body);

View File

@@ -61,6 +61,7 @@ function highlightCode(code: string, lang?: string): string[] {
export const theme = {
fg: fg(palette.text),
assistantText: (text: string) => text,
dim: fg(palette.dim),
accent: fg(palette.accent),
accentSoft: fg(palette.accentSoft),