diff --git a/packages/cli/src/tui/app.tsx b/packages/cli/src/tui/app.tsx index 3b169ac..4066343 100644 --- a/packages/cli/src/tui/app.tsx +++ b/packages/cli/src/tui/app.tsx @@ -43,7 +43,16 @@ export function TuiApp({ gatewayUrl, conversationId, sessionCookie }: TuiAppProp return ( - + = 1_000_000) return `${(n / 1_000_000).toFixed(0)}M`; + if (n >= 1_000) return `${(n / 1_000).toFixed(0)}k`; + return String(n); +} + +/** + * Mosaic windmill icon — 4 colored tiles + pink center + * Colors from the Mosaic brand: + * TL: blue (#2f80ff) TR: purple (#8b5cf6) + * BL: amber (#f59e0b) BR: teal (#14b8a6) + * Center: pink (#ec4899) + */ +function MosaicIcon() { return ( - - - Mosaic Stack TUI + + + ██ + + ██ + + + + ██ + + + + ██ + + ██ - {host} + + ); +} + +export function TopBar({ + gatewayUrl, + version, + modelName, + thinkingLevel, + contextWindow, + agentName, + connected, + connecting, +}: TopBarProps) { + const host = compactHost(gatewayUrl); + const connectionIndicator = connected ? '●' : '○'; + const connectionColor = connected ? 'green' : connecting ? 'yellow' : 'red'; + + // Build model description line like: "claude-opus-4-6 (1M context) · default" + const modelDisplay = modelName ?? 'awaiting model'; + const contextStr = contextWindow > 0 ? ` (${formatContextWindow(contextWindow)} context)` : ''; + const thinkingStr = thinkingLevel !== 'off' ? ` · ${thinkingLevel}` : ''; + + return ( + + + + + + Mosaic Stack + + v{version} + + + {modelDisplay} + {contextStr} + {thinkingStr} · {agentName} + + + {connectionIndicator} + {host} + + ); }