Commit Graph

6 Commits

  • style: apply code formatting across backend and frontend (#252)
    Apply cargo fmt and prettier formatting to improve code readability.
    No functional changes.
    
    Changes:
    - Rust: multi-line assertion formatting (gemini_config, env_checker)
    - Rust: simplify chained method calls (provider)
    - TypeScript: add trailing commas to function parameters (codexProviderPresets)
  • feat: update Gemini default model and remove Google Official preset model
    Updated default model from gemini-2.5-pro to gemini-3-pro-preview across:
    - Provider presets (PackyCode, Custom)
    - Form field placeholders
    - Default configurations
    - Test cases
    
    Google Official preset now has empty env config, allowing users to choose
    their own model or use application defaults, which is more appropriate for
    OAuth-based authentication.
    
    Changes:
    - geminiProviderPresets.ts: updated model to gemini-3-pro-preview, removed model from Google Official
    - GeminiFormFields.tsx: updated placeholder to gemini-3-pro-preview
    - GeminiConfigSections.tsx: updated placeholder to gemini-3-pro-preview
    - ProviderForm.tsx: updated default config to gemini-3-pro-preview
    - gemini_config.rs: updated test examples to gemini-3-pro-preview
  • fix(gemini): relax validation when adding providers (#210)
    Allow users to create Gemini provider configurations without API key
    and fill it in later. Split validation into two modes:
    
    - validate_gemini_settings: Basic structure check (used when adding)
    - validate_gemini_settings_strict: Full validation (used when switching)
    
    This fixes the error 'Gemini config missing required field: GEMINI_API_KEY'
    when trying to add Gemini providers from presets like PackyCode or Google.
    
    Changes:
    - Add validate_gemini_settings_strict for switching validation
    - Update write_gemini_live to use strict validation
    - Add comprehensive tests for both validation modes
  • feat(tray): add Gemini support to system tray menu (#209)
    Refactor tray menu system to support three applications (Claude/Codex/Gemini):
    - Introduce generic TrayAppSection structure and TRAY_SECTIONS array
    - Implement append_provider_section and handle_provider_tray_event helper functions
    - Enhance Gemini provider service with .env config read/write support
    - Implement Gemini LiveSnapshot for atomic operations and rollback
    - Update README documentation to reflect Gemini tray quick switching feature
  • feat(gemini): add Gemini provider integration (#202)
    * feat(gemini): add Gemini provider integration
    
    - Add gemini_config.rs module for .env file parsing
    - Extend AppType enum to support Gemini
    - Implement GeminiConfigEditor and GeminiFormFields components
    - Add GeminiIcon with standardized 1024x1024 viewBox
    - Add Gemini provider presets configuration
    - Update i18n translations for Gemini support
    - Extend ProviderService and McpService for Gemini
    
    * fix(gemini): resolve TypeScript errors, add i18n support, and fix MCP logic
    
    **Critical Fixes:**
    - Fix TS2741 errors in tests/msw/state.ts by adding missing Gemini type definitions
    - Fix ProviderCard.extractApiUrl to support GOOGLE_GEMINI_BASE_URL display
    - Add missing apps.gemini i18n keys (zh/en) for proper app name display
    - Fix MCP service Gemini cross-app duplication logic to prevent self-copy
    
    **Technical Details:**
    - tests/msw/state.ts: Add gemini default providers, current ID, and MCP config
    - ProviderCard.tsx: Check both ANTHROPIC_BASE_URL and GOOGLE_GEMINI_BASE_URL
    - services/mcp.rs: Skip Gemini in sync_other_side logic with unreachable!() guards
    - Run pnpm format to auto-fix code style issues
    
    **Verification:**
    -  pnpm typecheck passes
    -  pnpm format completed
    
    * feat(gemini): enhance authentication and config parsing
    
    - Add strict and lenient .env parsing modes
    - Implement PackyCode partner authentication detection
    - Support Google OAuth official authentication
    - Auto-configure security.auth.selectedType for PackyCode
    - Add comprehensive test coverage for all auth types
    - Update i18n for OAuth hints and Gemini config
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>