Commit Graph

699 Commits

  • feat(omo): add preset model variants for thinking level support
    Add OPENCODE_PRESET_MODEL_VARIANTS constant with variant definitions
    for Google, OpenAI, and Anthropic models. The omoModelVariantsMap
    builder now falls back to presets when config-defined variants are
    absent, enabling the variant selector for supported models.
  • fix(omo): use lowercase keys for builtin agent definitions
    OMO config schema expects all agent keys to be lowercase.
    Updated OMO_BUILTIN_AGENTS keys (Sisyphus → sisyphus, Hephaestus →
    hephaestus, etc.) and aligned Rust test fixtures accordingly.
  • feat(omo): integrate Oh My OpenCode profile management (#972)
    * feat(omo): integrate Oh My OpenCode profile management into Provider system
    
    Adds full-stack OMO support: backend config read/write/import, OMO-specific
    provider CRUD with exclusive switching, frontend profile editor with
    agent/category/model configuration, global config management, and i18n support.
    
    * feat(omo): add model/variant dropdowns from enabled providers
    
    Replace model text inputs with Select dropdowns sourced from enabled
    OpenCode providers, add thinking-level variant selection, and prevent
    auto-enabling newly added OMO providers.
    
    * fix(omo): use standard provider action styles for OMO switch button
    
    * fix(omo): replace hardcoded isZh strings with proper i18n t() calls
  • feat: rename Qwen Coder preset to Bailian (#965)
    - replace Qwen Coder preset with Bailian for Claude and OpenCode
    - add Bailian icon asset and metadata mapping
    - remove Bailian preset default model values
    - rename Claude preset Kimi k2 to Kimi
  • feat(usage): enhance dashboard with auto-refresh control and robust formatting (#942)
    * style: format code and apply clippy lint fixes
    
    * feat(usage): enhance dashboard with auto-refresh control and robust formatting
    
    - Add configurable auto-refresh interval toggle (off/5s/10s/30s/60s) to usage dashboard
    - Extract shared format utilities (fmtUsd, fmtInt, parseFiniteNumber, getLocaleFromLanguage)
    - Refactor request log time filtering to rolling vs fixed mode with validation
    - Use stable serializable query keys instead of filter objects
    - Handle NaN/Infinity safely in number formatting across all usage components
    - Use RFC 3339 date format in backend trend data
  • fix(opencode): reject save when no models configured (#932)
    Add validation to require at least one model before saving an OpenCode
    provider. Shows a localized toast error when models are empty.
  • refactor(terminal): unify terminal selection using global settings
    - Remove terminal selector from Session Manager page
    - Backend now reads terminal preference from global settings
    - Add terminal name mapping (iterm2 → iterm) for compatibility
    - Add WezTerm support to macOS terminal options
    - Add WezTerm translations for zh/en/ja
  • fix(i18n): replace hardcoded Chinese strings in Session Manager
    - Add i18n keys for relative time (justNow, minutesAgo, hoursAgo, daysAgo)
    - Add i18n keys for role labels (roleUser, roleSystem, roleTool)
    - Add i18n keys for UI elements (tocTitle, searchSessions, clickToCopyPath)
    - Update formatRelativeTime and getRoleLabel to accept t function
    - Add useTranslation hook to SessionToc component
  • feat(ui): hide provider test button
    Provider request formats are complex and varied, making it difficult
    to create a unified test mechanism. Users may incorrectly assume
    request format issues indicate provider unavailability.
    
    Code is commented out (not deleted) for easy restoration if needed.
  • refactor(ui): extract shared components and deduplicate MCP/Skills panels (#897)
    * refactor(ui): add tooltips and icons to MCP and Skills panels
    
    * refactor: deduplicate UnifiedSkillsPanel and UnifiedMcpPanel shared code
  • feat: session manger (#867)
    * feat: init session manger
    
    * feat: persist selected app to localStorage
    
    - Save app selection when switching providers
    - Restore last selected app on page load
    
    * feat: persist current view to localStorage
    
    - Save view selection when switching tabs
    - Restore last selected view on page load
    
    * styles: update ui
    
    * feat: Improve macOS Terminal activation and refactor Kitty launch to use  command with user's default shell.
    
    * fix: session view
    
    * feat: toc
    
    * feat: Implement FlexSearch for improved session search functionality.
    
    * feat: Redesign session manager search and filter UI for a more compact and dynamic experience.
    
    * refactor: modularize session manager by extracting components and utility functions into dedicated files.
    
    * feat: Enhance session terminal launching with support for iTerm2, Ghostty, WezTerm, and Alacritty, including UI and custom configuration options.
    
    * feat: Conditionally render terminal selection and resume session buttons only on macOS.
  • fix(skills): handle Windows path separator in installed status matching (#868)
    * fix(skills): handle Windows path separator in installed status matching
    
    Use regex to split directory path by both / and \ to correctly extract
    the install name on Windows, fixing the issue where installed skills
    were not showing as installed in the discovery page filter.
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * feat(skills): add repository filter to skills discovery page
    
    - Add dropdown to filter skills by repository (owner/name)
    - Extract unique repos from discoverable skills list
    - Add truncate style for long repo names with hover title
    - Add i18n translations for zh/en/ja
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
  • feat(ui): dynamic endpoint hint based on API format selection (#860)
    - Add apiHintOAI i18n key for OpenAI Chat Completions format hint
    - Update ClaudeFormFields to show format-specific endpoint hints
    - When API format is "openai_chat", show OAI-specific hint
    - Maintains consistency between hint and selected API format
    
    Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
  • fix(mutations): use extractErrorMessage for complete error display
    Provider add/update/delete mutations were using error.message directly,
    which doesn't extract Tauri invoke errors properly. Now using the same
    extractErrorMessage pattern as the rest of the codebase.
  • chore: bump version to 3.10.3
    - Update version in package.json, Cargo.toml, and tauri.conf.json
    - Add missing changelog entries for OpenCode API key link and AICodeMirror preset
    - Fix Prettier formatting for new hook files
  • feat(opencode): add API key link support for OpenCode provider form
    Enable API key link feature for OpenCode app, allowing users to access
    provider websites for key registration directly from the form.
  • feat(providers): add AICodeMirror partner preset for all apps
    Register AICodeMirror icon, add i18n partner promotion texts (zh/en/ja),
    and fix trailing whitespace in codexProviderPresets.
  • feat(settings): add OpenCode support to environment check and one-click install
    - Add OpenCode version detection with Go path scanning
    - Add GitHub Releases API for fetching latest OpenCode version
    - Add OpenCode install command to one-click install section
    - Update i18n hints to include OpenCode across all locales
    - Fix SettingsPage indentation formatting
  • feat(claude): show proxy hint when switching to OpenAI Chat format provider
    Display an info toast when switching to a provider that uses OpenAI Chat
    format (apiFormat === "openai_chat"), reminding users to enable the proxy
    service. Move toast logic from mutation to useProviderActions for better
    control over notification content based on provider properties.
  • feat(providers): add NVIDIA NIM preset for Claude and OpenCode
    - Add NVIDIA NIM provider preset with API configuration
    - Add nvidia.svg icon and register in icon system
    - Add nvidia metadata with keywords and default color (#74B71B)
  • feat(claude): add apiFormat support for provider presets
    Allow preset providers to specify API format (anthropic or openai_chat),
    enabling third-party proxy services that use OpenAI Chat Completions format.
  • refactor(claude): migrate api_format from settings_config to meta
    Move api_format storage from settings_config to ProviderMeta to prevent
    polluting ~/.claude/settings.json when switching providers.
    
    - Add api_format field to ProviderMeta (Rust + TypeScript)
    - Update ProviderForm to read/write apiFormat from meta
    - Maintain backward compatibility for legacy settings_config.api_format
      and openrouter_compat_mode fields (read-only fallback)
    - Strip api_format from settings_config before writing to live config
  • fix(i18n): update apiFormatOpenAIChat label to mention proxy requirement
    Change label from "Requires conversion" to "Requires proxy" for clarity:
    - zh: "需转换" → "需开启代理"
    - en: "Requires conversion" → "Requires proxy"
    - ja: "変換が必要" → "プロキシが必要"
  • fix(claude): improve backward compatibility for openrouter_compat_mode
    Extend backward compatibility support for legacy openrouter_compat_mode field:
    - Support number type (1 = enabled, 0 = disabled)
    - Support string type ("true"/"1" = enabled)
    - Add corresponding test cases for number and string types
  • feat(claude): add API format selector for third-party providers
    Replace the OpenRouter-specific compatibility toggle with a generic
    API format selector that allows all Claude providers to choose between:
    
    - Anthropic Messages (native): Direct passthrough, no conversion
    - OpenAI Chat Completions: Enables Anthropic ↔ OpenAI format conversion
    
    Changes:
    - Add ClaudeApiFormat type ("anthropic" | "openai_chat") to types.ts
    - Replace openRouterCompatToggle with apiFormat dropdown in ClaudeFormFields
    - Update ProviderForm to manage apiFormat state via settingsConfig.api_format
    - Refactor claude.rs: add get_api_format() method, update needs_transform()
    - Maintain backward compatibility with legacy openrouter_compat_mode field
    - Update i18n translations (zh, en, ja)
  • feat(skills): add install from ZIP file feature
    - Add open_zip_file_dialog command for selecting ZIP files
    - Add install_from_zip service method with recursive skill scanning
    - Add install_skills_from_zip Tauri command
    - Add frontend API methods and useInstallSkillsFromZip hook
    - Add "Install from ZIP" button in Skills management page
    - Support local skill ID format: local:{directory}
    - Add i18n translations for new feature and error messages
  • feat(settings): prioritize native install path for Claude Code detection
    - Move ~/.local/bin to first position in version scan search paths
    - Update one-click install commands to use official native installation
      (curl script) instead of npm for Claude Code
  • fix(settings): correct Gemini default visibility to true (#818)
    Frontend fallback value for visibleApps had gemini: false, which was
    inconsistent with backend default (gemini: true). This caused Gemini
    to be hidden by default on first install.
    
    Fixes #817
    
    Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
  • chore(presets): upgrade Kimi/Moonshot providers to k2.5 model
    - Update Moonshot preset models from kimi-k2-thinking to kimi-k2.5
    - Update OpenCode Kimi preset name and model to k2.5
    - Remove explicit model config from Kimi preset (use API defaults)
  • fix(settings): correct footer layout in advanced settings tab
    - Establish proper flexbox height chain from App to SettingsPage
    - Move save button to fixed footer outside scrollable area
    - Align footer styling with FullScreenPanel for consistency
  • Feat/pricing config enhancement (#781)
    * feat(db): add pricing config fields to proxy_config table
    
    - Add default_cost_multiplier field per app type
    - Add pricing_model_source field (request/response)
    - Add request_model field to proxy_request_logs table
    - Implement schema migration v5
    
    * feat(api): add pricing config commands and provider meta fields
    
    - Add get/set commands for default cost multiplier
    - Add get/set commands for pricing model source
    - Extend ProviderMeta with cost_multiplier and pricing_model_source
    - Register new commands in Tauri invoke handler
    
    * fix(proxy): apply cost multiplier to total cost only
    
    - Move multiplier calculation from per-item to total cost
    - Add resolve_pricing_config for provider-level override
    - Include request_model and cost_multiplier in usage logs
    - Return new fields in get_request_logs API
    
    * feat(ui): add pricing config UI and usage log enhancements
    
    - Add pricing config section to provider advanced settings
    - Refactor PricingConfigPanel to compact table layout
    - Display all three apps (Claude/Codex/Gemini) in one view
    - Add multiplier column and request model display to logs
    - Add frontend API wrappers for pricing config
    
    * feat(i18n): add pricing config translations
    
    - Add zh/en/ja translations for pricing defaults config
    - Add translations for multiplier, requestModel, responseModel
    - Add provider pricing config translations
    
    * fix(pricing): align backfill cost calculation with real-time logic
    
    - Fix backfill to deduct cache_read_tokens from input (avoid double billing)
    - Apply multiplier only to total cost, not to each item
    - Add multiplier display in request detail panel with i18n support
    - Use AppError::localized for backend error messages
    - Fix init_proxy_config_rows to use per-app default values
    - Fix silent failure in set_default_cost_multiplier/set_pricing_model_source
    - Add clippy allow annotation for test mutex across await
    
    * style: format code with cargo fmt and prettier
    
    * fix(tests): correct error type assertions in proxy DAO tests
    
    The tests expected AppError::InvalidInput but the DAO functions use
    AppError::localized() which returns AppError::Localized variant.
    Updated assertions to match the correct error type with key validation.
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>
  • feat(opencode): sync all providers to live config on directory change
    Add additive mode support for OpenCode in sync_current_to_live:
    - Add AppType::is_additive_mode() to distinguish switch vs additive mode
    - Add AppType::all() iterator to avoid hardcoding app lists
    - Add sync_all_providers_to_live() for additive mode apps
    - Refactor sync_current_to_live to handle both modes
    
    Frontend changes (directory settings):
    - Track opencodeDirChanged in useDirectorySettings
    - Trigger syncCurrentProvidersLiveSafe when OpenCode dir changes
    - Add i18n strings for OpenCode directory settings
  • feat(settings): add preferred terminal selection
    Allow users to choose their preferred terminal app for opening
    provider terminals. Supports platform-specific options:
    - macOS: Terminal.app, iTerm2, Alacritty, Kitty, Ghostty
    - Windows: cmd, PowerShell, Windows Terminal
    - Linux: GNOME Terminal, Konsole, Xfce4, Alacritty, Kitty, Ghostty
    
    Falls back to system default if selected terminal is unavailable.
  • fix(skills): prevent duplicate skill installation from different repos (#778)
    - Add directory conflict detection before installation
    - Fix installed status check to match repo owner and name
    - Add i18n translations for conflict error messages
  • feat(ui): replace update badge dot with ArrowUpCircle icon
    - Replace blue dot indicator with lucide ArrowUpCircle icon
    - Change color scheme from blue to green for better visibility
    - Enlarge button (h-8 w-8) and icon (h-5 w-5) for better UX
    - Move UpdateBadge from title area to after settings icon
  • feat(skills): add skill sync method setting (symlink/copy)
    - Add SyncMethod enum (Auto/Symlink/Copy) in Rust backend
    - Implement sync_to_app_dir with symlink support (cross-platform)
    - Add SkillSyncMethodSettings UI component (simplified 2-button selector)
    - Add i18n support for zh/en/ja
    - Replace copy_to_app with configurable sync_to_app_dir
    - Add skill_sync_method field to AppSettings
    
    User can now choose between symlink (disk space saving) or copy (best compatibility) in Settings > General.
  • feat(partner): add RightCode as official partner
    Update RightCode referral link to use CCSWITCH affiliate code and mark
    as official partner with promotional messages in all supported languages.
  • fix(opencode): preserve extra model fields during serialization
    Add `extra` field with serde flatten to OpenCodeModel struct to capture
    custom fields like cost, modalities, thinking, and variants that were
    previously lost during save operations.
  • fix(form): backfill model fields when editing Claude provider
    Use lazy initialization in useState to parse model values from config
    on first render, matching the pattern used in useApiKeyState. This
    fixes an issue where model fields were not populated in edit mode.
  • chore: release v3.10.1
    - Bump version to 3.10.1 across all config files
    - Update CHANGELOG with all fixes since v3.10.0
    - Fix Rust Clippy warning by using derive(Default)
    - Apply code formatting
  • feat(icons): update RightCode provider icon
    - Import new detailed RC icon from rc.svg (128x128 viewBox)
    - Add icon configuration to Claude provider preset
    - Remove duplicate old RC icon definition to fix TS1117 error