Commit Graph

293 Commits

Author SHA1 Message Date
Jason
7ccef5f385 fix(ui): add dark mode support for Kimi model selector
- Update select dropdown with dark mode background and text colors
- Add dark mode styles to labels and refresh button
- Apply dark mode colors to error messages (red theme)
- Ensure hint box uses consistent amber theme in dark mode
- Fix chevron icon visibility in dark mode

This ensures the Kimi provider configuration UI is properly visible
and maintains consistency with other provider modals in dark mode.
v3.2.0
2025-09-13 21:48:18 +08:00
Jason
85ba24f1c3 fix(ui): add dark mode support for provider modals
- Add dark mode styles to ProviderForm modal (background, borders, text)
- Update ApiKeyInput component with dark mode colors
- Add dark mode detection to ClaudeConfigEditor for JSON editor
- Apply dark mode styles to CodexConfigEditor textareas
- Update PresetSelector buttons for dark mode
- Ensure consistent amber color scheme for all hint boxes in dark mode

This ensures proper visibility and readability of add/edit provider dialogs
when dark mode is enabled.
2025-09-13 21:45:34 +08:00
Jason
0d2dedbb6d fix(migration): ensure config directory exists before writing marker
- Create parent directory before checking/writing migration marker
- Prevents runtime error for fresh installations without config directory
- Defensive fix for edge case where ~/.cc-switch/ doesn't exist yet
2025-09-13 21:03:48 +08:00
Jason
d76c675feb docs: update README and screenshots for v3.2.0 release
- Update README with v3.2.0 features and UI improvements
- Replace screenshots with new UI design
- Clarify SSOT architecture and one-time migration details
- Update version badge to 3.2.0
2025-09-13 17:54:21 +08:00
Jason
9372ecd3c6 feat(ui): enhance provider form with brand icons and colors
- Add Save icon to submit buttons in provider forms
- Replace generic Zap icon with brand-specific icons (ClaudeIcon, CodexIcon)
- Update selected state colors: Claude uses brand color #D97757, Codex uses black
- Maintain visual consistency with AppSwitcher component
2025-09-13 17:04:46 +08:00
Jason
d0b654f63e feat(ui): replace generic icons with official brand icons
- Add Claude and ChatGPT/Codex official brand SVG icons
- Create BrandIcons component with proper currentColor support
- Update AppSwitcher to use brand icons with Claude's official color (#D97757)
- Icons now dynamically change color based on active state
- Improve brand recognition and visual consistency
2025-09-13 16:21:15 +08:00
Jason
f035796654 chore(release): polish 3.2.0 changes\n\n- Docs: add 3.2.0 release notes to CHANGELOG\n- UI: silence debug logs in production via import.meta.env.DEV\n- CSS: replace pseudo-element Tailwind @apply with explicit selectors to fix minifier warnings 2025-09-13 15:48:14 +08:00
Jason
160da2729e fix(css): eliminate minifier warnings for scrollbar styles\n\n- Replace Tailwind @apply + custom dark variant on pseudo-elements\n- Use explicit selectors (html.dark) and hex colors for track/thumb\n- Prevent :where() empty selector warnings during production build 2025-09-13 15:38:23 +08:00
Jason
14db6b8a8f refactor(tauri): replace println/eprintln with structured logging\n\n- Use log::info/warn/error instead of println!/eprintln!\n- Keep behavior identical; improve log integration with tauri-plugin-log\n- Reduce stdout noise in production builds 2025-09-13 15:38:01 +08:00
Jason
d91bbb122c refactor(ui): silence debug logs in production\n\n- Wrap dark mode and event logs with import.meta.env.DEV\n- Keep error logging for failures intact\n- Reduce console noise in release builds 2025-09-13 15:37:39 +08:00
Jason
6df5dfc123 style: format codebase with Prettier\n\n- Apply Prettier across src to ensure consistent styling\n- No functional changes; whitespace and ordering only\n- Unblocks format:check for release pipeline 2025-09-13 15:36:43 +08:00
Jason
c8327f7632 feat: add API key links for third-party providers and simplify Kimi model labels
- Add "Get API Key" link support for third-party providers (e.g., PackyCode)
- Simplify Kimi model selector labels by removing technical field names
  - Changed "主模型 (ANTHROPIC_MODEL)" to "主模型"
  - Changed "快速模型 (ANTHROPIC_SMALL_FAST_MODEL)" to "快速模型"
- Improve user experience with cleaner, more intuitive interface labels
2025-09-13 13:23:32 +08:00
Jason
4a0e63d0b7 style: improve "Get API Key" link styling
- Change link color to light blue (text-blue-400)
- Remove arrow symbol from link text
- Apply to domestic official and aggregator provider API key links
2025-09-12 21:36:32 +08:00
Jason
e63b4e069b feat: enhance provider configuration UX with custom URL support and API key links
- Add custom base URL input for custom providers
  - New "Request URL" field appears only in custom mode
  - Automatically syncs with ANTHROPIC_BASE_URL in config
  - Includes helpful amber-styled hint about Claude API compatibility

