From 90cc4a16d2274693081b9194c86c687b549d7c3a Mon Sep 17 00:00:00 2001 From: KimiSwitch Dev Date: Thu, 6 Aug 2026 01:56:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(subagent):=20=E5=AE=9E=E9=AA=8C=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E6=94=B9=E4=B8=BA=E6=BB=91=E5=8A=A8=E5=BC=80=E5=85=B3?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AF=E6=80=81=E5=9B=A0?= =?UTF-8?q?=20bg-primary=20=E6=9C=AA=E5=AE=9A=E4=B9=89=E8=80=8C=E9=9A=90?= =?UTF-8?q?=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Toggle 开启态改用已定义的 bg-blue-600(tailwind 配置无 primary 背景色, 导致开启态滑轨透明、白色滑块在白底上不可见) - 子代理开关移至模型下拉之后,统一使用滑动开关 --- release-notes-v0.7.1.md | 18 ++++++++ src/components/SubagentSettingsPage.tsx | 56 +++++++++++++++---------- src/components/ui/controls.tsx | 33 +++++++++++++++ 3 files changed, 86 insertions(+), 21 deletions(-) create mode 100644 release-notes-v0.7.1.md diff --git a/release-notes-v0.7.1.md b/release-notes-v0.7.1.md new file mode 100644 index 0000000..dc74c40 --- /dev/null +++ b/release-notes-v0.7.1.md @@ -0,0 +1,18 @@ +## v0.7.1 + +### 实验功能设置:子代理模型配置 + +- 新增「子代理模型(次主力模型)」设置:选择次主力模型后,子代理默认绑定该模型,不再继承主模型 +- 仅保存模型引用,子代理直接继承所选模型的上下文长度与思考模式,无需补丁配置 +- 界面只读展示继承的上下文长度与思考模式 + +### 仪表盘用量统计 + +- 识别子代理请求(`__secondary__`):归为「子代理模型(估算)」独立展示,并缓存次主力模型定价,删除配置后历史记录仍稳定估算 +- 自定义网关模型(未收录 models.dev)按官方同名模型跨 provider 匹配价格,不再落入兜底估算 + +### Downloads by platform + +- **Windows**: `.msi` installer +- **macOS**: `.dmg` (unsigned — first launch needs right-click → Open) + `.app` +- **Linux**: `.deb` / `.AppImage` / `.rpm` diff --git a/src/components/SubagentSettingsPage.tsx b/src/components/SubagentSettingsPage.tsx index 0596a5c..d2e4e10 100644 --- a/src/components/SubagentSettingsPage.tsx +++ b/src/components/SubagentSettingsPage.tsx @@ -15,7 +15,7 @@ import { setSecondaryModelOnly, type ExperimentalFlagDef, } from "../lib/subagent-settings"; -import { Card, Checkbox } from "./ui/controls"; +import { Card, Toggle } from "./ui/controls"; interface SubagentSettingsPageProps { /** config.raw_other — hosts the `[experimental]` and `[secondary_model]` sections. */ @@ -71,6 +71,7 @@ export function SubagentSettingsPage({ : isFlagLockedByEnv(env, secondaryFlag) ? forcedEnvValue(env, secondaryFlag) : flags["secondary-model"] === true; + const secondaryLocked = masterOn || isFlagLockedByEnv(env, secondaryFlag); const aliasList = Object.keys(models).sort(); @@ -127,10 +128,10 @@ export function SubagentSettingsPage({ 🔒 {t("lockedByEnv")} )} - onChange(setExperimentalFlag(rawOther, flag.id, checked)) } @@ -160,17 +161,8 @@ export function SubagentSettingsPage({ )} - {/* Subagent: experimental flag + secondary model in one card */} + {/* Subagent: secondary model picker + inherited settings */} - {renderFlagRow(secondaryFlag)} -
- - {!secondaryEnabled && ( -
- {t("secondaryModelDisabledHint")} -
- )} -