orca icon indicating copy to clipboard operation
orca copied to clipboard

refactor: remove legacy Gemini CLI code and related components

Open siddqamar opened this issue 5 months ago â€ĸ 4 comments

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 lint
  • [ ] pnpm typecheck
  • [ ] pnpm test
  • [ ] pnpm build
  • [ ] Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

Tests 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:

  • Removal of unused and obsolete code paths
  • Detection of stale imports and references
  • Cleanup of related files and directories
  • Verification that removed components were no longer required

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

  • Removes legacy Gemini CLI support from the codebase.
  • Intended as a maintenance and cleanup change.
  • Additional validation may be required to ensure no remaining references to removed components exist.

Open in Stage

siddqamar avatar Jun 20 '26 16:06 siddqamar

Ready to review this PR? Stage has broken it down into 7 individual chapters for you:

Title
1 Remove Gemini from shared types and telemetry
2 Delete Gemini rate limit fetching logic
3 Clean up RateLimitService and related tests
4 Delete Gemini agent hook service
5 Unwire Gemini hooks from main process and IPC
6 Remove Gemini session parsing logic
7 Remove Gemini from status bar UI
Open in Stage

Chapters generated by Stage for commit 02626226a6f43dee11c6b102a10c14b953ec26df on Jun 20, 2026 8:57pm UTC.

stage-review[bot] avatar Jun 20 '26 16:06 stage-review[bot]

Review Change Stack

No actionable comments were generated in the recent review. 🎉

â„šī¸ Recent review info
âš™ī¸ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d78a480a-8b6d-4c4e-8b1a-14220fef708a

đŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between 325f8a6347a07d93e07e734d21b6b58087fdc733 and 02626226a6f43dee11c6b102a10c14b953ec26df.

📒 Files selected for processing (8)
  • src/renderer/src/components/status-bar/StatusBar.tsx
  • src/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsx
  • src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
  • src/renderer/src/components/status-bar/status-bar-agent-gating.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
  • src/renderer/src/components/status-bar/tooltip.test.ts
  • src/renderer/src/components/status-bar/tooltip.tsx

📝 Walkthrough

Walkthrough

This pull request removes all Gemini agent support from the codebase. Shared type unions (TuiAgent, StatusBarItem, ProviderRateLimits.provider, WellKnownAgentType, RateLimitState) drop the 'gemini' member; GlobalSettings removes geminiCliOAuthEnabled and adds opencodeWorkspaceId; telemetry schemas remove Gemini from AGENT_KIND_VALUES and SETTINGS_CHANGED_WHITELIST. The hook service removes gemini from MANAGED_AGENT_HOOK_INSTALLERS, LOCAL_MANAGED_HOOK_REMOVERS, and LOCAL_MANAGED_HOOK_STATUS_READERS registries and deletes all geminiHookService references from remote installers, IPC handlers, and the preload API bridge. AI Vault session scanning drops Gemini session discovery, directory constants, and parser function exports. The RateLimitService removes Gemini from its fetch cycle, state management, and settings resolver. Status bar UI components remove Gemini icon rendering, visibility checks, and provider detail blocks; corresponding test coverage for rate limit, agent gating, provider visibility, and tooltip functionality is updated to exclude or replace Gemini assertions.

đŸšĨ Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage âš ī¸ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description covers the summary and screenshots, but testing checkboxes are unchecked and the author explicitly states 'Tests not run' without justification. The AI Review Report and Security Audit sections acknowledge that cross-platform compatibility review and security audit were not performed, which partially addresses the template requirements but with significant caveats. Consider running the specified test procedures or providing detailed justification for why they were skipped. Clarify whether cross-platform compatibility and security review will be deferred to a later stage or if they have been addressed through other means.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main change: removal of legacy Gemini CLI code and related components throughout the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

âœī¸ Tip: You can configure your own custom pre-merge checks in the settings.


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.

â¤ī¸ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jun 20 '26 17:06 coderabbitai[bot]

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

siddqamar avatar Jun 20 '26 17:06 siddqamar

I reviewed the code rabbit comment and pushed a follow-up fix. The branch has been updated accordingly.

siddqamar avatar Jun 20 '26 20:06 siddqamar