@eddyskywalker/dsh-chatgpt-subscription 0.1.25 → 0.1.27

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
@@ -240,6 +240,11 @@ window.__ModuleLoader__.load({
240
240
  supportsReasoningSummary: false
241
241
  }
242
242
  ];
243
+ const DEFAULT_VISIBLE_CODEX_MODEL_IDS = [
244
+ "gpt-5.6-sol",
245
+ "gpt-5.6-terra",
246
+ "gpt-5.6-luna"
247
+ ];
243
248
  const DEFAULT_CODEX_MODEL = CODEX_MODEL_CATALOG[0];
244
249
  const CONFIGURABLE_CONTEXT_MODEL_IDS = [
245
250
  "gpt-5.6-sol",
@@ -444,6 +449,12 @@ window.__ModuleLoader__.load({
444
449
  preferences
445
450
  });
446
451
  });
452
+ const toggleVisibleModel = async (modelId, checked) => {
453
+ const current = status?.preferences.visibleModelIds ?? [...DEFAULT_VISIBLE_CODEX_MODEL_IDS];
454
+ const visibleModelIds = checked ? [...current, modelId] : current.filter((id) => id !== modelId);
455
+ if (visibleModelIds.length === 0) return;
456
+ await updatePreferences({ visibleModelIds });
457
+ };
447
458
  const updateContextWindow = async (model) => {
448
459
  const current = status?.preferences.contextWindowOverrides[model] ?? resolveCodexCatalogEntry(model).contextWindow;
449
460
  const parsed = parseCapacity$1(contextDrafts[model] ?? String(current));
@@ -478,6 +489,7 @@ window.__ModuleLoader__.load({
478
489
  }
479
490
  };
480
491
  const account = status?.account;
492
+ const visibleModelIds = status?.preferences.visibleModelIds ?? DEFAULT_VISIBLE_CODEX_MODEL_IDS;
481
493
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
482
494
  className: "dsh-codex-page",
483
495
  "aria-labelledby": "dsh-codex-title",
@@ -583,13 +595,26 @@ window.__ModuleLoader__.load({
583
595
  label: t("latency"),
584
596
  value: `${connection.latencyMs} ms · ${formatDate(connection.checkedAt)}`
585
597
  }) : null,
598
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
599
+ className: "dsh-codex-muted dsh-codex-models-hint",
600
+ children: t("modelsHint")
601
+ }),
586
602
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
587
603
  className: "dsh-codex-models",
588
604
  "aria-label": t("models"),
589
- children: CODEX_MODEL_CATALOG.map((model) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
590
- title: model.id,
591
- children: model.name
592
- }, model.id))
605
+ children: CODEX_MODEL_CATALOG.map((model) => {
606
+ const checked = visibleModelIds.some((id) => id === model.id);
607
+ const lastVisible = checked && visibleModelIds.length === 1;
608
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
609
+ title: model.id,
610
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
611
+ type: "checkbox",
612
+ checked,
613
+ disabled: busy !== null || lastVisible,
614
+ onChange: (event) => void toggleVisibleModel(model.id, event.currentTarget.checked)
615
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: model.name })]
616
+ }, model.id);
617
+ })
593
618
  }),
594
619
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
595
620
  className: "dsh-codex-actions",
@@ -628,6 +653,40 @@ window.__ModuleLoader__.load({
628
653
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("searchProviderCodex") })] })]
629
654
  })]
630
655
  }),
656
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
657
+ className: "dsh-codex-pref-row",
658
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("outputVerbosity") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
659
+ className: "dsh-codex-muted",
660
+ children: t("outputVerbosityHint")
661
+ })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
662
+ className: "dsh-codex-select",
663
+ "aria-label": t("outputVerbosity"),
664
+ value: status?.preferences.outputVerbosity ?? "",
665
+ disabled: busy !== null,
666
+ onChange: (event) => {
667
+ const value = event.currentTarget.value;
668
+ updatePreferences({ outputVerbosity: value === "" ? null : value });
669
+ },
670
+ children: [
671
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
672
+ value: "",
673
+ children: t("providerDefault")
674
+ }),
675
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
676
+ value: "low",
677
+ children: t("verbosityLow")
678
+ }),
679
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
680
+ value: "medium",
681
+ children: t("verbosityMedium")
682
+ }),
683
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
684
+ value: "high",
685
+ children: t("verbosityHigh")
686
+ })
687
+ ]
688
+ })]
689
+ }),
631
690
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
632
691
  className: "dsh-codex-context-settings",
