晴天
dba69ee0fc
feat(channels): 统一模型渠道——一处配置,同步 OpenClaw / Hermes / 晴辰助手
新增「模型渠道」页面(通用分组):用户只维护一份渠道配置
(服务商预设 / Base URL / API Key / 模型列表 / 默认模型),
通过显式同步推送到三个消费方,消灭重复配置。
实现要点:
- 渠道存储 src-tauri/src/commands/model_channels.rs:
读取只回掩码(apiKeySaved/apiKeyMask),写入支持 __KEEP__ 哨兵保留旧 Key,
明文 Key 仅经 reveal_model_channel_key 在同步时取出;
文件位于 openclaw 数据目录下,便携迁移自动带走;含 6 个单元测试
- 同步逻辑 src/lib/model-channels.js 组合现有命令完成(各自带自动备份):
OpenClaw 只 upsert 对应 provider 保留未知字段;
Hermes 写 provider 环境变量 + 可选默认模型(仅 OpenAI/Anthropic/Gemini
兼容 API Key 型,OAuth/SDK 型仍走 Hermes 向导);
助手为一次性拷贝到 localStorage
- 页面 src/pages/model-channels.js:渠道卡片 + 三目标同步状态徽标
(已同步/有未同步变更/未同步)+ 编辑弹窗(预设自动填充、在线拉取模型、
默认模型联动)+ 从 OpenClaw 现有配置一键导入 + 全部操作确认弹窗
- Web 模式 dev-api.js 同构 handler + ALWAYS_LOCAL;i18n 简/繁/英 +
侧栏 11 语言;tests/model-channels.test.js 锁定注册链与安全约束
验证:npm build / cargo fmt+check+clippy -D warnings / cargo test --lib
314 通过 / node --test 全部 427 通过
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 11:48:24 -07:00
..
2026-07-05 11:43:33 -07:00
2026-06-15 16:20:35 +08:00
2026-06-06 18:32:37 +08:00
2026-06-15 16:20:35 +08:00
2026-05-26 04:42:28 +08:00
2026-05-26 01:50:06 +08:00
2026-05-26 02:18:03 +08:00
2026-05-27 06:43:41 +08:00
2026-05-26 23:22:25 +08:00
2026-05-25 07:44:56 +08:00
2026-06-11 15:24:01 +08:00
2026-05-27 05:39:22 +08:00
2026-05-27 01:59:06 +08:00
2026-05-26 01:05:17 +08:00
2026-05-27 06:59:16 +08:00
2026-05-26 06:11:25 +08:00
2026-06-06 18:32:37 +08:00
2026-05-26 04:04:22 +08:00
2026-05-27 01:14:10 +08:00
2026-05-25 03:29:56 +08:00
2026-05-27 04:49:03 +08:00
2026-05-26 05:39:19 +08:00
2026-06-11 15:24:01 +08:00
2026-05-26 04:28:33 +08:00
2026-05-27 05:06:32 +08:00
2026-05-26 06:01:41 +08:00
2026-05-26 02:36:37 +08:00
2026-05-25 07:07:47 +08:00
2026-05-26 03:26:46 +08:00
2026-05-26 03:00:31 +08:00
2026-06-11 15:24:01 +08:00
2026-05-26 05:50:12 +08:00
2026-05-27 02:14:20 +08:00
2026-05-27 01:40:53 +08:00
2026-05-26 01:29:32 +08:00
2026-05-27 06:28:45 +08:00
2026-05-27 04:02:36 +08:00
2026-05-27 02:33:57 +08:00
2026-06-15 14:00:07 +08:00
2026-05-27 05:25:42 +08:00
2026-07-05 11:48:24 -07:00
2026-06-06 18:32:37 +08:00
2026-06-11 15:24:01 +08:00
2026-06-11 15:24:01 +08:00
2026-06-06 18:32:37 +08:00
2026-06-06 18:32:37 +08:00
2026-07-05 11:43:33 -07:00