From 5c9964e44a55e1b50f5491c7afe478247bb21494 Mon Sep 17 00:00:00 2001 From: Dev Randalpura Date: Mon, 2 Mar 2026 14:32:26 -0500 Subject: [PATCH] Added session ID to resume tip in exit footer --- .../ui/components/SessionSummaryDisplay.tsx | 20 ++++++++++++------- .../SessionSummaryDisplay.test.tsx.snap | 3 ++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/ui/components/SessionSummaryDisplay.tsx b/packages/cli/src/ui/components/SessionSummaryDisplay.tsx index 6975f757aa..6c822a6517 100644 --- a/packages/cli/src/ui/components/SessionSummaryDisplay.tsx +++ b/packages/cli/src/ui/components/SessionSummaryDisplay.tsx @@ -6,6 +6,7 @@ import type React from 'react'; import { StatsDisplay } from './StatsDisplay.js'; +import { useSessionStats } from '../contexts/SessionContext.js'; interface SessionSummaryDisplayProps { duration: string; @@ -13,10 +14,15 @@ interface SessionSummaryDisplayProps { export const SessionSummaryDisplay: React.FC = ({ duration, -}) => ( - -); +}) => { + const { stats } = useSessionStats(); + const footer = `To resume this session, run:\n gemini --resume ${stats.sessionId}`; + + return ( + + ); +}; diff --git a/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap index eb0fada885..fe27ab840b 100644 --- a/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap @@ -24,7 +24,8 @@ exports[` > renders the summary display with a title 1` │ │ │ Savings Highlight: 500 (50.0%) of input tokens were served from the cache, reducing costs. │ │ │ -│ Tip: Resume a previous session using gemini --resume or /resume │ +│ To resume this session, run: │ +│ gemini --resume test-session │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ " `;