@eddyskywalker/dsh-chatgpt-subscription 0.92.0 → 0.93.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -63193,7 +63193,7 @@ window.__ModuleLoader__.load({
63193
63193
  const advisorContext = typeof value.advisorContextTokenBudget === "number" ? value.advisorContextTokenBudget : ADVISOR_LIMITS.context.fallback;
63194
63194
  const advisorTimeout = typeof value.advisorTimeoutMs === "number" ? value.advisorTimeoutMs : ADVISOR_LIMITS.timeout.fallback;
63195
63195
  const advisorRetry = typeof value.advisorMaxRetries === "number" ? value.advisorMaxRetries : ADVISOR_LIMITS.retries.fallback;
63196
- const threshold = typeof value.progressUpdatesNudgeThreshold === "number" ? value.progressUpdatesNudgeThreshold : 8;
63196
+ const threshold = typeof value.progressUpdatesNudgeThreshold === "number" ? value.progressUpdatesNudgeThreshold : 24;
63197
63197
  const language = value.progressUpdatesLanguage === "zh" || value.progressUpdatesLanguage === "en" || value.progressUpdatesLanguage === "ru" ? value.progressUpdatesLanguage : "auto";
63198
63198
  const [draft, setDraft] = (0, react.useState)(() => String(threshold));
63199
63199
  (0, react.useEffect)(() => {
@@ -66667,6 +66667,13 @@ window.__ModuleLoader__.load({
66667
66667
  const limitsDirty = depthDirty || activeDirty;
66668
66668
  const emptyOverride = Object.values(desiredOverrides).some((list) => list.length === 0);
66669
66669
  const invalid = maxDepth.invalid || maxActive.invalid || enabled && (desiredDefault.length === 0 || emptyOverride);
66670
+ const defaultModelUncovered = [];
66671
+ if (enabled && desiredDefaultModel !== void 0) {
66672
+ const defaultKey = routeKey(desiredDefaultModel);
66673
+ const covers = (list) => list.some((route) => routeKey(route) === defaultKey);
66674
+ if (!covers(desiredDefault)) defaultModelUncovered.push(GLOBAL_TARGET);
66675
+ for (const [target, list] of Object.entries(desiredOverrides)) if (!covers(list)) defaultModelUncovered.push(target);
66676
+ }
66670
66677
  const activeOverridden = this.activeTarget !== "default" && desiredOverrides[this.activeTarget] !== void 0;
66671
66678
  const activeForkOverridden = this.activeTarget !== "default" && desiredForkOverrides[this.activeTarget] !== void 0;
66672
66679
  return {
@@ -66695,6 +66702,7 @@ window.__ModuleLoader__.load({
66695
66702
  forkOverridesByMainModel: desiredForkOverrides,
66696
66703
  activeTargetAllowParentFork: this.activeAllowParentFork(),
66697
66704
  activeTargetForkOverridden: activeForkOverridden,
66705
+ defaultModelUncovered,
66698
66706
  preferencesStatus: this.preferencesStatus
66699
66707
  };
66700
66708
  }
@@ -66708,9 +66716,9 @@ window.__ModuleLoader__.load({
66708
66716
  /**
66709
66717
  * 「子智能体」设置卡片:运行限制 + 模型选择(全局默认 + 按主代理模型覆盖)。
66710
66718
  *
66711
- * 1:1 还原 DSH 官方 `@deepseek-ai/dsh-client-ui-settings-subagent` 的 DOM 层次与样式:
66712
- * - 运行限制:双列响应式网格,标题旁带 `?` 帮助按钮(展开显示深度说明表格),全宽数字输入框;
66713
- * - 模型选择:官方胶囊开关、主代理模型切换栏、以及带滚动条(max-height: 280px)和提供方分隔线的子智能体模型勾选框;
66719
+ * - 运行限制:沿用官方卡片的双列网格与帮助按钮;
66720
+ * - 模型选择:总开关与默认模型在上;开启后按「选主代理 → 冷启动可选模型 → 同源分叉」
66721
+ * 自上而下排列,后两块都作用于当前选中的主代理;
66714
66722
  * - 保存栏:左对齐保存按钮,卸载页面时自动丢弃未保存草稿。
66715
66723
  *
66716
66724
  * @module @eddyskywalker/dsh-chatgpt-subscription/client/subagent/SubagentCard
@@ -66771,11 +66779,18 @@ window.__ModuleLoader__.load({
66771
66779
  children: candidate.modelName
66772
66780
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
66773
66781
  className: "dsh-subagent-model-route",
66774
- children: candidate.providerName + " · " + candidate.provider + "/" + candidate.model
66782
+ title: candidate.provider + "/" + candidate.model,
66783
+ children: candidate.provider + "/" + candidate.model
66775
66784
  })] }),
66776
- candidate.available ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
66777
- className: "dsh-subagent-model-unavailable",
66778
- children: props.unavailableLabel
66785
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
66786
+ className: "dsh-subagent-model-tags",
66787
+ children: [props.isDefault ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
66788
+ className: "dsh-subagent-model-tag",
66789
+ children: props.defaultLabel
66790
+ }) : null, candidate.available ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
66791
+ className: "dsh-subagent-model-unavailable",
66792
+ children: props.unavailableLabel
66793
+ })]
66779
66794
  })
66780
66795
  ]
66781
66796
  });
@@ -66895,12 +66910,25 @@ window.__ModuleLoader__.load({
66895
66910
  return key;
66896
66911
  };
66897
66912
  const activeModelKey = state.activeTarget;
66898
- const overrideKeys = [.../* @__PURE__ */ new Set([...Object.keys(state.overridesByMainModel), ...Object.keys(state.forkOverridesByMainModel)])];
66913
+ /** 配置目标的显示名:全局默认或主代理模型名。 */
66914
+ const targetName = (key) => key === "default" ? t("subagentChipGlobal") : mainModelName(key);
66915
+ const targets = [.../* @__PURE__ */ new Set([
66916
+ GLOBAL_TARGET,
66917
+ ...Object.keys(state.overridesByMainModel),
66918
+ ...Object.keys(state.forkOverridesByMainModel),
66919
+ activeModelKey
66920
+ ])].map((key) => ({
66921
+ key,
66922
+ count: key === "default" ? state.defaultCount : state.overridesByMainModel[key]?.length ?? state.defaultCount,
66923
+ fork: key === "default" ? state.defaultAllowParentFork : state.forkOverridesByMainModel[key] ?? state.defaultAllowParentFork
66924
+ }));
66899
66925
  const activeAnyOverridden = state.activeTargetOverridden || state.activeTargetForkOverridden;
66926
+ const statusText = activeModelKey === "default" ? t("subagentTargetGlobalHint") : state.activeTargetOverridden ? withCount(t("subagentTargetOverrideStatus"), state.activeTargetCount) : state.activeTargetForkOverridden ? t("subagentTargetForkOnlyOverrideStatus") : t("subagentTargetFollowGlobalStatus");
66900
66927
  const limitsHeadingId = headingId + "-limits";
66901
66928
  const modelsHeadingId = headingId + "-models";
66902
66929
  const defaultModelId = headingId + "-default-model";
66903
66930
  const mainModelId = headingId + "-main-model";
66931
+ const spawnTitleId = headingId + "-spawn-title";
66904
66932
  const blocked = !state.dirty || state.invalid || state.saving || !state.writable;
66905
66933
  const defaultGroups = /* @__PURE__ */ new Map();
66906
66934
  const defaultUnavailable = [];
@@ -67028,9 +67056,34 @@ window.__ModuleLoader__.load({
67028
67056
  children: t("subagentModelSelectionTitle")
67029
67057
  }),
67030
67058
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67031
- className: "dsh-subagent-default-row",
67059
+ className: "dsh-subagent-setting-row",
67032
67060
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67033
- className: "dsh-subagent-default-meta",
67061
+ className: "dsh-subagent-setting-meta",
67062
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67063
+ className: "dsh-subagent-label",
67064
+ children: t("subagentModelSelectionToggle")
67065
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67066
+ className: "dsh-subagent-hint",
67067
+ children: t(state.enabled ? "subagentModelSelectionChoose" : "subagentModelSelectionOff")
67068
+ })]
67069
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67070
+ type: "button",
67071
+ role: "switch",
67072
+ "aria-checked": state.enabled,
67073
+ "aria-label": t("subagentModelSelectionToggle"),
67074
+ className: "dsh-subagent-switch",
67075
+ "data-dsh-part": "subagent-enabled-switch",
67076
+ disabled,
67077
+ onClick: () => {
67078
+ props.toggleEnabled();
67079
+ },
67080
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "dsh-subagent-switch-thumb" })
67081
+ })]
67082
+ }),
67083
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67084
+ className: "dsh-subagent-setting-row",
67085
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67086
+ className: "dsh-subagent-setting-meta",
67034
67087
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
67035
67088
  className: "dsh-subagent-label",
