Commit Graph
122 Commits
Author SHA1 Message Date
KimiSwitch Dev 2464500ef5 feat: 优化更新检查逻辑 + 修复按量余额显示(v0.6.5)
Release / Version consistency (push) Canceled after 0s
Release / Build (macos-latest) (push) Canceled after 0s
Release / Build (ubuntu-latest) (push) Canceled after 0s
Release / Build (windows-latest) (push) Canceled after 0s
v0.6.5
2026-08-01 10:51:54 +08:00
954801926@qq.com f60305fbeb fix(ci): 显式透传 GITHUB_TOKEN 给 tauri-action 上传用
Release / Version consistency (push) Canceled after 0s
Release / Build (macos-latest) (push) Canceled after 0s
Release / Build (ubuntu-latest) (push) Canceled after 0s
Release / Build (windows-latest) (push) Canceled after 0s
- tauri-action 报 'GITHUB_TOKEN is required' 实际是模板替换失败
- 在 step env 显式给 ${{ secrets.GITHUB_TOKEN }} 解决
v0.6.4
2026-08-01 09:53:42 +08:00
954801926@qq.com 8d734a6507 fix(ci): 加 npm ci 步骤 + 移除冲突的 libappindicator3-dev
- macOS/Windows 失败: 'tauri' 命令找不到 → 实际是 npm 依赖没装
  tauri-action 不会自动 npm install, 需显式 npm ci
- Linux apt 冲突: libappindicator3-dev 与 libayatana-appindicator3-dev 互斥
  保留后者 (Tauri 2 推荐)
2026-08-01 09:53:42 +08:00
954801926@qq.com 0a36cd0ec4 fix(ci): setup-rust 改用 dtolnay/rust-toolchain (上游 @v1 解析失败) 2026-08-01 09:53:42 +08:00
954801926@qq.com 6b867ff6fc fix(ci): check-version.sh 兼容预发布 tag (v0.6.0-rc1 / beta / alpha)
- 预发布标签在比较时也剥离 -rc1 / -beta.2 / -alpha.3 等后缀
- 允许用户复用已发布的版本文件来打预发布
- 显式不匹配仍正常工作
2026-08-01 09:53:42 +08:00
KimiSwitch Dev c6da421d2f docs: 交接文档更新 v0.6.4 发布状态 2026-08-01 09:48:57 +08:00
KimiSwitch Dev ace9842556 feat: 新增部分套餐账单查询(v0.6.4)
Release / Version consistency (push) Canceled after 0s
Release / Build (macos-latest) (push) Canceled after 0s
Release / Build (ubuntu-latest) (push) Canceled after 0s
Release / Build (windows-latest) (push) Canceled after 0s
- 账单/用量查询:balance:kimi(Moonshot 开放平台余额)、NewAPI 中转站余额(accessToken+userId)、Kimi/智谱/MiniMax 套餐档位(5小时/7天)
- managed:kimi-code 走 Kimi Code OAuth 登录凭据查询订阅用量,access token 过期自动 refresh 并写回凭据(单 flight 锁 + 写回前重读防 CLI 竞态)
- 全屏「配置用量查询」页面:启用开关 / 自动检测 vs NewAPI 模板 / 超时与自动查询间隔 / 测试查询
- 供应商卡片紧凑用量行(切换使用左侧)+ 多档明细行;managed 供应商列表置顶(仅展示层)
- 用量显示中英文适配(five_hour→5小时、weekly_limit→7天,Rust 错误串本地化映射)
- 修复:usage_kinds serde rename 导致账单入口不显示;测试查询因 save 触发 loading 翻页卸载面板导致结果丢失(silent save)
2026-08-01 09:44:36 +08:00
KimiSwitch Dev 12dcb17771 docs: 账单查询适配调研 + OpenCode Zen 预设补推荐链接
- 新增 docs/USAGE-QUERY-ADAPTATION.md:cc-switch/OpenCode/官方 API 账单查询适配调研(含 Kimi 余额 API 缺口 P0、OpenCode Go 不可查结论、遗漏盘点)
- opencode-zen 预设 apiKeyUrl 补推荐链接 ref=DFCNADQCEM(Zen 控制台页无 ref 参数)
2026-07-31 21:58:53 +08:00
KimiSwitch Dev 02555daff4 build: 恢复 NSIS 打包支持(工具链缓存到本地,含 msi+nsis 双格式) 2026-07-31 14:56:34 +08:00
KimiSwitch Dev b9ea6426d8 merge Dev_260708 → main: v0.6.1~v0.6.3 发版合入主线
# Conflicts:
#	src-tauri/src/commands.rs
2026-07-31 10:57:27 +08:00
KimiSwitch Dev 0889eeba24 chore: update Cargo.lock for v0.6.3 2026-07-30 14:30:45 +08:00
KimiSwitch Dev f35924e15c v0.6.3: 添加默认供应商支持
- 新增 StepFun Plan 套餐预设
- 供应商编辑页 API Key 下方添加获取 Key 链接(支持推广链接)
- 修复链接无法打开浏览器的问题(Rust open_external_url)
- 无推广链接时回退打开官网
- 必填字段(供应商名称/API Key/请求地址)添加红色 * 标注
- 用户自定义预设方案文档
v0.6.3
2026-07-30 14:19:27 +08:00
KimiSwitch Dev bee981aefa v0.6.2: 仪表盘布局重构 + 每日趋势折线图 + OpenCode Go/Zen 预设
仪表盘:
- 新增每日用量趋势折线图(Token/缓存命中率/请求数三线)
- 用量趋势 Tab 组(每日/模型/供应商模型)与模型表格同行等高
- 热力图独立整行,格子放大 16px
- 折线图坐标轴文字改 HTML 覆盖层(修复 SVG 拉伸变形)
- 表格 border-collapse + 行线与边框同色
- 模型表格估算标签行内显示(行高统一)
- 最近请求容器 max-h 限制
- 页脚归属放内容流末尾

