Commit Graph

61 Commits

  • Merge branch 'main' into refactor/ui
    # Conflicts:
    #	src/components/skills/SkillsPage.tsx
  • chore: bump version to v3.7.1
    Prepare for v3.7.1 maintenance release.
    
    **Version Updates**:
    - package.json: 3.7.0 → 3.7.1
    - src-tauri/Cargo.toml: 3.7.0 → 3.7.1
    - src-tauri/tauri.conf.json: 3.7.0 → 3.7.1
    - README.md: version badge updated
    - README_ZH.md: version badge updated
    
    **CHANGELOG.md**:
    - Added v3.7.1 release notes (2025-11-22)
    - 3 bug fixes (Skills installation, Gemini persistence, dialog overlay)
    - 2 new features (Gemini config directory, ArchLinux support)
    - 3 improvements (error i18n, download timeout, code formatting)
    - 1 reverted feature (auto-launch)
    
    **Code Formatting**:
    - Applied prettier to SkillsPage.tsx and skillErrorParser.ts
    
    **Pre-Release Checks**:
     TypeScript type check passed
     Prettier format check passed
     All version numbers synchronized
  • chore(deps): add icon library and update preset configurations
    Add dependencies and utility scripts for icon system:
    
    ## Dependencies (package.json)
    - Add @lobehub/icons-static-svg@1.73.0
      - High-quality SVG icon library for AI providers
      - Source for extracted icons in src/icons/extracted/
    - Update pnpm-lock.yaml accordingly
    
    ## Provider Preset Updates (src/config/claudeProviderPresets.ts)
    - Add optional `icon` and `iconColor` fields to ProviderPreset interface
    - Apply to Anthropic Official preset as example:
      - icon: "anthropic"
      - iconColor: "#D4915D"
    - Future presets can include default icon configurations
    
    ## Utility Script (scripts/filter-icons.js) [NEW]
    - Helper script for filtering and managing icon assets
    - Supports icon discovery and validation workflow
    - Complements extract-icons.js and generate-icon-index.js
    
    This completes the icon system infrastructure, providing all
    necessary tools and dependencies for icon customization.
  • chore(release): bump version to v3.7.0 and rebrand to include Gemini CLI
    - Update version from 3.6.2 to 3.7.0 across all config files
    - Update project description to "All-in-One Assistant for Claude Code, Codex & Gemini CLI"
    - Update Chinese description to "Claude Code / Codex / Gemini CLI 全方位辅助工具"
    - Sync version in package.json, Cargo.toml, tauri.conf.json
    - Update branding in README.md, README_ZH.md and i18n locale files
  • 添加Claude和Codex环境变量检查 (#242)
    * feat(env): add environment variable conflict detection and management
    
    实现了系统环境变量冲突检测与管理功能:
    
    核心功能:
    - 自动检测会影响 Claude/Codex 的系统环境变量
    - 支持 Windows 注册表和 Unix shell 配置文件检测
    - 提供可视化的环境变量冲突警告横幅
    - 支持批量选择和删除环境变量
    - 删除前自动备份,支持后续恢复
    
    技术实现:
    - Rust 后端: 跨平台环境变量检测与管理
    - React 前端: EnvWarningBanner 组件交互界面
    - 国际化支持: 中英文界面
    - 类型安全: 完整的 TypeScript 类型定义
    
    * refactor(env): remove unused imports and function
    
    Remove unused HashMap and PathBuf imports, and delete the unused get_source_description function to clean up the code.
  • Feat/claude skills management (#237)
    * feat(skills): add Claude Skills management feature
    
    Implement complete Skills management system with repository discovery,
    installation, and lifecycle management capabilities.
    
    Backend:
    - Add SkillService with GitHub integration and installation logic
    - Implement skill commands (list, install, uninstall, check updates)
    - Support multiple skill repositories with caching
    
    Frontend:
    - Add Skills management page with repository browser
    - Create SkillCard and RepoManager components
    - Add badge, card, table UI components
    - Integrate Skills API with Tauri commands
    
    Files: 10 files changed, 1488 insertions(+)
    
    * feat(skills): integrate Skills feature into application
    
    Integrate Skills management feature with complete dependency updates,
    configuration structure extensions, and internationalization support.
    
    Dependencies:
    - Add @radix-ui/react-visually-hidden for accessibility
    - Add anyhow, zip, serde_yaml, tempfile for Skills backend
    - Enable chrono serde feature for timestamp serialization
    
    Backend Integration:
    - Extend MultiAppConfig with SkillStore field
    - Implement skills.json migration from legacy location
    - Register SkillService and skill commands in main app
    - Export skill module in commands and services
    
    Frontend Integration:
    - Add Skills page route and dialog in App
    - Integrate Skills UI with main navigation
    
    Internationalization:
    - Add complete Chinese translations for Skills UI
    - Add complete English translations for Skills UI
    
    Code Quality:
    - Remove redundant blank lines in gemini_mcp.rs
    - Format log statements in mcp.rs
    
    Tests:
    - Update import_export_sync tests for SkillStore
    - Update mcp_commands tests for new structure
    
    Files: 16 files changed, 540 insertions(+), 39 deletions(-)
    
    * style(skills): improve SkillsPage typography and spacing
    
    Optimize visual hierarchy and readability of Skills page:
    - Reduce title size from 2xl to lg with tighter tracking
    - Improve description spacing and color contrast
    - Enhance empty state with better text hierarchy
    - Use explicit gray colors for better dark mode support
    
    * feat(skills): support custom subdirectory path for skill scanning
    
    Add optional skillsPath field to SkillRepo to enable scanning skills
    from subdirectories (e.g., "skills/") instead of repository root.
    
    Changes:
    - Backend: Add skillsPath field with subdirectory scanning logic
    - Frontend: Add skillsPath input field and display in repo list
    - Presets: Add cexll/myclaude repo with skills/ subdirectory
    - Code quality: Fix clippy warnings (dedup logic, string formatting)
    
    Backward compatible: skillsPath is optional, defaults to root scanning.
    
    * refactor(skills): improve repo manager dialog layout
    
    Optimize dialog structure with fixed header and scrollable content:
    - Add flexbox layout with fixed header and scrollable body
    - Remove outer border wrapper for cleaner appearance
    - Match SkillsPage design pattern for consistency
    - Improve UX with better content hierarchy
  • feat(prompts+i18n): add prompt management and improve prompt editor i18n (#193)
    * feat(prompts): add prompt management across Tauri service and React UI
    
    - backend: add commands/prompt.rs, services/prompt.rs, register in commands/mod.rs and lib.rs, refine app_config.rs
    - frontend: add PromptPanel, PromptFormModal, PromptListItem, MarkdownEditor, usePromptActions, integrate in App.tsx
    - api: add src/lib/api/prompts.ts
    - i18n: update src/i18n/locales/{en,zh}.json
    - build: update package.json and pnpm-lock.yaml
    
    * feat(i18n): improve i18n for prompts and Markdown editor
    
    - update src/i18n/locales/{en,zh}.json keys and strings
    - apply i18n in PromptFormModal, PromptPanel, and MarkdownEditor
    - align prompt text with src-tauri/src/services/prompt.rs
    
    * feat(prompts): add enable/disable toggle and simplify panel UI
    
    - Add PromptToggle component and integrate in prompt list items
    - Implement toggleEnabled with optimistic update; enable via API, disable via upsert with enabled=false;
      reload after success
    - Simplify PromptPanel: remove file import and current-file preview to keep CRUD flow focused
    - Tweak header controls style (use mcp variant) and minor copy: rename “Prompt Management” to “Prompts”
    - i18n: add disableSuccess/disableFailed messages
    - Backend (Tauri): prevent duplicate backups when importing original prompt content
    
    * style: unify code formatting with trailing commas
    
    * feat(prompts): add Gemini filename support to PromptFormModal
    
    Update filename mapping to use Record<AppId, string> pattern, supporting
    GEMINI.md alongside CLAUDE.md and AGENTS.md.
    
    * fix(prompts): sync enabled prompt to file when updating
    
    When updating a prompt that is currently enabled, automatically sync
    the updated content to the corresponding live file (CLAUDE.md/AGENTS.md/GEMINI.md).
    
    This ensures the active prompt file always reflects the latest content
    when editing enabled prompts.
  • chore(release): prepare for v3.6.1 release
    - Bump version to 3.6.1 across all config files
      - package.json, Cargo.toml, tauri.conf.json
      - README.md and README_ZH.md version badges
      - Auto-updated Cargo.lock
    - Add release notes documentation
      - docs/release-note-v3.6.0-en.md (archive)
      - docs/release-note-v3.6.1-zh.md (cumulative format)
      - docs/release-note-v3.6.1-en.md (cumulative format)
    - Enlarge PackyCode sponsor logo by 50% (100px → 150px)
    - Update roadmap checklist (homebrew support marked as done)
  • Release v3.6.0: Major architecture refactoring and feature enhancements
    New Features:
    - Provider duplication and manual sorting via drag-and-drop
    - Custom endpoint management for aggregator providers
    - Usage query with auto-refresh interval and test script API
    - Config editor improvements (JSON format button, real-time TOML validation)
    - Auto-sync on directory change for WSL environment support
    - Load live config when editing active provider to protect manual modifications
    - New provider presets: DMXAPI, Azure Codex, AnyRouter, AiHubMix, MiniMax
    - Partner promotion mechanism (Zhipu GLM Z.ai)
    
    Architecture Improvements:
    - Backend: 5-phase refactoring (error handling → command split → services → concurrency)
    - Frontend: 4-stage refactoring (tests → hooks → components → cleanup)
    - Testing: 100% hooks unit test coverage, integration tests for critical flows
    
    Documentation:
    - Complete README rewrite with detailed architecture overview
    - Separate Chinese (README_ZH.md) and English (README.md) versions
    - Comprehensive v3.6.0 changelog with categorized changes
    - New bilingual screenshots and partner banners
    
    Bug Fixes:
    - Fixed configuration sync issues (apiKeyUrl priority, MCP sync, import sync)
    - Fixed usage query interval timing and refresh button animation
    - Fixed UI issues (edit mode alignment, language switch state)
    - Fixed endpoint speed test and provider duplicate insertion position
    - Force exit on config error to prevent silent fallback
    
    Technical Details:
    - Updated to Tauri 2.8.x, TailwindCSS 4.x, TanStack Query v5.90.x
    - Removed legacy v1 migration logic for better startup performance
    - Standardized command parameters (unified to camelCase `app`)
    - Result pattern for graceful error handling
  • test: migrate to MSW testing architecture for App integration test
    Major testing infrastructure upgrade from manual mocks to Mock Service Worker (MSW):
    
    New MSW infrastructure (tests/msw/):
    - Add state.ts: In-memory state manager with full CRUD operations
      - Manage providers and current selections per app type (Claude/Codex)
      - Auto-switch current provider when deleted
      - Deep clone to prevent reference pollution
    - Add handlers.ts: HTTP request handlers for 10 Tauri API endpoints
      - Mock get_providers, switch_provider, add/update/delete_provider
      - Mock update_sort_order, update_tray_menu, import_default_config
      - Support error scenarios (404 for non-existent providers)
    - Add tauriMocks.ts: Tauri API mock layer
      - Transparently convert invoke() calls to HTTP requests
      - Mock event listener system with emitTauriEvent helper
      - Use cross-fetch for Node.js environment
    - Add server.ts: MSW server setup for Node.js test environment
    
    Refactor App.test.tsx (-170 lines, -43%):
    - Remove 23 manual mocks (useProvidersQuery, useProviderActions, etc.)
    - Run real hooks with MSW-backed API calls instead of mock implementations
    - Test real state changes instead of mock call counts
    - Add comprehensive flow: duplicate → create → edit → delete → event listening
    - Verify actual provider list changes and current selection updates
    
    Setup integration:
    - Add MSW server lifecycle to tests/setupTests.ts
      - Start server before all tests
      - Reset handlers and state after each test
      - Close server after all tests complete
    - Clear all mocks in afterEach for test isolation
    
    Dependencies:
    - Add msw@^2.11.6 for API mocking
    - Add cross-fetch@^4.1.0 for fetch polyfill in Node.js
    
    Type fixes:
    - Add missing imports (AppType, Provider) in handlers.ts
    - Fix HttpResponse.json generic constraint with as any (MSW best practice)
    - Change invalid category "default" to "official" in state.ts
    
    Test results: All 50 tests passing across 8 files, 0 TypeScript errors
  • test: add frontend testing infrastructure with vitest
    - Introduce Vitest + React Testing Library + jsdom environment
    - Add useDragSort hook unit tests covering:
      * Sorting logic (sortIndex → createdAt → name)
      * Successful drag operation (API call + cache invalidation)
      * Failed drag operation (error toast display)
      * Edge case (no valid target, no API call)
    - Configure global test setup (i18n mock, auto cleanup)
    - Update TypeScript configs to include tests/ directory
    - Add test development plan documentation
    
    Test Coverage:
      ✓ Provider drag-and-drop sorting core logic
      ✓ React Query cache refresh
      ✓ Toast notification display
      ✓ Boundary condition handling
    
    Test Results: 4/4 passed (671ms)
    Next Steps: Sprint 2 - component tests with MSW mock layer
  • refactor: cleanup and minor improvements
    - Remove unused useDarkMode hook (now using shadcn theme-provider)
    - Clean up MCP components (remove redundant code)
    - Add restart API to settings
    - Minor type improvements
  • feat(ui): add drag-and-drop sorting for provider list (#126)
    * feat(ui): add drag-and-drop sorting for provider list
    
    Implement drag-and-drop functionality to allow users to reorder providers with custom sort indices.
    
    Features:
    - Install @dnd-kit libraries for drag-and-drop support
    - Add sortIndex field to Provider type (frontend & backend)
    - Implement SortableProviderItem component with drag handle
    - Add update_providers_sort_order Tauri command
    - Sync tray menu order with provider list sorting
    - Add i18n support for drag-related UI text
    
    Technical details:
    - Use @dnd-kit/core and @dnd-kit/sortable for smooth drag interactions
    - Disable animations for immediate response after drop
    - Update tray menu immediately after reordering
    - Sort priority: sortIndex → createdAt → name
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * fix(ui): remove unused transition variable in ProviderList
    
    Remove unused 'transition' destructured variable from useSortable hook
    to fix TypeScript error TS6133. The transition property is hardcoded
    as 'none' in the style object to prevent conflicts with drag operations.
    
    ---------
    
    Co-authored-by: Claude <noreply@anthropic.com>
  • feat: add provider usage query with JavaScript scripting support (#101)
    * feat: add provider usage query functionality
    
    - Updated `Cargo.toml` to include `regex` and `rquickjs` dependencies for usage script execution.
    - Implemented `query_provider_usage` command in `commands.rs` to handle usage queries.
    - Created `UsageScript` and `UsageData` structs in `provider.rs` for managing usage script configurations and results.
    - Added `execute_usage_script` function in `usage_script.rs` to run user-defined scripts for querying usage.
    - Enhanced `ProviderList` component to include a button for configuring usage scripts and a modal for editing scripts.
    - Introduced `UsageFooter` component to display usage information and status.
    - Added `UsageScriptModal` for editing and testing usage scripts with preset templates.
    - Updated Tauri API to support querying provider usage.
    - Modified types in `types.ts` to include structures for usage scripts and results.
    
    * feat(usage): support multi-plan usage display for providers
    
    - 【Feature】
      - Update `UsageResult` to support an array of `UsageData` for displaying multiple usage plans per provider.
      - Refactor `query_provider_usage` command to parse both single `UsageData` objects (for backward compatibility) and arrays of `UsageData`.
      - Enhance `usage_script` validation to accept either a single usage object or an array of usage objects.
    - 【Frontend】
      - Redesign `UsageFooter` to iterate and display details for all available usage plans, introducing `UsagePlanItem` for individual plan rendering.
      - Improve usage display with color-coded remaining balance and clear plan information.
      - Update `UsageScriptModal` test notification to summarize all returned plans.
      - Remove redundant `isCurrent` prop from `UsageFooter` in `ProviderList`.
    - 【Build】
      - Change frontend development server port from `3000` to `3005` in `tauri.conf.json` and `vite.config.mts`.
    
    * feat(usage): enhance query flexibility and display
    - 【`src/types.ts`, `src-tauri/src/provider.rs`】Make `UsageData` fields optional and introduce `extra` and `invalidMessage` for more flexible reporting.
      - `expiresAt` replaced by generic `extra` field.
      - `isValid`, `remaining`, `unit` are now optional.
      - Added `invalidMessage` to provide specific reasons for invalid status.
    - 【`src-tauri/src/usage_script.rs`】Relax usage script result validation to accommodate optional fields in `UsageData`.
    - 【`src/components/UsageFooter.tsx`】Update UI to display `extra` field and `invalidMessage`, and conditionally render `remaining` and `unit` based on availability.
    - 【`src/components/UsageScriptModal.tsx`】
      - Add a new `NewAPI` preset template demonstrating advanced extractor logic for complex API responses.
      - Update script instructions to reflect optional fields and new variable syntax (`{{apiKey}}`).
      - Remove old "DeepSeek" and "OpenAI" templates.
      - Remove basic syntax check for `return` statement.
    - 【`.vscode/settings.json`】Add `dish-ai-commit.base.language` setting.
    - 【`src-tauri/src/commands.rs`】Adjust usage logging to handle optional `remaining` and `unit` fields.
    
    * chore(config): remove VS Code settings from version control
    
    - delete .vscode/settings.json to remove editor-specific configurations
    - add /.vscode to .gitignore to prevent tracking of local VS Code settings
    - ensure personalized editor preferences are not committed to the repository
    
    * fix(provider): preserve usage script during provider update
    
    - When updating a provider, the `usage_script` configuration within `ProviderMeta` was not explicitly merged.
    - This could lead to the accidental loss of `usage_script` settings if the incoming `provider` object in the update request did not contain this field.
    - Ensure `usage_script` is cloned from the existing provider's meta when merging `ProviderMeta` during an update.
    
    * refactor(provider): enforce base_url for usage scripts and update dev ports
    - 【Backend】
        - `src-tauri/src/commands.rs`: Made `ANTHROPIC_BASE_URL` a required field for Claude providers and `base_url` a required field in `config.toml` for Codex providers when extracting credentials for usage script execution. This improves error handling by explicitly failing if these critical URLs are missing or malformed.
    - 【Frontend】
        - `src/App.tsx`, `src/components/ProviderList.tsx`: Passed `appType` prop to `ProviderList` component to ensure `updateProvider` calls within `handleSaveUsageScript` correctly identify the application type.
    - 【Config】
        - `src-tauri/tauri.conf.json`, `vite.config.mts`: Updated development server ports from `3005` to `3000` to standardize local development environment.
    
    * refactor(usage): improve usage data fetching logic
    
    - Prevent redundant API calls by tracking last fetched parameters in `useEffect`.
    - Avoid concurrent API requests by adding a guard in `fetchUsage`.
    - Clear usage data and last fetch parameters when usage query is disabled.
    - Add `queryProviderUsage` API declaration to `window.api` interface.
    
    * fix(usage-script): ensure usage script updates and improve reactivity
    
    - correctly update `usage_script` from new provider meta during updates
    - replace full page reload with targeted provider data refresh after saving usage script settings
    - trigger usage data fetch or clear when `usageEnabled` status changes in `UsageFooter`
    - reduce logging verbosity for usage script execution in backend commands and script execution
    
    * style(usage-footer): adjust usage plan item layout
    
    - Decrease width of extra field column from 35% to 30%
    - Increase width of usage information column from 40% to 45%
    - Improve visual balance and readability of usage plan items
  • chore: bump version to v3.5.0 and update roadmap
    Version Changes:
    - Update version to 3.5.0 in package.json, Cargo.toml, and tauri.conf.json
    
    Changelog Updates:
    - Add v3.5.0 release notes with comprehensive feature list
    - Document MCP management system implementation
    - Document configuration import/export functionality
    - Document endpoint speed testing feature
    - List all improvements, bug fixes, and technical enhancements
    
    Roadmap Updates:
    - Mark MCP manager as completed 
    - Mark i18n (internationalization) as completed 
    - Add new planned features: memory management, cloud sync
    - Reorganize feature priorities
  • fix(app): eliminate startup white screen by replacing @iarna/toml with browser-friendly smol-toml
    - chore(deps): switch TOML dependency from @iarna/toml to smol-toml and update lockfile
    - feat(mcp): add TOML editing/validation for Codex while keeping JSON for Claude; support auto ID extraction from TOML and JSON->TOML conversion for wizard output; add pre-submit required checks (stdio.command / http.url)
    - refactor(mcp): unify JSON/TOML validation errors via i18n; add formatTomlError for consistent, localized messages; consolidate state into formConfig/configError
    - feat(i18n): add TOML labels/placeholders and error keys (tomlConfig, tomlPlaceholder, tomlInvalid)
    - feat(utils): introduce tomlUtils with parse/stringify/validate/convert helpers using smol-toml; provide tomlToMcpServer, mcpServerToToml, extractIdFromToml, validateToml
    - build: confirm Vite no longer externalizes Node builtins during build; renderer builds without 'Module 'stream' has been externalized' warning
  • chore: bump version to 3.4.0
    - Add i18next internationalization with Chinese/English support
    - Add Claude plugin sync alongside VS Code integration
    - Extend provider presets with new models (DeepSeek-V3.2-Exp, Qwen3-Max, GLM-4.6)
    - Support portable mode and single instance enforcement
    - Add tray minimize and macOS Dock visibility management
    - Improve Settings UI with scrollable layout and save icon
    - Fix layout shifts and provider toggle consistency
    - Remove unnecessary OpenAI auth requirement
    - Update Windows MSI installer to target per-user LocalAppData
  • feat: integrate i18next for internationalization support (#65)
    * feat: integrate i18next for internationalization support
    
    - Added i18next and react-i18next dependencies for localization.
    - Updated various components to utilize translation functions for user-facing text.
    - Enhanced user experience by providing multilingual support across the application.
    
    * feat: improve i18n implementation with better translations and accessibility
    
    - Add proper i18n keys for language switcher tooltips and aria-labels
    - Replace hardcoded Chinese console error messages with i18n keys
    - Add missing translation keys for new UI elements
    - Improve accessibility with proper aria-label attributes
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>
  • release: bump version to v3.3.1
    Add support for DeepSeek-V3.1-Terminus model with emergency hotfix release
  • release: bump version to 3.3.0
    Update version across all package files and add comprehensive changelog for v3.3.0 release featuring VS Code integration, shared config snippets, enhanced Codex wizard, and cross-platform improvements.
  • feat: add config directory override support for WSL
    - Add persistent app settings with custom Claude Code and Codex config directories
    - Add config directory override UI in settings modal with manual input, browse, and reset options
    - Integrate tauri-plugin-dialog for native directory picker
    - Support WSL and other special environments where config paths need manual specification
    
    Changes:
    - settings.rs: Implement settings load/save and directory override logic
    - SettingsModal: Add config directory override UI components
    - API: Add get_config_dir and pick_directory commands
  • - feat(codex): Add “Apply to VS Code/Remove from VS Code” button on current Codex provider card
    - feat(tauri): Add commands to read/write VS Code settings.json with cross-variant detection (Code/Insiders/VSCodium/OSS)
    - fix(vscode): Use top-level keys “chatgpt.apiBase” and “chatgpt.config.preferred_auth_method”
    - fix(vscode): Handle empty settings.json (skip deletes, direct write) to avoid “Can not delete in empty document”
    - fix(windows): Make atomic writes robust by removing target before rename
    - ui(provider-list): Improve error surfacing when applying/removing
    - chore(types): Extend window.api typings and tauri-api wrappers for VS Code commands
    - deps: Add jsonc-parser
  • feat: add common config snippet management system
    - Add settings module for managing common configuration snippets
    - Implement UI for creating, editing, and deleting snippets
    - Add tauri-plugin-fs for file operations
    - Replace co-authored setting with flexible snippet system
    - Enable users to define custom config snippets for frequently used settings
  • feat: 系统托盘 (#12)
    * feat: 系统托盘
    
    1. 添加系统托盘
    2. 托盘添加切换供应商功能
    3. 整理组件目录
    
    * feat: 优化系统托盘菜单结构
    
    - 扁平化Claude和Codex的菜单结构,直接将所有供应商添加到主菜单,简化用户交互。
    - 添加无供应商时的提示信息,提升用户体验。
    - 更新分隔符文本以增强可读性。
    
    * feat: integrate Tailwind CSS and Lucide icons
    
    - Added Tailwind CSS for styling and layout improvements.
    - Integrated Lucide icons for enhanced UI elements.
    - Updated project structure by removing unused CSS files and components.
    - Refactored configuration files to support new styling and component structure.
    - Introduced new components for managing providers with improved UI interactions.   
    
    * fix: 修复类型声明和分隔符实现问题
    
    - 修复 updateTrayMenu 返回类型不一致(Promise<void> -> Promise<boolean>)
    - 添加缺失的 UnlistenFn 类型导入
    - 使用 MenuBuilder.separator() 替代文本分隔符
    
    ---------
    
    Co-authored-by: farion1231 <farion1231@gmail.c
  • feat: JsonEditor for inputting JSON content (#4)
    * feat(editor): add JsonEditor component for JSON configuration editing
    
    * fix(provider): update API Key visibility logic in ProviderForm component
    
    * fix(editor): stabilize JsonEditor height and restore API Key logic
    
    - Revert API Key visibility to preset-based rule and injection to non-custom preset only.
    - Reduce JsonEditor min-height from rows*22px to rows*18px to lessen layout jitter when switching presets.
    - Keep fonts/size consistent with the previous textarea for visual parity.
    
    * - fix(form): remove websiteUrl auto-extraction from JSON to prevent incorrect overrides
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>
  • chore: bump version to v3.1.1
    - Update version in package.json, Cargo.toml, and tauri.conf.json
    - Add CHANGELOG entries for v3.1.0 and v3.1.1
  • feat: add prettier formatter and MIT license
    - Add prettier dev dependency for code formatting
    - Create MIT LICENSE file
    - Format TypeScript files with prettier
    - Update provider order in README (Qwen coder first)
    - Update add provider screenshot with new UI
  • feat: add development scripts and CHANGELOG for v3.0.0
    - Add typecheck script for TypeScript validation
    - Add format and format:check scripts for code formatting
    - Create comprehensive CHANGELOG documenting migration from Electron to Tauri
    - Document all major changes, improvements, and migration notes for v3.0.0
  • chore: prepare v3.0.0 release
    - Bump version to 3.0.0 across all files
    - Update Cargo.toml with proper package metadata
    - Rename crate from 'app' to 'cc-switch'
    - Use Rust edition 2024 with minimum rust-version 1.85.0
    - Update library name to cc_switch_lib
  • - chore: 添加 Tauri CLI 开发依赖
    - 在 `package.json` 新增 `@tauri-apps/cli`
    - 更新 `pnpm-lock.yaml` 锁定文件
    - 仅依赖变更,无业务代码改动
  • refactor: 清理 Electron 遗留代码并优化项目结构
    - 删除 Electron 主进程代码 (src/main/)
    - 删除构建产物文件夹 (build/, dist/, release/)
    - 清理 package.json 中的 Electron 依赖和脚本
    - 删除 TypeScript 配置中的 Electron 相关文件
    - 优化前端代码结构至 Tauri 标准结构 (src/renderer → src/)
    - 删除移动端图标和不必要文件
    - 更新文档说明技术栈变更为 Tauri
  • feat: 完成前端窗口控制和配置适配
    - 更新 tauri.conf.json 配置正确的前端构建路径
    - 调整开发服务器端口为 Vite 默认端口 5173
    - 添加 Tauri 前端依赖包
    - 窗口拖拽样式已兼容
  • feat: configure Tauri build system and app metadata
    - Update Vite config for Tauri integration
    - Configure package.json scripts for Tauri commands
    - Generate multi-platform app icons
    - Update app metadata and window configuration
  • feat: initialize Tauri project structure
    - Add @tauri-apps/api dependency
    - Create src-tauri directory with base configuration
    - Generate Tauri project Rust code framework
    - Add application icon resources
  • 实施最终发布策略:Intel-only 配置
     配置 Intel-only 构建 (package.json)
     更新 GitHub Actions 发布流程
     完善 README 安装说明
    
    核心策略:
    - 只发布 Intel x64 版本,通过 Rosetta 2 支持 M 系列芯片
    - 使用 ad-hoc 签名,避免 ARM64 签名复杂性
    - 提供详细的 macOS 安全警告处理指南
    - 强调兼容性和稳定性优于原生性能