feat(cli): add shortcuts to /memory list and interactive UI#20429
feat(cli): add shortcuts to /memory list and interactive UI#20429Oerum wants to merge 2 commits intogoogle-gemini:mainfrom
Conversation
Summary of ChangesHello @Oerum, 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 significantly enhances the user experience of the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new interactive UI for the /memory list command, which is a great improvement for user experience. It adds shortcuts to open memory files and their containing directories. The implementation is solid, using the open package for security and a new React component for the UI. The suggested changes address an important area for improvement related to error handling for the new shortcuts. When opening a file or directory fails, the error is currently swallowed, leading to a silent failure. The comments provide a comprehensive solution to handle these errors and provide feedback to the user. Overall, this is a valuable feature addition.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable interactive UI for the /memory list command, significantly improving user experience with shortcuts for opening files and directories. The implementation is well-structured, moving presentation logic into a new MemoryList component and correctly updating tests and keybindings. I have one suggestion to optimize performance in the new component.
Summary
Extends the
/memory listcommand with an interactive UI and keyboard shortcuts for opening files and folders.Details
/memory listwith a new interactiveMemoryListcomponent.Ctrl+Xshortcut to open the selectedGEMINI.mdfile in the default system editor.Alt+Oshortcut to open the directory containing the selected file.openutility for both actions to prevent command injection vulnerabilities.Command.OPEN_DIRECTORYtokeyBindings.ts.Related Issues
Fixes #20364
How to Validate
npm run start/memory listCtrl+Xon a file to open it in an external editor.Alt+Oon a file to open its containing folder.npm run test -w @google/gemini-cli -- src/ui/commands/memoryCommand.test.tsPre-Merge Checklist