模型唯一性:
- 获取模型列表时自动勾选已存在模型 + 已添加徽章
- 批量添加跳过同供应商已存在 model id
- onBulkAdd 同供应商 model id 去重

新增预设:
- OpenCode Go(套餐 subscription,带推荐链接)
- OpenCode Zen(按量 pay_as_you_go)

折线图优化:
- 缓存命中率 0-1 映射修复
- 请求数默认显示
- 直线连接 + 渐变填充
v0.6.2
2026-07-30 11:50:05 +08:00
954801926@qq.com 19f58c3a2b docs(readme): multi-platform downloads + workflow badge
Release / Version consistency (push) Canceled after 0s
Release / Build (macos-latest) (push) Canceled after 0s
Release / Build (ubuntu-latest) (push) Canceled after 0s
Release / Build (windows-latest) (push) Canceled after 0s
- 中文/英文 README 各加一段"下载"/"Downloads"段落
- 三平台链接: Windows .msi / macOS .dmg (注明未签名) / Linux 多格式
- 历史版本指向 git.codingplan.site
- 加 GH Actions Release workflow 徽章
2026-07-30 00:30:34 +08:00
954801926@qq.com 8f0729ddfc docs: build instructions for all platforms + Docker + CI 2026-07-30 00:29:48 +08:00
954801926@qq.com 0dbe2ba88c ci: add Linux Docker build environment
- Ubuntu 22.04 + webkit2gtk-4.1 + librsvg2 + nodejs + rustup + tauri-cli
- docker-compose: 绑定源码到 /workspace, 持久化 cargo/target 缓存
- 与 GH Actions ubuntu-latest job 依赖保持一致
2026-07-30 00:29:31 +08:00
954801926@qq.com 6a8b09ef35 ci: add multi-platform release workflow on tag push
- version-check job: tag == package.json / Cargo.toml / tauri.conf.json
- 3 平台矩阵: ubuntu (deb/AppImage/rpm), macos (app/dmg), windows (msi)
- tauri-action 自动建 Release + 上传 assets
- prerelease 自动识别 (含 -rc / -beta / -alpha 的 tag)
- macOS unsigned: release body 注明用户首次启动需右键 → Open
2026-07-30 00:23:51 +08:00
954801926@qq.com 4adf5cafbe ci: add version-consistency check script (tag vs package.json vs Cargo.toml vs tauri.conf.json) 2026-07-30 00:23:13 +08:00
954801926@qq.com 90ab9f8a97 feat(update): use platform-aware asset and filename in update flow
- check_for_update: download_url = pick_asset_for_current_os(assets)
- download_update: temp file = update_temp_filename() (按 OS: msi/dmg/AppImage)
2026-07-30 00:22:49 +08:00
954801926@qq.com 06aad52e0f feat(update): TDD platform-aware asset picker + tests
- 抽取 pick_asset_for_os(assets, os) 纯函数(可测)
- pick_asset_for_current_os 包裹运行时 OS
- update_temp_filename 按 OS 决定后缀
- 6 个单元测覆盖 win/mac/linux + missing/empty/unknown
2026-07-30 00:21:54 +08:00
954801926@qq.com 548cdabe99 fix(build): only set windows_subsystem on Windows targets 2026-07-30 00:17:39 +08:00
954801926@qq.com 7b41518d6e feat(bundle): enable all-platform targets + macOS/Linux config 2026-07-30 00:17:00 +08:00
954801926@qq.com 63ae664e72 docs(plan): 多平台打包实施计划
10 个任务覆盖:
- tauri.conf.json 改造 + main.rs 平台条件
- TDD 平台资产选择器 + 单元测
- check_for_update / download_update 接入
- 版本一致性脚本
- GitHub Actions release workflow
- Docker Linux 构建
- BUILD.md
- README 三平台下载 + workflow 徽章
- E2E 验证 (pre-release tag)
2026-07-30 00:15:12 +08:00
954801926@qq.com 00322fb503 docs(spec): 多平台打包设计 (macOS + Linux + Windows 同时 GH Actions 发布)
- 构建策略: GH Actions + Docker 本地
- macOS: 不签名 / 跳过公证
- Linux: deb + AppImage + rpm
- Release 触发: tag 推送 + 4 处版本一致性
- update checker: 按 OS + 扩展名自动选 asset

