dsh-m 0.9.80 → 0.9.81
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 +29 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -5616,8 +5616,17 @@ function MarketIcon() {
|
|
|
5616
5616
|
h("rect", { x: "14", y: "14", width: "7", height: "7", rx: "1", stroke: "currentColor", strokeWidth: "2" })
|
|
5617
5617
|
);
|
|
5618
5618
|
}
|
|
5619
|
+
var dshmSlotsRef = null;
|
|
5620
|
+
var shellTakeover = () => {
|
|
5621
|
+
try {
|
|
5622
|
+
return ((dshmSlotsRef && dshmSlotsRef.entries ? dshmSlotsRef.entries("sidebar.workspaces") : []) || []).some((entry) => (entry.options.priority ?? 0) < 0);
|
|
5623
|
+
} catch {
|
|
5624
|
+
return false;
|
|
5625
|
+
}
|
|
5626
|
+
};
|
|
5619
5627
|
function MarketEntry(props) {
|
|
5620
5628
|
useEffect(() => ensureCss(), []);
|
|
5629
|
+
if (shellTakeover()) return null;
|
|
5621
5630
|
const rail = !(props && props.wide);
|
|
5622
5631
|
return h(
|
|
5623
5632
|
"button",
|
|
@@ -5636,11 +5645,22 @@ function MarketEntry(props) {
|
|
|
5636
5645
|
props && props.wide ? h("span", null, lookup("market.title")) : null
|
|
5637
5646
|
);
|
|
5638
5647
|
}
|
|
5648
|
+
function safeRegister(slots, options, component) {
|
|
5649
|
+
const label = `${options.name}${options.key != null ? `:${options.key}` : options.id != null ? `#${options.id}` : ""}`;
|
|
5650
|
+
try {
|
|
5651
|
+
return slots.register(options, component);
|
|
5652
|
+
} catch (error) {
|
|
5653
|
+
if (!/already has a registration|already has an entry/.test(String(error && error.message || error))) throw error;
|
|
5654
|
+
console.warn(`[dsh-m] slot "${label}" is contested; dsh-m yields it and keeps running`, error);
|
|
5655
|
+
return () => {
|
|
5656
|
+
};
|
|
5657
|
+
}
|
|
5658
|
+
}
|
|
5639
5659
|
function registerSlot(slots, options, component) {
|
|
5640
5660
|
const next = { ...options };
|
|
5641
5661
|
if (next.id == null && next.key != null) next.id = String(next.key);
|
|
5642
5662
|
if (next.key == null && next.id != null) next.key = next.id;
|
|
5643
|
-
return slots
|
|
5663
|
+
return safeRegister(slots, next, component);
|
|
5644
5664
|
}
|
|
5645
5665
|
function ToolCardRow({ it, onInstalled }) {
|
|
5646
5666
|
const [busy, setBusy] = useState(false);
|
|
@@ -5754,6 +5774,7 @@ var inject = ["slots"];
|
|
|
5754
5774
|
function apply(ctx) {
|
|
5755
5775
|
const slots = ctx.slots;
|
|
5756
5776
|
if (!slots) return;
|
|
5777
|
+
dshmSlotsRef = slots;
|
|
5757
5778
|
ctx.effect(() => ensureCss(), "dshm-style");
|
|
5758
5779
|
ctx.inject(["locale"], (c) => {
|
|
5759
5780
|
if (!c.locale || typeof c.locale.register !== "function") return;
|
|
@@ -5768,7 +5789,13 @@ function apply(ctx) {
|
|
|
5768
5789
|
});
|
|
5769
5790
|
slots.inject(
|
|
5770
5791
|
"sidebar.footer.action",
|
|
5771
|
-
() =>
|
|
5792
|
+
() => safeRegister(
|
|
5793
|
+
slots,
|
|
5794
|
+
// 页脚 order 维持正数工具位(9):bot 视图的让位由壳接管哨兵负责(该视图
|
|
5795
|
+
// 下 MarketEntry 整行不渲染),order 只影响官方 harness 页脚的排序——那里
|
|
5796
|
+
// DS Bot 入口(-200)应在本工具行之上。2026-10-13 曾试装深负 order
|
|
5797
|
+
// (-400/-500)让 ds-bot 集群贴底,哨兵上线后该做法只剩 harness 视图副作用
|
|
5798
|
+
// (DS Bot 入口沉底),已回撤(裁定:哨兵管让位,order 管排序,各司其职)。
|
|
5772
5799
|
{ name: "sidebar.footer.action", id: "dshm-market", key: "dshm-market", order: 9, locale: "dshm", label: () => lookup("market.title") },
|
|
5773
5800
|
function DshmMarketEntry(actionProps) {
|
|
5774
5801
|
return h(MarketEntry, actionProps);
|