mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 06:27:27 +00:00
fix (tui): keep assistant text contrast theme-adaptive
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user