@michengai/dsh-agency-agents 0.1.40 → 0.1.41

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  The five most recent published versions are listed below.
6
6
 
7
+ ## 0.1.41 - 2026-09-12
8
+
9
+ - Fix navigation from the chat Experts button to Settings → Experts when all experts are disabled, supporting both native DSH dialogs and Codex UI settings pages.
10
+
7
11
  ## 0.1.40 - 2026-09-11
8
12
 
9
13
  - Fix the Experts plugin moving the attachment button to the end of the toolbar, preserving the original host button order.
@@ -4,6 +4,10 @@
4
4
 
5
5
  以下记录最近发布的五个版本。
6
6
 
7
+ ## 0.1.41 - 2026-09-12
8
+
9
+ - 修复全部专家禁用时,聊天输入栏的「专家」按钮无法跳转到「设置 → 专家」的问题,兼容原生 DSH 设置弹窗和 Codex UI 设置页。
10
+
7
11
  ## 0.1.40 - 2026-09-11
8
12
 
9
13
  - 修复专家插件将附件按钮移到工具栏末尾的问题,保留宿主按钮的原有顺序。
package/lib/client.js CHANGED
@@ -8988,7 +8988,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8988
8988
  return pickHostSettingsTrigger(collectSettingsTriggerCandidates(root))?.button;
8989
8989
  }
8990
8990
  function findExpertSettingsNavButton(root, navLabel) {
8991
- for (const dialog of root.querySelectorAll("[role=\"dialog\"]")) for (const button of dialog.querySelectorAll("nav button")) if (button instanceof HTMLElement && (button.textContent ?? "").trim() === navLabel) return button;
8991
+ for (const dialog of root.querySelectorAll("[data-dcu-settings-page], [role=\"dialog\"]")) for (const button of dialog.querySelectorAll("nav button")) if (button instanceof HTMLElement && (button.textContent ?? "").trim() === navLabel) return button;
8992
8992
  }
8993
8993
  function queueSettingsNav(work) {
8994
8994
  if (typeof requestAnimationFrame === "function") {
@@ -9008,9 +9008,42 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9008
9008
  }
9009
9009
  const trigger = findHostSettingsTrigger(root);
9010
9010
  if (trigger === void 0) return false;
9011
+ if (trigger.hasAttribute("data-dcu-settings-trigger")) {
9012
+ const request = new CustomEvent("dcu-settings-open-section", {
9013
+ detail: { labels: [navLabel] },
9014
+ cancelable: true
9015
+ });
9016
+ if (!trigger.dispatchEvent(request)) return true;
9017
+ }
9018
+ let finished = false;
9019
+ const observer = new MutationObserver(() => {
9020
+ select();
9021
+ });
9022
+ const timeout = setTimeout(() => {
9023
+ if (select()) return;
9024
+ cleanup();
9025
+ console.warn(`[agency-agents] 未找到设置分区:${navLabel}`);
9026
+ }, 4e3);
9027
+ const cleanup = () => {
9028
+ finished = true;
9029
+ observer.disconnect();
9030
+ clearTimeout(timeout);
9031
+ };
9032
+ const select = () => {
9033
+ if (finished) return false;
9034
+ const target = findExpertSettingsNavButton(root, navLabel);
9035
+ if (target === void 0) return false;
9036
+ cleanup();
9037
+ target.click();
9038
+ return true;
9039
+ };
9040
+ observer.observe(root, {
9041
+ childList: true,
9042
+ subtree: true
9043
+ });
9011
9044
  trigger.click();
9012
9045
  schedule(() => {
9013
- findExpertSettingsNavButton(root, navLabel)?.click();
9046
+ select();
9014
9047
  });
9015
9048
  return true;
9016
9049
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@michengai/dsh-agency-agents",
3
3
  "description": "Agency Experts — a summonable domain-expert roster for DSH (expert mode)",
4
- "version": "0.1.40",
4
+ "version": "0.1.41",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",
7
7
  "engines": {