- Add "Get API Key" links for non-official providers
  - Shows for cn_official, aggregator, and third_party categories
  - Links point to provider's official website
  - Styled as subtle helper text (text-xs, gray-500)
  - Positioned closely under API key input for better visual grouping

- Improve UI consistency and hints
  - Unify all hint boxes to use amber color scheme (amber-50/amber-200/amber-600)
  - Update model placeholders to latest versions (GLM-4.5, GLM-4.5-Air)
  - Simplify provider names (remove version numbers and redundant text)

- Update provider presets
  - GLM models: glm-4-plus → GLM-4.5, glm-4-flash → GLM-4.5-Air
  - Qwen models: qwen-coder-turbo → qwen3-coder-plus
  - Cleaner naming: "Claude官方登录" → "Claude官方", "DeepSeek v3.1" → "DeepSeek"

- Fix Kimi model selector behavior
  - Remove API key requirement for displaying selector
  - Avoid showing duplicate model input fields for Kimi preset
  - Improve hint message clarity
2025-09-12 20:14:59 +08:00
Jason
687c7de111 feat: improve custom provider configuration UX
- Show API key input field for custom mode
- Initialize default custom mode with JSON template on modal open
- Change default API key from placeholder to empty string
- Remove Save icon from submit button for cleaner UI
- Ensure consistent behavior between default and manually selected custom mode
2025-09-12 15:20:49 +08:00
Jason
876605e983 feat: require API key for non-official Claude providers
- Add required asterisk to API key input label for non-official providers
- Pre-fill API key placeholder when switching to custom mode
- Ensure consistent validation across Claude and Codex providers
2025-09-12 12:15:09 +08:00
Jason
442b05507c feat: simplify Claude provider configuration form
- Add optional model input fields (ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL)
- Place model inputs in a single row for better space utilization
- Move website URL field above API configuration section
- Add JSON template for custom mode to guide users
- Simplify field labels and remove redundant descriptions
- Keep JSON editor for advanced configuration flexibility
2025-09-12 12:04:19 +08:00
Jason
eca9c02147 feat(providers): add provider categorization system
- Add ProviderCategory type with official, cn_official, aggregator, third_party, and custom categories
- Update Provider interface and Rust struct to include optional category field
- Enhance ProviderForm to automatically sync category when selecting presets
- Improve PresetSelector to show category-based styling and hints
- Add category classification to all provider presets
- Support differentiated interactions (e.g., hide API key input for official providers)
- Maintain backward compatibility with existing configurations
2025-09-11 22:33:55 +08:00
Jason
9fbce5d0cf refactor(settings): rename Dock setting to system tray (showInDock → showInTray)
- compat: map legacy showInDock to showInTray when loading settings
- ui(copy): clarify “system tray (menu bar)” vs Dock in SettingsModal
- tauri(settings): return showInTray in get_settings; adjust default fallback
- docs(comment): align comments to “system tray” terminology across code
- note: no functional change yet; tray visibility toggle remains unimplemented
2025-09-11 20:20:27 +08:00
farion1231
c597b9b122 feat(ui): add "up-to-date" feedback for update check button
- Show green "Already up-to-date" state with check icon when no updates available
- Button changes color and text temporarily (3 seconds) to provide clear feedback
- Fix TypeScript type for checkUpdate to return Promise<boolean>
- Handle dev mode gracefully - show up-to-date instead of opening release page
- Simplify previous complex notification UI to inline button state change
2025-09-11 15:13:33 +08:00
Jason
54b88d9c89 refactor(ui): redesign update notification to match Linear design system
- Replace gradient background with solid colors and subtle borders
- Remove decorative Info icon from settings panel that had no functionality
- Change update badge icon from Sparkles to Download for better clarity
- Simplify update button states with consistent blue primary color
- Remove all gradient effects in favor of flat design
- Unify hover states and transitions across all update-related UI

The update notification now seamlessly integrates with the app's Linear-inspired
aesthetic, providing a clean and non-intrusive user experience.
2025-09-11 12:06:49 +08:00
Jason
319e5fa61a build(rust): optimize release binary size (thin LTO, strip symbols, s-level, codegen-units=1, panic=abort)\n\n- Helps reduce final AppImage size by trimming Rust binary 2025-09-11 10:17:35 +08:00
Jason
310086d5c9 ci(release): refine artifacts\n\n- macOS: add .app zip (plus tar.gz + .sig for updater)\n- Windows: only MSI + .sig; add portable zip\n- Linux: always include .deb; keep AppImage + .sig for updater 2025-09-11 10:17:35 +08:00
Jason
4297703ebe ci(release): pin runners for compatibility and update cache action\n\n- matrix: windows-2022 / ubuntu-22.04 / macos-14\n- assemble-latest-json runs on ubuntu-22.04\n- actions/cache bumped to v4 2025-09-11 09:33:49 +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
af8b9289fe feat(updater): 优化更新体验与 UI
- ui: UpdateBadge 使用 Tailwind 内置过渡,支持点击打开设置,保留图标动画

