diff options
| author | Abhi <[email protected]> | 2025-06-11 16:40:31 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-11 16:40:31 -0400 |
| commit | 7a72d255d8effec1396170306cc6be57f598a6d8 (patch) | |
| tree | eab86a4d4d5f145a033eed06d16dedeba7b23a37 /packages/cli/src/ui/components/HistoryItemDisplay.test.tsx | |
| parent | 4160d904da8328eb7168b5b652d4c0f17682546c (diff) | |
feat: Add exit UI w/ stats (#924)
Diffstat (limited to 'packages/cli/src/ui/components/HistoryItemDisplay.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/HistoryItemDisplay.test.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx index 0fe739df..5999f0ad 100644 --- a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx +++ b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx @@ -73,4 +73,27 @@ describe('<HistoryItemDisplay />', () => { ); expect(lastFrame()).toContain('About Gemini CLI'); }); + + it('renders SessionSummaryDisplay for "quit" type', () => { + const stats: CumulativeStats = { + turnCount: 1, + promptTokenCount: 10, + candidatesTokenCount: 20, + totalTokenCount: 30, + cachedContentTokenCount: 5, + toolUsePromptTokenCount: 2, + thoughtsTokenCount: 3, + apiTimeMs: 123, + }; + const item: HistoryItem = { + ...baseItem, + type: 'quit', + stats, + duration: '1s', + }; + const { lastFrame } = render( + <HistoryItemDisplay {...baseItem} item={item} />, + ); + expect(lastFrame()).toContain('Agent powering down. Goodbye!'); + }); }); |
