Add support for auto-updating git extensions#8511
Conversation
|
Size Change: +4.49 kB (+0.03%) Total Size: 17.3 MB
ℹ️ View Unchanged
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
| type ExtensionInstallMetadata, | ||
| } from '@google/gemini-cli-core'; | ||
|
|
||
| export function createExtension({ |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces an auto-update feature for git extensions, controlled by a new autoUpdate setting. The implementation includes significant refactoring of the extension update logic, moving it into dedicated files under config/extensions/. While the feature is a valuable addition, the current implementation has some critical issues, including a potential infinite loop in a React hook and incorrect state management, which could lead to unpredictable behavior. I've provided detailed comments and suggestions to address these issues.
TLDR
Adds a setting under
extensionscalledautoUpdate. This can either be just a boolean or a map of extension names to booleans. The default isfalse.On startup, we now always check for updates, and if auto-update is enabled we will auto-update and log a message once it completes. If auto-updating is disabled we log a message that there is an update available. The messages look like this (but are the same size):
Dive Deeper
Adds a new
useExtensionUpdateshook which handles the update state of all extensions. This manages only checking for updates once, and possibly auto-updating if enabled, as well as adding the new history items to the UI.Reviewer Test Plan
Testing Matrix
Linked issues / bugs
Closes #7009