Commit Graph

1023 Commits

  • 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(i18n): add format transform translations
    Add translations for format transform configuration UI in Chinese,
    English, and Japanese.
  • feat(ui): add format transform configuration in provider form
    - Add FormatTransformConfig type definition
    - Add format transform section in ProviderAdvancedConfig component
    - Support source/target format selection (Anthropic/OpenAI)
    - Add transform streaming toggle option
  • fix(proxy): prevent duplicate endpoint in Codex adapter URL building
    Fix URL construction when base_url already contains the endpoint path
    (e.g., base_url="https://api.example.com/v1/chat/completions" with
    endpoint="/v1/chat/completions" should not result in double path).
  • feat(proxy): integrate format transform module in forwarder
    - Use TransformConfig.from_provider() to get transform settings
    - Add early validation for missing transformers
    - Support transform_streaming flag to force non-streaming mode
    - Transform endpoint path based on source/target format
  • feat(provider): add FormatTransformConfig for API format conversion
    Add FormatTransformConfig struct to support API format transformation
    between different providers (e.g., Anthropic ↔ OpenAI). This enables
    providers like OpenRouter that use OpenAI-compatible interfaces.
  • refactor(proxy): extract format transform into standalone module
    - Create new `proxy/transform/` module with clean architecture:
      - `traits.rs`: FormatTransformer trait definition
      - `format.rs`: ApiFormat enum (Anthropic, OpenAI, Gemini)
      - `registry.rs`: TransformerRegistry with global instance
      - `config.rs`: TransformConfig from Provider settings
      - `anthropic_openai/`: Bidirectional Anthropic ↔ OpenAI converters
    
    - Move streaming transform from providers/ to transform/
    - Remove legacy transform code from providers/adapter.rs and claude.rs
    - Update handlers.rs to use new transform module
    
    This refactor improves maintainability and makes it easier to add
    new format converters in the future.
  • 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(prompt): clear prompt file when all prompts are disabled
    When disabling a prompt, check if any other prompts remain enabled.
    If all prompts are disabled, clear the prompt file to ensure UI state
    matches the actual configuration that Claude Code reads.
  • 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
  • fix(proxy): change rectifier default state to disabled
    Change the default state of the rectifier from enabled to disabled.
    This allows users to opt-in to the rectifier feature rather than having it enabled by default.
    
    Changes:
    - Set RectifierConfig::default() enabled and request_thinking_signature to false
    - Update serde default attributes from default_true to default
    - Update unit tests to reflect new default behavior
  • 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
  • fix(ui): increase app icon collapse threshold from 3 to 4
    Improve readability by keeping app names visible when 3 apps are shown.
    Icons now only collapse to compact mode when 4 or more apps are visible.
  • fix(ui): improve ProviderIcon color validation to prevent black icons
    Enhance the effectiveColor logic in ProviderIcon to properly validate
    the color prop before using it. Now only uses color when it's a valid
    non-empty string, otherwise falls back to icon metadata defaultColor.
    
    This fixes the issue where Gemini icons would turn black when selected
    in ProviderCard due to null/undefined/empty string color values being
    passed through.
  • fix(ui): unify layout padding across all panels
    Remove max-width constraints and standardize padding to px-6 for consistent full-width layout across header and all content panels.
  • fix(settings): reorder window settings and change default values
    Move "minimize to tray on close" to the bottom of window settings.
    Change skipClaudeOnboarding default to false.
  • fix(terminal): keep Windows terminal window open after execution
    Use /K instead of /C flag to prevent cmd window from closing
    immediately after batch file execution. Also remove the buggy
    errorlevel check that was checking del command's return value
    instead of claude's.
    
    Fixes #726
  • fix(config): correct OpenCode config path on Windows
    OpenCode uses ~/.config/opencode on all platforms, not %APPDATA%\opencode
    on Windows. Remove the platform-specific path handling to use unified
    ~/.config/opencode path across all operating systems.
  • fix(ui): align panel content with header constraints
    Add max-w-[56rem] and mx-auto to Skills, MCP, and Prompts panels
    to match the header layout constraints, ensuring the back button
    and action buttons align with the content area.
  • feat(config): add RightCode provider and rename Z.ai GLM
    - Add RightCode provider preset with GPT-5.2 models
    - Rename "Z.ai GLM" to "Zhipu GLM en" for clarity
  • fix(config): remove icon config from provider preset
    Remove unused icon and iconColor fields from Requesty Cloud preset
  • feat(icons): replace MCP button icon with official MCP logo
    Use inline SVG for MCP icon to support currentColor inheritance,
    enabling proper hover color transitions.
  • feat(icons): add new provider icons and fix SiliconFlow iconColor
    - Add rc.svg for RightCode (optimized from 96KB to 581 bytes)
    - Add catcoder.svg for KAT-Coder (快手)
    - Add mcp.svg for Model Context Protocol
    - Add siliconflow.svg for SiliconFlow
    - Register all new icons in index.ts
    - Add icon config for RightCode in claude/codex presets
    - Add icon config for KAT-Coder in claude/opencode presets
    - Fix SiliconFlow iconColor from #000000 to #6E29F6
  • feat(skills): add baoyu-skills preset repo and auto-supplement missing defaults
    - Add JimLiu/baoyu-skills to default skill repositories
    - Change init_default_skill_repos() from "first-run only" to "supplement missing"
    - New preset repos will now auto-appear for existing users on upgrade
  • fix(icon): auto-apply default color from metadata when color prop is not provided
    When ProviderIcon is used without a color prop, it now automatically
    fetches the defaultColor from icon metadata. This fixes the issue where
    Gemini app icon turns black when selected in AppSwitcher, because the
    component was inheriting the parent's text-foreground color.
  • fix(failover): switch to P1 immediately when enabling auto failover
    Previously, enabling auto failover kept using the current provider until
    the first failure, causing inconsistency when the current provider was
    not in the failover queue. When stopping proxy, the restored config
    would not match user expectations.
    
    New behavior:
    - Enable auto failover = immediately switch to queue P1
    - Subsequent routing follows queue order (P1→P2→...)
    - Auto-add current provider to queue if queue is empty
    
    Changes:
    - Add switch_proxy_target() for hot-switching during proxy mode
    - Update provider_router to use queue order when failover enabled
    - Sync tray menu Auto click with the same logic
    - Update UI tooltips to reflect new semantics
    - Add tests for queue-only routing scenario
  • chore: fix code formatting and test setup
    - Format Rust code with rustfmt (misc.rs, types.rs)
    - Format TypeScript/React code with Prettier (4 files)
    - Fix ProviderList test by wrapping with QueryClientProvider
  • fix(terminal): use temp script files to avoid escaping issues on all platforms
    - macOS: Replace inline AppleScript commands with temp .sh script file
    - Linux: Use temp .sh script file instead of inline bash -c command
    - Windows: Add proper error capturing with output() instead of spawn()
    - Remove unused escape_shell_path and generate_wrapper_script functions
    - Unified approach across platforms for better maintainability
  • feat(tray): sync tray menu with app visibility settings
    Apply visibleApps setting to filter tray menu sections, so hidden apps
    no longer appear in the system tray menu.
  • feat(settings): add app visibility settings
    Allow users to choose which apps (Claude, Codex, Gemini, OpenCode) to display on the homepage.
    
    - Add VisibleApps type and settings field in both frontend and backend
    - Refactor AppSwitcher to render apps dynamically based on visibility
    - Extract ToggleRow component for reuse
    - Add i18n support for app visibility settings
  • feat(settings): set Gemini visibility to false by default
    New users will see Claude, Codex, and OpenCode by default, with Gemini hidden.
  • Feat/provider individual config (#663)
    * refactor(ui): simplify UpdateBadge to minimal dot indicator
    
    * feat(provider): add individual test and proxy config for providers
    
    Add support for provider-specific model test and proxy configurations:
    
    - Add ProviderTestConfig and ProviderProxyConfig types in Rust and TypeScript
    - Create ProviderAdvancedConfig component with collapsible panels
    - Update stream_check service to merge provider config with global config
    - Proxy config UI follows global proxy style (single URL input)
    
    Provider-level configs stored in meta field, no database schema changes needed.
    
    * feat(ui): add failover toggle and improve proxy controls
    
    - Add FailoverToggle component with slide animation
    - Simplify ProxyToggle style to match FailoverToggle
    - Add usage statistics button when proxy is active
    - Fix i18n parameter passing for failover messages
    - Add missing failover translation keys (inQueue, addQueue, priority)
    - Replace AboutSection icon with app logo
    
    * fix(proxy): support system proxy fallback and provider-level proxy config
    
    - Remove no_proxy() calls in http_client.rs to allow system proxy fallback
    - Add get_for_provider() to build HTTP client with provider-specific proxy
    - Update forwarder.rs and stream_check.rs to use provider proxy config
    - Fix EditProviderDialog.tsx to include provider.meta in useMemo deps
    - Add useEffect in ProviderAdvancedConfig.tsx to sync expand state
    
    Fixes #636
    Fixes #583
    
    * fix(ui): sync toast theme with app setting
    
    * feat(settings): add log config management
    
    Fixes #612
    Fixes #514
    
    * fix(proxy): increase request body size limit to 200MB
    
    Fixes #666
    
    * docs(proxy): update timeout config descriptions and defaults
    
    Fixes #612
    
    * fix(proxy): filter x-goog-api-key header to prevent duplication
    
    * fix(proxy): prevent proxy recursion when system proxy points to localhost
    
    Detect if HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY environment variables
    point to loopback addresses (localhost, 127.0.0.1), and bypass system
    proxy in such cases to avoid infinite request loops.
    
    * fix(i18n): add providerAdvanced i18n keys and fix failover toast parameter
    
    - Add providerAdvanced.* i18n keys to en.json, zh.json, and ja.json
    - Fix failover toggleFailed toast to pass detail parameter
    - Remove Chinese fallback text from UI for English/Japanese users
    
    * fix(tray): restore tray-provider events and enable Auto failover properly
    
    - Emit provider-switched event on tray provider click (backward compatibility)
    - Auto button now: starts proxy, takes over live config, enables failover
    
    * fix(log): enable dynamic log level and single file mode
    
    - Initialize log at Trace level for dynamic adjustment
    - Change rotation strategy to KeepSome(1) for single file
    - Set max file size to 1GB
    - Delete old log file on startup for clean start
    
    * fix(tray): fix clippy uninlined format args warning
    
    Use inline format arguments: {app_type_str} instead of {}
    
    * fix(provider): allow typing :// in endpoint URL inputs
    
    Change input type from "url" to "text" to prevent browser
    URL validation from blocking :// input.
    
    Closes #681
    
    * fix(stream-check): use Gemini native streaming API format
    
    - Change endpoint from OpenAI-compatible to native streamGenerateContent
    - Add alt=sse parameter for SSE format response
    - Use x-goog-api-key header instead of Bearer token
    - Convert request body to Gemini contents/parts format
    
    * feat(proxy): add request logging for debugging
    
    Add debug logs for outgoing requests including URL and body content
    with byte size, matching the existing response logging format.
    
    * fix(log): prevent usize underflow in KeepSome rotation strategy
    
    KeepSome(n) internally computes n-2, so n=1 causes underflow.
    Use KeepSome(2) as the minimum safe value.
  • feat: 添加 ESC 键快捷返回功能 (#670)
    * feat: 添加 ESC 键快捷返回功能
    
    - FullScreenPanel 组件支持 ESC 键关闭
    - App.tsx 主页面支持 ESC 键返回主界面
    - 优化键盘事件处理,合并多个监听器
    - 使用事件捕获阶段避免冲突
    - 适用于所有子页面:MCP、设置、Prompts、Skills 等
    - 跨平台兼容:macOS、Windows、Linux
    
    * perf: 优化 ESC 键处理逻辑
    
    - 使用 useRef 避免闭包陷阱,提升性能
    - 修复输入框中按 ESC 会关闭面板的问题
    - 检测焦点元素,不干扰输入框的 ESC 行为
    - 改进用户体验,避免意外关闭导致数据丢失
    
    * fix: enhance global keyboard shortcuts and improve useModelState sync
    
    - App & FullScreenPanel: Use `isTextEditableTarget` to prevent shortcuts (ESC, etc.) from triggering while editing text.
    - useModelState: Prevent overwriting user input during config synchronization.
    - App: Add `Cmd/Ctrl + ,` shortcut to open settings.
    - Add `isTextEditableTarget` utility.
  • fix(provider): fix stale data shown when reopening edit dialog after save (#654)
    Add `open` to initialData useMemo dependencies to ensure latest provider
    data is read each time the dialog opens.
  • Merge pull request #695 from farion1231/feat/opencode-support
    feat: add OpenCode as the fourth managed CLI application
  • feat(opencode): add model-level options editor
    Add support for configuring per-model options like provider routing.
    Each model row now has an expand/collapse toggle to show a key-value
    editor for model-specific options (e.g., provider order, fallbacks).
    
    - Add options field to OpenCodeModel in Rust and TypeScript
    - Add expandable key-value editor UI for each model
    - Use local state pattern for option key input to prevent focus loss
    - Add i18n translations for zh/en/ja