67036
67089
  htmlFor: defaultModelId,
@@ -67042,7 +67095,7 @@ window.__ModuleLoader__.load({
67042
67095
  })]
67043
67096
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
67044
67097
  id: defaultModelId,
67045
- className: "dsh-subagent-select dsh-subagent-default-select",
67098
+ className: "dsh-subagent-select dsh-subagent-setting-select",
67046
67099
  "data-dsh-part": "subagent-default-model",
67047
67100
  "aria-label": t("subagentDefaultModel"),
67048
67101
  "aria-describedby": defaultModelId + "-hint",
@@ -67074,138 +67127,183 @@ window.__ModuleLoader__.load({
67074
67127
  ]
67075
67128
  })]
67076
67129
  }),
67130
+ state.defaultModelUncovered.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67131
+ className: "dsh-subagent-warning",
67132
+ role: "status",
67133
+ "data-dsh-part": "subagent-default-uncovered",
67134
+ children: t("subagentDefaultModelUncovered").replace("{targets}", state.defaultModelUncovered.map(targetName).join("、"))
67135
+ }) : null,
67077
67136
  !state.enabled ? catalogFeedback : null,
67078
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67079
- className: "dsh-subagent-permission",
67080
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67081
- className: "dsh-subagent-toggle-row",
67082
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67083
- className: "dsh-subagent-toggle-label",
67084
- children: t("subagentModelSelectionToggle")
67085
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67086
- type: "button",
67087
- role: "switch",
67088
- "aria-checked": state.enabled,
67089
- "aria-label": t("subagentModelSelectionToggle"),
67090
- className: "dsh-subagent-switch",
67091
- "data-dsh-part": "subagent-enabled-switch",
67092
- disabled,
67093
- onClick: () => {
67094
- props.toggleEnabled();
67095
- },
67096
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "dsh-subagent-switch-thumb" })
67097
- })]
67098
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67099
- className: "dsh-subagent-hint",
67100
- children: t(state.enabled ? "subagentModelSelectionChoose" : "subagentModelSelectionOff")
67101
- })]
67102
- }),
67103
67137
  state.enabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67104
- className: "dsh-subagent-selection",
67138
+ className: "dsh-subagent-scope",
67105
67139
  "data-dsh-part": "subagent-target",
