Commit Graph

126 Commits

Author SHA1 Message Date
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
Jason
d3adfc480d ci: migrate release workflow to Tauri action and correct bundle handling 2025-08-25 10:29:58 +08:00
Jason
731cfc47be chore(deps): remove unused @tauri-apps/plugin-shell dependency 2025-08-24 23:40:32 +08:00
Jason
95b3746e49 chore(version): align package.json version to 3.0.0-beta.1 to match Tauri app version 2025-08-24 23:39:41 +08:00
Jason
c8670aede6 feat(ui): drive config path UI from getClaudeConfigStatus (show path + existence hint) and remove direct getClaudeCodeConfigPath usage 2025-08-24 23:36:09 +08:00
Jason
95549473bd fix(tauri): ensure ~/.claude directory exists before copying provider settings into main settings file 2025-08-24 23:35:44 +08:00
Jason
f3f484a04b fix(tauri): normalize external URLs by auto-prepending https:// when protocol is missing 2025-08-24 23:35:07 +08:00
Jason
1458f1e45d fix(ui): use browser-safe timeout ref type (ReturnType<typeof setTimeout>) to avoid NodeJS.Timeout mismatch 2025-08-24 23:31:56 +08:00
Jason
0301d1aee7 fix(tauri): avoid duplicate import of default provider in import_default_config by early-exit when default exists 2025-08-24 23:30:35 +08:00
Jason
224d7a8be0 fix: 修复 Tauri 重构导致的配置读取与渲染问题
- 前端:始终绑定 ,避免环境判断失误造成白屏
- 后端: 仅初始化一次,并通过  注入,避免双实例不一致
- 配置: 兼容  回退,提高旧配置兼容性
- 结果:主页面数据正常加载,底部配置路径组件恢复显示
2025-08-24 23:04:55 +08:00
Jason
c4791ff523 - chore: 添加 Tauri CLI 开发依赖
- 在 `package.json` 新增 `@tauri-apps/cli`
- 更新 `pnpm-lock.yaml` 锁定文件
- 仅依赖变更,无业务代码改动
2025-08-24 22:38:13 +08:00
Jason
55c62a3753 - fix(types): 统一导入到 src/types.ts,移除 shared/types 残留路径
- chore(tsconfig): 将 include 扩展为 src/**/* 覆盖迁移后的源文件
- feat(build): Vite 设置 root 为 src,并将 build.outDir 设为 ../dist 以匹配 Tauri frontendDist
- refactor(api): 去除未使用的 plugin-shell import;统一 electronAPI 类型定义至 vite-env.d.ts
- build: 验证 renderer 构建通过,产物输出至 dist/
2025-08-23 23:11:39 +08:00
farion1231
12fa80e002 refactor: 清理 Electron 遗留代码并优化项目结构
- 删除 Electron 主进程代码 (src/main/)
- 删除构建产物文件夹 (build/, dist/, release/)
- 清理 package.json 中的 Electron 依赖和脚本
- 删除 TypeScript 配置中的 Electron 相关文件
- 优化前端代码结构至 Tauri 标准结构 (src/renderer → src/)
- 删除移动端图标和不必要文件
- 更新文档说明技术栈变更为 Tauri
2025-08-23 21:13:25 +08:00
farion1231
29581b85d9 fix: 修复 Rust 编译错误并成功启动 Tauri 应用
- 修复 commands.rs 中的重复导入问题
- 清理未使用的导入
- 统一 Vite 和 Tauri 配置的端口为 3000
- 添加 Tauri 前端依赖包
- 应用已成功编译并运行
2025-08-23 21:00:50 +08:00
farion1231
88e69e844a docs: 更新迁移计划 - 标记 Phase 4 已完成 2025-08-23 20:52:01 +08:00
farion1231
2a658af5b9 feat: 完成前端窗口控制和配置适配
- 更新 tauri.conf.json 配置正确的前端构建路径
- 调整开发服务器端口为 Vite 默认端口 5173
- 添加 Tauri 前端依赖包
- 窗口拖拽样式已兼容
2025-08-23 20:41:14 +08:00
farion1231
1402fd0cc5 feat: 创建 Tauri API 层替换 Electron IPC 调用
- 创建 tauri-api.ts 封装所有 Tauri invoke 调用
- 保持与 Electron API 相同的接口,确保代码兼容性
- 添加类型声明文件 vite-env.d.ts
- 在 main.tsx 中导入 Tauri API
2025-08-23 20:38:57 +08:00
farion1231
8a3133be43 feat: 实现 Tauri Commands - 完成所有供应商和配置管理命令 2025-08-23 20:15:10 +08:00
farion1231
f64320fbd6 feat: 实现 Rust 后端核心模块 - 配置管理、供应商管理和数据存储 2025-08-23 20:12:35 +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