Skip to content

Commit 9548d05

Browse files
committed
only show when above 0
1 parent bc14645 commit 9548d05

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

extensions/cli/src/ui/components/BottomStatusBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const BottomStatusBar: React.FC<BottomStatusBarProps> = ({
6464
</React.Fragment>
6565
)}
6666
<ModeIndicator />
67-
{contextPercentage !== undefined && (
67+
{contextPercentage !== undefined && contextPercentage > 0 && (
6868
<React.Fragment>
6969
<Text key="context-separator" color="dim">
7070
{" "}

extensions/cli/src/ui/components/ContextPercentageDisplay.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ interface ContextPercentageDisplayProps {
77

88
/**
99
* Component to display the current context usage percentage
10-
* Shows the percentage in gray color for consistency with other status indicators
10+
* Shows the non-zero percentage in gray color for consistency with other status indicators
1111
*/
1212
export const ContextPercentageDisplay: React.FC<
1313
ContextPercentageDisplayProps
1414
> = ({ percentage }) => {
15+
if (percentage === 0) {
16+
return null;
17+
}
18+
1519
return <Text color="dim">Context: {percentage}%</Text>;
1620
};

0 commit comments

Comments
 (0)