From 2c7d44576624d8e0afb85e6d89cf74295e625c4f Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Wed, 25 Feb 2026 17:04:06 -0800 Subject: [PATCH] fix(tui): remove s:/t: suffixes from footer status bar (#1145) Co-authored-by: Letta --- src/cli/App.tsx | 2 - src/cli/components/InputRich.tsx | 65 +++--------------------------- src/cli/components/ShimmerText.tsx | 23 ++++++----- 3 files changed, 20 insertions(+), 70 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index 1641081..a3db20c 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -12293,8 +12293,6 @@ Plan file path: ${planFilePath}`; currentModel={currentModelDisplay} currentModelProvider={currentModelProvider} currentReasoningEffort={currentReasoningEffort} - currentSystemPromptId={currentSystemPromptId} - currentToolset={currentToolset} messageQueue={messageQueue} onEnterQueueEditMode={handleEnterQueueEditMode} onEscapeCancel={ diff --git a/src/cli/components/InputRich.tsx b/src/cli/components/InputRich.tsx index e0cf141..4a73c42 100644 --- a/src/cli/components/InputRich.tsx +++ b/src/cli/components/InputRich.tsx @@ -217,8 +217,6 @@ const InputFooter = memo(function InputFooter({ agentName, currentModel, currentReasoningEffort, - currentSystemPromptId, - currentToolset, isOpenAICodexProvider, isByokProvider, hideFooter, @@ -236,8 +234,6 @@ const InputFooter = memo(function InputFooter({ agentName: string | null | undefined; currentModel: string | null | undefined; currentReasoningEffort?: ModelReasoningEffort | null; - currentSystemPromptId?: string | null; - currentToolset?: string | null; isOpenAICodexProvider: boolean; isByokProvider: boolean; hideFooter: boolean; @@ -256,45 +252,11 @@ const InputFooter = memo(function InputFooter({ const modelWithReasoning = (currentModel ?? "unknown") + (reasoningTag ? ` (${reasoningTag})` : ""); - // Optional suffixes: system prompt id + toolset. - const suffixParts: string[] = []; - if (currentSystemPromptId) { - suffixParts.push(`s:${currentSystemPromptId}`); - } - if (currentToolset) { - suffixParts.push(`t:${currentToolset}`); - } - - // Reserve 4 chars per suffix part so the label is visible even on narrow terminals. - const minSuffixBudget = suffixParts.length * 4; - const maxModelChars = Math.max( - 8, - rightColumnWidth - baseReservedChars - minSuffixBudget, - ); + const maxModelChars = Math.max(8, rightColumnWidth - baseReservedChars); const displayModel = truncateEnd(modelWithReasoning, maxModelChars); - const baseTextLength = + const rightTextLength = displayAgentName.length + displayModel.length + byokExtraChars + 3; - const maxSuffixChars = Math.max(0, rightColumnWidth - baseTextLength); - - const displaySuffix = (() => { - if (suffixParts.length === 0 || maxSuffixChars <= 0) return ""; - - let remaining = maxSuffixChars; - const out: string[] = []; - for (const part of suffixParts) { - // Leading space before each part. - if (remaining <= 1) break; - const budget = remaining - 1; - const clipped = truncateEnd(part, budget); - if (!clipped) break; - out.push(` ${clipped}`); - remaining -= 1 + clipped.length; - } - return out.join(""); - })(); - - const rightTextLength = baseTextLength + displaySuffix.length; const rightPrefixSpaces = Math.max(0, rightColumnWidth - rightTextLength); const rightLabel = useMemo(() => { const parts: string[] = []; @@ -310,16 +272,11 @@ const InputFooter = memo(function InputFooter({ } parts.push(chalk.dim("]")); - if (displaySuffix) { - parts.push(chalk.dim(displaySuffix)); - } - return parts.join(""); }, [ rightPrefixSpaces, displayAgentName, displayModel, - displaySuffix, isByokProvider, isOpenAICodexProvider, ]); @@ -559,16 +516,14 @@ const StreamingStatus = memo(function StreamingStatus({ // Uses chalk.dim to match reasoning text styling // Memoized to prevent unnecessary re-renders during shimmer updates const statusHintText = useMemo(() => { + const hintColor = chalk.hex(colors.subagent.hint); + const hintBold = hintColor.bold; const suffix = `${statusHintSuffix})`; if (interruptRequested) { - return {` (interrupting${suffix}`}; + return hintColor(` (interrupting${suffix}`); } return ( - - {" ("} - esc - {` to interrupt${suffix}`} - + hintColor(" (") + hintBold("esc") + hintColor(` to interrupt${suffix}`) ); }, [interruptRequested, statusHintSuffix]); @@ -633,8 +588,6 @@ export function Input({ currentModel, currentModelProvider, currentReasoningEffort, - currentSystemPromptId, - currentToolset, messageQueue, onEnterQueueEditMode, onEscapeCancel, @@ -676,8 +629,6 @@ export function Input({ currentModel?: string | null; currentModelProvider?: string | null; currentReasoningEffort?: ModelReasoningEffort | null; - currentSystemPromptId?: string | null; - currentToolset?: string | null; messageQueue?: QueuedMessage[]; onEnterQueueEditMode?: () => void; onEscapeCancel?: () => void; @@ -1500,8 +1451,6 @@ export function Input({ agentName={agentName} currentModel={currentModel} currentReasoningEffort={currentReasoningEffort} - currentSystemPromptId={currentSystemPromptId} - currentToolset={currentToolset} isOpenAICodexProvider={ currentModelProvider === OPENAI_CODEX_PROVIDER_NAME } @@ -1559,8 +1508,6 @@ export function Input({ statusLineText, statusLineRight, statusLinePadding, - currentSystemPromptId, - currentToolset, promptChar, promptVisualWidth, suppressDividers, diff --git a/src/cli/components/ShimmerText.tsx b/src/cli/components/ShimmerText.tsx index 9d26e3e..9693700 100644 --- a/src/cli/components/ShimmerText.tsx +++ b/src/cli/components/ShimmerText.tsx @@ -1,3 +1,4 @@ +import chalk from "chalk"; import { memo } from "react"; import { colors } from "./colors.js"; import { Text } from "./Text"; @@ -83,13 +84,17 @@ export const ShimmerText = memo(function ShimmerText({ pushRegion(shimmer, start, colors.status.processingShimmer); pushRegion(after, end, color); - return ( - - {segments.map((seg) => ( - - {seg.text} - - ))} - - ); + // Use chalk for ALL styling (color + bold) instead of style props. + // Ink's doesn't emit SGR 22 to reset bold, and mixing + // chalk.bold inside gets overwritten by Ink's ANSI handling. + // A single pre-formatted chalk string avoids both issues. + const formatted = segments + .map((seg) => { + let styled = chalk.hex(seg.color || color)(seg.text); + if (seg.bold) styled = chalk.bold(styled); + return styled; + }) + .join(""); + + return {formatted}; });