- updater: 新增 UpdateContext 首启延迟检查,忽略版本键名命名空间化(含旧键迁移),并发保护

- settings: 去除版本硬编码回退;检测到更新时复用 updateHandle 下载并安装,并新增常显“更新日志”入口

- a11y: 更新徽标支持键盘触达(Enter/Space)

- refactor: 移除未使用的 runUpdateFlow 导出

- chore: 类型检查通过,整体行为与权限边界未改变
2025-09-10 19:46:38 +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
b015af173a feat(updater): refactor release workflow for proper Tauri updater support
- Switch macOS packaging from .app to .tar.gz updater artifacts
- Add automatic latest.json generation workflow
- Include signature file handling for all platforms
- Remove manual latest.json in favor of automated generation
- Improve updater artifact detection and path handling
2025-09-10 09:20:14 +08:00
Jason
4a4779a7e7 enhance(ci): improve release workflow with concurrency control and updated dependencies
- Add concurrency control to prevent multiple simultaneous releases
- Upgrade softprops/action-gh-release from v1 to v2 for better reliability
- Add docs/ directory to .gitignore to exclude documentation build artifacts
2025-09-10 08:10:01 +08:00
Jason
92a39a1a34 enhance(ci): implement cross-platform base64 encoding for private key
- Add support for multiple base64 encoders (base64, openssl, node.js)
- Encode complete private key file content as single-line base64
- Implement fallback chain for maximum platform compatibility
- Simplify environment variable handling with encoded content
2025-09-10 07:05:02 +08:00
Jason
ea56794a37 refactor(ci): use complete private key content with heredoc syntax
- Switch to passing complete two-line private key content instead of base64 only
- Use GitHub Actions heredoc syntax (<<'EOF') for proper multiline handling
- Preserve original minisign private key format with comment and base64 lines
- Improve compatibility with Tauri CLI's private key parsing
2025-09-09 22:52:34 +08:00
Jason
fd4864115c enhance(ci): improve Tauri signing key handling with direct base64 content
- Switch from file path to direct base64 content for better compatibility
- Extract private key base64 from second line for stable parsing
- Enhance error handling for key extraction process
- Improve cross-version compatibility for different Tauri CLI versions
2025-09-09 22:40:26 +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
a95f974787 refactor(ci): simplify Tauri signing key handling to use file path only
- Remove redundant environment variables for key content export
- Focus on providing proper key file path to Tauri CLI to avoid decoding ambiguity
- Maintain support for all three key formats (two-line, base64-wrapped, single base64)
- Improve reliability by standardizing on file-based key passing approach
2025-09-09 21:50:37 +08:00
Jason
29057c1fe0 refactor: optimize key handling to export base64 line only with multiple env var formats 2025-09-09 21:38:24 +08:00
Jason
63285acba8 enhance: improve private key handling with better base64 compatibility and single-line support 2025-09-09 21:21:30 +08:00
Jason
f99b614888 enhance: improve updater workflow with latest.json collection and prerelease flag 2025-09-09 21:14:44 +08:00
Jason
41f3aa7d76 fix: correct Tauri signing key environment variable usage 2025-09-09 16:38:59 +08:00
Jason
f23898a5c9 fix: correct GitHub Secret name to TAURI_PRIVATE_KEY 2025-09-09 16:29:42 +08:00
Jason
664391568c fix: add debug output for GitHub Secret issues 2025-09-09 16:28:12 +08:00
Jason
081aabe10f fix: add Tauri signing key decoding in GitHub Actions 2025-09-09 16:25:49 +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 Young
df43692bb9 Merge pull request #16 from farion1231/feat/auto-update
feat: Add auto-updater support with GitHub releases
2025-09-09 15:16:19 +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
a1a16be2aa feat(updater): 前端 Updater 封装与设置页接入\n\n- 新增 src/lib/updater.ts(check→download→install→relaunch 封装与类型)\n- SettingsModal 按钮优先走 Updater,失败回退打开 Releases\n- 依赖:@tauri-apps/plugin-updater、@tauri-apps/plugin-process\n- 文档:精简并重写 docs/updater-plan.md(明确接口/流程/配置) 2025-09-08 16:48:24 +08:00
Jason
df7d818514 feat(ui): enhance dark mode styling support
- AppSwitcher: add dark mode backgrounds, borders and hover effects
- ConfirmDialog: apply dark theme colors to dialog elements
- ProviderList: update list items and buttons for dark mode
- Global styles: use color-scheme property for native controls theming

Ensures all interactive components have proper visual feedback and consistent UX in dark mode.
2025-09-08 15:57:29 +08:00