67106
67140
  children: [
67107
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
67108
- className: "dsh-subagent-target-bar",
67141
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67142
+ className: "dsh-subagent-scope-head",
67143
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
67144
+ className: "dsh-subagent-label",
67145
+ htmlFor: mainModelId,
67146
+ children: t("subagentMainModelLabel")
67147
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
67148
+ id: mainModelId,
67149
+ className: "dsh-subagent-select dsh-subagent-setting-select",
67150
+ "data-dsh-part": "subagent-main-model",
67151
+ "aria-label": t("subagentMainModelLabel"),
67152
+ value: activeModelKey,
67153
+ disabled,
67154
+ onChange: (event) => {
67155
+ props.setActiveTarget(event.target.value);
67156
+ },
67157
+ children: [
67158
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67159
+ value: GLOBAL_TARGET,
67160
+ children: t("subagentMainModelGlobalOption")
67161
+ }),
67162
+ state.mainModelGroups.map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
67163
+ label: group.providerName,
67164
+ children: group.models.map((model) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67165
+ value: model.key,
67166
+ children: model.modelName + (model.overridden ? t("subagentOverrideBadge") : "")
67167
+ }, model.key))
67168
+ }, group.provider)),
67169
+ state.orphanMainModels.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
67170
+ label: t("subagentModelSelectionUnavailableGroup"),
67171
+ children: state.orphanMainModels.map((key) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67172
+ value: key,
67173
+ children: mainModelName(key) + " · " + key + t("subagentOverrideBadge")
67174
+ }, key))
67175
+ }) : null
67176
+ ]
67177
+ })]
67178
+ }),
67179
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67180
+ className: "dsh-subagent-chips",
67181
+ role: "group",
67182
+ "data-dsh-part": "subagent-chips",
67183
+ "aria-label": t("subagentMainModelQuickSwitch"),
67184
+ children: targets.map((target) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
67185
+ type: "button",
67186
+ className: "dsh-subagent-chip",
67187
+ "data-dsh-part": target.key === "default" ? "subagent-chip-global" : "subagent-chip-override",
67188
+ "aria-pressed": activeModelKey === target.key,
67189
+ disabled,
67190
+ onClick: () => {
67191
+ props.setActiveTarget(target.key);
67192
+ },
67193
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67194
+ className: "dsh-subagent-chip-name",
67195
+ children: targetName(target.key)
67196
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67197
+ className: "dsh-subagent-chip-meta",
67198
+ children: withCount(t("subagentChipModels"), target.count) + " · " + t(target.fork ? "subagentChipForkOn" : "subagentChipForkOff")
67199
+ })]
67200
+ }, target.key))
67201
+ }),
67202
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67203
+ className: "dsh-subagent-status",
67204
+ "data-dsh-part": "subagent-target-status",
67205
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67206
+ className: "dsh-subagent-hint",
67207
+ children: statusText
67208
+ }), activeModelKey !== "default" && activeAnyOverridden ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67209
+ type: "button",
67210
+ className: "dsh-subagent-reset",
67211
+ "data-dsh-part": "subagent-reset-to-global",
67212
+ disabled,
67213
+ onClick: () => {
67214
+ props.resetActiveTarget();
67215
+ },
67216
+ children: t("subagentResetToGlobal")
67217
+ }) : null]
67218
+ }),
67219
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67220
+ className: "dsh-subagent-block",
67221
+ "data-dsh-part": "subagent-spawn-block",
67109
67222
  children: [
67110
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("subagentMainModelLabel") }),
67111
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
67112
- id: mainModelId,
67113
- className: "dsh-subagent-select",
67114
- "data-dsh-part": "subagent-main-model",
67115
- "aria-label": t("subagentMainModelLabel"),
67116
- value: activeModelKey,
67117
- disabled,
67118
- onChange: (event) => {
67119
- props.setActiveTarget(event.target.value);
67120
- },
67121
- children: [
67122
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67123
- value: GLOBAL_TARGET,
67124
- children: t("subagentMainModelGlobalOption")
67125
- }),
67126
- state.mainModelGroups.map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
67127
- label: group.providerName,
67128
- children: group.models.map((model) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67129
- value: model.key,
67130
- children: model.modelName + " · " + model.key + (model.overridden ? t("subagentOverrideBadge") : "")
67131
- }, model.key))
67132
- }, group.provider)),
67133
- state.orphanMainModels.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
67134
- label: t("subagentModelSelectionUnavailableGroup"),
67135
- children: state.orphanMainModels.map((key) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67136
- value: key,
67137
- children: mainModelName(key) + " · " + key + t("subagentOverrideBadge")
67138
- }, key))
67139
- }) : null
67140
- ]
67141
- }),
67142
67223
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67143
- className: "dsh-subagent-chips",
67144
- "data-dsh-part": "subagent-chips",
67145
- "aria-label": t("subagentMainModelQuickSwitch"),
67146
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67147
- type: "button",
67148
- className: "dsh-subagent-chip",
67149
- "data-dsh-part": "subagent-chip-global",
67150
- "aria-pressed": activeModelKey === GLOBAL_TARGET,
67151
- disabled,
67152
- onClick: () => {
67153
- props.setActiveTarget(GLOBAL_TARGET);
67154
- },
67155
- children: withCount(t("subagentChipGlobal"), state.defaultCount)
67156
- }), overrideKeys.map((key) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67157
- type: "button",
67158
- className: "dsh-subagent-chip",
67159
- "data-dsh-part": "subagent-chip-override",
67160
- "aria-pressed": activeModelKey === key,
67161
- disabled,
67162
- onClick: () => {
67163
- props.setActiveTarget(key);
67164
- },
67165
- children: mainModelName(key) + " (" + String(state.overridesByMainModel[key]?.length ?? state.defaultCount) + ")"
67166
- }, key))]
67224
+ className: "dsh-subagent-block-head",
67225
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67226
+ className: "dsh-subagent-setting-meta",
67227
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67228
+ className: "dsh-subagent-block-title",
67229
+ id: spawnTitleId,
67230
+ children: t("subagentModelSelectionAllowed")
67231
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67232
+ className: "dsh-subagent-hint",
67233
+ children: t("subagentModelSelectionAllowedHint")
67234
+ })]
67235
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67236
+ className: "dsh-subagent-count",
67237
+ "data-dsh-part": "subagent-selected-count",
67238
+ children: withCount(t("subagentSelectedCount"), state.activeTargetCount)
67239
+ })]
67167
67240
  }),
