feat(ai): add configurable tips display via showTips config#137
feat(ai): add configurable tips display via showTips config#137
Conversation
Add new `showTips` configuration option under the `ai` config section to allow users to disable AI-related tips. When set to false, tips about AI auto-run configuration will not be displayed. Configuration example: ```toml [ai] showTips = false ``` Defaults to true when not set to maintain backward compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary of ChangesHello @AnnatarHe, 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 new configuration setting, "ai.showTips", which provides users with granular control over the display of AI-related informational tips. This enhancement allows for a more personalized user experience by enabling the suppression of these tips while ensuring that they remain visible by default for all other users, preserving existing functionality. 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. 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
|
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a showTips configuration option to allow users to disable AI-related tips, which is a great addition for user experience. The implementation is clean, using a nullable boolean to correctly handle the default behavior. However, this change highlights a potential issue in the configuration merging logic. If a user only sets ai.showTips in a local config, it could unintentionally reset other AI-related settings like ai.agent configurations. This is because the AIConfig struct is replaced entirely instead of being merged field by field. While the file with this logic (model/config.go) is not part of this pull request's changes, I recommend addressing this in a follow-up to prevent unexpected behavior for users. I've also included a minor suggestion to consolidate multiple print statements for better code style.
| color.Yellow.Printf("\n💡 Tip: You can enable AI auto-run in your config file:\n") | ||
| color.Yellow.Printf(" [ai.agent]\n") | ||
| color.Yellow.Printf(" view = true # Auto-run view commands\n") | ||
| color.Yellow.Printf(" edit = true # Auto-run edit commands\n") | ||
| color.Yellow.Printf(" delete = true # Auto-run delete commands\n") |
There was a problem hiding this comment.
For improved readability and to consolidate multiple function calls into one, you can combine these Printf statements into a single call.
| color.Yellow.Printf("\n💡 Tip: You can enable AI auto-run in your config file:\n") | |
| color.Yellow.Printf(" [ai.agent]\n") | |
| color.Yellow.Printf(" view = true # Auto-run view commands\n") | |
| color.Yellow.Printf(" edit = true # Auto-run edit commands\n") | |
| color.Yellow.Printf(" delete = true # Auto-run delete commands\n") | |
| color.Yellow.Printf("\n💡 Tip: You can enable AI auto-run in your config file:\n [ai.agent]\n view = true # Auto-run view commands\n edit = true # Auto-run edit commands\n delete = true # Auto-run delete commands\n") |
Document the new `ai.showTips` configuration option in both the configuration reference table and the example configuration section. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
showTipsconfiguration option under theaiconfig sectionai.showTips = falsein their configshouldShowTips()helper function checks this configuration before displaying tipsTest plan
showTipsis not configuredshowTips = falseis set in configshowTips = trueis explicitly set in config🤖 Generated with Claude Code