({
modelId,
contextTokens,
totalCost: _totalCost,
state,
approvalMode,
busy,
title,
plan: _plan,
usagePercentage: _usagePercentage,
tieredUsage,
}: StatusBarProps)
| 82 | } |
| 83 | |
| 84 | export function StatusBar({ |
| 85 | modelId, |
| 86 | contextTokens, |
| 87 | totalCost: _totalCost, |
| 88 | state, |
| 89 | approvalMode, |
| 90 | busy, |
| 91 | title, |
| 92 | plan: _plan, |
| 93 | usagePercentage: _usagePercentage, |
| 94 | tieredUsage, |
| 95 | }: StatusBarProps) { |
| 96 | const model = getModel(modelId); |
| 97 | const contextPct = Math.min( |
| 98 | 100, |
| 99 | Math.round((contextTokens / model.contextWindow) * 100), |
| 100 | ); |
| 101 | const usageLine = usageSummary(tieredUsage); |
| 102 | return ( |
| 103 | <Box flexDirection="column"> |
| 104 | <Box justifyContent="space-between"> |
| 105 | <Text dimColor> |
| 106 | <Text color={approvalMode === "ask" ? undefined : COLORS.warning}> |
| 107 | {MODE_LABELS[approvalMode]} |
| 108 | </Text> |
| 109 | {" (shift+tab to cycle)"} |
| 110 | {busy && " · esc to interrupt"} |
| 111 | {state ? <Text color={COLORS.thinking}> · {state}</Text> : null} |
| 112 | </Text> |
| 113 | <Text dimColor> |
| 114 | {title ? `${truncate(title, 32)} · ` : ""} |
| 115 | {model.name} · ctx {contextTokens.toLocaleString()} ({contextPct}%) |
| 116 | </Text> |
| 117 | </Box> |
| 118 | {usageLine && ( |
| 119 | <Box justifyContent="flex-end"> |
| 120 | <Text dimColor>{usageLine}</Text> |
| 121 | </Box> |
| 122 | )} |
| 123 | </Box> |
| 124 | ); |
| 125 | } |
nothing calls this directly
no test coverage detected