Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): clarify subagent effort controls

david51f387cbe170
diff --git a/apps/desktop/src/renderer/__tests__/modelSelectorProviderGroups.test.tsx b/apps/desktop/src/renderer/__tests__/modelSelectorProviderGroups.test.tsx
index 4347338e2e..6eb53fa8ab 100644
--- a/apps/desktop/src/renderer/__tests__/modelSelectorProviderGroups.test.tsx
+++ b/apps/desktop/src/renderer/__tests__/modelSelectorProviderGroups.test.tsx
@@ -374,6 +374,15 @@ describe('ModelSelector provider groups', () => {
expect(within(dashscopeGroup).queryByText('Opus 4.8')).toBeNull();
});
+ it('hides effort summaries when the entry only supports selecting a model id', async () => {
+ renderSelector({ configurationEnabled: false });
+ await openDropdown();
+
+ const popover = screen.getByTestId('model-options-popover');
+ expect(within(popover).queryByTitle('high')).toBeNull();
+ expect(within(popover).queryByTitle('medium')).toBeNull();
+ });
+
it('keeps the create-agent secondary panel at the original left/center position with layout coordinates', async () => {
renderSelector({ visualVariant: 'create-agent', useMorphPopover: true });
await openDropdown();
diff --git a/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx b/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx
index 04226af040..78cc3bb460 100644
--- a/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx
+++ b/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx
@@ -633,7 +633,7 @@ interface ModelSelectorProps {
* 不传时沿用通用面板的 300px 上限,供 Settings 等紧凑场景按行数收窄。
*/
maxVisibleModelRows?: number;
- /** 关闭模型的 effort / Fast 编辑入口;只选择模型 id 的设置项使用。 */
+ /** 关闭模型的 effort / Fast 编辑入口与行内状态摘要;只选择模型 id 的设置项使用。 */
configurationEnabled?: boolean;
/** 可选的列表首行兜底值,例如“不指定(使用原逻辑)”。 */
fallbackOption?: { active: boolean; label: string; onSelect: () => void };
@@ -1883,8 +1883,11 @@ function ModelSelectorContentView({
}));
const disabled = interactionDisabled || modelDisabledOf(provider, model.id);
const disabledReason = subscriptionDirectDisabledReason(model.id);
- const rowEffort = rowEffortOf(providerId, model);
- const rowFastOn = fastOnOf(providerId, model);
+ // 只选择模型 id 的入口没有 effort / Fast 语义;继续展示目录默认档会让用户
+ // 误以为该值可在当前入口调整。选择事务仍由 handleRowSelect 独立解析 effort,
+ // 此处只收窄可见摘要,不改变支持配置入口的行为。
+ const rowEffort = configurationEnabled ? rowEffortOf(providerId, model) : null;
+ const rowFastOn = configurationEnabled ? fastOnOf(providerId, model) : false;
const rowPrice = pricePresentationOf(providerId, model.id);
const rowPromotionLabel =
rowPrice?.kind === 'free'
diff --git a/apps/desktop/src/renderer/components/settings/SubagentModelSection.tsx b/apps/desktop/src/renderer/components/settings/SubagentModelSection.tsx
index 04b56ce65f..8513aaf3d8 100644
--- a/apps/desktop/src/renderer/components/settings/SubagentModelSection.tsx
+++ b/apps/desktop/src/renderer/components/settings/SubagentModelSection.tsx
@@ -438,7 +438,7 @@ export function SubagentModelSection() {
<div className="min-w-0 flex-1">
{/* composer 同款全功能标准面板(2026-07 用户定稿基准:全软件一个模型选择
面板,处处同行为):供应商分段、订阅来源全开,(model, providerId) 原子
- 落库。仅 effort/Fast 配置列保持关闭(configurationEnabled=false)——
+ 落库。仅 effort/Fast 配置列与行内摘要保持关闭(configurationEnabled=false)——
子代理派发通道 CLAUDE_CODE_SUBAGENT_MODEL 只有模型 id,没有 effort/Fast
维度,展示可调项会承诺一个不存在的能力(功能特殊化理由,见 PR 说明)。 */}
<ModelSelector
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index c6751bc188..dfcece5bb2 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -2322,7 +2322,7 @@
"title": "Subagents",
"description": "Choose the default model used for sub tasks in Claude Code and Codex, and set guardrails for Codex subagents. The setting applies per entry, not per model.",
"unspecified": "Not specified (use default behavior)",
- "hint": "Available models depend on your connected model sources. Leave it unspecified to use the agent's normal default. Claude Code changes apply to new sessions; Codex changes restart the local Codex runtime right away when idle, or after running sessions finish their current task.",
+ "hint": "Claude Code subagents only support choosing a model; reasoning effort follows Claude Code's native behavior. Available models depend on your connected model sources. Leave it unspecified to use the agent's normal default. Claude Code changes apply to new sessions; Codex changes restart the local Codex runtime right away when idle, or after running sessions finish their current task.",
"codexV2ModelHint": "The subagent default must be a model from Codex's own catalog; models outside it (such as third-party models connected through the compatibility bridge) are rejected by Codex. Sol / Terra (multi-agent V2) further only accept V2 catalog models (currently gpt-5.6-sol and gpt-5.6-terra); legacy multi-agent (V1) has no V2 restriction.",
"saveFailed": "Failed to save subagent settings",
"guardrails": {
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 332658ee59..5ab284dfa8 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -2321,7 +2321,7 @@
"title": "サブエージェント",
"description": "Claude Code と Codex がサブタスクを実行するときに使用する既定のモデルを設定し、Codex サブエージェントのガードレールを構成します。設定は入口ごとに適用され、モデルごとには保存されません。",
"unspecified": "指定しない(既定の動作を使用)",
- "hint": "選択できるモデルは接続済みのモデルソースによって異なります。未指定の場合は Agent 本来の既定値を使用します。Claude Code の変更は新規セッションから有効になります。Codex の変更はアイドル時に即時再起動で反映され、タスク実行中はローカルの Codex セッションがすべてアイドルになった後に自動適用されます。",
+ "hint": "Claude Code のサブエージェントではモデルのみ指定でき、推論強度は Claude Code 本来の動作に従います。選択できるモデルは接続済みのモデルソースによって異なります。未指定の場合は Agent 本来の既定値を使用します。Claude Code の変更は新規セッションから有効になります。Codex の変更はアイドル時に即時再起動で反映され、タスク実行中はローカルの Codex セッションがすべてアイドルになった後に自動適用されます。",
"codexV2ModelHint": "サブエージェントの既定モデルは Codex 自身のモデルカタログ内のモデルである必要があり、カタログ外のモデル(互換ブリッジ経由のサードパーティモデルなど)は Codex に拒否されます。Sol / Terra(マルチエージェント V2)はさらに V2 カタログモデル(現在は gpt-5.6-sol と gpt-5.6-terra)のみを受け付けます。旧版マルチエージェント(V1)に V2 の制限はありません。",
"saveFailed": "サブエージェント設定の保存に失敗しました",
"guardrails": {
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 324eb6ba3e..a73a22df22 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -2321,7 +2321,7 @@
"title": "하위 에이전트",
"description": "Claude Code와 Codex가 하위 작업을 실행할 때 사용할 기본 모델을 설정하고 Codex 하위 에이전트의 가드레일을 구성합니다. 설정은 진입점별로 적용되며 모델별로 저장되지 않습니다.",
"unspecified": "지정 안 함(기본 동작 사용)",
- "hint": "선택 가능한 모델은 연결된 모델 소스에 따라 달라집니다. 지정하지 않으면 Agent의 기본 설정을 사용합니다. Claude Code 변경 사항은 새 세션부터 적용됩니다. Codex 변경 사항은 유휴 상태에서 즉시 재시작되어 반영되며, 작업 실행 중에는 로컬 Codex 세션이 모두 유휴 상태가 된 후 자동 적용됩니다.",
+ "hint": "Claude Code 하위 에이전트에서는 모델만 지정할 수 있으며 추론 강도는 Claude Code의 기본 동작을 따릅니다. 선택 가능한 모델은 연결된 모델 소스에 따라 달라집니다. 지정하지 않으면 Agent의 기본 설정을 사용합니다. Claude Code 변경 사항은 새 세션부터 적용됩니다. Codex 변경 사항은 유휴 상태에서 즉시 재시작되어 반영되며, 작업 실행 중에는 로컬 Codex 세션이 모두 유휴 상태가 된 후 자동 적용됩니다.",
"codexV2ModelHint": "하위 에이전트 기본 모델은 Codex 자체 모델 카탈로그에 있는 모델이어야 하며, 카탈로그 외부 모델(호환 브리지로 연결된 서드파티 모델 등)은 Codex가 거부합니다. Sol / Terra(멀티 에이전트 V2)는 나아가 V2 카탈로그 모델(현재 gpt-5.6-sol과 gpt-5.6-terra)만 허용합니다. 이전 버전 멀티 에이전트(V1)에는 V2 제한이 없습니다.",
"saveFailed": "하위 에이전트 설정 저장 실패",
"guardrails": {
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index 11bce49124..06bcc1e044 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -2321,7 +2321,7 @@
"title": "Subagent",
"description": "分别设置 Claude Code 和 Codex 执行子任务时使用的默认模型,并为 Codex Subagent 配置运行护栏。设置按入口生效,不会为每个模型单独保存。",
"unspecified": "不指定(跟随原逻辑)",
- "hint": "可选模型取决于已连接的模型来源;留空表示使用 Agent 原本的默认设置。Claude Code 的修改从新建的 Agent 会话开始生效;Codex 的修改在空闲时立即重启生效,有任务运行时会在本地 Codex 会话全部空闲后自动应用。",
+ "hint": "Claude Code Subagent 只支持指定模型,推理强度沿用 Claude Code 原生逻辑。可选模型取决于已连接的模型来源;留空表示使用 Agent 原本的默认设置。Claude Code 的修改从新建的 Agent 会话开始生效;Codex 的修改在空闲时立即重启生效,有任务运行时会在本地 Codex 会话全部空闲后自动应用。",
"codexV2ModelHint": "Subagent 默认模型必须是 Codex 自身模型目录内的模型,目录外的模型(如经兼容桥接入的第三方模型)会被 Codex 拒绝;Sol / Terra(Multi-Agent V2)进一步只接受 V2 目录模型(当前为 gpt-5.6-sol 与 gpt-5.6-terra),旧版(V1)无 V2 限制。",
"saveFailed": "保存 Subagent 设置失败",
"guardrails": {
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
index bf86563989..96b2e54cc2 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -2321,7 +2321,7 @@
"title": "Subagent",
"description": "分別設定 Claude Code 和 Codex 執行子任務時使用的預設模型,併為 Codex Subagent 配置執行護欄。設定按入口生效,不會為每個模型單獨儲存。",
"unspecified": "不指定(跟隨原邏輯)",
- "hint": "可選模型取決於已連線的模型來源;留空表示使用 Agent 原本的預設設定。Claude Code 的修改從新建的 Agent 會話開始生效;Codex 的修改在空閒時立即重啟生效,有任務執行時會在本地 Codex 會話全部空閒後自動應用。",
+ "hint": "Claude Code Subagent 僅支援指定模型,推理強度沿用 Claude Code 原生邏輯。可選模型取決於已連線的模型來源;留空表示使用 Agent 原本的預設設定。Claude Code 的修改從新建的 Agent 會話開始生效;Codex 的修改在空閒時立即重啟生效,有任務執行時會在本地 Codex 會話全部空閒後自動應用。",
"codexV2ModelHint": "Subagent 預設模型必須是 Codex 自身模型目錄內的模型,目錄外的模型(如經相容橋接入的第三方模型)會被 Codex 拒絕;Sol / Terra(Multi-Agent V2)進一步只接受 V2 目錄模型(當前為 gpt-5.6-sol 與 gpt-5.6-terra),舊版(V1)無 V2 限制。",
"saveFailed": "儲存 Subagent 設定失敗",
"guardrails": {