bug: only show tool tokens if > 0 (#985)

This commit is contained in:
Abhi
2025-06-12 15:31:17 -04:00
committed by GitHub
parent 6bb3f27f6c
commit 32da693b91
4 changed files with 17 additions and 6 deletions

View File

@@ -66,6 +66,17 @@ describe('<StatsColumn />', () => {
);
expect(lastFrame()).toMatchSnapshot();
});
it('hides the tool use row when there are no tool use tokens', () => {
const statsWithNoToolUse: FormattedStats = {
...mockStats,
toolUseTokens: 0,
};
const { lastFrame } = render(
<StatsColumn title="Test Stats" stats={statsWithNoToolUse} />,
);
expect(lastFrame()).not.toContain('Tool Use Tokens');
});
});
describe('<DurationColumn />', () => {