67168
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67169
- className: "dsh-subagent-status",
67170
- "data-dsh-part": "subagent-target-status",
67171
- children: [activeModelKey === "default" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67172
- className: "dsh-subagent-hint",
67173
- children: t("subagentTargetGlobalHint")
67174
- }) : state.activeTargetOverridden ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67175
- className: "dsh-subagent-hint",
67176
- children: withCount(t("subagentTargetOverrideStatus"), state.activeTargetCount)
67177
- }) : state.activeTargetForkOverridden ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67178
- className: "dsh-subagent-hint",
67179
- children: t("subagentTargetForkOnlyOverrideStatus")
67180
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67181
- className: "dsh-subagent-hint",
67182
- children: t("subagentTargetFollowGlobalStatus")
67183
- }), activeModelKey !== "default" && activeAnyOverridden ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67184
- type: "button",
67185
- className: "dsh-subagent-reset",
67186
- "data-dsh-part": "subagent-reset-to-global",
67187
- disabled,
67188
- onClick: () => {
67189
- props.resetActiveTarget();
67190
- },
67191
- children: t("subagentResetToGlobal")
67241
+ catalogFeedback,
67242
+ state.candidates.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67243
+ className: "dsh-subagent-models",
67244
+ role: "group",
67245
+ "aria-labelledby": spawnTitleId,
67246
+ children: [[...groups].map(([provider, group]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67247
+ className: "dsh-subagent-group",
67248
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67249
+ className: "dsh-subagent-group-name",
67250
+ children: group.providerName
67251
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67252
+ className: "dsh-subagent-group-rows",
67253
+ children: group.rows.map((candidate) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelRow, {
67254
+ candidate,
67255
+ disabled,
67256
+ isDefault: candidate.key === state.defaultModelKey,
67257
+ defaultLabel: t("subagentDefaultTag"),
67258
+ unavailableLabel: t("subagentModelSelectionUnavailable"),
67259
+ onToggle: (key) => {
67260
+ props.toggleModel(key);
67261
+ }
67262
+ }, candidate.key))
67263
+ })]
67264
+ }, provider)), unavailable.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67265
+ className: "dsh-subagent-group",
67266
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67267
+ className: "dsh-subagent-group-name",
67268
+ children: t("subagentModelSelectionUnavailableGroup")
67269
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67270
+ className: "dsh-subagent-group-rows",
67271
+ children: unavailable.map((candidate) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelRow, {
67272
+ candidate,
67273
+ disabled,
67274
+ isDefault: candidate.key === state.defaultModelKey,
67275
+ defaultLabel: t("subagentDefaultTag"),
67276
+ unavailableLabel: t("subagentModelSelectionUnavailable"),
67277
+ onToggle: (key) => {
67278
+ props.toggleModel(key);
67279
+ }
67280
+ }, candidate.key))
67281
+ })]
67192
67282
  }) : null]
67193
- })
67283
+ }) : state.catalogStatus === "ready" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67284
+ className: "dsh-subagent-notice",
67285
+ children: t("subagentModelSelectionEmpty")
67286
+ }) : null,
67287
+ state.invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67288
+ className: "dsh-subagent-invalid",
67289
+ role: "alert",
67290
+ children: t("subagentModelPerTargetRequired")
67291
+ }) : null
67194
67292
  ]
67195
67293
  }),
67196
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
67197
- className: "dsh-subagent-fork-card",
67294
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67295
+ className: "dsh-subagent-block dsh-subagent-fork-card",
67198
67296
  "data-dsh-part": "subagent-fork-card",
67199
- children: [
67200
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("subagentForkTitle") }),
67201
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67202
- className: "dsh-subagent-fork-head",
67297
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67298
+ className: "dsh-subagent-block-head",
67299
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67300
+ className: "dsh-subagent-setting-meta",
67203
67301
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67204
- className: "dsh-subagent-fork-title-group",
67302
+ className: "dsh-subagent-block-title-row",
67205
67303
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67206
- className: "dsh-subagent-fork-label",
67304
+ className: "dsh-subagent-block-title",
67207
67305
  children: t("subagentForkToggle")
67208
- }), activeModelKey !== "default" && state.activeTargetForkOverridden ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
67306
+ }), activeModelKey === "default" ? null : state.activeTargetForkOverridden ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
67209
67307
  className: "dsh-subagent-badges",
67210
67308
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67211
67309
  className: "dsh-subagent-override-tag",
@@ -67220,70 +67318,29 @@ window.__ModuleLoader__.load({
67220
67318
  },
67221
67319
  children: t("reset")
67222
67320
  })]
67223
- }) : null]
67224
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67225
- type: "button",
67226
- role: "switch",
67227
- "aria-checked": state.activeTargetAllowParentFork,
67228
- "aria-label": t("subagentForkToggle"),
67229
- className: "dsh-subagent-switch",
67230
- "data-dsh-part": "subagent-fork-switch",
67231
- disabled,
67232
- onClick: () => {
67233
- props.toggleAllowParentFork();
67234
- },
67235
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "dsh-subagent-switch-thumb" })
67321
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
67322
+ className: "dsh-subagent-follow-tag",
67323
+ children: t("subagentFollowGlobalTag")
67324
+ })]
67325
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67326
+ className: "dsh-subagent-hint",
67327
+ children: t("subagentForkHint")
67236
67328
  })]
67237
- }),
67238
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67239
- className: "dsh-subagent-hint",
67240
- children: t("subagentForkHint")
67241
- })
67242
- ]
67243
- }),
67244
- catalogFeedback,
67245
- state.candidates.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
67246
- className: "dsh-subagent-models",
67247
- children: [
67248
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("subagentModelSelectionAllowed") }),
67249
- [...groups].map(([provider, group]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67250
- className: "dsh-subagent-group",
67251
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67252
- className: "dsh-subagent-group-name",
67253
- children: group.providerName
67254
- }), group.rows.map((candidate) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelRow, {
67255
- candidate,
67256
- disabled,
67257
- unavailableLabel: t("subagentModelSelectionUnavailable"),
67258
- onToggle: (key) => {
67259
- props.toggleModel(key);
67260
- }
67261
- }, candidate.key))]
67262
- }, provider)),
67263
- unavailable.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67264
- className: "dsh-subagent-group",
67265
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67266
- className: "dsh-subagent-group-name",
67267
- children: t("subagentModelSelectionUnavailableGroup")
67268
- }), unavailable.map((candidate) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelRow, {
67269
- candidate,
67270
- disabled,
67271
- unavailableLabel: t("subagentModelSelectionUnavailable"),
67272
- onToggle: (key) => {
67273
- props.toggleModel(key);
67274
- }
67275
- }, candidate.key))]
67276
- }) : null
67277
- ]
67278
- }) : state.catalogStatus === "ready" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67279
- className: "dsh-subagent-notice",
67280
- children: t("subagentModelSelectionEmpty")
67281
- }) : null,
67282
- state.invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
67283
- className: "dsh-subagent-invalid",
67284
- role: "alert",
67285
- children: t("subagentModelPerTargetRequired")
67286
- }) : null
67329
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
67330
+ type: "button",
67331
+ role: "switch",
67332
+ "aria-checked": state.activeTargetAllowParentFork,
67333
+ "aria-label": t("subagentForkToggle"),
67334
+ className: "dsh-subagent-switch",
67335
+ "data-dsh-part": "subagent-fork-switch",
67336
+ disabled,
67337
+ onClick: () => {
67338
+ props.toggleAllowParentFork();
67339
+ },
67340
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "dsh-subagent-switch-thumb" })
67341
+ })]
67342
+ })
67343
+ })
67287
67344
  ]
