Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sgnagnarella
Copy link
Contributor

TLDR

Adding list sub command to memoryCommand to list the path of GEMINI.md files.

Dive Deeper

Reviewer Test Plan

Execute the list sub command from the memory command. Test a scenario where long term memory has been added (e.g. "Remember that my favorite color is blue") and make sure that the path for ~/.gemini/GEMINI.md file is listed.

Testing Matrix

🍏 🪟 🐧
npm run X - -
npx X
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

@sgnagnarella sgnagnarella requested a review from a team as a code owner September 28, 2025 15:03
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sgnagnarella, 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 introduces a significant quality-of-life improvement for users interacting with the CLI's hierarchical memory feature. By adding a new /memory list subcommand, users can now easily inspect which GEMINI.md files are contributing to their current instructional context. This enhances transparency and aids in debugging memory-related issues by providing direct visibility into the file paths being utilized. The change involved propagating file path information from the memory discovery utility through the configuration system to the new CLI command, ensuring a robust and testable implementation.

Highlights

  • New /memory list subcommand: A new command has been added to the CLI's memoryCommand to display the paths of all GEMINI.md files currently loaded into hierarchical memory.
  • Enhanced Memory Discovery: The loadHierarchicalGeminiMemory function now returns not only the memory content and file count but also an array of the file paths from which the memory was loaded.
  • Configuration Update: The core Config class and its parameters have been extended to store and provide access to the discovered GEMINI.md file paths.
  • Comprehensive Testing: New unit tests have been added for the /memory list subcommand, covering cases where no files are found and where multiple files are present. Existing memory discovery tests were also updated to verify the returned file paths.
  • Documentation: The CLI commands documentation (docs/cli/commands.md) has been updated to include the description of the new /memory list subcommand.
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 introduces a new /memory list command to display the paths of GEMINI.md files being used. The implementation involves modifying loadHierarchicalGeminiMemory to return file paths and updating the Config object to store them. The changes are well-implemented, and tests have been updated accordingly.

However, I found a significant issue where the file paths are not updated when memory is refreshed, which would lead to the new /memory list command showing stale data. I've left a comment with details on how to fix this.

…fter the refresh command. Updated refresh command to update GEMINI.md file paths. Updated perform memory refresh method on AppContainer to also update FilePaths in the config.
Copy link
Collaborator

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding this!

@abhipatel12 abhipatel12 added this pull request to the merge queue Oct 2, 2025
Merged via the queue into google-gemini:main with commit 43bac6a Oct 2, 2025
25 checks passed
thacio added a commit to thacio/auditaria that referenced this pull request Oct 7, 2025
giraffe-tree pushed a commit to giraffe-tree/gemini-cli that referenced this pull request Oct 10, 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.

Add ability to list the paths for GEMINI.md files in use

2 participants