-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Migrate /corgi #4419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate /corgi #4419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @abhipatel12, 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 marks the completion of the command migration project by moving the final legacy command, /corgi
, to the new command structure. This crucial step enabled the comprehensive removal of the entire legacy command processing system, resulting in a significantly streamlined and more maintainable codebase.
Highlights
- Command Migration Completion: The
/corgi
command, the final legacy command, has been successfully migrated to the new, standardized command architecture. - Legacy Command System Removal: The entire deprecated legacy command processing infrastructure has been eliminated. This includes the
LegacySlashCommand
interface, thelegacyCommands
array, and all associated fallback logic within theslashCommandProcessor.ts
hook. - Codebase Streamlining: The
useSlashCommandProcessor
hook has been significantly simplified by removing parameters and internal logic that were solely tied to the old command system, leading to a leaner and more maintainable codebase. - Enhanced Test Coverage: A new dedicated test file (
corgiCommand.test.ts
) has been added for the migrated command, and existing test suites (CommandService.test.ts
,slashCommandProcessor.test.ts
) have been updated to reflect the new command structure and the removal of legacy components.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 is currently in preview and 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 to provide feedback.
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
-
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. ↩
There was a problem hiding this 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 completes the migration of the /corgi
command and removes the legacy command processing system. I've identified a critical syntax error in corgiCommand.test.ts
and a high-severity maintainability issue in CommandService.test.ts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Coverage Summary
CLI Package - Full Text Report
Core Package - Full Text Report
For detailed HTML reports, please see the 'coverage-reports-22.x' artifact from the main CI run. |
Hi there! What's corgi mode? And what can I do with it? |
@YdayangY Corgi mode is just a UI effect that gets toggled when you're in the CLI. You should see a corgi in the bottom right if you use |
TLDR
This PR completes the command migration project by migrating the final legacy command,
/corgi
, to the new command structure. With this change, the entire legacy command processing system, including thelegacyCommands
array and related fallback logic inslashCommandProcessor.ts
, has been removed.Dive Deeper
The migration of the
/corgi
command followed the established plan:packages/cli/src/ui/commands/corgiCommand.ts
.corgiCommand.test.ts
, was added to ensure the command's functionality is covered.CommandService.ts
and its test file.The most significant part of this PR is the cleanup phase. Since
/corgi
was the last command, I was able to:LegacySlashCommand
interface.legacyCommands
array and theuseMemo
hook that created it.handleSlashCommand
function.allCommands
memoized value and its associated logic for adapting legacy commands.useSlashCommandProcessor
hook's signature and dependency arrays, removing props that were only used by the legacy system.This leaves the
slashCommandProcessor
hook much leaner.Reviewer Test Plan
npm start
./corgi
and press Enter./corgi
again and press Enter./help
,/theme
,/clear
) to ensure that the removal of the legacy system has not caused any regressions./foo
correctly displays an "Unknown command" error.Testing Matrix