Skip to content

Comments

feat(cli): add gemini --resume hint on exit#16285

Merged
jackwotherspoon merged 8 commits intogoogle-gemini:mainfrom
Mag1ck:feature/add-resume-message-on-exit
Feb 18, 2026
Merged

feat(cli): add gemini --resume hint on exit#16285
jackwotherspoon merged 8 commits intogoogle-gemini:mainfrom
Mag1ck:feature/add-resume-message-on-exit

Conversation

@Mag1ck
Copy link
Contributor

@Mag1ck Mag1ck commented Jan 10, 2026

Summary

This PR adds a helpful hint to the exit summary screen, informing users how to resume their session after leaving according to jacob comment here:
#16226

I'm not sure about padding tho

Details

Modified SessionSummaryDisplay.tsx to include a new message below the standard "Agent powering down" text, packed new and old message into box component.

Related Issues

Fixes #16226

How to Validate

Build and start the CLI: npm run build -> npm run start
Exit the session by typing /quit or pressing Ctrl+C twice.

Expected Result: The exit summary should display the following message at the bottom:
Resume this session by running gemini --resume

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • [x ] Windows
      • [x ] npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@Mag1ck Mag1ck requested a review from a team as a code owner January 10, 2026 00:38
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Mag1ck, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience of the Gemini CLI by providing a clear and actionable instruction to users upon exiting a session. It addresses a specific user need by displaying a command to resume their work, making the CLI more intuitive and user-friendly.

Highlights

  • Feature: Resume Hint on Exit: A new hint has been added to the CLI exit summary screen, guiding users on how to resume their session.
  • User Guidance: The hint specifically instructs users to run gemini --resume to continue their previous session.
  • UI Component Update: The SessionSummaryDisplay.tsx component was modified to incorporate the new message, utilizing Box and Text components from the ink library for layout and styling.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a helpful hint to the exit summary screen, informing users how to resume their session. The implementation is straightforward, but there's a minor UI alignment issue that should be addressed for consistency.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@gemini-cli gemini-cli bot added the area/core Issues related to User Interface, OS Support, Core Functionality label Jan 10, 2026
@jackwotherspoon
Copy link
Contributor

@Mag1ck Currently the hint is under the box on exit??

image

Is this the intent? I personally believe it would make more sense to be under Savings Highlights at the bottom of the box for a more pleasant look.

Wonder what @jacob314 thinks here.

@Mag1ck
Copy link
Contributor Author

Mag1ck commented Jan 14, 2026

Yes that was intentional.
I think that saving highlights is dedicated for model performance and our message is just goodbye tip. I think we should wait for Jacob to decide

@gemini-cli gemini-cli bot added the priority/p2 Important but can be addressed in a future release. label Jan 21, 2026
@jacob314 jacob314 added the help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! label Jan 22, 2026
@afarber
Copy link
Contributor

afarber commented Jan 25, 2026

I am sorry, but more changes are needed for this small feature - please take a look at #17481

@jackwotherspoon
Copy link
Contributor

@afarber why do you propose the sessionId is needed?

We just need to show the tip and message...?

@jackwotherspoon
Copy link
Contributor

@Mag1ck Can you move the tip into the box, i think it makes sense for everything to be in the box.

Just have it at the end with Tip: Resume this session ...

@Mag1ck
Copy link
Contributor Author

Mag1ck commented Jan 27, 2026

@afarber why do you propose the sessionId is needed?
I also don't understand to be honest

@afarber
Copy link
Contributor

afarber commented Jan 27, 2026

To avoid showing the resume hint when there's nothing to resume (user quits immediately without any prompts).

@jackwotherspoon
Copy link
Contributor

To avoid showing the resume hint when there's nothing to resume (user quits immediately without any prompts).

That is a fair point.

Couple options I see:

a) We could make the resume tip more generic. Tip: Resume a previous session using gemini --resume or /resume
b) Add the additional logic.

@jacob314 do you have any preference here?

I would probably lean option a)

@jackwotherspoon
Copy link
Contributor

BTW the session browser could filter out empty sessions too. Currently it shows them as '(No messages)' in the list

@afarber that sounds like a bug, the session browser should not show empty sessions. Want to file a bug for that?

@afarber
Copy link
Contributor

afarber commented Jan 27, 2026

@jackwotherspoon sorry, I do not see that issue anymore. Deleted the misleading comment

@Mag1ck
Copy link
Contributor Author

Mag1ck commented Jan 27, 2026

@Mag1ck Can you move the tip into the box, i think it makes sense for everything to be in the box.

Just have it at the end with Tip: Resume this session ...

Sure I will move it into the box no problem. I will make this fix tomorrow

Also @afarber is right here In my opinion but generic tip is also an option

@Mag1ck
Copy link
Contributor Author

Mag1ck commented Jan 28, 2026

@jackwotherspoon I've added footer into the box, and updated branch
image

@jackwotherspoon
Copy link
Contributor

I fixed conflicts and added a bottom margin to model usage area so that proper spacing is added when models are used. As screenshot above was testing no model calls 😄

image

Will get this merged today ✅

@Mag1ck
Copy link
Contributor Author

Mag1ck commented Feb 18, 2026

Thank you Sir 🙏

@jackwotherspoon jackwotherspoon added this pull request to the merge queue Feb 18, 2026
Merged via the queue into google-gemini:main with commit 65e0043 Feb 18, 2026
27 checks passed
@jackwotherspoon
Copy link
Contributor

Thanks for the patience here @Mag1ck

Sorry this took so long!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a prompt before exiting using ctrl c

4 participants