docs: specify .gemini directory for custom commands#24908
docs: specify .gemini directory for custom commands#24908LindaLawton wants to merge 1 commit intogoogle-gemini:mainfrom
Conversation
Update Step 5 of the custom commands documentation to clarify that the commands directory must reside within a .gemini configuration folder. Previously, the instructions lacked context regarding the required root path, which could lead to users creating directories in locations where the CLI cannot detect them. Added explicit directory navigation to the code examples for macOS, Linux, and Windows.
Summary of ChangesHello, 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 improves the clarity of the custom commands documentation. By explicitly defining the required directory structure, it helps users avoid common configuration issues where the CLI fails to detect custom command definitions. Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for writing extensions by specifying the location for custom commands. However, the feedback indicates that the added instruction is technically incorrect for extension development; while standalone commands use a '.gemini' directory, commands bundled within an extension must be placed in a 'commands/' directory at the extension root. The reviewer suggested reverting the change to maintain technical accuracy and consistency with the provided code examples.
Note: Security Review has been skipped due to the limited scope of the PR.
| ## Step 5: Add a custom command | ||
|
|
||
| Custom commands create shortcuts for complex prompts. | ||
| Custom commands create shortcuts for complex prompts. These must be located within a `.gemini` configuration directory (either in your project root or your home directory). |
There was a problem hiding this comment.
This instruction is incorrect for extension development. While standalone custom commands (user or project level) are stored within a .gemini directory, commands bundled as part of an extension must be placed in a commands/ directory at the root of the extension. The FileCommandLoader specifically scans [extension-path]/commands, so following this new instruction would result in the commands failing to load. Additionally, this text contradicts the code examples provided in the following steps which do not use the .gemini prefix, violating the requirement for documentation consistency.
| Custom commands create shortcuts for complex prompts. These must be located within a `.gemini` configuration directory (either in your project root or your home directory). | |
| Custom commands create shortcuts for complex prompts. |
References
- Maintain consistency in documentation. When information about a feature is present in multiple documents, ensure all instances are updated or removed together to avoid contradictions.
Summary
Update Step 5 of the custom commands documentation to clarify that the commands directory must reside within a .gemini configuration folder.
Details
Previously, the instructions lacked context regarding the required root path, which could lead to users creating directories in locations where the CLI cannot detect them. Added explicit directory navigation to the code examples for macOS, Linux, and Windows.