完整内容: docs/superpowers/specs/2026-07-29-multi-platform-packaging-design.md
2026-07-30 00:12:19 +08:00
954801926@qq.com 084883a54a fix(update): 切换 check_for_update 至 GitHub Releases API
- URL: git.codingplan.site Gitea API -> api.github.com/repos/billowliu2/KimiSwitch
- 增加 User-Agent header (GitHub 403 without UA)
- User-Agent: KimiSwitch/<CARGO_PKG_VERSION>
- 包目标只跟随 v0.6.0+ 历史版本仍留在 git.codingplan.site
2026-07-29 23:57:03 +08:00
954801926@qq.com fb530c85ca docs: bump to v0.6.0, point historical versions to git.codingplan.site
- badge: v0.5.2 -> v0.6.0, link to GitHub releases
- release history: replace v0.5.1 'latest' with v0.6.0 notes
- history section: link git.codingplan.site for v0.5.x and earlier
- .gitignore: exclude .release* (private release-notes drafts)
- README_EN: same updates in English
2026-07-29 23:53:29 +08:00
954801926@qq.com 919b9e49f5 merge: integrate Dev_260708 into main 2026-07-29 23:36:42 +08:00
954801926@qq.com 549c8b5b13 chore: init main branch 2026-07-29 23:36:41 +08:00
KimiSwitch Dev 2614f80d0f v0.6.0: 预设供应商 + 供应商账单查询
## 新增

- 15 条主流供应商预设(Kimi Coding / Moonshot / Anthropic /
  DeepSeek / 智谱 GLM / z.ai / 阿里百炼 / MiniMax / StepFun /
  SiliconFlow / Novita / OpenRouter / OpenAI / Google AI Studio /
  火山方舟),通过 PresetPickerModal 一键填表
- 供应商余额/套餐查询(卡片底部 UsageFooter):余额类
  (DeepSeek / SiliconFlow / OpenRouter / StepFun / Novita) +
  套餐类(Kimi For Coding / 智谱 GLM / MiniMax),5min stale TTL +
  force_refresh + 并发 ≤3
- Rust 端 services/ 模块(balance / coding_plan / usage_types),
  参考 cc-switch(MIT,© Jason Young)实现
- query_provider_usage 命令:Rust 端从 config 加载 key,
  不经 IPC 序列化 API key
- usageKinds 持久化到 SQLite settings(JSON 数组),
  load 时合并回 config,导出 config.toml 时不写
- detect_provider 启发式:旧用户升级后自动获得账单支持
- save-time 校验:未完成供应商(缺 api_key / base_url / 模型)
  保存时弹 confirm 列出原因;新增未提交 back 时静默 drop
- docs/PROPOSAL-presets-and-usage.md(v0.4-draft 实施档)
- docs/VERIFICATION-CHECKLIST.md(70+ 项手动验证清单)

## 修复

- handleDuplicateProvider 的 alias.slice 漏洞:老数据
  非规范 alias 复制不再错位
- handleSelectPreset 不再 auto-save,半成品不会落盘
- handleSwitchProvider 校验取消时自动 refresh 回滚,
  不会出现内存改 / 盘没动的脏态

## 文档

- README / README_EN 致谢段补 cc-switch(预设 + 账单)
- README 已知限制与后续建议段(/reload 上游限制调研结论)
- i18n 补 5 条校验 key + 11 条预设 UI key + 12 条账单 key

