Skip to content

Followup from #10719#13243

Merged
mrcabbage972 merged 3 commits intogoogle-gemini:mainfrom
Piebald-AI:use-RESUME_LATEST
Nov 19, 2025
Merged

Followup from #10719#13243
mrcabbage972 merged 3 commits intogoogle-gemini:mainfrom
Piebald-AI:use-RESUME_LATEST

Conversation

@bl-ue
Copy link
Copy Markdown
Contributor

@bl-ue bl-ue commented Nov 18, 2025

Summary

I meant to do this in #10719 (comment) and #10719 (comment) per @mrcabbage972 but I accidentally made it on my #4401 MR so the changes didn't go into main.

Details

Related Issues

How to Validate

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
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@bl-ue bl-ue requested a review from a team as a code owner November 18, 2025 00:54
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bl-ue, 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 implements a follow-up change to improve the robustness and maintainability of the CLI's session management. It standardizes the handling of the --resume flag's default behavior by introducing a constant and significantly expands test coverage for session listing and deletion, ensuring these features work as expected under various conditions.

Highlights

  • Refactored --resume flag handling: The --resume command-line flag now uses a dedicated RESUME_LATEST constant instead of a hardcoded string 'latest' when no value is provided, improving code clarity and maintainability.
  • Enhanced Session Management Tests: Comprehensive unit tests have been added for the listSessions and deleteSession functionalities, covering scenarios like listing sessions, deleting by UUID or index, handling invalid identifiers, and preventing deletion of the current active session.
  • Type Safety Improvement: The CliArgs interface has been updated to reflect the use of typeof RESUME_LATEST for the resume property, enhancing type safety.
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
Copy Markdown
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 follows up on #10719 by refactoring the magic string 'latest' for resuming sessions into a RESUME_LATEST constant and adding comprehensive tests for session listing and deletion functionalities. The changes are well-implemented. I've found one issue in the new test file sessions.test.ts where mock objects for SessionInfo include an extraneous displayName property that will cause a type error. I've left a comment with a suggestion to fix it. Otherwise, the changes look good.

Comment thread packages/cli/src/utils/sessions.test.ts Outdated
@bl-ue
Copy link
Copy Markdown
Contributor Author

bl-ue commented Nov 18, 2025

/gemini review

Copy link
Copy Markdown
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 introduces a good refactoring by replacing the magic string 'latest' with a RESUME_LATEST constant, improving maintainability and type safety. The changes are applied consistently across the codebase. Additionally, a comprehensive new test file for session management (sessions.test.ts) has been added, which significantly improves test coverage for this functionality. The new tests are well-structured and cover a good range of scenarios. Overall, this is a high-quality contribution that improves the codebase.

@mrcabbage972 mrcabbage972 added this pull request to the merge queue Nov 19, 2025
Merged via the queue into google-gemini:main with commit 0d89ac7 Nov 19, 2025
21 checks passed
@bl-ue bl-ue deleted the use-RESUME_LATEST branch November 19, 2025 16:38
thacio added a commit to thacio/auditaria that referenced this pull request Nov 23, 2025
danpalmer pushed a commit to danpalmer/gemini-cli that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants