@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 +4 -0
- package/CHANGELOG.zh-CN.md +4 -0
- package/lib/client.js +35 -2
- package/package.json +1 -1
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.
|
package/CHANGELOG.zh-CN.md
CHANGED
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
|
-
|
|
9046
|
+
select();
|
|
9014
9047
|
});
|
|
9015
9048
|
return true;
|
|
9016
9049
|
}
|
package/package.json
CHANGED