farion1231
4dce31aff7
Fix the default codex config.toml to match the latest modifications.
2025-09-03 16:33:12 +08:00
Jason
451ca949ec
feat(ui): improve provider configuration UX with custom option
...
- Add explicit "Custom" button in preset selection
- Set "Custom" as default selection when adding new provider
- Update label from "One-click import" to "Choose configuration type"
- Add contextual hints for different configuration modes:
- Custom mode: "Manually configure provider, complete configuration required"
- Official preset: "Official login, no API Key required"
- Other presets: "Use preset configuration, only API Key required"
- Remove redundant "(optional)" text from Codex config.toml hint
- Improve clarity for users who were confused about adding custom providers
2025-09-03 15:58:02 +08:00
Jason
b00e8de26f
feat(config): backup v1 file before v2 migration
...
- Add timestamped backup at `~/.cc-switch/config.v1.backup.<ts>.json`
- Keep provider files untouched; only cc-switch metadata is backed up
- Remove UI notification plan; backup only as requested
- Update CHANGELOG with migration backup notes
2025-09-01 10:49:31 +08:00
Jason
47b06b7773
feat(ui): elevate title above controls for better visual hierarchy
...
Move title to separate row above switcher and action buttons for cleaner layout.
2025-08-31 23:13:27 +08:00
Jason
4e66f0c105
feat(ui): center title and balance header layout
...
Unify title to "CC Switch" to prevent text length jumping during app switching.
Reorganize header as three-column grid with centered title.
2025-08-31 21:49:28 +08:00
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
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
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
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
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
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
374649750b
feat(ui): update preset template description for clarity
2025-08-26 15:12:27 +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
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
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
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
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
224d7a8be0
fix: 修复 Tauri 重构导致的配置读取与渲染问题
...
- 前端:始终绑定 ,避免环境判断失误造成白屏
- 后端: 仅初始化一次,并通过 注入,避免双实例不一致
- 配置: 兼容 回退,提高旧配置兼容性
- 结果:主页面数据正常加载,底部配置路径组件恢复显示
2025-08-24 23:04:55 +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
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
afb20f298a
更新文档
2025-08-21 23:23:08 +08:00
farion1231
654a4745d5
feat: 添加 API Key 快速输入功能
...
- 选择预设模板后自动显示 API Key 输入框
- 输入 API Key 后自动更新 JSON 配置
- 简化用户配置流程,无需手动编辑 JSON
- 优化交互体验,API Key 输入框位于供应商名称下方
2025-08-21 22:20:57 +08:00
farion1231
0c7043154a
feat: 添加快速选择模板按钮的选中状态
...
- 为模板选择按钮添加选中后保持深色的视觉反馈
- 选中状态与hover状态共享相同的样式
- 用户可以清楚地看到当前选中的模板
2025-08-21 21:46:48 +08:00
farion1231
3097894d30
增加对 DeepSeek v3.1 的支持
2025-08-21 20:05:42 +08:00
Jason
9dac53b754
fix: 修复关键逻辑错误
...
- 修复 store 初始化的异步问题:构造函数中的异步方法现在正确等待
- 修复配置切换时删除原文件的严重 bug:使用 copyFile 替代 rename 避免文件丢失
- 简化代码实现,移除过度设计的部分
2025-08-10 20:36:17 +08:00
Jason
5f0ef8a441
fix(mac): 修复隐藏标题栏拖拽;标题与内容左对齐;增加 banner 高度以避让交通灯
2025-08-10 19:13:45 +08:00
farion1231
c5843ae849
修复UI问题:禁用正在使用供应商的编辑按钮
...
- 为正在使用中的供应商禁用编辑按钮,避免编辑活跃配置
- 添加edit-btn的disabled样式,保持界面一致性
- 防止用户编辑正在使用的settings.json导致配置冲突
2025-08-08 15:29:28 +08:00
farion1231
482298411a
代码重构:移除 any 类型并抽取共享表单组件
...
- 移除所有 any 类型声明,提升类型安全性
- 简化 ClaudeCodeSettings 接口为通用的 Record<string, any>,支持任意供应商配置
- 创建 ProviderForm 共享组件,减少重复代码约 300 行
- 优化 Store 类型定义,使用泛型约束确保类型安全
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-08 15:03:38 +08:00
farion1231
fe71373e7d
界面改进和代码重构:设置窗口最小尺寸并抽象预设供应商配置
...
- 设置窗口最小尺寸为600x400,防止界面缩放问题
- 将预设供应商配置提取到独立文件providerPresets.ts
- 便于管理和维护预设供应商列表
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-08 12:12:28 +08:00
farion1231
6021ad8b22
代码质量优化:修复废弃API并改进ID生成
...
- 使用 crypto.randomUUID() 替换已废弃的 substr() 方法
- 将默认供应商名称从"默认"改为"default",提高国际化兼容性
- 优化 ID 生成算法,提供更可靠的唯一性保证
2025-08-07 23:58:07 +08:00
farion1231
100b3f6e21
重大功能改进:添加禁止 Claude Code 签名功能并重构代码
...
新增功能:
- 在添加供应商和编辑供应商窗口都增加"禁止 Claude Code 签名"选择框
- 自动同步 JSON 配置中的 includeCoAuthoredBy 字段
- 支持双向同步:手动编辑 JSON 时选择框状态自动更新
代码优化:
- 提取通用函数到 providerConfigUtils.ts 工具文件
- 重构代码避免重复,提高可维护性
- 保持原有自动提取官网地址功能
UI改进:
- 优化选择框与标签的对齐样式
- 统一两个窗口的交互体验
2025-08-07 23:05:11 +08:00
farion1231
b0d4537398
改进添加供应商界面:实现自动提取官网地址功能
...
- 新增 extractWebsiteUrl 函数,从 JSON 配置中自动解析 ANTHROPIC_BASE_URL
- 智能处理 URL 前缀,自动去掉 "api." 前缀生成官网地址
- 优化用户体验:仅在官网地址为空时自动填入,不覆盖用户手动输入
- 支持实时解析,用户输入 JSON 配置时立即更新官网地址字段
2025-08-07 22:20:03 +08:00
farion1231
db28ccb27b
优化用户体验:简化数据结构并改进文件夹访问
...
- 移除 Provider 中无用的 createdAt 和 updatedAt 字段
- 简化数据结构,去除冗余的时间戳设置代码
- 将底部"浏览"按钮改为"打开",直接打开配置文件夹
- 新增 openConfigFolder API,使用 shell.openPath 打开文件夹
- 优化用户体验,方便用户查看和管理所有配置文件
2025-08-07 22:08:47 +08:00