详见 docs/PROPOSAL-presets-and-usage.md 与
docs/VERIFICATION-CHECKLIST.md
v0.6.0
2026-07-29 20:59:53 +08:00
KimiSwitch Dev a1fdc6c93d feat: v0.5.2 - daily trend refactor + provider/model two-level drill-down
- Dashboard: 用量趋势卡片改为外层 tab 容器(下划线 tab),移除卡片标题与内部 pill 切换器
- 用量趋势: 新增 供应商模型用量趋势 tab,与 模型用量趋势 并列
- 供应商 tab 弹窗: 每日用量详情改为两级(供应商 → 模型)分组
- 后端: DailyRow 新增 by_provider_model 嵌套聚合
- 前端: DailyBars 通用化(dimension/colorMap),DailyDetailModal 按 tab 维度渲染
- i18n: 新增 providerDistribution(中/英)
- 版本: 0.5.1 → 0.5.2(tauri.conf / Cargo.toml / package.json / README)
v0.5.2
2026-07-29 13:41:04 +08:00
KimiSwitch Dev 3dd1fd93fe fix: v0.5.1 - window/tray behavior, model table & capability UI polish
- Window: minimize keeps taskbar button (remove minimize-to-tray hook); close button hides to tray; tray left-click always shows + focuses window
- Dashboard model table: model column auto-width (whitespace-nowrap, no truncation)
- Capabilities editor: expose only thinking; image_in/video_in/tool_use still auto-derived from models.dev
- Model mapping table: theme-aware row divider (fix harsh dark line in light mode)
v0.5.1
2026-07-29 10:01:17 +08:00
954801926@qq.com 6f2b927914 docs: 新增界面截图,将 docs/superpowers 移出版本库
- 新增 docs/screenshots/ 5 张界面截图(仪表盘、会话、供应商列表、编辑供应商基本信息/模型映射)
- README.md / README_EN.md 新增截图章节与目录项,并在项目结构说明中补充 docs/screenshots/
- .gitignore 排除 docs/superpowers/,从索引中移除已跟踪的设计规范与实施计划文件(本地保留)
2026-07-28 18:57:54 +08:00
KimiSwitch Dev b1d137f072 feat: v0.5.0 - provider icon actions, duplicate & connectivity test, dashboard chart fixes
- ProviderList: icon buttons (edit/copy/test/delete) via lucide-react, speed-test badge before enable/switch button
- Duplicate provider: deep-copy provider + models as xxx-copy
- test_connectivity command (cc-switch semantics: GET base_url, any HTTP response = reachable), latency badge green/orange/red, auto-dismiss 6s
- Dashboard: daily bars anchored to panel bottom, Card flex height fix (heatmap stays content-height)
v0.5.0
2026-07-28 21:04:47 +08:00
KimiSwitch Dev 6b172914be fix: v0.4.1 - paginate model discovery for OpenAI / Anthropic / Google
- fetch_openai_models: loop on has_more + last_id (?after=) and fall back to next_page_token (?page_token=)

- fetch_anthropic_models: loop on has_more + last_id (?after_id=&limit=1000)

- fetch_google_genai_models: loop on nextPageToken (?pageToken=&pageSize=1000)

- Dedup by id across pages, MAX_PAGES safety cap per provider

- Bump version to 0.4.1
v0.4.1
2026-07-28 16:24:36 +08:00
KimiSwitch Dev ebf2dd28d5 feat: v0.4.0 - provider icon system, settings modal & polish
- Add provider icon system with extracted icon library (cc-switch based)

- Persist icon and icon_color in SQLite and config.toml

- Add Settings modal (theme / language / update check / silent download)

- Add useTheme and useUpdateCheck hooks

- Add provider icon picker (IconPicker) with search and grid

- Fix icon frame 2-layer color difference in ProviderEdit

- Dashboard heatmap and daily usage improvements

- Sessions page polish and adaptive layout

- Bump version to 0.4.0
v0.4.0
2026-07-28 16:01:11 +08:00
KimiSwitch Dev 14d48500bf docs: update README with v0.3.0 release notes, add dashboard & sessions features, thanks to kimicode-dashboard v0.3.0 2026-07-28 09:53:48 +08:00
KimiSwitch Dev 32de98bff5 feat: v0.3.0 re-release - add dashboard & sessions, hide pi option
- Usage dashboard: KPIs, model split, daily bars, year heatmap, recent requests
- Sessions management: list/preview/archive/delete with streaming preview
- Double-click daily bar opens per-model breakdown modal
- Paginated recent requests (30/page)
- Hide pi option from nav (kept code, just removed from UI)
- Timezone fixes: today/day_key/heatmap now use local calendar day
- Streaming preview with 20MB byte cap + 500-char frontend clip
- README attribution to kimicode-dashboard (MIT, JochenYang)
2026-07-28 09:16:21 +08:00
KimiSwitch Dev 139af18826 feat: v0.3.0 - fix provider data loss, oauth corruption & switch UX
Bug fixes:
- Fix config.toml wiped to single provider on switch (now writes all providers)
- Fix managed:kimi-code oauth key corruption (oauth/kimi-code was rewritten
  to oauth/managed-kimi-code, breaking the official subscription)
