Commit Graph

36 Commits

Author SHA1 Message Date
YoVinchen
3d69da5b66 feat: add model configuration support and fix Gemini deeplink bug (#251)
* feat(providers): add notes field for provider management

- Add notes field to Provider model (backend and frontend)
- Display notes with higher priority than URL in provider card
- Style notes as non-clickable text to differentiate from URLs
- Add notes input field in provider form
- Add i18n support (zh/en) for notes field

* chore: format code and clean up unused props

- Run cargo fmt on Rust backend code
- Format TypeScript imports and code style
- Remove unused appId prop from ProviderPresetSelector
- Clean up unused variables in tests
- Integrate notes field handling in provider dialogs

* feat(deeplink): implement ccswitch:// protocol for provider import

Add deep link support to enable one-click provider configuration import via ccswitch:// URLs.

Backend:
- Implement URL parsing and validation (src-tauri/src/deeplink.rs)
- Add Tauri commands for parse and import (src-tauri/src/commands/deeplink.rs)
- Register ccswitch:// protocol in macOS Info.plist
- Add comprehensive unit tests (src-tauri/tests/deeplink_import.rs)

Frontend:
- Create confirmation dialog with security review UI (src/components/DeepLinkImportDialog.tsx)
- Add API wrapper (src/lib/api/deeplink.ts)
- Integrate event listeners in App.tsx

Configuration:
- Update Tauri config for deep link handling
- Add i18n support for Chinese and English
- Include test page for deep link validation (deeplink-test.html)

Files: 15 changed, 1312 insertions(+)

* chore(deeplink): integrate deep link handling into app lifecycle

Wire up deep link infrastructure with app initialization and event handling.

Backend Integration:
- Register deep link module and commands in mod.rs
- Add URL handling in app setup (src-tauri/src/lib.rs:handle_deeplink_url)
- Handle deep links from single instance callback (Windows/Linux CLI)
- Handle deep links from macOS system events
- Add tauri-plugin-deep-link dependency (Cargo.toml)

Frontend Integration:
- Listen for deeplink-import/deeplink-error events in App.tsx
- Update DeepLinkImportDialog component imports

Configuration:
- Enable deep link plugin in tauri.conf.json
- Update Cargo.lock for new dependencies

Localization:
- Add Chinese translations for deep link UI (zh.json)
- Add English translations for deep link UI (en.json)

Files: 9 changed, 359 insertions(+), 18 deletions(-)

* refactor(deeplink): enhance Codex provider template generation

Align deep link import with UI preset generation logic by:
- Adding complete config.toml template matching frontend defaults
- Generating safe provider name from sanitized input
- Including model_provider, reasoning_effort, and wire_api settings
- Removing minimal template that only contained base_url
- Cleaning up deprecated test file deeplink-test.html

* style: fix clippy uninlined_format_args warnings

Apply clippy --fix to use inline format arguments in:
- src/mcp.rs (8 fixes)
- src/services/env_manager.rs (10 fixes)

* style: apply code formatting and cleanup

- Format TypeScript files with Prettier (App.tsx, EnvWarningBanner.tsx, formatters.ts)
- Organize Rust imports and module order alphabetically
- Add newline at end of JSON files (en.json, zh.json)
- Update Cargo.lock for dependency changes

* feat: add model name configuration support for Codex and fix Gemini model handling

- Add visual model name input field for Codex providers
  - Add model name extraction and update utilities in providerConfigUtils
  - Implement model name state management in useCodexConfigState hook
  - Add conditional model field rendering in CodexFormFields (non-official only)
  - Integrate model name sync with TOML config in ProviderForm

- Fix Gemini deeplink model injection bug
  - Correct environment variable name from GOOGLE_GEMINI_MODEL to GEMINI_MODEL
  - Add test cases for Gemini model injection (with/without model)
  - All tests passing (9/9)

- Fix Gemini model field binding in edit mode
  - Add geminiModel state to useGeminiConfigState hook
  - Extract model value during initialization and reset
  - Sync model field with geminiEnv state to prevent data loss on submit
  - Fix missing model value display when editing Gemini providers

Changes:
  - 6 files changed, 245 insertions(+), 13 deletions(-)
2025-11-19 09:03:18 +08:00
YoVinchen
ec303544ca 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
2025-11-18 22:05:54 +08:00
Jason
8d2c067814 feat(window): center window on screen by default
Add `center: true` to main window configuration to improve initial
window positioning on Windows and other platforms. This addresses
user feedback about the window appearing in the top-left corner.
2025-11-17 23:25:13 +08:00
Jason
9d431cc7ae style(ui): migrate color scheme to macOS native design system
- Update primary blue from Linear style (#3498db) to macOS system blue (#0A84FF)
- Align gray scale with macOS dark mode palette (#1C1C1E, #2C2C2E, etc.)
- Adjust dark mode background to match macOS systemBackground (HSL 240 5% 12%)
- Refine scrollbar colors to use native macOS gray tones
- Remove transparent titleBarStyle for better stability
2025-11-16 10:44:15 +08:00
Jason
32a2ba5ef6 chore(release): prepare for v3.6.2 release 2025-11-11 23:57:21 +08:00
Jason
9a5c8c0e57 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)
2025-11-10 21:21:27 +08:00
Jason
8d77866160 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
2025-11-07 16:27:51 +08:00
Jason
59644b29e6 chore: bump version to 3.5.1 2025-10-14 10:39:11 +08:00
Jason
60e8351f60 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
2025-10-12 22:27:02 +08:00
Jason
94e93137a2 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
2025-10-02 09:59:38 +08:00
Jason
4dd07dfd85 Switch MSI installer to per-user LocalAppData target 2025-09-23 14:41:28 +08:00
Jason
aaf1af0743 release: bump version to v3.3.1
Add support for DeepSeek-V3.1-Terminus model with emergency hotfix release
2025-09-22 23:31:59 +08:00
Jason
077d491720 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.
2025-09-22 22:50:07 +08:00
Jason
ca7ce99702 chore(version): bump app version to 3.2.0\n\n- package.json → 3.2.0\n- src-tauri/Cargo.toml → 3.2.0\n- src-tauri/tauri.conf.json → 3.2.0\n- src-tauri/Cargo.lock → 3.2.0 2025-09-11 09:33:49 +08:00
Jason
bf7e13d4e9 chore: update repository URLs from jasonyoung to farion1231
- Update GitHub repository URLs in README.md badges
- Update repository URL in Cargo.toml metadata
- Update updater endpoint URL in tauri.conf.json for auto-updates
2025-09-10 15:26:21 +08:00
Jason
74d4b42936 refactor(ci): standardize Tauri signing key variable and update pubkey
- Update CI workflow to use TAURI_SIGNING_PRIVATE_KEY consistently
- Simplify key handling logic and add password support
- Update pubkey in tauri.conf.json to match new signing key
2025-09-09 22:26:37 +08:00
Jason
f99b614888 enhance: improve updater workflow with latest.json collection and prerelease flag 2025-09-09 21:14:44 +08:00
Jason
036069a5c1 update pub key again 2025-09-09 16:06:14 +08:00
Jason
9b7091ba88 update pub key 2025-09-09 15:36:04 +08:00
Jason
2357d976dc chore: bump version to 3.1.2 for auto-updater testing 2025-09-09 15:21:49 +08:00
Jason
6ed9cf47df feat: add auto-updater support with GitHub releases
- Configure Tauri updater plugin with Ed25519 signing
- Add GitHub Actions support for signed builds
- Set up GitHub releases as update endpoint
- Enable update checking in Settings modal
2025-09-09 15:13:06 +08:00
Jason
a3582f54e9 fix(updater): 避免因 Updater 配置不完整导致应用启动中止\n\n- Updater 插件注册改为容错(失败仅告警,不影响应用启动) 2025-09-09 10:28:34 +08:00
Jason
9ff7516c51 feat(updater): 集成 Rust 侧 Updater/Process 插件与权限配置
- Cargo 依赖:tauri-plugin-updater、tauri-plugin-process
- 插件注册:process 顶层 init,updater 于 setup 中注册
- 权限配置:capabilities 增加 updater:default、process:allow-restart
- 配置:tauri.conf.json 启用 createUpdaterArtifacts 与 updater 占位(pubkey/endpoints)
2025-09-08 16:58:41 +08:00
Jason
1d9fb7bf26 fix(tauri): correct window config and CSP\n\n- Set titleBarStyle to "Transparent" to match v2 schema\n- Add ipc: and http://ipc.localhost to connect-src for IPC\n- Add label: "main" for the primary window\n 2025-09-05 10:19:14 +08:00
farion1231
3665a79e50 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
2025-09-03 16:43:29 +08:00
Jason
a05fefb54c feat: optimize release workflow for better distribution
- Configure GitHub Actions to generate platform-specific releases:
  - macOS: zip package only (avoids signing issues)
  - Windows: installer (NSIS) and portable version
  - Linux: AppImage and deb packages
- Update Tauri config to build all available targets
- Add documentation for macOS signature workarounds
2025-08-29 14:40:40 +08:00
Jason
642e7a3817 chore: format code and fix bundle identifier for v3.0.0 release
- Format all TypeScript/React code with Prettier
- Format all Rust code with cargo fmt
- Fix bundle identifier from .app to .desktop to avoid macOS conflicts
- Prepare codebase for v3.0.0 Tauri release
2025-08-27 11:00:53 +08:00
Jason
dcf49cc094 fix(tauri): correct bundle.targets schema to array
- Replace per-OS map with array: ["app","dmg","nsis","appimage"].

- Align with Tauri v2 config; resolves schema validation error.

- Keeps Windows portable ("app") target enabled.
2025-08-26 22:51:22 +08:00
Jason
f8e39594fa 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
2025-08-26 15:45:42 +08:00
Jason
616e230218 style: remove window title and adjust header padding for cleaner UI 2025-08-25 23:30:25 +08:00
Jason
70f9a68e5c feat(macos): implement transparent titlebar with custom background color
- Add transparent titlebar configuration in tauri.conf.json
- Implement macOS titlebar background color matching main UI banner (#3498db)
- Replace deprecated cocoa crate with modern objc2-app-kit
- Preserve native window functionality (drag, traffic lights)
- Remove all deprecation warnings from build process

The titlebar now seamlessly matches the application's blue theme while
maintaining all native macOS window management features.
2025-08-25 23:06:54 +08:00
Jason
b5696b4511 security: add restrictive default CSP for Tauri app 2025-08-25 10:32:47 +08:00
farion1231
29581b85d9 fix: 修复 Rust 编译错误并成功启动 Tauri 应用
- 修复 commands.rs 中的重复导入问题
- 清理未使用的导入
- 统一 Vite 和 Tauri 配置的端口为 3000
- 添加 Tauri 前端依赖包
- 应用已成功编译并运行
2025-08-23 21:00:50 +08:00
farion1231
2a658af5b9 feat: 完成前端窗口控制和配置适配
- 更新 tauri.conf.json 配置正确的前端构建路径
- 调整开发服务器端口为 Vite 默认端口 5173
- 添加 Tauri 前端依赖包
- 窗口拖拽样式已兼容
2025-08-23 20:41:14 +08:00
farion1231
3479780639 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
2025-08-23 20:05:50 +08:00
farion1231
1b0ab269fb 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
2025-08-23 19:59:29 +08:00