Repository navigation
Conversation
|
Ready to review this PR? Stage has broken it down into 7 individual chapters for you: Chapters generated by Stage for commit 0262622 on Jun 20, 2026 8:57pm UTC. |
📝 WalkthroughWalkthroughThis pull request removes all Gemini agent support from the codebase. Shared type unions ( 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/shared/rate-limit-types.ts (1)
69-70:⚠️ Potential issue | 🔴 CriticalRemove the
gemini: nullfield from RateLimitState initializations.The
RateLimitStatetype insrc/shared/rate-limit-types.tsdoes not include ageminifield. However, at least two initialization sites still include it:
src/renderer/src/web/web-preload-api.ts:2304-2314(line 2307)src/renderer/src/store/slices/rate-limits.ts:18-28(line 21)Both need the
gemini: nullfield removed to match the type definition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ec7ab632-eaa4-4351-a185-956d59a71f05
📥 Commits
Reviewing files that changed from the base of the PR and between c3bff64 and 262287d8e777c66c7a8e91044491d6dcfa575377.
📒 Files selected for processing (29)
src/main/agent-hooks/managed-agent-hook-controls.tssrc/main/agent-hooks/remote-managed-hook-installers.tssrc/main/ai-vault/session-scanner-agent-parser.tssrc/main/ai-vault/session-scanner-primary-parsers.tssrc/main/ai-vault/session-scanner-types.tssrc/main/ai-vault/session-scanner.test.tssrc/main/ai-vault/session-scanner.tssrc/main/gemini/hook-service.test.tssrc/main/gemini/hook-service.tssrc/main/index.tssrc/main/ipc/agent-hooks.tssrc/main/rate-limits/gemini-bucket-formatting.test.tssrc/main/rate-limits/gemini-bucket-formatting.tssrc/main/rate-limits/gemini-cli-oauth-extractor.tssrc/main/rate-limits/gemini-oauth-sources.tssrc/main/rate-limits/gemini-usage-fetcher.fallback.test.tssrc/main/rate-limits/gemini-usage-fetcher.test-fixtures.tssrc/main/rate-limits/gemini-usage-fetcher.test.tssrc/main/rate-limits/gemini-usage-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/preload/api-types.tssrc/preload/index.tssrc/shared/agent-hook-types.tssrc/shared/agent-status-types.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/telemetry-events.tssrc/shared/types.ts
💤 Files with no reviewable changes (23)
- src/main/rate-limits/gemini-bucket-formatting.test.ts
- src/shared/status-bar-defaults.ts
- src/main/gemini/hook-service.test.ts
- src/shared/agent-hook-types.ts
- src/main/rate-limits/gemini-cli-oauth-extractor.ts
- src/main/rate-limits/gemini-oauth-sources.ts
- src/preload/api-types.ts
- src/main/rate-limits/gemini-usage-fetcher.test.ts
- src/main/rate-limits/gemini-usage-fetcher.fallback.test.ts
- src/main/ai-vault/session-scanner-types.ts
- src/main/ai-vault/session-scanner-agent-parser.ts
- src/preload/index.ts
- src/main/rate-limits/gemini-usage-fetcher.ts
- src/main/rate-limits/gemini-bucket-formatting.ts
- src/main/rate-limits/gemini-usage-fetcher.test-fixtures.ts
- src/shared/agent-status-types.ts
- src/main/rate-limits/service.ts
- src/main/ipc/agent-hooks.ts
- src/shared/telemetry-events.ts
- src/shared/types.ts
- src/main/ai-vault/session-scanner.ts
- src/main/gemini/hook-service.ts
- src/main/ai-vault/session-scanner-primary-parsers.ts
|
Code rabbit raised concerns about a few non gemini cli related code removal. I am currently reviewing those changes and will push a follow up commit if any unrelated deletions are identified |
262287d to
325f8a6
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/main/rate-limits/service.ts (2)
934-948:⚠️ Potential issue | 🔴 CriticalFix remaining Gemini references in status-bar components after service state removal.
The service no longer provides a
geminifield, but multiple renderer components still reference it:
status-bar-provider-visibility.ts: Accessesproviders.gemini(lines 128, 138), checkssettings?.geminiCliOAuthEnabled(line 59), and handlesproviderId === 'gemini'(line 77)StatusBar.tsx: DestructuresgeminifromrateLimits(line 1799), passes it togetVisibleUsageProvider(line 1808), and checksgemini?.status(line 1848)tooltip.tsx: Handlesprovider === 'gemini'(lines 76, 95)status-bar-agent-gating.ts: Includes'gemini'inCLI_GATED_ITEMS(line 9)These unresolved references will cause runtime errors. Remove all Gemini-related code from the status-bar components to complete the removal.
98-147:⚠️ Potential issue | 🔴 CriticalUpdate
setSettingsResolvercaller insrc/main/index.tsto return only the required properties.The call at line 1331 passes
store!.getSettings()which returns the fullGlobalSettingsobject, but the narrowed signature expects only{ opencodeSessionCookie: string; opencodeWorkspaceId: string }. Update the caller to extract and return only these two properties:Suggested fix
rateLimits.setSettingsResolver(() => { const settings = store!.getSettings() return { opencodeSessionCookie: settings.opencodeSessionCookie, opencodeWorkspaceId: settings.opencodeWorkspaceId } })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9381d793-fe6e-463d-b9db-205d75022712
📥 Commits
Reviewing files that changed from the base of the PR and between 262287d8e777c66c7a8e91044491d6dcfa575377 and 325f8a6.
📒 Files selected for processing (29)
src/main/agent-hooks/managed-agent-hook-controls.tssrc/main/agent-hooks/remote-managed-hook-installers.tssrc/main/ai-vault/session-scanner-agent-parser.tssrc/main/ai-vault/session-scanner-primary-parsers.tssrc/main/ai-vault/session-scanner-types.tssrc/main/ai-vault/session-scanner.test.tssrc/main/ai-vault/session-scanner.tssrc/main/gemini/hook-service.test.tssrc/main/gemini/hook-service.tssrc/main/index.tssrc/main/ipc/agent-hooks.tssrc/main/rate-limits/gemini-bucket-formatting.test.tssrc/main/rate-limits/gemini-bucket-formatting.tssrc/main/rate-limits/gemini-cli-oauth-extractor.tssrc/main/rate-limits/gemini-oauth-sources.tssrc/main/rate-limits/gemini-usage-fetcher.fallback.test.tssrc/main/rate-limits/gemini-usage-fetcher.test-fixtures.tssrc/main/rate-limits/gemini-usage-fetcher.test.tssrc/main/rate-limits/gemini-usage-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/preload/api-types.tssrc/preload/index.tssrc/shared/agent-hook-types.tssrc/shared/agent-status-types.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/telemetry-events.tssrc/shared/types.ts
💤 Files with no reviewable changes (22)
- src/main/ai-vault/session-scanner-types.ts
- src/main/ai-vault/session-scanner-agent-parser.ts
- src/main/rate-limits/gemini-bucket-formatting.ts
- src/main/rate-limits/gemini-usage-fetcher.test-fixtures.ts
- src/shared/status-bar-defaults.ts
- src/main/gemini/hook-service.ts
- src/main/rate-limits/gemini-usage-fetcher.fallback.test.ts
- src/shared/agent-status-types.ts
- src/main/rate-limits/gemini-usage-fetcher.ts
- src/main/rate-limits/gemini-bucket-formatting.test.ts
- src/shared/agent-hook-types.ts
- src/preload/index.ts
- src/preload/api-types.ts
- src/main/ipc/agent-hooks.ts
- src/main/rate-limits/gemini-oauth-sources.ts
- src/main/rate-limits/gemini-usage-fetcher.test.ts
- src/main/rate-limits/gemini-cli-oauth-extractor.ts
- src/main/ai-vault/session-scanner-primary-parsers.ts
- src/main/ai-vault/session-scanner.ts
- src/main/gemini/hook-service.test.ts
- src/shared/telemetry-events.ts
- src/shared/types.ts
✅ Files skipped from review due to trivial changes (1)
- src/main/index.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- src/main/agent-hooks/remote-managed-hook-installers.ts
- src/main/ai-vault/session-scanner.test.ts
- src/shared/rate-limit-types.ts
- src/main/agent-hooks/managed-agent-hook-controls.ts
|
I reviewed the code rabbit comment and pushed a follow-up fix. The branch has been updated accordingly. |
- Remove Gemini CLI hook service and related Gemini-specific wiring. - Delete rate-limit, automation, AI vault, preload, and agent-hook code paths. - Remove shared enums, types, tests, and fixtures tied to discontinued CLI support. - Restore non-Gemini shared rate-limit and agent-status code that was accidentally included in the cleanup.
- Remove the live Gemini usage bar and related status-bar gating. - Remove Gemini from the empty-state CTA and provider visibility logic. - Update the matching status-bar tests to reflect the cleanup. - Leave the shared Gemini icon helper in place for settings UI usage.
|
Thanks for the PR! Closing it for now as we'll have a new version based on the main, but will credit you as the commit author in that PR! |
Summary
Removed legacy Gemini CLI-related code and cleaned up associated files, folders, and references throughout the codebase following the deprecation of Gemini CLI. This change removes obsolete implementation details and reduces maintenance overhead.
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildTests not run as part of this cleanup-only change.
AI Review Report
The changes were implemented with the assistance of an AI coding agent and primarily focused on removing deprecated Gemini CLI-related code, files, and references.
Review focus areas:
No major issues were identified during the cleanup process. Manual verification of application behavior and platform-specific functionality is still recommended.
Cross-platform compatibility review was not independently verified and may require additional validation on macOS, Linux, and Windows.
Security Audit
This change primarily removes deprecated functionality and does not intentionally introduce new authentication, authorization, command execution, IPC, dependency, or secret-management logic.
No dedicated security audit was performed. Additional review is recommended before release if any removed components previously interacted with authentication flows, local file access, shell commands, or external services.
Notes
ELI5
Removes leftover Gemini CLI code after deprecation. Cleanup only; no intentional user-facing feature change.