67288
67345
  }) : null
67289
67346
  ]
@@ -67368,10 +67425,14 @@ window.__ModuleLoader__.load({
67368
67425
  subagentModelSelectionTitle: "模型选择",
67369
67426
  subagentDefaultModel: "子智能体默认模型",
67370
67427
  subagentDefaultModelInherit: "与父 Agent 相同",
67371
- subagentDefaultModelHint: "父智能体未指定模型时使用此项;已单独配置模型的委派工具保持自身配置。",
67428
+ subagentDefaultModelHint: "Agent 派发时没有指定模型就用它。开启模型选择后,它还要在对应主代理的可选列表里才会生效。",
67429
+ subagentDefaultModelUncovered: "默认模型不在「{targets}」的可选列表里,这些主代理派发时必须显式选择模型。",
67372
67430
  subagentModelSelectionToggle: "允许 Agent 为子智能体选择模型",
67373
- subagentModelSelectionChoose: "开启后,Agent 可以从下方授权模型中,为每个子智能体选择提供方、模型和推理强度。修改会立即对所有会话生效。",
67374
- subagentModelSelectionAllowed: "Agent 可选择的模型",
67431
+ subagentModelSelectionChoose: "开启后,Agent 只能从下方为当前主代理授权的模型中选择子智能体的模型和推理强度。修改立即对所有会话生效。",
67432
+ subagentModelSelectionAllowed: "冷启动可选模型",
67433
+ subagentModelSelectionAllowedHint: "用 subagent 新开子智能体时,Agent 只能选这些模型。",
67434
+ subagentSelectedCount: "已选 {count}",
67435
+ subagentDefaultTag: "默认",
67375
67436
  subagentModelSelectionLoading: "正在加载模型…",
67376
67437
  subagentModelSelectionLoadFailed: "无法加载模型。",
67377
67438
  subagentModelSelectionRetry: "重试",
@@ -67380,22 +67441,26 @@ window.__ModuleLoader__.load({
67380
67441
  subagentModelSelectionUnavailableGroup: "已保存但当前不可用",
67381
67442
  subagentModelSelectionEmpty: "当前没有模型提供方公布模型。",
67382
67443
  subagentModelSelectionRequired: "保存前请至少选择一个模型。",
67383
- subagentModelSelectionOff: "关闭后,子智能体使用配置的默认模型或继承父 Agent 的模型;已选模型会保留。",
67384
- subagentMainModelLabel: "主代理模型配置栏",
67385
- subagentMainModelGlobalOption: "全局默认(未单独配置的主代理使用)",
67386
- subagentMainModelQuickSwitch: "快捷切换",
67387
- subagentChipGlobal: "全局默认 ({count})",
67388
- subagentTargetGlobalHint: "正在编辑全局默认子代理模型列表;未单独配置专属列表的主代理将使用此列表。",
67389
- subagentTargetOverrideStatus: "已为该主代理单独配置 {count} 个子代理模型",
67390
- subagentTargetForkOnlyOverrideStatus: "子代理模型列表跟随全局默认;已为该主代理单独配置同源分叉策略",
67391
- subagentTargetFollowGlobalStatus: "当前跟随全局默认列表(勾选或取消下方模型即可为该主代理创建专属列表)",
67444
+ subagentModelSelectionOff: "关闭后,子智能体使用上面的默认模型或继承父 Agent 的模型,同源分叉也不受限制;已选模型会保留。",
67445
+ subagentMainModelLabel: "为哪个主代理配置",
67446
+ subagentMainModelGlobalOption: "全局默认(未单独配置的主代理)",
67447
+ subagentMainModelQuickSwitch: "已配置的主代理",
67448
+ subagentChipGlobal: "全局默认",
67449
+ subagentChipModels: "{count} 个模型",
67450
+ subagentChipForkOn: "可分叉",
67451
+ subagentChipForkOff: "不可分叉",
67452
+ subagentTargetGlobalHint: "正在编辑全局默认:所有未单独配置的主代理都使用这套设置。",
67453
+ subagentTargetOverrideStatus: "该主代理使用专属列表({count} 个模型)。",
67454
+ subagentTargetForkOnlyOverrideStatus: "模型列表跟随全局默认,同源分叉为该主代理单独设置。",
67455
+ subagentTargetFollowGlobalStatus: "当前跟随全局默认;修改下方任一项即为该主代理单独配置。",
67392
67456
  subagentResetToGlobal: "恢复跟随全局默认",
67393
- subagentOverrideBadge: "(已覆盖)",
67457
+ subagentOverrideBadge: "(已单独配置)",
67458
+ subagentFollowGlobalTag: "跟随全局",
67394
67459
  subagentPreferencesLoadFailed: "无法读取已保存的子代理模型偏好;保存时将以当前界面为准。",
67395
67460
  subagentModelPerTargetRequired: "保存前请至少选择一个模型(或点击「恢复跟随全局默认」)。",
67396
67461
  subagentForkTitle: "同源分叉",
67397
- subagentForkToggle: "允许同源分叉(subagent_fork 继承当前主代理模型)",
67398
- subagentForkHint: "开启后,subagent_fork 可直接继承当前主代理模型以复用会话上下文与前缀缓存,无需将该主模型加入下方冷启动可选列表;不影响冷启动 subagent 与团队派生。"
67462
+ subagentForkToggle: "允许同源分叉(subagent_fork)",
67463
+ subagentForkHint: "开启后,主代理可以用 subagent_fork 分出继承当前对话的子代理:沿用主代理模型、复用前缀缓存,不需要把主模型加进上方列表;子代理不能再分叉。关闭后 subagent_fork 不可用。"
67399
67464
  };
67400
67465
  /** 英文对照,键集与中文完全一致。 */
67401
67466
  const en = {
@@ -67424,10 +67489,14 @@ window.__ModuleLoader__.load({
67424
67489
  subagentModelSelectionTitle: "Model selection",
67425
67490
  subagentDefaultModel: "Default Subagent model",
67426
67491
  subagentDefaultModelInherit: "Same as parent agent",
67427
- subagentDefaultModelHint: "Used when an agent starts a Subagent without choosing a model. A delegation tool with its own configured model keeps that model.",
67492
+ subagentDefaultModelHint: "Used when an agent starts a Subagent without choosing a model. With model selection on, it also has to be on that main agent's list.",
67493
+ subagentDefaultModelUncovered: "The default model is not on the list for “{targets}”; those main agents must choose a model explicitly.",
67428
67494
  subagentModelSelectionToggle: "Allow agents to choose models for Subagents",
67429
- subagentModelSelectionChoose: "When enabled, agents can choose a provider, model, and reasoning effort for each Subagent from the authorized models below. Changes apply immediately to every session.",
67430
- subagentModelSelectionAllowed: "Models agents may choose",
67495
+ subagentModelSelectionChoose: "When enabled, agents can only choose Subagent models and reasoning efforts authorized below for the current main agent. Changes apply immediately to every session.",
67496
+ subagentModelSelectionAllowed: "Cold-spawn models",
67497
+ subagentModelSelectionAllowedHint: "When starting a fresh Subagent with subagent, agents can only choose these models.",
67498
+ subagentSelectedCount: "{count} selected",
67499
+ subagentDefaultTag: "Default",
67431
67500
  subagentModelSelectionLoading: "Loading models…",
67432
67501
  subagentModelSelectionLoadFailed: "Models could not be loaded.",
67433
67502
  subagentModelSelectionRetry: "Retry",
@@ -67436,22 +67505,26 @@ window.__ModuleLoader__.load({
67436
67505
  subagentModelSelectionUnavailableGroup: "Saved but currently unavailable",
67437
67506
  subagentModelSelectionEmpty: "No model provider currently advertises a model.",
67438
67507
  subagentModelSelectionRequired: "Select at least one model before saving.",
67439
- subagentModelSelectionOff: "Subagents use configured defaults or inherit the parent agent's model. Saved model choices are retained.",
67440
- subagentMainModelLabel: "Main agent model",
67441
- subagentMainModelGlobalOption: "Global default (used by main agents without their own list)",
67442
- subagentMainModelQuickSwitch: "Quick switch",
67443
- subagentChipGlobal: "Global default ({count})",
67444
- subagentTargetGlobalHint: "Editing the global default subagent model list; main agents without their own list use it.",
67445
- subagentTargetOverrideStatus: "This main agent has {count} dedicated subagent models",
67446
- subagentTargetForkOnlyOverrideStatus: "Subagent models follow the global default; same-model fork is overridden for this main agent",
67447
- subagentTargetFollowGlobalStatus: "Currently following the global default list (tick or untick a model below to create a dedicated list for this main agent)",
67508
+ subagentModelSelectionOff: "Subagents use the default model above or inherit the parent agent's model, and same-model fork is unrestricted. Saved model choices are retained.",
67509
+ subagentMainModelLabel: "Configure for main agent",
67510
+ subagentMainModelGlobalOption: "Global default (main agents without their own settings)",
67511
+ subagentMainModelQuickSwitch: "Configured main agents",
67512
+ subagentChipGlobal: "Global default",
67513
+ subagentChipModels: "{count} models",
67514
+ subagentChipForkOn: "fork on",
67515
+ subagentChipForkOff: "fork off",
67516
+ subagentTargetGlobalHint: "Editing the global default: every main agent without its own settings uses it.",
67517
+ subagentTargetOverrideStatus: "This main agent uses its own list ({count} models).",
67518
+ subagentTargetForkOnlyOverrideStatus: "The model list follows the global default; same-model fork is set for this main agent.",
67519
+ subagentTargetFollowGlobalStatus: "Following the global default; changing anything below creates settings for this main agent.",
67448
67520
  subagentResetToGlobal: "Follow the global default again",
67449
- subagentOverrideBadge: " (overridden)",
67521
+ subagentOverrideBadge: " (customized)",
67522
+ subagentFollowGlobalTag: "Follows global",
67450
67523
  subagentPreferencesLoadFailed: "Saved subagent model preferences could not be read; saving will use what this page shows.",
67451
67524
  subagentModelPerTargetRequired: "Select at least one model before saving (or choose \"Follow the global default again\").",
67452
67525
  subagentForkTitle: "Same-model fork",
67453
- subagentForkToggle: "Allow same-model fork (subagent_fork inherits the main agent model)",
67454
- subagentForkHint: "When enabled, subagent_fork may inherit the main agent model to reuse conversation context and prefix cache without adding that model to the cold-spawn list below; cold-spawn subagent and teammate creation remain governed by the list."
67526
+ subagentForkToggle: "Allow same-model fork (subagent_fork)",
67527
+ subagentForkHint: "When enabled, the main agent can use subagent_fork to start a Subagent that inherits this conversation: it keeps the main agent model and reuses the prefix cache without adding that model to the list above, and a Subagent cannot fork again. When disabled, subagent_fork is unavailable."
67455
67528
  };
67456
67529
  /** 与其余线路同形的字典包(四个内置语言 id 都指向那两份)。 */
67457
67530
  const dictionaries = {
@@ -67613,7 +67686,7 @@ window.__ModuleLoader__.load({
67613
67686
  * - `.dsh-subagent-section` / `.dsh-subagent-heading` 对应 `SubagentCard.module.css`
67614
67687
  * - `.dsh-subagent-limits-grid` / `.dsh-subagent-field` / `.dsh-subagent-input` 对应 `SubagentLimitsFields.module.css` + `fields.module.css`
67615
67688
  * - `.dsh-subagent-switch` 对应 `Switch.module.css`
67616
- * - `.dsh-subagent-models` / `.dsh-subagent-group` / `.dsh-subagent-model` 对应 `SubagentModelSelectionFields.module.css`
67689
+ * - `.dsh-subagent-scope` / `.dsh-subagent-block`:按主代理配置的面板,冷启动列表与同源分叉同属当前目标
67617
67690
  * - `.dsh-subagent-footer` / `.dsh-subagent-save` 对应 `SettingsForm.module.css`
67618
67691
  */
67619
67692
  /** 这张表的 `data-plugin-css` 子名。 */
@@ -67825,47 +67898,38 @@ window.__ModuleLoader__.load({
67825
67898
  border-color: var(--dsw-alias-state-error-primary);
67826
67899
  }
67827
67900
 
67828
- .dsh-subagent-permission {
67829
- display: grid;
67830
- gap: 6px;
67831
- padding: 12px 0;
67832
- }
67833
-
67834
- .dsh-subagent-toggle-row {
67835
- display: flex;
67836
- align-items: flex-start;
67837
- justify-content: space-between;
67838
- gap: 16px;
67839
- font-size: 13px;
67840
- line-height: 1.5;
67841
- color: var(--dsw-alias-label-primary);
67842
- }
67843
-
67844
- .dsh-subagent-toggle-label {
67845
- flex: 1;
67846
- min-width: 0;
67847
- }
67848
-
67849
- .dsh-subagent-default-row {
67901
+ /* 一行设置:左侧标题与说明,右侧开关或下拉。 */
67902
+ .dsh-subagent-setting-row {
67850
67903
  display: flex;
67851
67904
  align-items: center;
67852
67905
  justify-content: space-between;
67853
- gap: 16px;
67906
+ gap: 24px;
67854
67907
  padding: 12px 0;
67908
+ min-width: 0;
67855
67909
  }
67856
67910
 
67857
- .dsh-subagent-default-meta {
67911
+ .dsh-subagent-setting-meta {
67858
67912
  display: grid;
67859
- gap: 4px;
67913
+ gap: 2px;
67860
67914
  flex: 1;
67861
67915
  min-width: 0;
67862
67916
  }
67863
67917
 
67864
- .dsh-subagent-default-select {
67865
- flex: 0 1 260px;
67918
+ .dsh-subagent-setting-select {
67919
+ flex: 0 1 340px;
67866
67920
  width: auto;
67867
- min-width: 160px;
67868
- max-width: 60%;
67921
+ min-width: 180px;
67922
+ max-width: 55%;
67923
+ }
67924
+
67925
+ .dsh-subagent-warning {
67926
+ margin: 0 0 4px;
67927
+ padding: 8px 10px;
67928
+ border-radius: var(--dsw-radius-md, 8px);
67929
+ background: color-mix(in srgb, var(--dsw-alias-state-warning-primary, #d29922) 12%, transparent);
67930
+ font-size: 12px;
67931
+ line-height: 1.5;
67932
+ color: var(--dsw-alias-label-secondary);
67869
67933
  }
67870
67934
 
67871
67935
  .dsh-subagent-switch {
@@ -67912,28 +67976,23 @@ window.__ModuleLoader__.load({
67912
67976
  transform: translateX(16px);
67913
67977
  }
67914
67978
 
67915
- .dsh-subagent-selection {
67979
+ /* 按主代理配置:选目标、看状态、再改下面两块。 */
67980
+ .dsh-subagent-scope {
67916
67981
  display: grid;
67917
67982
  gap: 12px;
67918
67983
  min-width: 0;
67919
- }
67920
-
67921
- .dsh-subagent-target-bar {
67922
- display: grid;
67923
- align-content: start;
67924
- gap: 8px;
67925
- min-width: 0;
67926
- margin: 0;
67927
- padding: 10px;
67984
+ margin-top: 8px;
67985
+ padding: 14px;
67928
67986
  border: 0.5px solid var(--dsw-alias-border-l4);
67929
67987
  border-radius: var(--dsw-radius-lg, 10px);
67930
- background: transparent;
67931
67988
  }
67932
67989
 
67933
- .dsh-subagent-target-bar > legend {
67934
- padding: 0 4px;
67935
- font-size: 12px;
67936
- color: var(--dsw-alias-label-secondary);
67990
+ .dsh-subagent-scope-head {
67991
+ display: flex;
67992
+ align-items: center;
67993
+ justify-content: space-between;
67994
+ gap: 16px;
67995
+ min-width: 0;
67937
67996
  }
67938
67997
 
67939
67998
  .dsh-subagent-select {
@@ -67983,7 +68042,11 @@ window.__ModuleLoader__.load({
67983
68042
  }
67984
68043
 
67985
68044
  .dsh-subagent-chip {
67986
- padding: 3px 10px;
68045
+ display: inline-flex;
68046
+ align-items: baseline;
68047
+ gap: 6px;
68048
+ max-width: 100%;
68049
+ padding: 4px 10px;
67987
68050
  border: 0.5px solid var(--dsw-alias-border-l3);
67988
68051
  border-radius: 999px;
67989
68052
  background: transparent;
@@ -67994,6 +68057,18 @@ window.__ModuleLoader__.load({
67994
68057
  cursor: pointer;
67995
68058
  }
67996
68059
 
68060
+ .dsh-subagent-chip-name {
68061
+ overflow: hidden;
68062
+ text-overflow: ellipsis;
68063
+ white-space: nowrap;
68064
+ }
68065
+
68066
+ .dsh-subagent-chip-meta {
68067
+ flex: none;
68068
+ font-size: 11px;
68069
+ color: var(--dsw-alias-label-tertiary);
68070
+ }
68071
+
67997
68072
  @media (hover: hover) {
67998
68073
  .dsh-subagent-chip:hover:not(:disabled):not([aria-pressed='true']) {
67999
68074
  background: var(--dsw-alias-bg-layer-4);
@@ -68008,6 +68083,11 @@ window.__ModuleLoader__.load({
68008
68083
  font-weight: 500;
68009
68084
  }
68010
68085
 
68086
+ .dsh-subagent-chip[aria-pressed='true'] .dsh-subagent-chip-meta {
68087
+ color: var(--dsw-alias-label-secondary);
68088
+ font-weight: 400;
68089
+ }
68090
+
68011
68091
  .dsh-subagent-chip:disabled {
68012
68092
  cursor: default;
68013
68093
  opacity: 0.5;
@@ -68020,8 +68100,9 @@ window.__ModuleLoader__.load({
68020
68100
  justify-content: space-between;
68021
68101
  gap: 8px;
68022
68102
  min-width: 0;
68023
- padding-top: 6px;
68024
- border-top: 0.5px solid var(--dsw-alias-border-l3);
68103
+ padding: 8px 10px;
68104
+ border-radius: var(--dsw-radius-md, 8px);
68105
+ background: var(--dsw-alias-bg-layer-2);
68025
68106
  }
68026
68107
 
68027
68108
  .dsh-subagent-reset {
@@ -68083,41 +68164,16 @@ window.__ModuleLoader__.load({
68083
68164
  cursor: pointer;
68084
68165
  }
68085
68166
 
68086
- .dsh-subagent-models {
68087
- display: grid;
68088
- align-content: start;
68089
- gap: 6px;
68090
- min-width: 0;
68091
- min-height: 180px;
68092
- max-height: clamp(220px, calc(100dvh - 620px), 440px);
68093
- resize: vertical;
68094
- margin: 0;
68095
- padding: 10px;
68096
- overflow: auto;
68097
- border: 0.5px solid var(--dsw-alias-border-l4);
68098
- border-radius: var(--dsw-radius-lg, 10px);
68099
- }
68100
-
68101
- .dsh-subagent-models > legend,
68102
- .dsh-subagent-fork-card > legend {
68103
- padding: 0 4px;
68104
- font-size: 12px;
68105
- color: var(--dsw-alias-label-secondary);
68106
- }
68107
-
68108
- .dsh-subagent-fork-card {
68167
+ /* 作用于当前主代理的一块设置(冷启动列表 / 同源分叉)。 */
68168
+ .dsh-subagent-block {
68109
68169
  display: grid;
68110
- align-content: start;
68111
- gap: 4px;
68170
+ gap: 10px;
68112
68171
  min-width: 0;
68113
- margin: 0;
68114
- padding: 10px;
68115
- border: 0.5px solid var(--dsw-alias-border-l4);
68116
- border-radius: var(--dsw-radius-lg, 10px);
68117
- background: transparent;
68172
+ padding-top: 12px;
68173
+ border-top: 0.5px solid var(--dsw-alias-border-l3);
68118
68174
  }
68119
68175
 
68120
- .dsh-subagent-fork-head {
68176
+ .dsh-subagent-block-head {
68121
68177
  display: flex;
68122
68178
  align-items: center;
68123
68179
  justify-content: space-between;
@@ -68125,31 +68181,57 @@ window.__ModuleLoader__.load({
68125
68181
  min-width: 0;
68126
68182
  }
68127
68183
 
68128
- .dsh-subagent-fork-title-group {
68184
+ .dsh-subagent-block-title-row {
68129
68185
  display: flex;
68130
68186
  flex-wrap: wrap;
68131
68187
  align-items: center;
68132
68188
  gap: 8px;
68133
- flex: 1;
68134
68189
  min-width: 0;
68135
68190
  }
68136
68191
 
68137
- .dsh-subagent-fork-label {
68192
+ .dsh-subagent-block-title {
68138
68193
  font-size: 13px;
68139
68194
  font-weight: 500;
68140
68195
  line-height: 1.5;
68141
68196
  color: var(--dsw-alias-label-primary);
68142
68197
  }
68143
68198
 
68199
+ .dsh-subagent-count,
68200
+ .dsh-subagent-follow-tag {
68201
+ flex: none;
68202
+ padding: 1px 8px;
68203
+ border-radius: 999px;
68204
+ background: var(--dsw-alias-bg-layer-4);
68205
+ font-size: 11px;
68206
+ line-height: 1.6;
68207
+ color: var(--dsw-alias-label-secondary);
68208
+ font-variant-numeric: tabular-nums;
68209
+ }
68210
+
68211
+ .dsh-subagent-fork-card {
68212
+ min-width: 0;
68213
+ }
68214
+
68215
+ .dsh-subagent-models {
68216
+ display: grid;
68217
+ align-content: start;
68218
+ gap: 10px;
68219
+ min-width: 0;
68220
+ max-height: clamp(220px, calc(100dvh - 560px), 420px);
68221
+ padding: 8px;
68222
+ overflow: auto;
68223
+ border-radius: var(--dsw-radius-md, 8px);
68224
+ background: var(--dsw-alias-bg-layer-2);
68225
+ }
68226
+
68144
68227
  .dsh-subagent-group {
68145
68228
  display: grid;
68146
- gap: 6px;
68229
+ gap: 4px;
68147
68230
  min-width: 0;
68148
68231
  }
68149
68232
 
68150
68233
  .dsh-subagent-group + .dsh-subagent-group {
68151
- margin-top: 4px;
68152
- padding-top: 10px;
68234
+ padding-top: 8px;
68153
68235
  border-top: 0.5px solid var(--dsw-alias-border-l3);
68154
68236
  }
68155
68237
 
@@ -68160,6 +68242,13 @@ window.__ModuleLoader__.load({
68160
68242
  color: var(--dsw-alias-label-tertiary);
68161
68243
  }
68162
68244
 
68245
+ .dsh-subagent-group-rows {
68246
+ display: grid;
68247
+ grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
68248
+ gap: 2px 8px;
68249
+ min-width: 0;
68250
+ }
68251
+
68163
68252
  .dsh-subagent-model {
68164
68253
  display: grid;
68165
68254
  grid-template-columns: auto minmax(0, 1fr) auto;
@@ -68196,6 +68285,22 @@ window.__ModuleLoader__.load({
68196
68285
  color: var(--dsw-alias-label-tertiary);
68197
68286
  }
68198
68287
 
68288
+ .dsh-subagent-model-tags {
68289
+ display: inline-flex;
68290
+ align-items: center;
68291
+ gap: 6px;
68292
+ }
68293
+
68294
+ .dsh-subagent-model-tag {
68295
+ padding: 0 6px;
68296
+ border-radius: var(--dsw-radius-sm, 6px);
68297
+ background: color-mix(in srgb, var(--dsw-alias-brand-primary, #e06c3b) 18%, transparent);
68298
+ font-size: 11px;
68299
+ line-height: 1.6;
68300
+ color: var(--dsw-alias-label-primary);
68301
+ white-space: nowrap;
68302
+ }
68303
+
68199
68304
  .dsh-subagent-model-unavailable {
68200
68305
  font-size: 11px;
68201
68306
  color: var(--dsw-alias-label-tertiary);