From fdfc94d9dbee58b4a49ad51fa0fbdb3a68d593d6 Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Mon, 27 Oct 2025 21:58:15 -0700 Subject: [PATCH] fix: dim bold reasoning (gpt5, codex, gemini, etc) (#9) --- src/cli/components/InlineMarkdownRenderer.tsx | 12 ++++++++---- src/cli/components/MarkdownDisplay.tsx | 16 ++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/cli/components/InlineMarkdownRenderer.tsx b/src/cli/components/InlineMarkdownRenderer.tsx index 79c9a7d..1b460d3 100644 --- a/src/cli/components/InlineMarkdownRenderer.tsx +++ b/src/cli/components/InlineMarkdownRenderer.tsx @@ -4,6 +4,7 @@ import { colors } from "./colors.js"; interface InlineMarkdownProps { text: string; + dimColor?: boolean; } /** @@ -11,7 +12,10 @@ interface InlineMarkdownProps { * Based on Gemini CLI's approach - NO ANSI codes! * Note: dimColor should be handled by parent Text component for proper wrapping */ -export const InlineMarkdown: React.FC = ({ text }) => { +export const InlineMarkdown: React.FC = ({ + text, + dimColor, +}) => { // Early return for plain text without markdown (treat underscores as plain text) if (!/[*~`[]/.test(text)) { return <>{text}; @@ -43,7 +47,7 @@ export const InlineMarkdown: React.FC = ({ text }) => { ) { // Bold nodes.push( - + {fullMatch.slice(2, -2)} , ); @@ -54,7 +58,7 @@ export const InlineMarkdown: React.FC = ({ text }) => { ) { // Italic nodes.push( - + {fullMatch.slice(1, -1)} , ); @@ -65,7 +69,7 @@ export const InlineMarkdown: React.FC = ({ text }) => { ) { // Strikethrough nodes.push( - + {fullMatch.slice(2, -2)} , ); diff --git a/src/cli/components/MarkdownDisplay.tsx b/src/cli/components/MarkdownDisplay.tsx index 56c51a4..28c63ef 100644 --- a/src/cli/components/MarkdownDisplay.tsx +++ b/src/cli/components/MarkdownDisplay.tsx @@ -86,25 +86,25 @@ export const MarkdownDisplay: React.FC = ({ if (level === 1) { headerElement = ( - + ); } else if (level === 2) { headerElement = ( - + ); } else if (level === 3) { headerElement = ( - + ); } else { headerElement = ( - + ); } @@ -136,7 +136,7 @@ export const MarkdownDisplay: React.FC = ({ - + , @@ -151,7 +151,7 @@ export const MarkdownDisplay: React.FC = ({ - + , ); @@ -184,12 +184,12 @@ export const MarkdownDisplay: React.FC = ({ } > - + ) : ( - + )} ,