From 7a72d255d8effec1396170306cc6be57f598a6d8 Mon Sep 17 00:00:00 2001
From: Abhi <43648792+abhipatel12@users.noreply.github.com>
Date: Wed, 11 Jun 2025 16:40:31 -0400
Subject: feat: Add exit UI w/ stats (#924)

---
 .../src/ui/components/HistoryItemDisplay.test.tsx  | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

(limited to 'packages/cli/src/ui/components/HistoryItemDisplay.test.tsx')

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!');
+  });
 });
-- 
cgit v1.2.3

