Skip to content

feat(ai): add configurable tips display via showTips config#137

Merged
AnnatarHe merged 2 commits intomainfrom
feat/ai-configurable-tips
Oct 7, 2025
Merged

feat(ai): add configurable tips display via showTips config#137
AnnatarHe merged 2 commits intomainfrom
feat/ai-configurable-tips

Conversation

@AnnatarHe
Copy link
Copy Markdown
Contributor

Summary

  • Added showTips configuration option under the ai config section
  • Users can now disable AI-related tips by setting ai.showTips = false in their config
  • Tips are shown by default (when not configured) to maintain backward compatibility
  • The shouldShowTips() helper function checks this configuration before displaying tips

Test plan

  • Verify tips are shown by default when showTips is not configured
  • Verify tips are hidden when showTips = false is set in config
  • Verify tips are shown when showTips = true is explicitly set in config
  • Test with AI auto-run enabled and disabled scenarios

🤖 Generated with Claude Code

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>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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

  • Configurable AI Tips: Introduced a new "ai.showTips" configuration option, allowing users to enable or disable AI-related tips displayed in the terminal output.
  • Default Behavior: AI tips are shown by default to ensure backward compatibility, meaning users do not need to configure anything unless they wish to hide the tips.
  • Helper Function: A "shouldShowTips()" helper function was added to centralize the logic for checking the "ai.showTips" configuration, handling cases where the option is not explicitly set.
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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
commands/query.go 92.85% 1 Missing ⚠️
Flag Coverage Δ
unittests 23.46% <92.85%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
commands/query.go 87.41% <92.85%> (-0.09%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 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.

Comment thread commands/query.go
Comment on lines +135 to +139
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")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For improved readability and to consolidate multiple function calls into one, you can combine these Printf statements into a single call.

Suggested change
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>
@AnnatarHe AnnatarHe merged commit 19e37ca into main Oct 7, 2025
3 checks passed
@AnnatarHe AnnatarHe deleted the feat/ai-configurable-tips branch October 7, 2025 13:56
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.

1 participant