Skip to content

Conversation

@kooksee
Copy link
Contributor

@kooksee kooksee commented Dec 30, 2025

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @kooksee, 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 new completion command to generate shell autocompletion scripts for various shells, significantly improving the user experience for CLI interaction. It also refactors the version management system and simplifies the configuration handling by removing file-based configuration. A major focus of this update is on enhancing the clarity and detail of the help and listing outputs, making the CLI more intuitive and informative. These changes are accompanied by internal code refactoring to improve modularity and API design.

Highlights

  • Shell Autocompletion Command: A new completion command has been introduced, allowing users to generate autocompletion scripts for Bash, Zsh, and Fish shells. This command is dynamically added to the root command.
  • Version Management Refactor: The --version global flag and its associated logic have been removed. Version information is now managed through an embedded file (.version/VERSION) and exposed via a new redant.Version() function, centralizing version control.
  • Configuration Simplification: Support for configuration files (like YAML) has been removed, streamlining the multi-source configuration to focus solely on command-line flags and environment variables. This also removes the YAMLConfigPath type and the fsnotify dependency.
  • Enhanced Help and Listing Output: The output for --list-commands and --list-flags has been significantly improved. --list-commands now displays command descriptions and argument details (name, type, defaults, requirements) more clearly, with reduced indentation. --list-flags no longer includes the root command name in subcommand paths and removes trailing colons. Additionally, all non-hidden options defined in the root command are now displayed as global flags.
  • Argument Parsing Optimization: Argument parsing and validation are now skipped if a help flag is requested, preventing unnecessary errors when users are simply querying for command help.
  • Code Structure and API Improvements: The completion command implementation has been moved to a dedicated cmds/completioncmd directory for better organization. A new Parent() method has been added to the Command struct, and an Type() method to the Option struct, enhancing the internal API.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

@kooksee kooksee merged commit f0ae743 into main Dec 30, 2025
1 check passed
Copy link

@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 shell completion command (completion) for bash, zsh, and fish, which is a great enhancement for the CLI framework. It also includes a significant refactoring to remove configuration file support, simplifying the framework's configuration sources. While the overall changes are positive, I've found a critical syntax error in the zsh completion script generation that will prevent the code from compiling. I've provided a detailed comment and a suggested fix for this issue.

Comment on lines +237 to +249
buf.WriteString(`\ case $state in
subcmds)
local subcommands=(")
for _, child := range cmd.Children {
if !child.Hidden {
buf.WriteString(fmt.Sprintf("'%s:%s' ", child.Name(), child.Short))
}
}
buf.WriteString(")")
buf.WriteString("
_describe 'subcommands' subcommands
;;
esac`)

Choose a reason for hiding this comment

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

critical

This block of code for generating zsh subcommand handlers contains a syntax error. The for loop on line 240 is mixed with buf.WriteString calls in a way that is not valid Go syntax. The for loop is outside of any string literal, but it's surrounded by what appears to be shell script code, which will cause a compilation failure.

To fix this, you should construct the string of subcommands within the Go for loop and then write the complete case statement to the buffer.

Suggested change
buf.WriteString(`\ case $state in
subcmds)
local subcommands=(")
for _, child := range cmd.Children {
if !child.Hidden {
buf.WriteString(fmt.Sprintf("'%s:%s' ", child.Name(), child.Short))
}
}
buf.WriteString(")")
buf.WriteString("
_describe 'subcommands' subcommands
;;
esac`)
buf.WriteString(`\ case $state in
subcmds)
local -a subcommands=(
`)
for _, child := range cmd.Children {
if !child.Hidden {
buf.WriteString(fmt.Sprintf(" '%s:%s'\n", child.Name(), child.Short))
}
}
buf.WriteString(` )
_describe 'subcommands' subcommands
;;
esac`)

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.

2 participants