633
692
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("contextWindows") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
@@ -948,6 +1007,7 @@ window.__ModuleLoader__.load({
948
1007
  function messageOf$1(error) {
949
1008
  return error instanceof Error ? error.message : String(error);
950
1009
  }
1010
+ [...DEFAULT_VISIBLE_CODEX_MODEL_IDS];
951
1011
  //#endregion
952
1012
  //#region src/client/SubagentSettingsSection.tsx
953
1013
  function SubagentSettingsSection({ t }) {
@@ -1300,7 +1360,13 @@ window.__ModuleLoader__.load({
1300
1360
  testing: "测试中…",
1301
1361
  latency: "最近延迟",
1302
1362
  models: "可用模型",
1363
+ modelsHint: "勾选后模型才会显示在对话页的模型选择列表中;至少保留一个。",
1303
1364
  enhancements: "增强功能",
1365
+ outputVerbosity: "输出详细程度",
1366
+ outputVerbosityHint: "控制 Codex 最终回答的详细程度;不影响思考深度。",
1367
+ verbosityLow: "低(保持回答简洁)",
1368
+ verbosityMedium: "中(兼顾细节与简洁)",
1369
+ verbosityHigh: "高(在回答中包含更多细节)",
1304
1370
  subagentSettingsNav: "子代理",
1305
1371
  subagentSettingsTitle: "子代理设置",
1306
1372
  subagentSettingsIntro: "全局配置 DSH 内置子代理。模型、思考深度、上下文预算和运行限制适用于所有父 Agent,不受父 Agent 当前 Provider 或模型影响。",
@@ -1422,7 +1488,13 @@ window.__ModuleLoader__.load({
1422
1488
  testing: "Testing…",
1423
1489
  latency: "Last latency",
1424
1490
  models: "Available models",
1491
+ modelsHint: "Checked models appear in the conversation model picker; at least one must remain enabled.",
1425
1492
  enhancements: "Enhancements",
1493
+ outputVerbosity: "Output verbosity",
1494
+ outputVerbosityHint: "Controls the detail level of final Codex answers without changing reasoning effort.",
1495
+ verbosityLow: "Low (keep answers concise)",
1496
+ verbosityMedium: "Medium (balance detail and brevity)",
1497
+ verbosityHigh: "High (include more detail)",
1426
1498
  subagentSettingsNav: "Subagents",
1427
1499
  subagentSettingsTitle: "Subagent settings",
1428
1500
  subagentSettingsIntro: "Configure DSH built-in subagents globally. Model, reasoning effort, context budget, and runtime limits apply to every parent Agent regardless of its current provider or model.",
@@ -1534,8 +1606,14 @@ window.__ModuleLoader__.load({
1534
1606
  .dsh-codex-success{color:var(--dsw-alias-label-success,#2e9b62)}
1535
1607
  .dsh-codex-errorbar{align-items:center;background:color-mix(in srgb,var(--dsw-alias-label-danger,#d94b4b) 9%,transparent);border:1px solid color-mix(in srgb,var(--dsw-alias-label-danger,#d94b4b) 28%,transparent);border-radius:7px;color:var(--dsw-alias-label-danger,#d94b4b);display:flex;font-size:13px;gap:12px;justify-content:space-between;padding:10px 12px}
1536
1608
  .dsh-codex-link{color:var(--dsw-alias-label-link,#3278d4);display:inline-block;font-size:13px;margin-top:8px}
1537
- .dsh-codex-models{display:flex;flex-wrap:wrap;gap:6px;padding-top:12px}
1538
- .dsh-codex-models code{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:5px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;padding:4px 6px}
1609
+ .dsh-codex-models-hint{padding-top:10px}
1610
+ .dsh-codex-models{display:flex;flex-wrap:wrap;gap:7px;padding-top:8px}
1611
+ .dsh-codex-models label{cursor:pointer;display:block;position:relative}
1612
+ .dsh-codex-models input{position:absolute;opacity:0;pointer-events:none}
1613
+ .dsh-codex-models span{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;color:var(--dsw-alias-label-secondary);display:block;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;padding:5px 8px}
1614
+ .dsh-codex-models input:checked+span{background:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 14%,var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 55%,var(--dsw-alias-border-l2));color:var(--dsw-alias-label-primary)}
1615
+ .dsh-codex-models input:focus-visible+span{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:2px}
1616
+ .dsh-codex-models input:disabled+span{cursor:default;opacity:.5}
1539
1617
  .dsh-codex-pref-row{align-items:center;border-bottom:1px solid var(--dsw-alias-border-l2);display:flex;gap:16px;justify-content:space-between;min-height:58px;padding:10px 0}
1540
1618
  .dsh-codex-pref-row strong,.dsh-codex-check strong{display:block;font-size:13px;font-weight:600;line-height:1.35}
1541
1619
  .dsh-codex-segments{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;display:flex;flex:none;gap:2px;padding:2px}