Commit Graph

646 Commits

Author SHA1 Message Date
Jason
84c7726940 feat(ui): implement pills-style AppSwitcher with consistent button widths
Replace segmented control with pills-style switcher for better visual consistency.
2025-08-31 21:27:58 +08:00
Jason
b8f59a4740 chore: silence non_snake_case warnings in commands.rs for legacy app/appType compatibility
- Add crate-level allow(non_snake_case) in src-tauri/src/commands.rs
- Keeps compatibility while avoiding compiler warnings
2025-08-31 19:00:09 +08:00
Jason
06a19519c5 revert: restore app/appType param compatibility and revert segmented-thumb pointer-events change
- Restore backend commands to accept app_type/app/appType with priority app_type
- Frontend invoke() now passes both { app_type, app } again
- Revert CSS change that set pointer-events: none on segmented-thumb
- Keep minor fix: open_config_folder signature uses handle + respects both names

Note: warnings for non_snake_case (appType) are expected for compatibility.
2025-08-31 18:14:31 +08:00
Jason
b4ebb7c9e5 docs(codex): document Codex config directory, fields (OPENAI_API_KEY), empty config.toml behavior, and switching strategy in README 2025-08-31 17:17:22 +08:00
Jason
5edc3e07a4 feat(codex): validate non-empty config.toml with toml crate (syntax check in save/import) 2025-08-31 17:13:25 +08:00
Jason
417dcc1d37 feat(codex): require OPENAI_API_KEY when non-official preset selected; keep config.toml optional 2025-08-31 17:07:35 +08:00
Jason
72f6068e86 Revert "feat(ui): enhance Codex provider list display by extracting base_url/model_provider from config.toml; plumb appType into ProviderList"
This reverts commit 97e7f34260.
2025-08-31 17:02:15 +08:00
Jason
97e7f34260 feat(ui): enhance Codex provider list display by extracting base_url/model_provider from config.toml; plumb appType into ProviderList 2025-08-31 16:55:55 +08:00
Jason
74babf9730 refactor(api): unify Tauri command app param as app_type with backward-compatible app/appType; update front-end invocations accordingly 2025-08-31 16:43:33 +08:00
Jason
30fe800ebe fix(codex): correct config path reporting and folder opening; allow empty config.toml; unify API key field as OPENAI_API_KEY; front-end invoke uses app_type/app fallback for Tauri commands 2025-08-31 16:39:38 +08:00
Jason
c98a724935 feat(ui): 优化首页切换为分段控件;精简 Banner 间距;标题在上切换在下 2025-08-31 00:03:22 +08:00
Jason
0cb89c8f67 chore(codex): 调整 Codex 预设模板与占位符(auth.json/config.toml 与表单占位) 2025-08-30 23:02:49 +08:00
Jason
7b5d5c6ce1 refactor(codex): 选择 Codex 预设时清空 API Key 输入,避免误保存占位符 2025-08-30 22:09:19 +08:00
Jason
eea5e4123b feat(codex): 增加 Codex 预设供应商(官方、PackyCode);在添加供应商时支持一键预设与 API Key 自动写入 auth.json;UI 同步 Codex 预设按钮与字段 2025-08-30 22:08:41 +08:00
Jason
c10ace7a84 - feat(codex): 引入 Codex 应用与供应商切换(管理 auth.json/config.toml,支持备份与恢复)
- feat(core): 多应用配置 v2(claude/codex)与 ProviderManager;支持 v1→v2 自动迁移
- feat(ui): 新增 Codex 页签与双编辑器表单;统一 window.api 支持 app 参数
- feat(tauri): 新增 get_config_status/open_config_folder/open_external 命令并适配 Codex
- fix(codex): 主配置缺失时不执行默认导入(对齐 Claude 行为)
- chore: 配置目录展示与重启提示等细节优化
2025-08-30 21:54:52 +08:00
farion1231
0e803b53d8 update readme 2025-08-29 15:37:26 +08:00
Jason
49d8787ab9 ci(release): generate macOS zip, Windows installer + portable, Linux deb; split per-OS build and asset steps v3.0.1 2025-08-29 14:57:33 +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
3574fa07cb ci(workflows): restore tag-only release; keep Linux deps 2025-08-29 12:11:16 +08:00
Jason Young
b64b86f3ca Merge pull request #2 from farion1231/tauri-migration
feat: migrate from Electron to Tauri 2.0 (v3.0.0)
v3.0.0
2025-08-29 11:56:31 +08:00
Jason
2cf116280f 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
2025-08-29 11:35:17 +08:00
Jason
73cf337c42 fix(config): create settings.json on first run; keep legacy claude.json read compatibility 2025-08-29 10:50:10 +08:00
Jason
fa2d64b692 feat: add official preset orange theme and disabled API input
- Add Anthropic orange theme styling for official preset buttons
- Auto-disable API Key input field when official preset is selected
- Add isOfficial field for precise official preset identification
- Enhance UX: official login requires no manual API Key input
2025-08-29 09:03:11 +08:00
Jason
9c17be1b59 security(tauri): remove unused shell plugin and capability
- Remove tauri-plugin-shell from Cargo.toml
- Drop tauri_plugin_shell::init() from src-tauri/src/lib.rs
- Delete "shell:allow-open" from src-tauri/capabilities/default.json
- No runtime behavior change; opener plugin still handles links/paths
- Motivation: reduce permissions surface and slightly shrink bundle
2025-08-28 22:26:02 +08:00
Jason
fe1574a026 docs: update README for v3.0.0 Tauri release
- Add version badges and Tauri branding
- Update performance metrics (85% size reduction, 10x startup speed)
- Add detailed system requirements for all platforms
- Update installation instructions with specific file names
- Add comprehensive development setup guide
- Include new npm scripts (typecheck, format)
- Add Rust development commands
- Enhance project structure documentation
- Link to CHANGELOG for version details
- Update screenshots for new UI
2025-08-27 22:26:07 +08:00
Jason
9254c5d291 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
2025-08-27 11:15:29 +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
5e2e80b00d fix: prevent modal header jumping when toggling API key field
Reserve fixed height for API key input container and use visibility/opacity
for show/hide instead of conditional rendering to maintain consistent modal
height when selecting presets
2025-08-27 10:39:39 +08:00
Jason
2a43f1f54d update: regenerate all platform icons 2025-08-27 10:30:29 +08:00
Jason
7e6ce83158 update: regenerate all platform icons 2025-08-27 09:01:36 +08:00
Jason
6932e89ea8 update: regenerate all platform icons from unified source
- Regenerated all desktop platform icons (Windows .ico, macOS .icns, Linux PNG)
- Added mobile platform icons for future cross-platform support
- Ensures consistent icon appearance across all platforms
2025-08-27 08:43:41 +08:00
Jason
d144d5c2fc ci(workflow): fix pnpm cache path context by using step outputs
- Replace env var STORE_PATH with step output\n- Add id to pnpm-store step and write to \n- Reference cache path via steps.pnpm-store.outputs.path\n- Resolves linter warning: Context access might be invalid: STORE_PATH\n- No behavior change; caching remains the same
2025-08-26 23:32:13 +08:00
Jason
adee37ab66 feat(icons): update application icon with new colorful radial design
Replace all platform-specific icon files with new radial burst design featuring teal, orange, and yellow gradients. Updated icons include:
- PNG variants for all required sizes (32x32 to 1024x1024)
- macOS ICNS bundle with all resolutions
- Windows Square logo variants for modern app packaging
2025-08-26 22:57:57 +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
374649750b feat(ui): update preset template description for clarity 2025-08-26 15:12:27 +08:00
Jason
6d26115368 update gitignore 2025-08-26 12:39:01 +08:00
Jason
606ee67778 fix(ui): Pin modal action bar; prevent bottom content overflow\n\n- Move action buttons to fixed .modal-footer at the bottom\n- Make modal a column flex container; scroll only body\n- Ensure buttons remain visible on small viewports\n- Remove sticky edge cases causing leaked content 2025-08-26 12:34:47 +08:00
Jason
57d21fabcf feat(providers): add Kimi K2 support and optimize provider configurations
- Add Kimi K2 (Moonshot AI) preset with k2-turbo-preview model support
- Set specific models for ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL
- Fix DeepSeek platform URL (remove trailing slash)
- Reorganize provider order for better categorization
2025-08-26 11:28:10 +08:00
Jason
001664c67d - feat(form): Support API Key ⇄ JSON two-way binding in edit modal
- feat(utils): Add helpers to read/write/detect API Key in config
- refactor(form): Reuse unified linking logic for preset and edit flows
- chore: Preserve website URL extraction and signature-disable behaviors
- build: Verify renderer build locally
2025-08-26 10:41:16 +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
78bc0a1a31 chore(tauri): remove dead code warnings and drop unused uuid dep
- Delete unused Provider::new, ProviderManager::get_current_provider
- Delete unused AppState::reload
- Remove uuid crate and related imports
- Keep functionality unchanged; frontend uses ID string for current provider
2025-08-25 21:41:35 +08:00
Jason
dac8ebe03b feat: upgrade Rust code to full Tauri 2.0 compatibility
- Add tauri-plugin-shell and tauri-plugin-opener dependencies
- Update permissions configuration to support shell and opener operations
- Refactor open_config_folder and open_external commands to use secure plugin APIs
- Remove unsafe direct std::process::Command usage
- Initialize necessary Tauri plugins
- Ensure all external operations comply with Tauri 2.0 security standards
2025-08-25 20:16:29 +08:00
Jason
9f370bf429 fix: remove @tauri-apps/api/os import and use local UA/platform detection for mac class 2025-08-25 10:37:19 +08:00
Jason
bac2c3db36 refactor: remove window.platform shim; platform detection handled via @tauri-apps/api/os 2025-08-25 10:33:54 +08:00
Jason
326e975748 feat: use @tauri-apps/api/os for reliable platform detection (mac body class) 2025-08-25 10:33:19 +08:00
Jason
b5696b4511 security: add restrictive default CSP for Tauri app 2025-08-25 10:32:47 +08:00
Jason
ef7e9d2f73 style: remove Electron-specific drag region styles for bordered Tauri window 2025-08-25 10:31:09 +08:00
Jason
d78013562c refactor: rename global API from electronAPI to api and update references 2025-08-25 10:30:45 +08:00