- Fix default_model not switching due to React 18 deferred state update
  (updateConfig now sets configRef synchronously before setConfig)
- Strip KimiSwitch-private default_model from config.toml provider output

Architecture:
- config.toml is now the authoritative source for Kimi Code provider data
- SQLite stores only metadata (notes, official URLs, remembered models)
- Load reconciles config.toml with SQLite for external /provider changes
- Activate is a no-op for KimiCode (save already writes config.toml)

Features:
- Selected provider moves to top of list on switch
- Add models-dev context size lookup
- Add tauri-plugin-single-instance

Tests:
- 3 new regression tests: oauth key round-trip, all-providers write,
  private default_model strip
2026-07-27 22:36:42 +08:00
KimiSwitch Dev 5806fac056 chore: sync Cargo.lock version to 0.2.0 2026-07-25 17:33:30 +08:00
KimiSwitch Dev 948e96352e feat: v0.2.0 - add system tray, clean up unused role field
- Replace text '+' icon with centered SVG plus icon for the add-provider button
- Add system tray: minimize-to-tray and quit-from-tray menu (minimize hides window, close exits app)
- Remove unused model role field (no functional effect, only stored/displayed)
- Fix multiple providers showing as active in Kimi Code mode: only the default_model's provider is marked active
- Copy /reload to clipboard after provider switch as a convenience hint
- Bump version to 0.2.0
v0.2.0
2026-07-25 16:39:20 +08:00
KimiSwitch Dev 0ce89b09d9 docs: add English README and cross-link both language versions
- New README_EN.md with full English documentation mirroring the Chinese README
- Add language switcher links (English | 中文) at the top of both files
2026-07-22 14:50:55 +08:00
KimiSwitch Dev 0bf0f50aaa docs: fix README inaccuracies found in audit
- Validation: validators.rs is a stub, i18n keys reserved but not wired.
  Reworded to 'reserved, not wired' instead of claiming active checks.
- Backup: actually 7-day retention by mtime, timestamp-based naming,
  stored in backups/ subdirectory (not 7 copies with .bak.N alongside).
- Wording: 'one edit, two effects' was wrong; Kimi Code and Pi have
  separate SQLite configs behind the agent tab.
- TOC: removed broken 'screenshot' anchor and stale 'License' anchor.
- Deduped the two trailing license lines.
- Rust version: drop unsupported '>= 1.77' claim; Cargo.toml has no
  rust-version field, so say 'stable latest'.
- Manual test list: removed Vertex validation item (validator not wired).
v0.1.0
2026-07-22 13:53:59 +08:00
KimiSwitch Dev dd22d769f4 docs: add MIT LICENSE and update README license reference
- Add LICENSE file under MIT, copyright 2026 CodingPlan.site
- Replace 'All rights reserved' note in README with link to LICENSE
- Switch License badge from 'Private' to 'MIT'
2026-07-22 13:35:02 +08:00
KimiSwitch Dev c32f3f458f docs: rewrite README with full project documentation
Cover what the project does, architecture, supported providers, storage
locations, dev workflow, Tauri commands, shortcuts, i18n, testing, build,
FAQ, and security notes.
2026-07-22 13:32:59 +08:00
PiSwitch Dev 4d120ad2bb chore: remove stray screenshot files 2026-07-22 13:18:19 +08:00
KimiSwitch Dev 211986a1e5 feat: update provider/model config handling 2026-07-15 19:15:04 +08:00
KimiSwitch Dev a394e5f730 refactor: auto-generate model role from model name[provider name] format 2026-07-09 11:00:36 +08:00
KimiSwitch Dev b01a5661b4 feat: unify provider active logic and add env field support for kimi_code_io 2026-07-09 08:44:11 +08:00
KimiSwitch Dev 3b12844342 docs: add design specs and implementation plans for reload hint and global settings panel 2026-07-09 08:41:28 +08:00
KimiSwitch Dev 675e8ba24d fix: correct effort type assertion in AgentSettingsPanel 2026-07-09 01:05:41 +08:00