@linxin666/dsh-client-ui-community-plugins 0.2.0 → 0.2.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/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +346 -20
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# node scripts/verify-docs.mjs --write <dir>
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 11f025dd1776a13159844ca91336351c81aa3ed4
|
|
6
|
+
README.zh.md: c02fd63c9f4c900252925cc09ef2ac3e909e0a8f
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Community plugin index section for the dsh web GUI settings page: a first-level
|
|
|
15
15
|
### From npm (recommended)
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
dsh plugin --profile web add @linxin666/dsh-client-ui-community-plugins
|
|
18
|
+
dsh plugin --profile web add @linxin666/dsh-client-ui-community-plugins@latest
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### From the repository (development)
|
package/README.zh.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -8,7 +8,7 @@ window.__ModuleLoader__.load({
|
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
10
10
|
//#region \0dsh-css:packages/dsh-community-plugins/src/client/settings-card.module.css.mjs
|
|
11
|
-
const css$1 = ".hX6Abq_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.hX6Abq_card:hover{border-color:var(--dsw-alias-label-dimmed)}.hX6Abq_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.hX6Abq_header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.hX6Abq_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.hX6Abq_headerStatic{border-radius:12px;align-items:center;gap:12px;width:100%;padding:14px 16px;display:flex}.hX6Abq_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.hX6Abq_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.hX6Abq_description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.hX6Abq_pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.hX6Abq_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.hX6Abq_chevronOpen{transform:rotate(180deg)}.hX6Abq_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.hX6Abq_readOnly{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.5}.hX6Abq_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}.hX6Abq_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.hX6Abq_failed{min-width:0;color:var(--dsw-alias-label-error);text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:12px;line-height:1.5;overflow:hidden}.hX6Abq_discard,.hX6Abq_save{appearance:none;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.hX6Abq_discard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.hX6Abq_discard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.hX6Abq_save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.hX6Abq_discard:disabled,.hX6Abq_save:disabled{opacity:.4;cursor:default}.hX6Abq_discard:focus-visible,.hX6Abq_save:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.hX6Abq_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.hX6Abq_field+.hX6Abq_field{border-top:1px solid var(--dsw-alias-border-l2)}.hX6Abq_head{align-items:center;gap:8px;display:flex}.hX6Abq_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.hX6Abq_badges{align-items:center;gap:8px;display:inline-flex}.hX6Abq_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.hX6Abq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.hX6Abq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.hX6Abq_reset:disabled{cursor:default}.hX6Abq_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.hX6Abq_input,.hX6Abq_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.hX6Abq_input:focus-visible,.hX6Abq_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.hX6Abq_input:disabled,.hX6Abq_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.hX6Abq_inputInvalid{border:1px solid var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.hX6Abq_inputInvalid:focus-visible{outline:2px solid var(--dsw-alias-label-error);outline-offset:1px;border-color:var(--dsw-alias-label-error)}.hX6Abq_invalid{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.hX6Abq_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}@media (prefers-reduced-motion:reduce){.hX6Abq_card,.hX6Abq_header,.hX6Abq_chevron,.hX6Abq_chevronOpen,.hX6Abq_discard,.hX6Abq_save{transition:none}}";
|
|
11
|
+
const css$1 = ".hX6Abq_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.hX6Abq_card:hover{border-color:var(--dsw-alias-label-dimmed)}.hX6Abq_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.hX6Abq_header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.hX6Abq_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.hX6Abq_headerStatic{border-radius:12px;align-items:center;gap:12px;width:100%;padding:14px 16px;display:flex}.hX6Abq_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.hX6Abq_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.hX6Abq_description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.hX6Abq_pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.hX6Abq_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.hX6Abq_chevronOpen{transform:rotate(180deg)}.hX6Abq_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.hX6Abq_readOnly{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.5}.hX6Abq_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}.hX6Abq_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.hX6Abq_failed{min-width:0;color:var(--dsw-alias-label-error);text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:12px;line-height:1.5;overflow:hidden}.hX6Abq_discard,.hX6Abq_save{appearance:none;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.hX6Abq_discard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.hX6Abq_discard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.hX6Abq_save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.hX6Abq_discard:disabled,.hX6Abq_save:disabled{opacity:.4;cursor:default}.hX6Abq_discard:focus-visible,.hX6Abq_save:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.hX6Abq_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.hX6Abq_field+.hX6Abq_field{border-top:1px solid var(--dsw-alias-border-l2)}.hX6Abq_head{align-items:center;gap:8px;display:flex}.hX6Abq_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.hX6Abq_badges{align-items:center;gap:8px;display:inline-flex}.hX6Abq_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.hX6Abq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.hX6Abq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.hX6Abq_reset:disabled{cursor:default}.hX6Abq_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.hX6Abq_input,.hX6Abq_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.hX6Abq_input:focus-visible,.hX6Abq_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.hX6Abq_input:disabled,.hX6Abq_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.hX6Abq_inputInvalid{border:1px solid var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.hX6Abq_inputInvalid:focus-visible{outline:2px solid var(--dsw-alias-label-error);outline-offset:1px;border-color:var(--dsw-alias-label-error)}.hX6Abq_selectWrap{position:relative}.hX6Abq_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.hX6Abq_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.hX6Abq_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.hX6Abq_selectChevronOpen{transform:rotate(180deg)}.hX6Abq_selectPopup{z-index:40;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-height:240px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;border-radius:8px;flex-direction:column;padding:4px;transition:opacity .1s,transform .1s;display:flex;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;transform:translateY(-4px)}.hX6Abq_selectPopupOpen{opacity:1;transform:none}.hX6Abq_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}.hX6Abq_selectOption{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;border-radius:6px;padding:6px 10px;font-size:13px;line-height:1.5;overflow:hidden}.hX6Abq_selectOption:hover,.hX6Abq_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}.hX6Abq_selectOptionSelected{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 10%, transparent);font-weight:500}.hX6Abq_invalid{color:var(--dsw-alias-label-error);margin:0;font-size:12px;line-height:1.5}.hX6Abq_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}@media (prefers-reduced-motion:reduce){.hX6Abq_card,.hX6Abq_header,.hX6Abq_chevron,.hX6Abq_chevronOpen,.hX6Abq_discard,.hX6Abq_save,.hX6Abq_selectChevron,.hX6Abq_selectChevronOpen,.hX6Abq_selectPopup{transition:none}}";
|
|
12
12
|
const tagId$1 = "@linxin666/dsh-client-ui-community-plugins/settings-card.module.css";
|
|
13
13
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
14
14
|
const tag = document.createElement("style");
|
|
@@ -45,7 +45,18 @@ window.__ModuleLoader__.load({
|
|
|
45
45
|
"readOnly": "hX6Abq_readOnly",
|
|
46
46
|
"reset": "hX6Abq_reset",
|
|
47
47
|
"save": "hX6Abq_save",
|
|
48
|
-
"select": "hX6Abq_select"
|
|
48
|
+
"select": "hX6Abq_select",
|
|
49
|
+
"selectButton": "hX6Abq_selectButton",
|
|
50
|
+
"selectChevron": "hX6Abq_selectChevron",
|
|
51
|
+
"selectChevronOpen": "hX6Abq_selectChevronOpen",
|
|
52
|
+
"selectLabel": "hX6Abq_selectLabel",
|
|
53
|
+
"selectOption": "hX6Abq_selectOption",
|
|
54
|
+
"selectOptionActive": "hX6Abq_selectOptionActive",
|
|
55
|
+
"selectOptionSelected": "hX6Abq_selectOptionSelected",
|
|
56
|
+
"selectPopup": "hX6Abq_selectPopup",
|
|
57
|
+
"selectPopupClose": "hX6Abq_selectPopupClose",
|
|
58
|
+
"selectPopupOpen": "hX6Abq_selectPopupOpen",
|
|
59
|
+
"selectWrap": "hX6Abq_selectWrap"
|
|
49
60
|
};
|
|
50
61
|
//#endregion
|
|
51
62
|
//#region src/client/PluginSettingsCard.tsx
|
|
@@ -179,6 +190,175 @@ window.__ModuleLoader__.load({
|
|
|
179
190
|
}) : null]
|
|
180
191
|
});
|
|
181
192
|
}
|
|
193
|
+
const NON_SKIN_BODY_MARKERS = /* @__PURE__ */ new Set(["dshSkinCenter", "dshSidebarCollapsed"]);
|
|
194
|
+
function isSkinActive() {
|
|
195
|
+
return Object.keys(document.body.dataset).some((key) => key.startsWith("dsh") && !NON_SKIN_BODY_MARKERS.has(key));
|
|
196
|
+
}
|
|
197
|
+
const SELECT_CLOSE_MS = 100;
|
|
198
|
+
/**
|
|
199
|
+
* The shared dual-mode select control. While an appearance skin is active it
|
|
200
|
+
* renders the legacy native `<select>` untouched, so element-level skin
|
|
201
|
+
* selectors keep working; under the default appearance it renders a
|
|
202
|
+
* self-drawn `role="listbox"` popup whose open/close is transition-animated.
|
|
203
|
+
* Staged cards reach it through BooleanField/ChoiceField; immediate-apply
|
|
204
|
+
* editors (the side-card prefs) bind it directly through onEdit.
|
|
205
|
+
* 双模式下拉框:皮肤激活时用原生 select,默认外观用自绘动画弹层。
|
|
206
|
+
*/
|
|
207
|
+
function SelectField(props) {
|
|
208
|
+
const { id, options, value } = props;
|
|
209
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
210
|
+
const [closing, setClosing] = (0, react.useState)(false);
|
|
211
|
+
const [phase, setPhase] = (0, react.useState)("initial");
|
|
212
|
+
const [activeIndex, setActiveIndex] = (0, react.useState)(0);
|
|
213
|
+
const closeTimer = (0, react.useRef)(void 0);
|
|
214
|
+
const wrapRef = (0, react.useRef)(null);
|
|
215
|
+
const popupRef = (0, react.useRef)(null);
|
|
216
|
+
const currentIndex = () => {
|
|
217
|
+
const index = options.findIndex((option) => option.value === value);
|
|
218
|
+
return index >= 0 ? index : 0;
|
|
219
|
+
};
|
|
220
|
+
const close = (0, react.useCallback)(() => {
|
|
221
|
+
if (closeTimer.current !== void 0) clearTimeout(closeTimer.current);
|
|
222
|
+
setClosing(true);
|
|
223
|
+
closeTimer.current = setTimeout(() => {
|
|
224
|
+
setClosing(false);
|
|
225
|
+
setOpen(false);
|
|
226
|
+
}, SELECT_CLOSE_MS);
|
|
227
|
+
}, []);
|
|
228
|
+
const openPopup = () => {
|
|
229
|
+
if (closeTimer.current !== void 0) clearTimeout(closeTimer.current);
|
|
230
|
+
setActiveIndex(currentIndex());
|
|
231
|
+
setPhase("initial");
|
|
232
|
+
setClosing(false);
|
|
233
|
+
setOpen(true);
|
|
234
|
+
};
|
|
235
|
+
const commit = (index) => {
|
|
236
|
+
const option = options[index];
|
|
237
|
+
if (option) props.onEdit(option.value);
|
|
238
|
+
close();
|
|
239
|
+
};
|
|
240
|
+
const onTriggerClick = () => {
|
|
241
|
+
if (props.disabled) return;
|
|
242
|
+
if (open && !closing) close();
|
|
243
|
+
else openPopup();
|
|
244
|
+
};
|
|
245
|
+
const onKeyDown = (event) => {
|
|
246
|
+
if (props.disabled) return;
|
|
247
|
+
const count = options.length;
|
|
248
|
+
switch (event.key) {
|
|
249
|
+
case "ArrowDown":
|
|
250
|
+
case "ArrowUp":
|
|
251
|
+
case "Enter":
|
|
252
|
+
case " ":
|
|
253
|
+
event.preventDefault();
|
|
254
|
+
if (!open) openPopup();
|
|
255
|
+
else if (!closing) if (event.key === "ArrowDown") setActiveIndex((index) => (index + 1) % count);
|
|
256
|
+
else if (event.key === "ArrowUp") setActiveIndex((index) => (index - 1 + count) % count);
|
|
257
|
+
else commit(activeIndex);
|
|
258
|
+
break;
|
|
259
|
+
case "Escape":
|
|
260
|
+
if (open) {
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
event.stopPropagation();
|
|
263
|
+
close();
|
|
264
|
+
}
|
|
265
|
+
break;
|
|
266
|
+
case "Tab":
|
|
267
|
+
if (open) close();
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
(0, react.useEffect)(() => () => {
|
|
272
|
+
if (closeTimer.current !== void 0) clearTimeout(closeTimer.current);
|
|
273
|
+
}, []);
|
|
274
|
+
(0, react.useLayoutEffect)(() => {
|
|
275
|
+
if (open && !closing && phase === "initial") {
|
|
276
|
+
popupRef.current?.offsetHeight;
|
|
277
|
+
setPhase("open");
|
|
278
|
+
}
|
|
279
|
+
}, [
|
|
280
|
+
open,
|
|
281
|
+
closing,
|
|
282
|
+
phase
|
|
283
|
+
]);
|
|
284
|
+
(0, react.useEffect)(() => {
|
|
285
|
+
if (!open) return;
|
|
286
|
+
const onPointerDown = (event) => {
|
|
287
|
+
const target = event.target;
|
|
288
|
+
if (target instanceof Node && !wrapRef.current?.contains(target)) close();
|
|
289
|
+
};
|
|
290
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
291
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
292
|
+
}, [open, close]);
|
|
293
|
+
(0, react.useEffect)(() => {
|
|
294
|
+
if (props.disabled && open) close();
|
|
295
|
+
}, [
|
|
296
|
+
props.disabled,
|
|
297
|
+
open,
|
|
298
|
+
close
|
|
299
|
+
]);
|
|
300
|
+
if (isSkinActive()) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
301
|
+
id,
|
|
302
|
+
className: settings_card_module_css_default.select,
|
|
303
|
+
value,
|
|
304
|
+
disabled: props.disabled,
|
|
305
|
+
onChange: (event) => {
|
|
306
|
+
props.onEdit(event.target.value);
|
|
307
|
+
},
|
|
308
|
+
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
309
|
+
value: option.value,
|
|
310
|
+
children: option.label
|
|
311
|
+
}, option.value))
|
|
312
|
+
});
|
|
313
|
+
const label = options.find((option) => option.value === value)?.label ?? "";
|
|
314
|
+
const popupClass = closing ? `${settings_card_module_css_default.selectPopup} ${settings_card_module_css_default.selectPopupClose}` : phase === "open" ? `${settings_card_module_css_default.selectPopup} ${settings_card_module_css_default.selectPopupOpen}` : settings_card_module_css_default.selectPopup;
|
|
315
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
316
|
+
className: settings_card_module_css_default.selectWrap,
|
|
317
|
+
ref: wrapRef,
|
|
318
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
319
|
+
type: "button",
|
|
320
|
+
id,
|
|
321
|
+
className: `${settings_card_module_css_default.select} ${settings_card_module_css_default.selectButton}`,
|
|
322
|
+
disabled: props.disabled,
|
|
323
|
+
"aria-haspopup": "listbox",
|
|
324
|
+
"aria-expanded": open,
|
|
325
|
+
"aria-activedescendant": open ? `${id}-o${activeIndex}` : void 0,
|
|
326
|
+
"aria-invalid": props.invalid || void 0,
|
|
327
|
+
onClick: onTriggerClick,
|
|
328
|
+
onKeyDown,
|
|
329
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
330
|
+
className: settings_card_module_css_default.selectLabel,
|
|
331
|
+
children: label
|
|
332
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
333
|
+
width: "14",
|
|
334
|
+
height: "14",
|
|
335
|
+
viewBox: "0 0 14 14",
|
|
336
|
+
fill: "none",
|
|
337
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
338
|
+
className: open ? `${settings_card_module_css_default.selectChevron} ${settings_card_module_css_default.selectChevronOpen}` : settings_card_module_css_default.selectChevron,
|
|
339
|
+
"aria-hidden": "true",
|
|
340
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
341
|
+
d: "M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z",
|
|
342
|
+
fill: "currentColor"
|
|
343
|
+
})
|
|
344
|
+
})]
|
|
345
|
+
}), open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
346
|
+
className: popupClass,
|
|
347
|
+
role: "listbox",
|
|
348
|
+
ref: popupRef,
|
|
349
|
+
children: options.map((option, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
350
|
+
id: `${id}-o${index}`,
|
|
351
|
+
role: "option",
|
|
352
|
+
"aria-selected": option.value === value,
|
|
353
|
+
className: `${settings_card_module_css_default.selectOption}${option.value === value ? ` ${settings_card_module_css_default.selectOptionSelected}` : ""}${index === activeIndex && !closing ? ` ${settings_card_module_css_default.selectOptionActive}` : ""}`,
|
|
354
|
+
onClick: () => {
|
|
355
|
+
commit(index);
|
|
356
|
+
},
|
|
357
|
+
children: option.label
|
|
358
|
+
}, option.value))
|
|
359
|
+
}) : null]
|
|
360
|
+
});
|
|
361
|
+
}
|
|
182
362
|
/** A staged boolean field: 继承 / 开 / 关. */
|
|
183
363
|
function BooleanField(props) {
|
|
184
364
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -204,28 +384,26 @@ window.__ModuleLoader__.load({
|
|
|
204
384
|
})]
|
|
205
385
|
}) : null]
|
|
206
386
|
}),
|
|
207
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
387
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
|
|
208
388
|
id: props.id,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
disabled: props.disabled,
|
|
212
|
-
onChange: (event) => {
|
|
213
|
-
props.onEdit(event.target.value);
|
|
214
|
-
},
|
|
215
|
-
children: [
|
|
216
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
389
|
+
options: [
|
|
390
|
+
{
|
|
217
391
|
value: "",
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
392
|
+
label: props.inheritLabel
|
|
393
|
+
},
|
|
394
|
+
{
|
|
221
395
|
value: "true",
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
|
|
396
|
+
label: props.onLabel
|
|
397
|
+
},
|
|
398
|
+
{
|
|
225
399
|
value: "false",
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
]
|
|
400
|
+
label: props.offLabel
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
value: props.text,
|
|
404
|
+
disabled: props.disabled,
|
|
405
|
+
invalid: props.invalid,
|
|
406
|
+
onEdit: props.onEdit
|
|
229
407
|
}),
|
|
230
408
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
231
409
|
className: settings_card_module_css_default.hint,
|
|
@@ -675,6 +853,7 @@ window.__ModuleLoader__.load({
|
|
|
675
853
|
"repo": "https://github.com/Qinling-Melon-Farmers/dsh-memoir",
|
|
676
854
|
"description": "项目持久化记忆与会话经验沉淀:memoir_record / memoir_read 工具(BM25 相关度排序检索)、每轮工作自动蒸馏、记忆诊断面板与跨项目全局检索,纯本地零外部依赖。",
|
|
677
855
|
"descriptionEn": "Project persistent memory and session-lessons distillation: memoir_record / memoir_read tools with BM25-ranked retrieval, per-turn auto-distill, a memory diagnostics panel and cross-project search - fully local, no external dependency.",
|
|
856
|
+
"npm": "dsh-memoir",
|
|
678
857
|
"category": "knowledge"
|
|
679
858
|
},
|
|
680
859
|
{
|
|
@@ -708,6 +887,153 @@ window.__ModuleLoader__.load({
|
|
|
708
887
|
"description": "DSH Web 一键换肤插件:8 套原创主题、背景壁纸(透明度/模糊/渐变/URL)、每用户强调色、主题包导入导出与分享链接、收藏与随机,纯原生 token 系统。",
|
|
709
888
|
"descriptionEn": "One-command skinning for DSH Web: 8 original themes, wallpaper (opacity/blur/gradient/URL), per-user accent, shareable theme packs with favorites and surprise-me. Purely native token system.",
|
|
710
889
|
"category": "ui"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"id": "dsh-friendly-steps",
|
|
893
|
+
"name": "过程精简 Friendly Steps",
|
|
894
|
+
"nameEn": "Friendly Steps",
|
|
895
|
+
"author": "dongwenxiu83-web",
|
|
896
|
+
"repo": "https://github.com/dongwenxiu83-web/dsh-friendly-steps",
|
|
897
|
+
"description": "面向文字工作者的过程精简:纯 CSS 折叠 Think / 工具调用等技术过程行,右下角浮条「已完成 N 步」一键展开收起,失败步骤红色计数反馈;不注入 React 列表、无全量扫描,零侵入。",
|
|
898
|
+
"descriptionEn": "Writer-friendly process collapse: hides Think / tool-call rows via pure CSS behind a floating 'N steps done' pill with red failure counts and one-click expand/collapse. No foreign nodes in React lists, no full-DOM scans — zero interference.",
|
|
899
|
+
"category": "ui"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"id": "dsh-full-remote",
|
|
903
|
+
"name": "全功能远程访问",
|
|
904
|
+
"nameEn": "Full Remote Access",
|
|
905
|
+
"author": "JUANWANG-BUAA",
|
|
906
|
+
"repo": "https://github.com/JUANWANG-BUAA/dsh-full-remote",
|
|
907
|
+
"description": "令牌门控反向代理:公网隧道或局域网下,在手机等设备上远程使用 DeepSeek Harness,设置、凭据与文件访问保持可用,支持按设备会话。",
|
|
908
|
+
"descriptionEn": "Token-gated reverse proxy for remote access: use DeepSeek Harness over public tunnels or LAN from phones and other devices, with settings, credentials and file access kept working and per-device sessions.",
|
|
909
|
+
"npm": "dsh-full-remote",
|
|
910
|
+
"category": "integration"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"id": "dsh-palate",
|
|
914
|
+
"name": "Palate 品味训练",
|
|
915
|
+
"nameEn": "Palate Design Taste",
|
|
916
|
+
"author": "guo6x",
|
|
917
|
+
"repo": "https://github.com/guo6x/dsh-palate",
|
|
918
|
+
"description": "会长大的眼:可积累的设计品味语料库(好/坏例子 + 编码原则),喂得越多评审越准;6 个 palate_* 工具(review/add/learn/list/principles/stats)+ 成长面板,node:sqlite + 人可读 Markdown 镜像,零运行时依赖。",
|
|
919
|
+
"descriptionEn": "An eye that grows: an accumulated design-taste corpus (good/bad examples plus codified principles) that sharpens with every example you feed; six palate_* tools (review/add/learn/list/principles/stats) plus a growth panel, node:sqlite with human-readable Markdown mirrors, zero runtime dependencies.",
|
|
920
|
+
"category": "knowledge"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"id": "dsh-archive-manager",
|
|
924
|
+
"name": "归档管理",
|
|
925
|
+
"nameEn": "Archive Manager",
|
|
926
|
+
"author": "z953218350",
|
|
927
|
+
"repo": "https://github.com/z953218350/dsh-archive-manager",
|
|
928
|
+
"description": "设置页 Codex 风格会话归档管理:按项目分组、搜索筛选、预览对话内容、一键恢复与彻底物理删除,内置 zstd 解压引擎。",
|
|
929
|
+
"descriptionEn": "Codex-style archived session manager in settings: group by project, search and filter, preview conversation history, restore to sidebar, and permanently delete from disk; built-in zstd decompression.",
|
|
930
|
+
"npm": "@mlgbnb/dsh-archive-manager",
|
|
931
|
+
"category": "utility"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"id": "dsh-history-tree",
|
|
935
|
+
"name": "历史树",
|
|
936
|
+
"nameEn": "History Tree",
|
|
937
|
+
"author": "z953218350",
|
|
938
|
+
"repo": "https://github.com/z953218350/dsh-history-tree",
|
|
939
|
+
"description": "在聊天消息左侧提供 Codex 风格对话轮次时间线点阵与悬浮历史概览卡片,支持鱼眼放大动效与点击直达对应轮次。",
|
|
940
|
+
"descriptionEn": "Codex-style conversation turn timeline rail and hover overview cards beside chat messages, with fish-eye magnification and click-to-jump navigation.",
|
|
941
|
+
"npm": "dsh-history-tree",
|
|
942
|
+
"category": "ui"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"id": "dsh-gzip",
|
|
946
|
+
"name": "dsh-gzip",
|
|
947
|
+
"nameEn": "dsh-gzip",
|
|
948
|
+
"author": "wingsky-1",
|
|
949
|
+
"repo": "https://github.com/wingsky-1/dsh-plugin-hub/tree/main/packages/dsh-gzip",
|
|
950
|
+
"description": "/api 响应 gzip 压缩插件:为远程 / 低带宽链路开启 /api 响应压缩,解决会话历史因大响应无压缩而超时加载失败的问题;SSE / zip / 已编码响应自动豁免,无全局副作用。",
|
|
951
|
+
"descriptionEn": "API response gzip plugin for DSH Web GUI: enables gzip on /api responses for remote / low-bandwidth links, fixing session-history loads that fail on the timeout of large uncompressed responses; SSE, zip and already-encoded responses are passed through untouched, with no global side effects.",
|
|
952
|
+
"npm": "@wingsky-1/dsh-gzip"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"id": "dsh-wsl-bridge",
|
|
956
|
+
"name": "WSL Windows 桥",
|
|
957
|
+
"nameEn": "WSL Windows Bridge",
|
|
958
|
+
"author": "ch1bug",
|
|
959
|
+
"repo": "https://github.com/ch1bug/dsh-wsl-bridge",
|
|
960
|
+
"description": "让 WSL 里的 agent 访问 Windows 侧:读写 C:\\ 文件、运行 .exe、Explorer 打开、wslpath 路径互转与盘符枚举(win_ls/read/write/run/open/path/drives)。",
|
|
961
|
+
"descriptionEn": "Lets a WSL agent reach the Windows host: read/write C:\\ files, run .exe programs, open in Explorer, convert paths via wslpath and list drives (win_ls/read/write/run/open/path/drives).",
|
|
962
|
+
"category": "integration"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"id": "dsh-mimo-agent-tools",
|
|
966
|
+
"name": "MiMo 多模态工具",
|
|
967
|
+
"nameEn": "MiMo Multimodal Tools",
|
|
968
|
+
"author": "ch1bug",
|
|
969
|
+
"repo": "https://github.com/ch1bug/dsh-mimo-agent-tools",
|
|
970
|
+
"description": "把小米 MiMo API 封装为 agent 工具:联网搜索、图像/音频/视频理解、语音转写、语音合成与音色克隆(mimo_search/vision/audio/video/asr/tts/voiceclone)。",
|
|
971
|
+
"descriptionEn": "Turns the Xiaomi MiMo API into agent tools: web search, image/audio/video understanding, speech-to-text, text-to-speech and voice cloning (mimo_search/vision/audio/video/asr/tts/voiceclone).",
|
|
972
|
+
"category": "tools"
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"id": "dsh-skill-fuzzy",
|
|
976
|
+
"name": "技能模糊搜索",
|
|
977
|
+
"nameEn": "Skill Fuzzy Search",
|
|
978
|
+
"author": "ch1bug",
|
|
979
|
+
"repo": "https://github.com/ch1bug/dsh-skill-fuzzy",
|
|
980
|
+
"description": "Codex 风格模糊技能搜索:/bug、/diag、/regression 都能在 / 技能菜单里命中 diagnosing-bugs(名称子序列 + 描述连续子串匹配)。",
|
|
981
|
+
"descriptionEn": "Codex-style fuzzy skill search: /bug, /diag and /regression all find diagnosing-bugs in the / skill menu (name subsequence + description substring matching).",
|
|
982
|
+
"category": "ui"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"id": "dsh-secret-redactor",
|
|
986
|
+
"name": "敏感信息脱敏",
|
|
987
|
+
"nameEn": "Secret Redactor",
|
|
988
|
+
"author": "DamonKoy",
|
|
989
|
+
"repo": "https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-secret-redactor",
|
|
990
|
+
"description": "自动掩码工具输出中的 API key、token、JWT、私钥与配置密钥。",
|
|
991
|
+
"descriptionEn": "Auto-masks API keys, tokens, JWTs and private keys in tool results shown to the model."
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"id": "dsh-approve-for-me",
|
|
995
|
+
"name": "自动审批审核",
|
|
996
|
+
"nameEn": "Approve for Me",
|
|
997
|
+
"author": "DamonKoy",
|
|
998
|
+
"repo": "https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-approve-for-me",
|
|
999
|
+
"description": "只读工具自动放行、危险命令自动拒绝,可配置全自动模式。",
|
|
1000
|
+
"descriptionEn": "Auto-approves read-only tools, auto-denies dangerous commands, optional full-auto mode."
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"id": "dsh-mcp-client-v2",
|
|
1004
|
+
"name": "MCP 客户端 v2",
|
|
1005
|
+
"nameEn": "MCP Client v2",
|
|
1006
|
+
"author": "DamonKoy",
|
|
1007
|
+
"repo": "https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-mcp-client-v2",
|
|
1008
|
+
"description": "MCP 客户端增强:分页工具发现、非阻塞启动、工具搜索。",
|
|
1009
|
+
"descriptionEn": "Enhanced MCP client: paginated tool discovery, non-blocking startup, tool search."
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"id": "dsh-memories",
|
|
1013
|
+
"name": "项目记忆",
|
|
1014
|
+
"nameEn": "Project Memories",
|
|
1015
|
+
"author": "DamonKoy",
|
|
1016
|
+
"repo": "https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-memories",
|
|
1017
|
+
"description": "按项目作用域持久化的键值记忆,支持增删查列与搜索。",
|
|
1018
|
+
"descriptionEn": "Project-scoped persistent key-value memories with set/get/list/delete/search."
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"id": "dsh-system-proxy",
|
|
1022
|
+
"name": "系统代理",
|
|
1023
|
+
"nameEn": "System Proxy",
|
|
1024
|
+
"author": "DamonKoy",
|
|
1025
|
+
"repo": "https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-system-proxy",
|
|
1026
|
+
"description": "检测系统代理(scutil/环境变量/PAC)并为子进程导出代理环境变量。",
|
|
1027
|
+
"descriptionEn": "Detects system proxy (scutil/env/PAC) and exports proxy env for child processes."
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"id": "dsh-usage-cost",
|
|
1031
|
+
"name": "用量成本提醒",
|
|
1032
|
+
"nameEn": "Usage & Cost",
|
|
1033
|
+
"author": "DamonKoy",
|
|
1034
|
+
"repo": "https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-usage-cost",
|
|
1035
|
+
"description": "统计会话与每日 token 用量和估算成本,超预算提醒。",
|
|
1036
|
+
"descriptionEn": "Tracks token usage and estimated cost per session/day with budget alerts."
|
|
711
1037
|
}
|
|
712
1038
|
];
|
|
713
1039
|
//#endregion
|
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["css","css"],"sources":["../../../packages/dsh-community-plugins/src/client/PluginSettingsCard.tsx","../../../packages/dsh-community-plugins/src/client/settings-form.ts","../../../packages/dsh-community-plugins/src/client/generated/community.ts","../../../packages/dsh-community-plugins/src/client/community-guard.ts","../../../packages/dsh-community-plugins/src/client/CommunityPluginsCard.tsx","../../../packages/dsh-community-plugins/src/client/locales.ts","../../../packages/dsh-community-plugins/src/client/index.ts"],"sourcesContent":["// Generated by scripts/sync-shared.mjs from shared/client/settings/PluginSettingsCard.tsx. Do not edit this copy; edit the shared source and run \"node scripts/sync-shared.mjs\".\n/**\n * Family-shared chrome for plugin settings cards: a disclosure header naming\n * the plugin and what its settings govern, the controls inside, and the save\n * that writes them. Renders nothing while the namespace is unavailable — a\n * deployment that does not compose the owning plugin should show no trace of\n * it. Inlined into each consumer's client bundle; mirrors the official\n * ui-plugin-config PluginCard in a self-contained slice.\n */\n\nimport { useState, type ReactNode } from 'react'\nimport type { CardShell } from './settings-form.ts'\nimport css from './settings-card.module.css'\n\n/** Copy keys the card chrome itself reads; every consumer locale carries this shared vocabulary. */\nexport const CARD_COPY_KEYS = [\n 'settings.collapse',\n 'settings.expand',\n 'settings.notExposed',\n 'settings.unsaved',\n 'settings.readOnly',\n 'settings.saveFailed',\n 'settings.discard',\n 'settings.save',\n 'settings.saving',\n] as const\n\n/** Copy key the card chrome itself reads. */\nexport type CardCopyKey = (typeof CARD_COPY_KEYS)[number]\n\n/** Key domain for the plugin's own copy (inferred per consumer). */\nexport type SettingsCardKey<TKey extends string = string> = TKey | CardCopyKey\n\n/** Card chrome shared by every plugin settings card. */\nexport interface PluginSettingsCardProps<TKey extends string = string> {\n /** Locale reader for this card's copy. */\n t: (key: SettingsCardKey<TKey>, params?: Record<string, string | number>) => string\n /** Locale key of the plugin's name. */\n titleKey: TKey\n /** Locale key of the line describing what this plugin's settings govern. */\n descriptionKey: TKey\n /** The card's form state: availability, writability, and what a save would do. */\n state: CardShell\n /** Write every staged edit. */\n onSave: () => void\n /** Drop every staged edit. */\n onDiscard: () => void\n /**\n * Render the controls expanded on arrival (still collapsible). Defaults to\n * true: promoted first-level sections show their settings immediately.\n */\n defaultOpen?: boolean\n /**\n * Render without the collapse affordance: a static header and an always\n * visible body. Used by first-level settings sections whose nav entry\n * already provides the selection.\n */\n alwaysOpen?: boolean\n /**\n * Hide the save/discard footer: cards whose body applies its own changes\n * immediately (an embedded external settings section) have no staged\n * edits, so the footer would sit there permanently disabled.\n */\n hideFooter?: boolean\n /** The plugin's controls. */\n children: ReactNode\n}\n\n/**\n * Render one plugin settings card.\n * @param props - the plugin's copy keys, its form state, and its controls.\n * @returns the card, or nothing while the namespace is still loading.\n */\nexport function PluginSettingsCard<TKey extends string = string>(props: PluginSettingsCardProps<TKey>) {\n const [open, setOpen] = useState(props.defaultOpen ?? true)\n const { state, alwaysOpen } = props\n if (!state.available) return null\n const title = props.t(props.titleKey)\n const description = props.t(props.descriptionKey)\n const blocked = !state.dirty || state.invalid || state.saving\n const expanded = alwaysOpen === true || open\n const cardClass = expanded ? `${css.cardOpen} ${css.card}` : css.card\n // With alwaysOpen the nav entry already provides the selection, so the\n // header is a static title row instead of a disclosure button.\n const header = alwaysOpen === true\n ? (\n <div className={css.headerStatic}>\n <span className={css.headText}>\n <span className={css.name} title={title}>{title}</span>\n <span className={css.description} title={description}>{description}</span>\n </span>\n {state.dirty ? <span className={css.pending} title={props.t('settings.unsaved')}>{props.t('settings.unsaved')}</span> : null}\n </div>\n )\n : (\n <button\n type=\"button\"\n className={css.header}\n aria-expanded={open}\n aria-label={`${props.t(open ? 'settings.collapse' : 'settings.expand')}: ${title}`}\n onClick={() => { setOpen(!open) }}\n >\n <span className={css.headText}>\n <span className={css.name} title={title}>{title}</span>\n <span className={css.description} title={description}>{description}</span>\n </span>\n {state.dirty ? <span className={css.pending} title={props.t('settings.unsaved')}>{props.t('settings.unsaved')}</span> : null}\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={open ? `${css.chevron} ${css.chevronOpen}` : css.chevron}\n >\n <path\n d=\"M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n )\n // The namespace exists but the Host does not serve it to this client (the\n // official settings allowlist omits third-party namespaces): show a card\n // that explains the gap instead of vanishing, so a missing card never\n // reads as a missing plugin.\n if (!state.exposed) {\n return (\n <li className={cardClass}>\n {header}\n {expanded\n ? (\n <div className={css.body}>\n <p className={css.notExposed} role=\"status\">{props.t('settings.notExposed')}</p>\n </div>\n )\n : null}\n </li>\n )\n }\n return (\n <li className={cardClass}>\n {header}\n {expanded\n ? (\n <div className={css.body}>\n {!state.writable ? <p className={css.readOnly} role=\"status\">{props.t('settings.readOnly')}</p> : null}\n {props.children}\n {props.hideFooter === true\n ? null\n : (\n <div className={css.footer}>\n {state.failed\n ? (\n <p className={css.failed} role=\"status\">\n {props.t('settings.saveFailed')}{state.failedReason ? ' - ' + state.failedReason : ''}\n </p>\n )\n : null}\n <button\n type=\"button\"\n className={css.discard}\n disabled={!state.dirty || state.saving}\n onClick={props.onDiscard}\n >\n {props.t('settings.discard')}\n </button>\n <button\n type=\"button\"\n className={css.save}\n disabled={blocked}\n onClick={props.onSave}\n >\n {props.t(!state.saving ? 'settings.save' : 'settings.saving')}\n </button>\n </div>\n )}\n </div>\n )\n : null}\n </li>\n )\n}\n\n/** Props every field control needs regardless of its value type. */\nexport interface FieldProps {\n /** Stable id associating the label with its control. */\n id: string\n /** Visible label. */\n label: string\n /** One-line explanation rendered under the control. */\n hint: string\n /** Draft text this control renders. */\n text: string\n /** True when saving would leave a user-layer entry for this field. */\n overridden: boolean\n /** True when the draft is not a value this field accepts. */\n invalid: boolean\n /** Copy for the overridden badge. */\n overriddenLabel: string\n /** Copy for the reset control. */\n resetLabel: string\n /** Copy shown in place of the hint while the draft is invalid. */\n invalidLabel: string\n /** Disables every control (read-only document, or an unavailable namespace). */\n disabled: boolean\n /** Stage draft text. */\n onEdit: (text: string) => void\n /** Stage a clear so the field re-inherits the composition layer. */\n onReset: () => void\n}\n\n/** A staged value field. `numeric` only hints the keypad: which drafts a field accepts is decided by its spec. */\nexport function ValueField(props: FieldProps & {\n /** Hints a numeric keypad without narrowing what the control accepts. */\n numeric?: boolean\n /** Placeholder shown while the draft is empty. */\n placeholder?: string\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.overridden\n ? (\n <span className={css.badges}>\n <span className={css.badge}>{props.overriddenLabel}</span>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <input\n id={props.id}\n className={props.invalid ? css.inputInvalid : css.input}\n type=\"text\"\n {...props.numeric === true ? { inputMode: 'numeric' as const } : {}}\n {...props.invalid ? { 'aria-invalid': true } : {}}\n value={props.text}\n placeholder={props.placeholder ?? ''}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n />\n <p className={props.invalid ? css.invalid : css.hint}>\n {props.invalid ? props.invalidLabel : props.hint}\n </p>\n </div>\n )\n}\n\n/** A staged boolean field: 继承 / 开 / 关. */\nexport function BooleanField(props: FieldProps & {\n /** Copy for the inherit option. */\n inheritLabel: string\n /** Copy for the on option. */\n onLabel: string\n /** Copy for the off option. */\n offLabel: string\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.overridden\n ? (\n <span className={css.badges}>\n <span className={css.badge}>{props.overriddenLabel}</span>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <select\n id={props.id}\n className={css.select}\n value={props.text}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n >\n <option value=\"\">{props.inheritLabel}</option>\n <option value=\"true\">{props.onLabel}</option>\n <option value=\"false\">{props.offLabel}</option>\n </select>\n <p className={css.hint}>{props.hint}</p>\n </div>\n )\n}\n\n/** A staged enumerated field rendered as a select. */\nexport function ChoiceField(props: FieldProps & {\n /** Copy for the inherit option (draft text is the empty string). */\n inheritLabel: string\n /** Choices rendered in order; `value` is the draft/stored text. */\n choices: ReadonlyArray<{ value: string; label: string }>\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.overridden\n ? (\n <span className={css.badges}>\n <span className={css.badge}>{props.overriddenLabel}</span>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <select\n id={props.id}\n className={css.select}\n value={props.text}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n >\n <option value=\"\">{props.inheritLabel}</option>\n {props.choices.map(choice => (\n <option key={choice.value} value={choice.value}>{choice.label}</option>\n ))}\n </select>\n <p className={props.invalid ? css.invalid : css.hint}>\n {props.invalid ? props.invalidLabel : props.hint}\n </p>\n </div>\n )\n}\n","// Generated by scripts/sync-shared.mjs from shared/client/settings/settings-form.ts. Do not edit this copy; edit the shared source and run \"node scripts/sync-shared.mjs\".\n/**\n * Staged form model behind the plugin settings card. A card stages what the\n * user types and writes it only when they save — the settings write is a\n * durable, revision-fenced document mutation, so staging keeps what is on\n * screen exactly what a save would store. Family-shared slice inlined into\n * each plugin's client bundle; mirrors the official ui-plugin-config\n * card-store pattern.\n */\n\nimport type { SettingsScope, SettingsScopeSnapshot, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'\n\n/** The write one field's staged text performs when the card is saved. */\nexport type FieldWrite =\n | { kind: 'set'; value: unknown }\n | { kind: 'clear' }\n\n/** How one field converts between its stored value and its draft text. */\nexport interface FieldSpec {\n /** Field name inside the namespace section. */\n field: string\n /**\n * Whether the Host treats this field as a secret and redacts its value from\n * the read-back (role('secret') in the section schema). Redacted secrets are\n * never compared against the draft on save; the field lands when the scope\n * reports the write succeeded (its secret-set marker under the bridge), so\n * a successful secret save is not misreported as failed.\n */\n secret?: boolean\n /** Render a stored value as draft text; the empty string when the section carries none. */\n format: (value: unknown) => string\n /**\n * The write this draft text stages, or undefined when the text is not a\n * value this field accepts — which blocks the save rather than discarding it.\n */\n parse: (text: string) => FieldWrite | undefined\n}\n\n/** One field as the card renders it. */\nexport interface FieldState {\n /** Draft text the control renders. */\n text: string\n /** Whether saving would leave a user-layer entry for this field. */\n overridden: boolean\n /** Whether the draft is not a value this field accepts, which blocks saving. */\n invalid: boolean\n}\n\n/** Form state every plugin settings card shares. */\nexport interface CardShell {\n /** False while the namespace is still loading; the card renders nothing. */\n available: boolean\n /**\n * Whether the namespace is actually served to this client. False when the\n * Host deployment does not expose it (e.g. the official apiproxy settings\n * allowlist omits third-party namespaces): the card renders an explanation\n * instead of its form, so a missing namespace never looks like a missing\n * plugin.\n */\n exposed: boolean\n /** Whether the Host document accepts writes. */\n writable: boolean\n /** Whether the form holds edits that a save would write. */\n dirty: boolean\n /** Whether any staged draft is invalid, which blocks the save. */\n invalid: boolean\n /** Whether a save is crossing the wire. */\n saving: boolean\n /** Whether the last save did not land as staged; cleared by the next edit or save. */\n failed: boolean\n /**\n * The rejection code/message the Host returned for the last failed save,\n * surfaced next to the generic failure text. Undefined while no save has\n * failed (or the failure carried no server reason).\n */\n failedReason?: string\n}\n\n/** The write actions the card's slot entry injects. */\nexport interface CardActions {\n /** Stage draft text for one field. */\n edit: (field: string, text: string) => void\n /** Stage a clear, so saving lets the field re-inherit the composition layer. */\n resetField: (field: string) => void\n /** Write every staged edit, then re-seed from what the Host accepted. */\n save: () => void\n /** Drop every staged edit. */\n discard: () => void\n}\n\n/** One field's staged edit. */\ninterface StagedEdit {\n /** Draft text the control renders. */\n text: string\n /** True when this edit clears the field whatever text it shows. */\n clear: boolean\n}\n\n/** One staged edit resolved into the write a save performs. */\ninterface PlannedWrite {\n /** Field this entry writes. */\n field: string\n /** The durable write this entry performs, described for a batched scope. */\n op: BatchedWrite\n /** Perform the write and report whether the Host holds the staged value afterwards. */\n run: (() => Promise<boolean>) | undefined\n}\n\n/** One durable write a batched settings scope performs. */\nexport interface BatchedWrite {\n /** Field this entry writes. */\n field: string\n /** set stores a value; unset drops the leaf. */\n op: 'set' | 'unset'\n /** Value for op set (absent for unset). */\n value?: unknown\n}\n\n/** Per-field outcome of one batched scope write. */\nexport interface BatchedFieldResult {\n /** Field this entry writes. */\n field: string\n /** Whether the Host accepted this field's write (per the read-back view). */\n landed: boolean\n}\n\n/**\n * Result of a batched scope write. The bridge scope posts every planned write\n * in one /mutate so the Host validate hook judges baseURL+model together; a\n * batched refusal fails the whole save rather than per-field.\n */\nexport interface BatchResult {\n /** Whether the whole mutate was accepted. */\n ok: boolean\n /** Per-field success, in the request order (always present when ok). */\n fields: BatchedFieldResult[]\n /** Host rejection code (mutate refused). */\n code?: string\n /** Host rejection message (mutate refused). */\n message?: string\n}\n\n/** The optional batch surface the bridge scope adds over the SettingsScope contract. */\ninterface BatchedSettingsScope {\n /** Write every operation in one scope mutation, reporting per-field success. */\n mutate: (writes: BatchedWrite[]) => Promise<BatchResult>\n}\n\n/** Constraints a numeric field's accepted drafts must satisfy, mirroring the host schema. */\nexport interface NumberConstraints {\n /** The accepted value must be a whole number. */\n integer?: boolean\n /** The accepted value must be at least this. */\n min?: number\n}\n\n/** A whole- or decimal-number field. An empty draft clears the field; any other draft that is not a finite number within the constraints blocks the save. */\nexport function numberField(field: string, constraints: NumberConstraints = {}): FieldSpec {\n const { integer = false, min } = constraints\n return {\n field,\n format: value => typeof value === 'number' ? String(value) : '',\n parse: (text) => {\n const trimmed = text.trim()\n if (trimmed === '') return { kind: 'clear' }\n const parsed = Number(trimmed)\n if (!Number.isFinite(parsed)) return undefined\n if (integer && !Number.isInteger(parsed)) return undefined\n if (min !== undefined && parsed < min) return undefined\n return { kind: 'set', value: parsed }\n },\n }\n}\n\n/** A free-text field. An empty draft clears the field. */\nexport function textField(field: string): FieldSpec {\n return {\n field,\n format: value => typeof value === 'string' ? value : '',\n parse: (text) => {\n const trimmed = text.trim()\n return trimmed === '' ? { kind: 'clear' } : { kind: 'set', value: trimmed }\n },\n }\n}\n\n/**\n * A free-text field the Host treats as a secret and redacts from the read-back\n * (role('secret') in the section schema). The card still edits it like text,\n * but a save never compares the redacted value back and relies on the scope\n * reporting the write landed.\n */\nexport function secretField(field: string): FieldSpec {\n return { ...textField(field), secret: true }\n}\n\n/** A boolean field, edited through true/false draft text. */\nexport function booleanField(field: string): FieldSpec {\n return {\n field,\n format: value => typeof value === 'boolean' ? String(value) : '',\n parse: (text) => {\n const trimmed = text.trim()\n if (trimmed === '') return { kind: 'clear' }\n if (trimmed === 'true') return { kind: 'set', value: true }\n if (trimmed === 'false') return { kind: 'set', value: false }\n return undefined\n },\n }\n}\n\n/** An enumerated string field; only the listed choices are accepted. An empty draft clears the field. */\nexport function choiceField(field: string, choices: readonly string[]): FieldSpec {\n return {\n field,\n format: value => typeof value === 'string' && choices.includes(value) ? value : '',\n parse: (text) => {\n if (text === '') return { kind: 'clear' }\n return choices.includes(text) ? { kind: 'set', value: text } : undefined\n },\n }\n}\n\n/**\n * Stages one card's edits over one settings namespace and writes them on save.\n *\n * The Host is the only authority on whether a value was accepted — its\n * validators own the constraints no schema can express — so the outcome is\n * read back from the section rather than predicted here. A save that did not\n * land keeps its drafts, so the user can correct them instead of retyping.\n */\nexport class CardForm<T> {\n private readonly specs: Map<string, FieldSpec>\n private readonly staged = new Map<string, StagedEdit>()\n private readonly listeners = new Set<() => void>()\n /** The scope subscription installed in the constructor; released by dispose(). */\n private readonly disposeScope: () => void\n private disposed = false\n private saving = false\n private failed = false\n private failedReason: string | undefined\n\n /** @param scope - the bound settings scope for this card's namespace. */\n constructor(\n private readonly scope: SettingsScope<T>,\n specs: FieldSpec[],\n ) {\n this.specs = new Map(specs.map(spec => [spec.field, spec]))\n this.disposeScope = scope.subscribe(() => { this.publish() })\n }\n\n /**\n * Release the scope subscription and every bound store listener. The card\n * must call this on teardown; later calls are no-ops.\n */\n dispose(): void {\n if (this.disposed) return\n this.disposed = true\n this.disposeScope()\n this.listeners.clear()\n }\n\n /** Publish a projection of this form, rebuilt whenever the scope or a draft changes. */\n bind<S>(project: () => S): SnapshotStore<S> {\n const store = createSnapshotStore(project())\n this.listeners.add(() => { store.set(project()) })\n return store\n }\n\n /** Read the card-level state: what the Host serves, and what a save would do. */\n shell(): CardShell {\n const snapshot = this.scope.getSnapshot()\n const plan = this.plan()\n return {\n available: snapshot.status !== 'loading',\n exposed: snapshot.status === 'ready',\n writable: snapshot.writable,\n dirty: plan.length > 0,\n invalid: plan.some(item => item.run === undefined),\n saving: this.saving,\n failed: this.failed,\n ...this.failedReason === undefined ? {} : { failedReason: this.failedReason },\n }\n }\n\n /** Read one field's state from the effective section and its staged draft. */\n field(field: string): FieldState {\n const spec = this.specOf(field)\n const staged = this.staged.get(field)\n if (staged === undefined) {\n return { text: spec.format(this.sectionValue(field)), overridden: this.stored(field), invalid: false }\n }\n const write = staged.clear ? { kind: 'clear' as const } : spec.parse(staged.text)\n return {\n text: staged.text,\n overridden: write?.kind === 'set',\n invalid: write === undefined,\n }\n }\n\n /** The actions the card's slot registration injects. */\n actions(): CardActions {\n return {\n edit: (field, text) => { this.stage(field, { text, clear: false }) },\n resetField: (field) => {\n this.stage(field, { text: this.specOf(field).format(this.baseValue(field)), clear: true })\n },\n save: () => { void this.save() },\n discard: () => {\n if (this.staged.size === 0 && !this.failed) return\n this.staged.clear()\n this.failed = false\n this.failedReason = undefined\n this.publish()\n },\n }\n }\n\n /**\n * Write every staged edit, then re-seed from what the Host accepted.\n *\n * When the scope carries the optional batch surface (the dsh-web-ui\n * bridge scope), every planned write rides one mutation so cross-field\n * validate hooks (baseURL+model) judge the batch as a unit instead of\n * deadlocking on per-field writes. Otherwise the per-field loop runs.\n * A field lands only when the Host reports it held the staged value; a\n * landed field's draft is dropped, a failed one stays staged for the user.\n * @returns settlement after every write and the read-back.\n */\n async save(): Promise<void> {\n const plan = this.plan()\n const valid = plan.filter(item => item.run !== undefined)\n if (plan.length === 0 || this.saving || valid.length !== plan.length) return\n const plannedWrites = valid.map(item => item.op)\n // Snapshot the fields this save writes, so edits staged while it is in\n // flight survive: only the staged keys this save actually wrote are cleared.\n const fields = new Set(plan.map(item => item.field))\n this.saving = true\n this.failed = false\n this.failedReason = undefined\n this.publish()\n const landed = new Set<string>()\n const batch = this.batchedScope()\n if (batch !== undefined) {\n const result = await batch.mutate(plannedWrites)\n if (result.ok) {\n for (const field of result.fields) {\n if (field.landed) landed.add(field.field)\n }\n } else {\n this.failedReason = result.message\n }\n } else {\n for (const item of valid) {\n if (await item.run!()) landed.add(item.field)\n }\n }\n for (const field of fields) {\n if (landed.has(field)) this.staged.delete(field)\n }\n this.saving = false\n this.failed = landed.size !== fields.size\n this.publish()\n }\n\n /** The scope's batch surface when it supports one; undefined conservatively otherwise. */\n private batchedScope(): BatchedSettingsScope | undefined {\n const candidate = this.scope as unknown as BatchedSettingsScope | undefined\n return typeof candidate?.mutate === 'function' ? candidate : undefined\n }\n\n /**\n * Every staged edit a save would write. An entry whose draft is not a value\n * its field accepts carries no write: the form is still dirty, and the save\n * refuses rather than dropping the edit. A staged edit that matches the\n * effective section is not a write at all.\n * @returns the planned writes, in the order the fields were staged.\n */\n private plan(): PlannedWrite[] {\n const plan: PlannedWrite[] = []\n for (const [field, staged] of this.staged) {\n const spec = this.specOf(field)\n if (staged.clear) {\n if (this.stored(field)) plan.push({ field, op: { field, op: 'unset' }, run: () => this.clear(field) })\n continue\n }\n if (staged.text === spec.format(this.sectionValue(field))) continue\n const write = spec.parse(staged.text)\n if (write === undefined) plan.push({ field, op: { field, op: 'unset' }, run: undefined })\n else if (write.kind === 'clear') plan.push({ field, op: { field, op: 'unset' }, run: () => this.clear(field) })\n else plan.push({ field, op: { field, op: 'set', value: write.value }, run: () => this.store(field, write.value) })\n }\n return plan\n }\n\n private async clear(field: string): Promise<boolean> {\n await this.scope.unset(field)\n return !this.stored(field)\n }\n\n private async store(field: string, value: unknown): Promise<boolean> {\n await this.scope.set(field, value)\n // A redacted secret never appears in the user layer read-back; judging it\n // by value would misreport a successful secret save as failed. The bridge\n // reports secret writes through its secret-set markers (batch path); on\n // the per-field path the scope resolved, so the write is landed.\n if (this.specOf(field).secret) return true\n return this.userLayer()?.[field] === value\n }\n\n private stage(field: string, edit: StagedEdit): void {\n this.staged.set(field, edit)\n this.failed = false\n this.failedReason = undefined\n this.publish()\n }\n\n private specOf(field: string): FieldSpec {\n const spec = this.specs.get(field)\n // Every call site names a field this card declared; a missing one is a\n // wiring mistake that must not degrade into a silently inert control.\n if (spec === undefined) throw new Error(`settings card has no field ${field}`)\n return spec\n }\n\n private snapshotOf(): SettingsScopeSnapshot<T> {\n return this.scope.getSnapshot()\n }\n\n private sectionValue(field: string): unknown {\n return (this.snapshotOf().value as Record<string, unknown> | undefined)?.[field]\n }\n\n private baseValue(field: string): unknown {\n return (this.snapshotOf().base as Record<string, unknown> | undefined)?.[field]\n }\n\n private userLayer(): Record<string, unknown> | undefined {\n return this.snapshotOf().user as Record<string, unknown> | undefined\n }\n\n private stored(field: string): boolean {\n const user = this.userLayer()\n return user !== undefined && Object.hasOwn(user, field)\n }\n\n private publish(): void {\n for (const listener of this.listeners) listener()\n }\n}\n","/**\n * AUTO-GENERATED by scripts/community-index — do not edit by hand.\n * Community plugin index for the settings page: every entry links to the\n * contributor's own repository. This repository never vendors the listed\n * plugins — it only points users at them.\n * Regenerate with `node scripts/community-index`.\n */\n\n/** Stable category ids rendered as marketplace-style filter pills (the runtime guard imports this). */\nexport const COMMUNITY_CATEGORIES = ['ui', 'agent', 'tools', 'knowledge', 'integration', 'security', 'utility'] as const\n\n/** One category id. */\nexport type CommunityPluginCategory = typeof COMMUNITY_CATEGORIES[number]\n\n/** One community plugin entry: contributor metadata plus the repository link. */\nexport interface CommunityPluginEntry {\n /** Stable entry id (unique in community.json). */\n id: string\n /** Display name (zh). */\n name: string\n /** Display name (en). */\n nameEn: string\n /** Contributor (GitHub user or organization). */\n author: string\n /** One-line description (zh). */\n description?: string\n /** One-line description (en). */\n descriptionEn?: string\n /** The contributor's own repository URL. */\n repo: string\n /** npm package name, when the plugin is published there. */\n npm?: string\n /** Category id for the marketplace filter pills. */\n category?: CommunityPluginCategory\n}\n\n/** Every community plugin, in community.json order. */\nexport const COMMUNITY_PLUGINS: readonly CommunityPluginEntry[] = [\n {\"id\":\"dsh-data-agent\",\"name\":\"Data Agent\",\"nameEn\":\"Data Agent\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-data-agent\",\"description\":\"为 DSH 定义专用 Data Agent 预设,让 AI 帮你查询、更新、分析数据。\",\"descriptionEn\":\"Defines a dedicated Data Agent preset for DSH so the AI can query, update and analyze data.\",\"category\":\"agent\"},\n {\"id\":\"dsh-tui\",\"name\":\"dsh-TUI\",\"nameEn\":\"dsh-TUI\",\"author\":\"ccch1mneyyy\",\"repo\":\"https://github.com/ccch1mneyyy/dsh-TUI\",\"description\":\"Claude Code 风格全屏交互终端插件:像素鲸鱼顶栏、实时工作状态行、思考流式展开、双击 Esc 回滚、上下文进度条与 TPS 仪表。\",\"descriptionEn\":\"A Claude Code style fullscreen interactive terminal plugin: pixel-whale header, live working-state line, streaming reasoning expansion, double-Esc rollback, context progress bar and TPS gauges.\",\"category\":\"ui\"},\n {\"id\":\"dsh-tianshu-tui\",\"name\":\"天书 TUI\",\"nameEn\":\"Tianshu TUI\",\"author\":\"huiliyi37\",\"repo\":\"https://github.com/huiliyi37/dsh-tianshu-tui\",\"description\":\"基于官方 DeepSeek Harness 的交互式终端 UI 插件,在官方基础上增加 TDD 与证据门等工作流。\",\"descriptionEn\":\"An interactive terminal UI plugin for DeepSeek Harness that adds TDD and evidence-gate workflows on top of the official base.\",\"category\":\"ui\"},\n {\"id\":\"dsh-chat-summary\",\"name\":\"Chat Summary\",\"nameEn\":\"Chat Summary\",\"author\":\"v833\",\"repo\":\"https://github.com/v833/dsh-chat-summary\",\"description\":\"总结当前对话并导出为 Markdown / DOCX / PDF,可选 LLM 智能总结(用户自配 API Key)。\",\"descriptionEn\":\"Summarize the current conversation and export it as Markdown / DOCX / PDF, with optional LLM summarization using your own API key.\",\"npm\":\"@linxin666/dsh-client-ui-chat-summary\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-builtin-toggles\",\"name\":\"内置能力检查器\",\"nameEn\":\"Built-in Capability Inspector\",\"author\":\"Starfie1d1272\",\"repo\":\"https://github.com/Starfie1d1272/dsh-builtin-toggles\",\"description\":\"Evidence-backed 内置 capability Inspector:展示 DSH Web built-in capability 的 provenance、compatibility 与 structural drift;仅对 9 个经过审阅的 UI leaves 提供 fail-closed 开关。\",\"descriptionEn\":\"Evidence-backed built-in capability Inspector: surfaces provenance, compatibility and structural drift of DSH Web built-ins, with fail-closed toggles for only the nine reviewed UI leaves.\",\"npm\":\"dsh-builtin-toggles\",\"category\":\"tools\"},\n {\"id\":\"dsh-pilot\",\"name\":\"Pilot 浏览器驾驶舱\",\"nameEn\":\"Pilot Browser Cockpit\",\"author\":\"guo6x\",\"repo\":\"https://github.com/guo6x/dsh-pilot\",\"description\":\"给 agent 一双会开车的手:零依赖 CDP 浏览器操控(8 个 pilot_* 工具:导航/点击/输入/按键/JS/截图)+ Web GUI 可拖拽驾驶舱面板,无需 Playwright、无需 API key。\",\"descriptionEn\":\"Give your agent hands: zero-dependency CDP browser control (8 pilot_* tools: navigate/click/type/keys/eval/screenshot) plus a draggable cockpit panel in the Web GUI - no Playwright, no API key.\",\"category\":\"tools\"},\n {\"id\":\"dsh-housekeeper\",\"name\":\"环境管家\",\"nameEn\":\"Environment Housekeeper\",\"author\":\"guo6x\",\"repo\":\"https://github.com/guo6x/dsh-housekeeper\",\"description\":\"管住 agent 的脏手:工具链台账(node/pnpm/git/gh/ffmpeg 等自动探测)、缓存与临时目录扫描 + 白名单安全一键清理、机器规则 AGENTS.md 查看编辑,全在设置面板完成。\",\"descriptionEn\":\"Keep your agent's hands clean: toolchain inventory, scratch/cache scan with whitelist-guarded one-click cleanup, and the machine rules file (AGENTS.md) view/edit - all in the settings panel.\",\"category\":\"utility\"},\n {\"id\":\"dsh-deepread\",\"name\":\"DeepRead 精读助手\",\"nameEn\":\"DeepRead Assistant\",\"author\":\"xiehuan123\",\"repo\":\"https://github.com/xiehuan123/dsh-deepread\",\"description\":\"五种模式精读插件(quick / deep / map / feynman / book),支持公众号链接与文件输入、批量对比、预算预检与后台任务进度透明,导出 md / mm / html,Web UI 提供工具结果卡片与精读面板。\",\"descriptionEn\":\"A five-mode deep reading plugin (quick / deep / map / feynman / book) for links and files, with batch comparison, budget preflight, transparent background-job progress, md / mm / html exports, and Web UI tool-result cards plus a reading panel.\",\"npm\":\"dsh-deepread\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-mnemon\",\"name\":\"Mnemon 记忆系统\",\"nameEn\":\"Mnemon Memory\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-mnemon\",\"description\":\"与 Mnemon CLI 集成的跨 Agent、本地优先持久记忆插件:用户画像 / 工作记忆 / 项目档案与长期 Memory Spaces,支持导入导出。\",\"descriptionEn\":\"A cross-agent, local-first persistent memory plugin integrating the Mnemon CLI: profiles, working memory, project documents and long-term Memory Spaces, with import and export.\",\"npm\":\"dsh-mnemon\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-plugin-hub\",\"name\":\"插件中心(dsh-plugin-hub)\",\"nameEn\":\"Plugin Hub\",\"author\":\"Noob-stupid\",\"repo\":\"https://github.com/Noob-stupid/dsh-plugin-hub\",\"description\":\"插件管理面板:已安装插件一键启用/停用,内置 GitHub dsh-plugin 插件市场(官方/聚合识别、子包浏览、一键安装与本地 AI 兜底修复、删除卸载)。\",\"descriptionEn\":\"Plugin management panel: one-click enable/disable, a GitHub dsh-plugin marketplace with official/aggregate detection, subpackage browsing, one-click installs with local-AI fallback repair, and uninstall.\",\"category\":\"tools\"},\n {\"id\":\"dsh-genui\",\"name\":\"GenUI 生成式 UI\",\"nameEn\":\"GenUI\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-genui\",\"description\":\"给模型输出配交互式 UI:助手回复内联渲染 dsh-ui fence(布局、图表、表单、Mermaid、3D),支持流式渲染与面板停靠,组件交互可回传模型。\",\"descriptionEn\":\"Interactive UI inside assistant replies via the dsh-ui fence: layouts, charts, forms, Mermaid and 3D with streaming rendering, panel docking and actions that loop back to the model.\",\"category\":\"ui\"},\n {\"id\":\"dsh-annotation\",\"name\":\"选中批注\",\"nameEn\":\"Selection Annotation\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-annotation\",\"description\":\"选中助手文字即可批注,回车随消息发送;自己的气泡只显示问题与「批注 ×N」标签,模型按 Annotation N 逐条对照回复(悬浮芯片)。\",\"descriptionEn\":\"Select text in an assistant reply to annotate it; annotations are sent with your next message, hidden from your own bubble behind an Annotations xN chip, and the model replies per Annotation N with hoverable chips.\",\"category\":\"ui\"},\n {\"id\":\"deepseek-harness-auth\",\"name\":\"DeepSeek Harness Auth\",\"nameEn\":\"DeepSeek Harness Auth\",\"author\":\"taichuy\",\"repo\":\"https://github.com/taichuy/deepseek-harness-auth\",\"description\":\"为 DSH Web 公网部署提供登录认证前置代理,支持账号密码、验证码、失败锁定和 IP/CIDR 白名单。\",\"descriptionEn\":\"An authentication proxy for public DSH Web deployments with password login, captcha, failed-attempt locking, and IP/CIDR allowlists.\",\"npm\":\"deepseek-harness-auth\",\"category\":\"security\"},\n {\"id\":\"dsh-cloud-sync\",\"name\":\"云同步服务\",\"nameEn\":\"Cloud Sync\",\"author\":\"dickpy\",\"repo\":\"https://github.com/dickpy/dsh-cloud-sync\",\"description\":\"支持 WebDAV、S3、阿里云 OSS、腾讯云 COS 与 MinIO 的 DSH 云同步插件,可同步 profile、插件配置及本地插件源码归档。\",\"descriptionEn\":\"DSH cloud sync for WebDAV, S3, Alibaba Cloud OSS, Tencent Cloud COS and MinIO, syncing profiles, plugin settings and local plugin source archives.\",\"npm\":\"@dickpy/dsh-cloud-sync\",\"category\":\"integration\"},\n {\"id\":\"dsh-auto-memory\",\"name\":\"自动记忆\",\"nameEn\":\"Auto Memory\",\"author\":\"Aik358\",\"repo\":\"https://github.com/Aik358/dsh-auto-memory\",\"description\":\"三层自动记忆插件:用户级/项目笔记/每日日志自动注入与检索、每轮自动沉淀、AI 时段问候、智能检索、日历与工作区思维导图,支持继承 WorkBuddy/CodeBuddy/Claude Code/Codex 等其他 AI 工具的记忆。\",\"descriptionEn\":\"Three-layer auto memory for DSH: user-level/project-notes/daily-logs with automatic injection and retrieval, per-turn auto-consolidation, AI greetings, smart search, calendar, workspace mind map, and inheritance from WorkBuddy/CodeBuddy/Claude Code/Codex.\",\"npm\":\"@a9i5k4/dsh-auto-memory\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-memoir\",\"name\":\"项目记忆 Memoir\",\"nameEn\":\"Project Memory Memoir\",\"author\":\"Qinling-Melon-Farmers\",\"repo\":\"https://github.com/Qinling-Melon-Farmers/dsh-memoir\",\"description\":\"项目持久化记忆与会话经验沉淀:memoir_record / memoir_read 工具(BM25 相关度排序检索)、每轮工作自动蒸馏、记忆诊断面板与跨项目全局检索,纯本地零外部依赖。\",\"descriptionEn\":\"Project persistent memory and session-lessons distillation: memoir_record / memoir_read tools with BM25-ranked retrieval, per-turn auto-distill, a memory diagnostics panel and cross-project search - fully local, no external dependency.\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-worktime-board\",\"name\":\"牛马修仙看板\",\"nameEn\":\"Worktime Cultivation Board\",\"author\":\"spacexun2\",\"repo\":\"https://github.com/spacexun2/dsh-worktime-board\",\"description\":\"DeepSeek Harness 工时统计 × 修仙养成:日/周/月/学年四档汇总 agent 活跃时长、token、输入与工具调用,十二重境界(炼气→宇宙洪荒)量化进度,纯本地存储。\",\"descriptionEn\":\"Worktime statistics meets cultivation: daily / weekly / monthly / yearly agent activity, token, input and tool-call summaries with a twelve-realm progression (Qi Refining to Cosmic Chaos), fully local.\",\"npm\":\"dsh-worktime-board\",\"category\":\"utility\"},\n {\"id\":\"dsh-skill-explorer\",\"name\":\"技能中心(Skill Explorer)\",\"nameEn\":\"Skill Explorer\",\"author\":\"wingsky-1\",\"repo\":\"https://github.com/wingsky-1/dsh-skill-explorer\",\"description\":\"DSH 技能中心:按来源分级浏览已加载 skill(系统内置 / 项目 / 用户 / 自定义 / 运行时),支持启用/禁用、创建与删除(移入 .trash)。\",\"descriptionEn\":\"DSH skill center: browse loaded skills grouped by source (bundled / project / user / custom / runtime), with enable/disable, create and delete (move to .trash).\",\"npm\":\"@linxin666/dsh-client-ui-skill-explorer\",\"category\":\"tools\"},\n {\"id\":\"dsh-dream-skin\",\"name\":\"dsh-dream-skin\",\"nameEn\":\"dsh-dream-skin\",\"author\":\"RevolutionLA\",\"repo\":\"https://github.com/RevolutionLA/dsh-dream-skin\",\"description\":\"DSH Web 一键换肤插件:8 套原创主题、背景壁纸(透明度/模糊/渐变/URL)、每用户强调色、主题包导入导出与分享链接、收藏与随机,纯原生 token 系统。\",\"descriptionEn\":\"One-command skinning for DSH Web: 8 original themes, wallpaper (opacity/blur/gradient/URL), per-user accent, shareable theme packs with favorites and surprise-me. Purely native token system.\",\"category\":\"ui\"},\n]\n","/**\n * Runtime guard for the generated community index entries. The index is\n * build-time generated data, but the card renders whatever the module\n * carries; a hand-written narrowing keeps one malformed entry from breaking\n * the whole list at render time.\n */\n\nimport { COMMUNITY_CATEGORIES, type CommunityPluginCategory, type CommunityPluginEntry } from './generated/community.ts'\n\n/** Category ids the card knows how to label; others are treated as uncategorized. */\nconst KNOWN_CATEGORIES: readonly CommunityPluginCategory[] = COMMUNITY_CATEGORIES\n\n/**\n * The install command is pasted into a shell, so repo/npm must be free of\n * shell metacharacters: repo is a plain https URL of path-safe characters,\n * npm a standard (optionally scoped) package name.\n */\nconst REPO_SAFE_RE = /^https:\\/\\/[A-Za-z0-9._~\\/-]+$/\nconst NPM_SAFE_RE = /^(@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$/\n\n/** True when the value is a well-formed community plugin entry. */\nexport function isCommunityPluginEntry(value: unknown): value is CommunityPluginEntry {\n if (typeof value !== 'object' || value === null) return false\n const entry = value as Record<string, unknown>\n if (typeof entry.id !== 'string' || entry.id === '') return false\n if (typeof entry.name !== 'string' || typeof entry.nameEn !== 'string') return false\n if (typeof entry.author !== 'string' || entry.author === '') return false\n if (typeof entry.repo !== 'string' || !REPO_SAFE_RE.test(entry.repo)) return false\n if (entry.description !== undefined && typeof entry.description !== 'string') return false\n if (entry.descriptionEn !== undefined && typeof entry.descriptionEn !== 'string') return false\n if (entry.npm !== undefined && (typeof entry.npm !== 'string' || !NPM_SAFE_RE.test(entry.npm))) return false\n if (entry.category !== undefined && (typeof entry.category !== 'string' || !KNOWN_CATEGORIES.includes(entry.category as CommunityPluginCategory))) return false\n return true\n}\n","/**\n * The community plugin index card: a first-level settings section that is\n * always open. Its own enable switch (backed by the community-plugins\n * settings namespace) gates the list, which is presented marketplace-style:\n * a search box, category filter pills with counts, and a two-column card grid\n * whose entries link to contributors' own repositories — this package only\n * indexes them, it never vendors their code.\n */\n\nimport { useMemo, useState, type ReactNode } from 'react'\nimport type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\n// Type-only: pulls the settings-surface SlotMap merge (the 'settings.section' entry).\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'\nimport { PluginSettingsCard, BooleanField } from './PluginSettingsCard.tsx'\nimport { CardForm, booleanField, type CardActions, type CardShell, type FieldState as CardFieldState } from './settings-form.ts'\nimport type { CommunityPluginKey } from './locales.ts'\nimport { COMMUNITY_PLUGINS, type CommunityPluginCategory, type CommunityPluginEntry } from './generated/community.ts'\nimport { isCommunityPluginEntry } from './community-guard.ts'\nimport css from './community.module.css'\n\n/** The settings fields this card edits (the namespace's full schema). */\nexport interface CommunityPluginsSettings {\n /** Master switch for the index card. */\n enabled?: boolean\n}\n\n/** What the community plugin card renders. */\nexport interface CommunityPluginsCardState extends CardShell {\n /** Master switch. */\n enabled: CardFieldState\n}\n\n/** The registration-side face the card's slot entry injects. */\nexport interface CommunityPluginsCardFace extends CardActions {\n hooks: {\n /** Card snapshot bound by the renderer as useCommunityPluginsCard. */\n communityPluginsCard: SnapshotStore<CommunityPluginsCardState>\n }\n}\n\n/** Bridges the community-plugins scope onto the card's staged form. */\nexport class CommunityPluginsCardController {\n private readonly form: CardForm<CommunityPluginsSettings>\n private readonly store: SnapshotStore<CommunityPluginsCardState>\n\n /** @param scope - the bound settings scope for the community-plugins namespace. */\n constructor(scope: SettingsScope<CommunityPluginsSettings>) {\n this.form = new CardForm(scope, [\n booleanField('enabled'),\n ])\n this.store = this.form.bind(() => this.projection())\n }\n\n private projection(): CommunityPluginsCardState {\n return {\n ...this.form.shell(),\n enabled: this.form.field('enabled'),\n }\n }\n\n /**\n * Build the face the card's slot registration injects.\n * @returns the card's snapshot and its form actions.\n */\n inject(): CommunityPluginsCardFace {\n return { hooks: { communityPluginsCard: this.store }, ...this.form.actions() }\n }\n\n /**\n * Release the card's scope subscription and bound stores; the slot\n * disposer calls this on teardown.\n */\n dispose(): void {\n this.form.dispose()\n }\n}\n\n/** The one-line install command for an entry: npm package when published, else the contributor repository URL. */\nfunction installCommand(entry: CommunityPluginEntry): string {\n return `dsh plugin --profile web add ${entry.npm ?? entry.repo}`\n}\n\n/**\n * Localized entry copy read through the card's `t`. Falls back to the raw\n * entry field when the key is missing — the dictionary only carries the\n * generated registry, so injected test entries land on the fallback.\n */\nfunction entryCopy(t: (key: string) => string, key: string, fallback: string): string {\n const value = t(key)\n return value === key ? fallback : value\n}\n\n/** Maps a category id onto its locale dictionary key (kept in the generated union). */\nconst CATEGORY_KEY: Record<CommunityPluginCategory, `category.${CommunityPluginCategory}`> = {\n ui: 'category.ui',\n agent: 'category.agent',\n tools: 'category.tools',\n knowledge: 'category.knowledge',\n integration: 'category.integration',\n security: 'category.security',\n utility: 'category.utility',\n}\n\n/** Props the renderer binds for the community plugin card. */\nexport type CommunityPluginsCardProps =\n PropsLocale<'community-plugins'>\n & InjectFace<CommunityPluginsCardFace>\n & {\n /** Index entries; defaults to the generated registry (injected for tests). */\n plugins?: readonly CommunityPluginEntry[]\n }\n\n/**\n * Render the community plugin index card.\n * @param props - locale copy, the card snapshot, its form actions, and the\n * (default-generated) entry list.\n * @returns the card.\n */\nexport function CommunityPluginsCard(props: CommunityPluginsCardProps): ReactNode {\n const { t } = props\n const state = props.useCommunityPluginsCard(snapshot => snapshot)\n // Memoized so the categoryCounts/visiblePlugins caches below only\n // recompute when the registry actually changes, not on every keystroke.\n const plugins = useMemo(() => (props.plugins ?? COMMUNITY_PLUGINS).filter(isCommunityPluginEntry), [props.plugins])\n const [query, setQuery] = useState('')\n const [category, setCategory] = useState<CommunityPluginCategory | null>(null)\n const [copiedId, setCopiedId] = useState<string | null>(null)\n\n const copyCommand = (id: string, command: string): void => {\n const mark = (): void => { setCopiedId(id) }\n const clipboard = typeof navigator !== 'undefined' ? navigator.clipboard : undefined\n if (clipboard?.writeText !== undefined) {\n void clipboard.writeText(command).then(mark, mark)\n return\n }\n // Fallback for browsers without the async clipboard API (or tests).\n try {\n const area = document.createElement('textarea')\n area.value = command\n area.setAttribute('readonly', '')\n area.style.position = 'fixed'\n area.style.opacity = '0'\n document.body.append(area)\n area.select()\n document.execCommand('copy')\n area.remove()\n } catch { /* the command stays visible to select by hand */ }\n mark()\n }\n const disabled = !state.writable\n // The draft text drives the list: '' (inherit) and 'true' keep it visible,\n // 'false' hides it until the switch is turned back on.\n const visible = state.enabled.text !== 'false'\n const fieldProps = {\n overriddenLabel: t('settings.overridden'),\n resetLabel: t('settings.reset'),\n invalidLabel: t('settings.invalidNumber'),\n disabled,\n }\n\n // Category pills in descending count (stable tie-break by id).\n const categoryCounts = useMemo(() => {\n const counts = new Map<CommunityPluginCategory, number>()\n for (const plugin of plugins) {\n if (plugin.category) counts.set(plugin.category, (counts.get(plugin.category) ?? 0) + 1)\n }\n return [...counts.entries()].sort(\n (a, b) => b[1] - a[1] || a[0].localeCompare(b[0]),\n )\n }, [plugins])\n\n // Both the active pill and the search text narrow the list (AND).\n const visiblePlugins = useMemo(() => {\n const needle = query.trim().toLowerCase()\n return plugins.filter((plugin) => {\n if (category !== null && plugin.category !== category) return false\n if (!needle) return true\n const categoryLabel = plugin.category ? t(CATEGORY_KEY[plugin.category]) : ''\n const haystack = [plugin.name, plugin.nameEn, plugin.author, plugin.description, plugin.descriptionEn, plugin.npm ?? '', categoryLabel]\n .join(' ')\n .toLowerCase()\n return haystack.includes(needle)\n })\n }, [plugins, query, category, t])\n\n return (\n <PluginSettingsCard\n t={t}\n titleKey=\"settings.title\"\n descriptionKey=\"settings.description\"\n state={state}\n alwaysOpen\n onSave={props.save}\n onDiscard={props.discard}\n >\n <BooleanField\n id=\"settings-community-enabled\"\n label={t('settings.enabled')}\n hint={t('settings.enabledHint')}\n inheritLabel={t('settings.inherit')}\n onLabel={t('settings.on')}\n offLabel={t('settings.off')}\n {...fieldProps}\n {...state.enabled}\n onEdit={(text) => { props.edit('enabled', text) }}\n onReset={() => { props.resetField('enabled') }}\n />\n {visible\n ? (\n <div className={css.market}>\n <div className={css.toolbar}>\n <input\n id=\"settings-community-search\"\n className={css.search}\n type=\"search\"\n placeholder={t('search.placeholder')}\n aria-label={t('search.label')}\n value={query}\n disabled={disabled}\n onChange={(event) => { setQuery(event.target.value) }}\n />\n </div>\n <div className={css.filters} role=\"group\" aria-label={t('filter.all')}>\n <button\n type=\"button\"\n className={category === null ? `${css.pill} ${css.pillActive}` : css.pill}\n aria-pressed={category === null}\n disabled={disabled}\n onClick={() => { setCategory(null) }}\n >\n {t('filter.all')} {plugins.length}\n </button>\n {categoryCounts.map(([id, count]) => (\n <button\n key={id}\n type=\"button\"\n className={category === id ? `${css.pill} ${css.pillActive}` : css.pill}\n aria-pressed={category === id}\n disabled={disabled}\n onClick={() => { setCategory(category === id ? null : id) }}\n >\n {t(CATEGORY_KEY[id])} {count}\n </button>\n ))}\n </div>\n <p className={css.resultCount} role=\"status\">\n {t('result.count', { shown: visiblePlugins.length, total: plugins.length })}\n </p>\n {plugins.length === 0\n ? <p className={css.empty} role=\"status\">{t('empty')}</p>\n : visiblePlugins.length === 0\n ? <p className={css.empty} role=\"status\">{t('noMatch')}</p>\n : (\n <ul className={css.grid}>\n {visiblePlugins.map((plugin) => {\n const command = installCommand(plugin)\n const copied = copiedId === plugin.id\n const name = entryCopy(t, `name.${plugin.id}`, plugin.nameEn || plugin.name)\n const description = entryCopy(t, `desc.${plugin.id}`, plugin.descriptionEn ?? plugin.description ?? '')\n return (\n <li key={plugin.id} className={css.card}>\n <span className={css.cardHead}>\n <span className={css.cardName} title={name}>{name}</span>\n <span\n className={plugin.npm ? `${css.badge} ${css.badgePublished}` : css.badge}\n title={plugin.npm ?? plugin.repo}\n >\n {plugin.npm ? t('badge.published') : t('badge.source')}\n </span>\n </span>\n <span className={css.cardMeta}>\n {plugin.category ? <span className={css.cardCategory}>{t(CATEGORY_KEY[plugin.category])}</span> : null}\n {plugin.category ? <span className={css.cardDot} aria-hidden=\"true\">·</span> : null}\n <span className={css.cardAuthor} title={plugin.author}>{plugin.author}</span>\n </span>\n {description ? <p className={css.cardDescription}>{description}</p> : null}\n <span className={css.cardFooter}>\n <span className={css.cardTop}>\n <a className={css.cardLink} href={plugin.repo} target=\"_blank\" rel=\"noreferrer\">{t('repository')}</a>\n <button\n type=\"button\"\n className={copied ? `${css.installButton} ${css.installButtonCopied}` : css.installButton}\n title={command}\n onClick={() => { copyCommand(plugin.id, command) }}\n >\n {copied ? t('copied') : t('install')}\n </button>\n </span>\n <code className={css.cardCommand} title={command}>{command}</code>\n </span>\n </li>\n )\n })}\n </ul>\n )}\n </div>\n )\n : <p className={css.off} role=\"status\">{t('off')}</p>}\n <p className={css.installNote} role=\"note\">{t('installHint')}</p>\n <p className={css.notice} role=\"note\">{t('notice')}</p>\n </PluginSettingsCard>\n )\n}\n\n/** Props the settings section binds for the community plugin page. */\nexport type CommunityPluginsSectionProps =\n PropsRuntime<'settings.section'>\n & PropsLocale<'community-plugins'>\n & InjectFace<CommunityPluginsCardFace>\n & {\n /** Index entries; defaults to the generated registry (injected for tests). */\n plugins?: readonly CommunityPluginEntry[]\n }\n\n/** Render the community plugin index as a first-level settings page. */\nexport function CommunityPluginsSection(props: CommunityPluginsSectionProps): ReactNode {\n const { t, useCommunityPluginsCard, save, discard, edit, resetField, plugins } = props\n return (\n <ul className={css.sectionList}>\n <CommunityPluginsCard t={t} useCommunityPluginsCard={useCommunityPluginsCard} save={save} discard={discard} edit={edit} resetField={resetField} plugins={plugins} />\n </ul>\n )\n}\n","/**\n * The community-plugins locale dictionaries for the index card. Static copy\n * for the card chrome plus one localized name/description pair per index\n * entry (`name.<id>` / `desc.<id>`), so the card localizes data-driven text\n * through the same `t` the rest of the settings UI uses — the document\n * `<html lang>` attribute is not a reliable locale signal in the GUI.\n */\n\nimport { COMMUNITY_PLUGINS } from './generated/community.ts'\n\n/** Simplified Chinese copy for the card chrome (the key-set source of truth). */\nconst STATIC_ZH = {\n 'settings.title': '社区插件',\n 'settings.description': '社区贡献者开发与维护的插件,链接指向作者自己的仓库。',\n 'settings.enabled': '启用社区插件索引',\n 'settings.enabledHint': '此开关只控制索引列表的显示与否,关闭后在这里重新打开。',\n 'settings.inherit': '继承',\n 'settings.on': '开',\n 'settings.off': '关',\n 'settings.overridden': '已覆盖',\n 'settings.reset': '恢复默认',\n 'settings.notExposed': '当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 ~/.dsh/settings.yaml 直接配置,或为 dsh-host-apiproxy 的 WEB_SETTINGS_NAMESPACES 白名单补充本命名空间后重启。',\n 'settings.readOnly': '当前部署的设置只读。',\n 'settings.expand': '展开设置',\n 'settings.collapse': '收起设置',\n 'settings.save': '保存',\n 'settings.saving': '保存中…',\n 'settings.discard': '放弃',\n 'settings.unsaved': '未保存',\n 'settings.saveFailed': '部署未接受这些值,已保留供你修改。',\n 'settings.invalidNumber': '请输入数字,留空则使用默认值。',\n 'author': '作者',\n 'repository': '仓库',\n 'copy': '复制',\n 'copied': '已复制',\n 'install': '复制安装命令',\n 'noMatch': '没有匹配的社区插件。',\n 'search.placeholder': '搜索名称、作者或简介',\n 'search.label': '搜索社区插件',\n 'filter.all': '全部',\n 'result.count': '显示 {shown} / {total} 个',\n 'badge.published': 'npm 已发布',\n 'badge.source': '仓库安装',\n 'category.ui': '界面与体验',\n 'category.agent': 'Agent 与自动化',\n 'category.tools': '开发者工具',\n 'category.knowledge': '记忆与知识',\n 'category.integration': '集成与分享',\n 'category.security': '安全与运维',\n 'category.utility': '实用工具',\n 'installHint': '索引只登记、不安装代码。要运行某个插件,复制它的安装命令到终端执行;安装后,插件自带的开关与配置(若有)会出现在插件配置里。',\n 'empty': '暂无社区插件登记。',\n 'off': '社区插件索引已关闭。',\n 'notice': '条目由贡献者自行登记,与 dsh-web-ui 的发布内容无关;使用前请自行评估。',\n} satisfies Record<string, string>\n\n/** English copy for the card chrome, checked complete against the zh key set. */\nconst STATIC_EN = {\n 'settings.title': 'Community Plugins',\n 'settings.description': \"Plugins developed and maintained by community contributors, linking to each author's own repository.\",\n 'settings.enabled': 'Enable the community plugin index',\n 'settings.enabledHint': 'This switch only controls whether the index list is shown; turn it back on here.',\n 'settings.inherit': 'Inherit',\n 'settings.on': 'On',\n 'settings.off': 'Off',\n 'settings.overridden': 'Overridden',\n 'settings.reset': 'Reset to default',\n 'settings.notExposed': \"This DSH version does not expose this plugin's settings namespace to the configuration page, so the form is unavailable. Edit ~/.dsh/settings.yaml directly, or add the namespace to dsh-host-apiproxy's WEB_SETTINGS_NAMESPACES allowlist and restart.\",\n 'settings.readOnly': 'This deployment stores settings read-only.',\n 'settings.expand': 'Show settings',\n 'settings.collapse': 'Hide settings',\n 'settings.save': 'Save',\n 'settings.saving': 'Saving…',\n 'settings.discard': 'Discard',\n 'settings.unsaved': 'Unsaved',\n 'settings.saveFailed': 'The deployment did not accept these values; they were left for you to correct.',\n 'settings.invalidNumber': 'Enter a number, or leave blank to use the default.',\n 'author': 'Author',\n 'repository': 'Repository',\n 'copy': 'Copy',\n 'copied': 'Copied',\n 'install': 'Copy install command',\n 'noMatch': 'No matching community plugin found.',\n 'search.placeholder': 'Search name, author or description',\n 'search.label': 'Search community plugins',\n 'filter.all': 'All',\n 'result.count': 'Showing {shown} / {total}',\n 'badge.published': 'Published on npm',\n 'badge.source': 'Install from repo',\n 'category.ui': 'UI & Experience',\n 'category.agent': 'Agents & Automation',\n 'category.tools': 'Developer Tools',\n 'category.knowledge': 'Memory & Knowledge',\n 'category.integration': 'Integration & Sharing',\n 'category.security': 'Security & Ops',\n 'category.utility': 'Utilities',\n 'installHint': 'The index only registers entries, it never installs code. To run a plugin, copy its install command into a terminal; once installed, the plugin provides its own switch and config (if any) in the plugin configuration section.',\n 'empty': 'No community plugins registered yet.',\n 'off': 'The community plugin index is turned off.',\n 'notice': 'Entries are contributed by their authors and are separate from dsh-web-ui releases; evaluate before use.',\n} satisfies Record<keyof typeof STATIC_ZH, string>\n\n/** Build the runtime dictionary: static copy plus one localized name/description pair per index entry. */\nfunction build(base: Record<string, string>, lang: 'zh' | 'en'): Record<string, string> {\n const dict: Record<string, string> = { ...base }\n for (const entry of COMMUNITY_PLUGINS) {\n dict[`name.${entry.id}`] = lang === 'zh' ? entry.name : entry.nameEn\n dict[`desc.${entry.id}`] = lang === 'zh'\n ? (entry.description ?? entry.descriptionEn ?? '')\n : (entry.descriptionEn ?? entry.description ?? '')\n }\n return dict\n}\n\n/** Simplified Chinese dictionary for the index card (chrome + per-entry copy). */\nexport const zh = build(STATIC_ZH, 'zh')\n\n/** English dictionary, built from the same key set. */\nexport const en = build(STATIC_EN, 'en')\n\n/** Key union for this namespace (chrome keys plus per-entry name/description keys). */\nexport type CommunityPluginKey = keyof typeof zh\n","/**\n * Community plugin index, browser half. Registers the community-plugins\n * dictionaries and one section into the settings panel's first-level nav\n * (settings.section; the promoted family sections sit beside the built-in\n * general / models / plugins / agent-presets entries). The card carries its\n * own enable switch (backed by the community-plugins settings namespace) and\n * lists community plugins with links to each contributor's own repository.\n * @module @linxin666/dsh-client-ui-community-plugins/client\n */\n\nimport type { ClientContext, SettingsScope, SettingsScopeSpec } from '@deepseek-ai/dsh-client-runtime/client'\n// Type-only: pulls the locale plugin's Context merge (ctx.locale).\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\n// Type-only: pulls the settings-surface Context merge (ctx.settingsScope).\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n// Type-only: pulls the slot-surface types (the settings.section seat).\nimport type {} from '@deepseek-ai/dsh-client-ui-slots'\nimport { CommunityPluginsCardController, CommunityPluginsSection, type CommunityPluginsSettings } from './CommunityPluginsCard.tsx'\nimport { en, zh, type CommunityPluginKey } from './locales.ts'\n\nexport type { CommunityPluginsCardProps, CommunityPluginsSectionProps } from './CommunityPluginsCard.tsx'\n\n/** Settings namespace the card's enable switch edits (the Host plugin registers it). */\nconst COMMUNITY_PLUGINS_NS = 'community-plugins'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** Community plugin index card copy. */\n 'community-plugins': CommunityPluginKey\n }\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n /**\n * Optional rc.6 compatibility binder provided by dsh-web-ui-settings;\n * absent when that group plugin is not installed, so callers fall back to\n * the official settings scope.\n */\n webUiSettings?: { bind<S>(spec: SettingsScopeSpec<S>): SettingsScope<S> }\n }\n}\n\n/** Required services. */\nexport const inject = ['slots', 'locale', 'connection', 'settingsScope', 'remote']\n\n/**\n * Register the community plugin index as a first-level settings section, with\n * its own enable switch over the community-plugins settings namespace.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register('community-plugins', { zh, en }), 'community-plugins: dictionaries')\n\n const binder = ctx.get('webUiSettings') ?? ctx.settingsScope\n const settingsScope = binder.bind<CommunityPluginsSettings>({ namespace: COMMUNITY_PLUGINS_NS })\n const controller = new CommunityPluginsCardController(settingsScope)\n\n ctx.slots.inject('settings.section', () => {\n const unregister = ctx.slots.register({\n name: 'settings.section',\n id: 'community-plugins',\n order: 140,\n label: () => ctx.locale.bind('community-plugins')('settings.title'),\n locale: 'community-plugins',\n inject: () => controller.inject(),\n }, CommunityPluginsSection)\n return () => {\n controller.dispose()\n unregister()\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEA,SAAgB,mBAAiD,OAAsC;GACrG,MAAM,CAAC,MAAM,YAAA,GAAA,MAAA,SAAA,CAAoB,MAAM,eAAe,IAAI;GAC1D,MAAM,EAAE,OAAO,eAAe;GAC9B,IAAI,CAAC,MAAM,WAAW,OAAO;GAC7B,MAAM,QAAQ,MAAM,EAAE,MAAM,QAAQ;GACpC,MAAM,cAAc,MAAM,EAAE,MAAM,cAAc;GAChD,MAAM,UAAU,CAAC,MAAM,SAAS,MAAM,WAAW,MAAM;GACvD,MAAM,WAAW,eAAe,QAAQ;GACxC,MAAM,YAAY,WAAW,GAAGA,iCAAI,SAAS,GAAGA,iCAAI,SAASA,iCAAI;GAGjE,MAAM,SAAS,eAAe,OAE1B,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAWA,iCAAI;cAApB,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;KAAM,WAAWA,iCAAI;eAArB,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,iCAAI;MAAa;gBAAQ;KAAY,CAAA,GACtD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,iCAAI;MAAa,OAAO;gBAAc;KAAkB,CAAA,CACrE;QACL,MAAM,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KAAM,WAAWA,iCAAI;KAAS,OAAO,MAAM,EAAE,kBAAkB;eAAI,MAAM,EAAE,kBAAkB;IAAQ,CAAA,IAAI,IACrH;QAGL,iBAAA,GAAA,kBAAA,KAAA,CAAC,UAAD;IACE,MAAK;IACL,WAAWA,iCAAI;IACf,iBAAe;IACf,cAAY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packages/dsh-community-plugins/src/client/PluginSettingsCard.tsx","../../../packages/dsh-community-plugins/src/client/settings-form.ts","../../../packages/dsh-community-plugins/src/client/generated/community.ts","../../../packages/dsh-community-plugins/src/client/community-guard.ts","../../../packages/dsh-community-plugins/src/client/CommunityPluginsCard.tsx","../../../packages/dsh-community-plugins/src/client/locales.ts","../../../packages/dsh-community-plugins/src/client/index.ts"],"sourcesContent":["// Generated by scripts/sync-shared.mjs from shared/client/settings/PluginSettingsCard.tsx. Do not edit this copy; edit the shared source and run \"node scripts/sync-shared.mjs\".\n/**\n * Family-shared chrome for plugin settings cards: a disclosure header naming\n * the plugin and what its settings govern, the controls inside, and the save\n * that writes them. Renders nothing while the namespace is unavailable — a\n * deployment that does not compose the owning plugin should show no trace of\n * it. Inlined into each consumer's client bundle; mirrors the official\n * ui-plugin-config PluginCard in a self-contained slice.\n */\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from 'react'\nimport type { CardShell } from './settings-form.ts'\nimport css from './settings-card.module.css'\n\n/** Copy keys the card chrome itself reads; every consumer locale carries this shared vocabulary. */\nexport const CARD_COPY_KEYS = [\n 'settings.collapse',\n 'settings.expand',\n 'settings.notExposed',\n 'settings.unsaved',\n 'settings.readOnly',\n 'settings.saveFailed',\n 'settings.discard',\n 'settings.save',\n 'settings.saving',\n] as const\n\n/** Copy key the card chrome itself reads. */\nexport type CardCopyKey = (typeof CARD_COPY_KEYS)[number]\n\n/** Key domain for the plugin's own copy (inferred per consumer). */\nexport type SettingsCardKey<TKey extends string = string> = TKey | CardCopyKey\n\n/** Card chrome shared by every plugin settings card. */\nexport interface PluginSettingsCardProps<TKey extends string = string> {\n /** Locale reader for this card's copy. */\n t: (key: SettingsCardKey<TKey>, params?: Record<string, string | number>) => string\n /** Locale key of the plugin's name. */\n titleKey: TKey\n /** Locale key of the line describing what this plugin's settings govern. */\n descriptionKey: TKey\n /** The card's form state: availability, writability, and what a save would do. */\n state: CardShell\n /** Write every staged edit. */\n onSave: () => void\n /** Drop every staged edit. */\n onDiscard: () => void\n /**\n * Render the controls expanded on arrival (still collapsible). Defaults to\n * true: promoted first-level sections show their settings immediately.\n */\n defaultOpen?: boolean\n /**\n * Render without the collapse affordance: a static header and an always\n * visible body. Used by first-level settings sections whose nav entry\n * already provides the selection.\n */\n alwaysOpen?: boolean\n /**\n * Hide the save/discard footer: cards whose body applies its own changes\n * immediately (an embedded external settings section) have no staged\n * edits, so the footer would sit there permanently disabled.\n */\n hideFooter?: boolean\n /** The plugin's controls. */\n children: ReactNode\n}\n\n/**\n * Render one plugin settings card.\n * @param props - the plugin's copy keys, its form state, and its controls.\n * @returns the card, or nothing while the namespace is still loading.\n */\nexport function PluginSettingsCard<TKey extends string = string>(props: PluginSettingsCardProps<TKey>) {\n const [open, setOpen] = useState(props.defaultOpen ?? true)\n const { state, alwaysOpen } = props\n if (!state.available) return null\n const title = props.t(props.titleKey)\n const description = props.t(props.descriptionKey)\n const blocked = !state.dirty || state.invalid || state.saving\n const expanded = alwaysOpen === true || open\n const cardClass = expanded ? `${css.cardOpen} ${css.card}` : css.card\n // With alwaysOpen the nav entry already provides the selection, so the\n // header is a static title row instead of a disclosure button.\n const header = alwaysOpen === true\n ? (\n <div className={css.headerStatic}>\n <span className={css.headText}>\n <span className={css.name} title={title}>{title}</span>\n <span className={css.description} title={description}>{description}</span>\n </span>\n {state.dirty ? <span className={css.pending} title={props.t('settings.unsaved')}>{props.t('settings.unsaved')}</span> : null}\n </div>\n )\n : (\n <button\n type=\"button\"\n className={css.header}\n aria-expanded={open}\n aria-label={`${props.t(open ? 'settings.collapse' : 'settings.expand')}: ${title}`}\n onClick={() => { setOpen(!open) }}\n >\n <span className={css.headText}>\n <span className={css.name} title={title}>{title}</span>\n <span className={css.description} title={description}>{description}</span>\n </span>\n {state.dirty ? <span className={css.pending} title={props.t('settings.unsaved')}>{props.t('settings.unsaved')}</span> : null}\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={open ? `${css.chevron} ${css.chevronOpen}` : css.chevron}\n >\n <path\n d=\"M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n )\n // The namespace exists but the Host does not serve it to this client (the\n // official settings allowlist omits third-party namespaces): show a card\n // that explains the gap instead of vanishing, so a missing card never\n // reads as a missing plugin.\n if (!state.exposed) {\n return (\n <li className={cardClass}>\n {header}\n {expanded\n ? (\n <div className={css.body}>\n <p className={css.notExposed} role=\"status\">{props.t('settings.notExposed')}</p>\n </div>\n )\n : null}\n </li>\n )\n }\n return (\n <li className={cardClass}>\n {header}\n {expanded\n ? (\n <div className={css.body}>\n {!state.writable ? <p className={css.readOnly} role=\"status\">{props.t('settings.readOnly')}</p> : null}\n {props.children}\n {props.hideFooter === true\n ? null\n : (\n <div className={css.footer}>\n {state.failed\n ? (\n <p className={css.failed} role=\"status\">\n {props.t('settings.saveFailed')}{state.failedReason ? ' - ' + state.failedReason : ''}\n </p>\n )\n : null}\n <button\n type=\"button\"\n className={css.discard}\n disabled={!state.dirty || state.saving}\n onClick={props.onDiscard}\n >\n {props.t('settings.discard')}\n </button>\n <button\n type=\"button\"\n className={css.save}\n disabled={blocked}\n onClick={props.onSave}\n >\n {props.t(!state.saving ? 'settings.save' : 'settings.saving')}\n </button>\n </div>\n )}\n </div>\n )\n : null}\n </li>\n )\n}\n\n/** Props every field control needs regardless of its value type. */\nexport interface FieldProps {\n /** Stable id associating the label with its control. */\n id: string\n /** Visible label. */\n label: string\n /** One-line explanation rendered under the control. */\n hint: string\n /** Draft text this control renders. */\n text: string\n /** True when saving would leave a user-layer entry for this field. */\n overridden: boolean\n /** True when the draft is not a value this field accepts. */\n invalid: boolean\n /** Copy for the overridden badge. */\n overriddenLabel: string\n /** Copy for the reset control. */\n resetLabel: string\n /** Copy shown in place of the hint while the draft is invalid. */\n invalidLabel: string\n /** Disables every control (read-only document, or an unavailable namespace). */\n disabled: boolean\n /** Stage draft text. */\n onEdit: (text: string) => void\n /** Stage a clear so the field re-inherits the composition layer. */\n onReset: () => void\n}\n\n/** A staged value field. `numeric` only hints the keypad: which drafts a field accepts is decided by its spec. */\nexport function ValueField(props: FieldProps & {\n /** Hints a numeric keypad without narrowing what the control accepts. */\n numeric?: boolean\n /** Placeholder shown while the draft is empty. */\n placeholder?: string\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.overridden\n ? (\n <span className={css.badges}>\n <span className={css.badge}>{props.overriddenLabel}</span>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <input\n id={props.id}\n className={props.invalid ? css.inputInvalid : css.input}\n type=\"text\"\n {...props.numeric === true ? { inputMode: 'numeric' as const } : {}}\n {...props.invalid ? { 'aria-invalid': true } : {}}\n value={props.text}\n placeholder={props.placeholder ?? ''}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n />\n <p className={props.invalid ? css.invalid : css.hint}>\n {props.invalid ? props.invalidLabel : props.hint}\n </p>\n </div>\n )\n}\n\nconst NON_SKIN_BODY_MARKERS = new Set(['dshSkinCenter', 'dshSidebarCollapsed'])\n// 检测使用使用皮肤,用了皮肤退回原生select样式,防止样式冲突。默认外观下使用优化后的select样式。\nfunction isSkinActive(): boolean {\n const datasetList = Object.keys(document.body.dataset)\n const isActive = datasetList.some(key => key.startsWith('dsh') && !NON_SKIN_BODY_MARKERS.has(key))\n return isActive\n}\n\ninterface SelectOption {\n value: string\n label: string\n}\n\nconst SELECT_CLOSE_MS = 100\n\n/**\n * The shared dual-mode select control. While an appearance skin is active it\n * renders the legacy native `<select>` untouched, so element-level skin\n * selectors keep working; under the default appearance it renders a\n * self-drawn `role=\"listbox\"` popup whose open/close is transition-animated.\n * Staged cards reach it through BooleanField/ChoiceField; immediate-apply\n * editors (the side-card prefs) bind it directly through onEdit.\n * 双模式下拉框:皮肤激活时用原生 select,默认外观用自绘动画弹层。\n */\nexport function SelectField(props: {\n id: string\n options: ReadonlyArray<SelectOption>\n value: string\n disabled: boolean\n invalid: boolean\n onEdit: (text: string) => void\n}) {\n const { id, options, value } = props\n const [open, setOpen] = useState(false)\n const [closing, setClosing] = useState(false)\n const [phase, setPhase] = useState<'initial' | 'open'>('initial')\n const [activeIndex, setActiveIndex] = useState(0)\n const closeTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)\n const wrapRef = useRef<HTMLDivElement | null>(null)\n const popupRef = useRef<HTMLDivElement | null>(null)\n\n const currentIndex = () => {\n const index = options.findIndex(option => option.value === value)\n return index >= 0 ? index : 0\n }\n\n const close = useCallback(() => {\n if (closeTimer.current !== undefined) clearTimeout(closeTimer.current)\n setClosing(true)\n closeTimer.current = setTimeout(() => {\n setClosing(false)\n setOpen(false)\n }, SELECT_CLOSE_MS)\n }, [])\n\n const openPopup = () => {\n if (closeTimer.current !== undefined) clearTimeout(closeTimer.current)\n setActiveIndex(currentIndex())\n setPhase('initial')\n setClosing(false)\n setOpen(true)\n }\n\n const commit = (index: number) => {\n const option = options[index]\n if (option) props.onEdit(option.value)\n close()\n }\n\n const onTriggerClick = () => {\n if (props.disabled) return\n if (open && !closing) close()\n else openPopup()\n }\n\n const onKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (props.disabled) return\n const count = options.length\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowUp':\n case 'Enter':\n case ' ':\n event.preventDefault()\n if (!open) {\n openPopup()\n } else if (!closing) {\n if (event.key === 'ArrowDown') setActiveIndex(index => (index + 1) % count)\n else if (event.key === 'ArrowUp') setActiveIndex(index => (index - 1 + count) % count)\n else commit(activeIndex)\n }\n break\n case 'Escape':\n if (open) {\n event.preventDefault()\n event.stopPropagation()\n close()\n }\n break\n case 'Tab':\n if (open) close()\n break\n }\n }\n\n useEffect(() => () => {\n if (closeTimer.current !== undefined) clearTimeout(closeTimer.current)\n }, [])\n useLayoutEffect(() => {\n if (open && !closing && phase === 'initial') {\n void popupRef.current?.offsetHeight\n setPhase('open')\n }\n }, [open, closing, phase])\n\n useEffect(() => {\n if (!open) return\n const onPointerDown = (event: PointerEvent) => {\n const target = event.target\n if (target instanceof Node && !wrapRef.current?.contains(target)) close()\n }\n document.addEventListener('pointerdown', onPointerDown)\n return () => document.removeEventListener('pointerdown', onPointerDown)\n }, [open, close])\n\n useEffect(() => {\n if (props.disabled && open) close()\n }, [props.disabled, open, close])\n\n // 使用了皮肤则退回原生select样式防止样式冲突。\n if (isSkinActive()) {\n return (\n <select\n id={id}\n className={css.select}\n value={value}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n >\n {options.map(option => (\n <option key={option.value} value={option.value}>{option.label}</option>\n ))}\n </select>\n )\n }\n\n const label = options.find(option => option.value === value)?.label ?? ''\n const popupClass = closing\n ? `${css.selectPopup} ${css.selectPopupClose}`\n : phase === 'open'\n ? `${css.selectPopup} ${css.selectPopupOpen}`\n : css.selectPopup\n return (\n <div className={css.selectWrap} ref={wrapRef}>\n <button\n type=\"button\"\n id={id}\n className={`${css.select} ${css.selectButton}`}\n disabled={props.disabled}\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n aria-activedescendant={open ? `${id}-o${activeIndex}` : undefined}\n aria-invalid={props.invalid || undefined}\n onClick={onTriggerClick}\n onKeyDown={onKeyDown}\n >\n <span className={css.selectLabel}>{label}</span>\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={open ? `${css.selectChevron} ${css.selectChevronOpen}` : css.selectChevron}\n aria-hidden=\"true\"\n >\n <path\n d=\"M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n {open\n ? (\n <div className={popupClass} role=\"listbox\" ref={popupRef}>\n {options.map((option, index) => (\n <div\n key={option.value}\n id={`${id}-o${index}`}\n role=\"option\"\n aria-selected={option.value === value}\n className={`${css.selectOption}${option.value === value ? ` ${css.selectOptionSelected}` : ''}${index === activeIndex && !closing ? ` ${css.selectOptionActive}` : ''}`}\n onClick={() => { commit(index) }}\n >\n {option.label}\n </div>\n ))}\n </div>\n )\n : null}\n </div>\n )\n}\n\n/** A staged boolean field: 继承 / 开 / 关. */\nexport function BooleanField(props: FieldProps & {\n /** Copy for the inherit option. */\n inheritLabel: string\n /** Copy for the on option. */\n onLabel: string\n /** Copy for the off option. */\n offLabel: string\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.overridden\n ? (\n <span className={css.badges}>\n <span className={css.badge}>{props.overriddenLabel}</span>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <SelectField\n id={props.id}\n options={[\n { value: '', label: props.inheritLabel },\n { value: 'true', label: props.onLabel },\n { value: 'false', label: props.offLabel },\n ]}\n value={props.text}\n disabled={props.disabled}\n invalid={props.invalid}\n onEdit={props.onEdit}\n />\n <p className={css.hint}>{props.hint}</p>\n </div>\n )\n}\n\n/** A staged enumerated field rendered as a select. */\nexport function ChoiceField(props: FieldProps & {\n /** Copy for the inherit option (draft text is the empty string). */\n inheritLabel: string\n /** Choices rendered in order; `value` is the draft/stored text. */\n choices: ReadonlyArray<{ value: string; label: string }>\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.overridden\n ? (\n <span className={css.badges}>\n <span className={css.badge}>{props.overriddenLabel}</span>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <SelectField\n id={props.id}\n options={[{ value: '', label: props.inheritLabel }, ...props.choices]}\n value={props.text}\n disabled={props.disabled}\n invalid={props.invalid}\n onEdit={props.onEdit}\n />\n <p className={props.invalid ? css.invalid : css.hint}>\n {props.invalid ? props.invalidLabel : props.hint}\n </p>\n </div>\n )\n}\n","// Generated by scripts/sync-shared.mjs from shared/client/settings/settings-form.ts. Do not edit this copy; edit the shared source and run \"node scripts/sync-shared.mjs\".\n/**\n * Staged form model behind the plugin settings card. A card stages what the\n * user types and writes it only when they save — the settings write is a\n * durable, revision-fenced document mutation, so staging keeps what is on\n * screen exactly what a save would store. Family-shared slice inlined into\n * each plugin's client bundle; mirrors the official ui-plugin-config\n * card-store pattern.\n */\n\nimport type { SettingsScope, SettingsScopeSnapshot, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'\n\n/** The write one field's staged text performs when the card is saved. */\nexport type FieldWrite =\n | { kind: 'set'; value: unknown }\n | { kind: 'clear' }\n\n/** How one field converts between its stored value and its draft text. */\nexport interface FieldSpec {\n /** Field name inside the namespace section. */\n field: string\n /**\n * Whether the Host treats this field as a secret and redacts its value from\n * the read-back (role('secret') in the section schema). Redacted secrets are\n * never compared against the draft on save; the field lands when the scope\n * reports the write succeeded (its secret-set marker under the bridge), so\n * a successful secret save is not misreported as failed.\n */\n secret?: boolean\n /** Render a stored value as draft text; the empty string when the section carries none. */\n format: (value: unknown) => string\n /**\n * The write this draft text stages, or undefined when the text is not a\n * value this field accepts — which blocks the save rather than discarding it.\n */\n parse: (text: string) => FieldWrite | undefined\n}\n\n/** One field as the card renders it. */\nexport interface FieldState {\n /** Draft text the control renders. */\n text: string\n /** Whether saving would leave a user-layer entry for this field. */\n overridden: boolean\n /** Whether the draft is not a value this field accepts, which blocks saving. */\n invalid: boolean\n}\n\n/** Form state every plugin settings card shares. */\nexport interface CardShell {\n /** False while the namespace is still loading; the card renders nothing. */\n available: boolean\n /**\n * Whether the namespace is actually served to this client. False when the\n * Host deployment does not expose it (e.g. the official apiproxy settings\n * allowlist omits third-party namespaces): the card renders an explanation\n * instead of its form, so a missing namespace never looks like a missing\n * plugin.\n */\n exposed: boolean\n /** Whether the Host document accepts writes. */\n writable: boolean\n /** Whether the form holds edits that a save would write. */\n dirty: boolean\n /** Whether any staged draft is invalid, which blocks the save. */\n invalid: boolean\n /** Whether a save is crossing the wire. */\n saving: boolean\n /** Whether the last save did not land as staged; cleared by the next edit or save. */\n failed: boolean\n /**\n * The rejection code/message the Host returned for the last failed save,\n * surfaced next to the generic failure text. Undefined while no save has\n * failed (or the failure carried no server reason).\n */\n failedReason?: string\n}\n\n/** The write actions the card's slot entry injects. */\nexport interface CardActions {\n /** Stage draft text for one field. */\n edit: (field: string, text: string) => void\n /** Stage a clear, so saving lets the field re-inherit the composition layer. */\n resetField: (field: string) => void\n /** Write every staged edit, then re-seed from what the Host accepted. */\n save: () => void\n /** Drop every staged edit. */\n discard: () => void\n}\n\n/** One field's staged edit. */\ninterface StagedEdit {\n /** Draft text the control renders. */\n text: string\n /** True when this edit clears the field whatever text it shows. */\n clear: boolean\n}\n\n/** One staged edit resolved into the write a save performs. */\ninterface PlannedWrite {\n /** Field this entry writes. */\n field: string\n /** The durable write this entry performs, described for a batched scope. */\n op: BatchedWrite\n /** Perform the write and report whether the Host holds the staged value afterwards. */\n run: (() => Promise<boolean>) | undefined\n}\n\n/** One durable write a batched settings scope performs. */\nexport interface BatchedWrite {\n /** Field this entry writes. */\n field: string\n /** set stores a value; unset drops the leaf. */\n op: 'set' | 'unset'\n /** Value for op set (absent for unset). */\n value?: unknown\n}\n\n/** Per-field outcome of one batched scope write. */\nexport interface BatchedFieldResult {\n /** Field this entry writes. */\n field: string\n /** Whether the Host accepted this field's write (per the read-back view). */\n landed: boolean\n}\n\n/**\n * Result of a batched scope write. The bridge scope posts every planned write\n * in one /mutate so the Host validate hook judges baseURL+model together; a\n * batched refusal fails the whole save rather than per-field.\n */\nexport interface BatchResult {\n /** Whether the whole mutate was accepted. */\n ok: boolean\n /** Per-field success, in the request order (always present when ok). */\n fields: BatchedFieldResult[]\n /** Host rejection code (mutate refused). */\n code?: string\n /** Host rejection message (mutate refused). */\n message?: string\n}\n\n/** The optional batch surface the bridge scope adds over the SettingsScope contract. */\ninterface BatchedSettingsScope {\n /** Write every operation in one scope mutation, reporting per-field success. */\n mutate: (writes: BatchedWrite[]) => Promise<BatchResult>\n}\n\n/** Constraints a numeric field's accepted drafts must satisfy, mirroring the host schema. */\nexport interface NumberConstraints {\n /** The accepted value must be a whole number. */\n integer?: boolean\n /** The accepted value must be at least this. */\n min?: number\n}\n\n/** A whole- or decimal-number field. An empty draft clears the field; any other draft that is not a finite number within the constraints blocks the save. */\nexport function numberField(field: string, constraints: NumberConstraints = {}): FieldSpec {\n const { integer = false, min } = constraints\n return {\n field,\n format: value => typeof value === 'number' ? String(value) : '',\n parse: (text) => {\n const trimmed = text.trim()\n if (trimmed === '') return { kind: 'clear' }\n const parsed = Number(trimmed)\n if (!Number.isFinite(parsed)) return undefined\n if (integer && !Number.isInteger(parsed)) return undefined\n if (min !== undefined && parsed < min) return undefined\n return { kind: 'set', value: parsed }\n },\n }\n}\n\n/** A free-text field. An empty draft clears the field. */\nexport function textField(field: string): FieldSpec {\n return {\n field,\n format: value => typeof value === 'string' ? value : '',\n parse: (text) => {\n const trimmed = text.trim()\n return trimmed === '' ? { kind: 'clear' } : { kind: 'set', value: trimmed }\n },\n }\n}\n\n/**\n * A free-text field the Host treats as a secret and redacts from the read-back\n * (role('secret') in the section schema). The card still edits it like text,\n * but a save never compares the redacted value back and relies on the scope\n * reporting the write landed.\n */\nexport function secretField(field: string): FieldSpec {\n return { ...textField(field), secret: true }\n}\n\n/** A boolean field, edited through true/false draft text. */\nexport function booleanField(field: string): FieldSpec {\n return {\n field,\n format: value => typeof value === 'boolean' ? String(value) : '',\n parse: (text) => {\n const trimmed = text.trim()\n if (trimmed === '') return { kind: 'clear' }\n if (trimmed === 'true') return { kind: 'set', value: true }\n if (trimmed === 'false') return { kind: 'set', value: false }\n return undefined\n },\n }\n}\n\n/** An enumerated string field; only the listed choices are accepted. An empty draft clears the field. */\nexport function choiceField(field: string, choices: readonly string[]): FieldSpec {\n return {\n field,\n format: value => typeof value === 'string' && choices.includes(value) ? value : '',\n parse: (text) => {\n if (text === '') return { kind: 'clear' }\n return choices.includes(text) ? { kind: 'set', value: text } : undefined\n },\n }\n}\n\n/**\n * Stages one card's edits over one settings namespace and writes them on save.\n *\n * The Host is the only authority on whether a value was accepted — its\n * validators own the constraints no schema can express — so the outcome is\n * read back from the section rather than predicted here. A save that did not\n * land keeps its drafts, so the user can correct them instead of retyping.\n */\nexport class CardForm<T> {\n private readonly specs: Map<string, FieldSpec>\n private readonly staged = new Map<string, StagedEdit>()\n private readonly listeners = new Set<() => void>()\n /** The scope subscription installed in the constructor; released by dispose(). */\n private readonly disposeScope: () => void\n private disposed = false\n private saving = false\n private failed = false\n private failedReason: string | undefined\n\n /** @param scope - the bound settings scope for this card's namespace. */\n constructor(\n private readonly scope: SettingsScope<T>,\n specs: FieldSpec[],\n ) {\n this.specs = new Map(specs.map(spec => [spec.field, spec]))\n this.disposeScope = scope.subscribe(() => { this.publish() })\n }\n\n /**\n * Release the scope subscription and every bound store listener. The card\n * must call this on teardown; later calls are no-ops.\n */\n dispose(): void {\n if (this.disposed) return\n this.disposed = true\n this.disposeScope()\n this.listeners.clear()\n }\n\n /** Publish a projection of this form, rebuilt whenever the scope or a draft changes. */\n bind<S>(project: () => S): SnapshotStore<S> {\n const store = createSnapshotStore(project())\n this.listeners.add(() => { store.set(project()) })\n return store\n }\n\n /** Read the card-level state: what the Host serves, and what a save would do. */\n shell(): CardShell {\n const snapshot = this.scope.getSnapshot()\n const plan = this.plan()\n return {\n available: snapshot.status !== 'loading',\n exposed: snapshot.status === 'ready',\n writable: snapshot.writable,\n dirty: plan.length > 0,\n invalid: plan.some(item => item.run === undefined),\n saving: this.saving,\n failed: this.failed,\n ...this.failedReason === undefined ? {} : { failedReason: this.failedReason },\n }\n }\n\n /** Read one field's state from the effective section and its staged draft. */\n field(field: string): FieldState {\n const spec = this.specOf(field)\n const staged = this.staged.get(field)\n if (staged === undefined) {\n return { text: spec.format(this.sectionValue(field)), overridden: this.stored(field), invalid: false }\n }\n const write = staged.clear ? { kind: 'clear' as const } : spec.parse(staged.text)\n return {\n text: staged.text,\n overridden: write?.kind === 'set',\n invalid: write === undefined,\n }\n }\n\n /** The actions the card's slot registration injects. */\n actions(): CardActions {\n return {\n edit: (field, text) => { this.stage(field, { text, clear: false }) },\n resetField: (field) => {\n this.stage(field, { text: this.specOf(field).format(this.baseValue(field)), clear: true })\n },\n save: () => { void this.save() },\n discard: () => {\n if (this.staged.size === 0 && !this.failed) return\n this.staged.clear()\n this.failed = false\n this.failedReason = undefined\n this.publish()\n },\n }\n }\n\n /**\n * Write every staged edit, then re-seed from what the Host accepted.\n *\n * When the scope carries the optional batch surface (the dsh-web-ui\n * bridge scope), every planned write rides one mutation so cross-field\n * validate hooks (baseURL+model) judge the batch as a unit instead of\n * deadlocking on per-field writes. Otherwise the per-field loop runs.\n * A field lands only when the Host reports it held the staged value; a\n * landed field's draft is dropped, a failed one stays staged for the user.\n * @returns settlement after every write and the read-back.\n */\n async save(): Promise<void> {\n const plan = this.plan()\n const valid = plan.filter(item => item.run !== undefined)\n if (plan.length === 0 || this.saving || valid.length !== plan.length) return\n const plannedWrites = valid.map(item => item.op)\n // Snapshot the fields this save writes, so edits staged while it is in\n // flight survive: only the staged keys this save actually wrote are cleared.\n const fields = new Set(plan.map(item => item.field))\n this.saving = true\n this.failed = false\n this.failedReason = undefined\n this.publish()\n const landed = new Set<string>()\n const batch = this.batchedScope()\n if (batch !== undefined) {\n const result = await batch.mutate(plannedWrites)\n if (result.ok) {\n for (const field of result.fields) {\n if (field.landed) landed.add(field.field)\n }\n } else {\n this.failedReason = result.message\n }\n } else {\n for (const item of valid) {\n if (await item.run!()) landed.add(item.field)\n }\n }\n for (const field of fields) {\n if (landed.has(field)) this.staged.delete(field)\n }\n this.saving = false\n this.failed = landed.size !== fields.size\n this.publish()\n }\n\n /** The scope's batch surface when it supports one; undefined conservatively otherwise. */\n private batchedScope(): BatchedSettingsScope | undefined {\n const candidate = this.scope as unknown as BatchedSettingsScope | undefined\n return typeof candidate?.mutate === 'function' ? candidate : undefined\n }\n\n /**\n * Every staged edit a save would write. An entry whose draft is not a value\n * its field accepts carries no write: the form is still dirty, and the save\n * refuses rather than dropping the edit. A staged edit that matches the\n * effective section is not a write at all.\n * @returns the planned writes, in the order the fields were staged.\n */\n private plan(): PlannedWrite[] {\n const plan: PlannedWrite[] = []\n for (const [field, staged] of this.staged) {\n const spec = this.specOf(field)\n if (staged.clear) {\n if (this.stored(field)) plan.push({ field, op: { field, op: 'unset' }, run: () => this.clear(field) })\n continue\n }\n if (staged.text === spec.format(this.sectionValue(field))) continue\n const write = spec.parse(staged.text)\n if (write === undefined) plan.push({ field, op: { field, op: 'unset' }, run: undefined })\n else if (write.kind === 'clear') plan.push({ field, op: { field, op: 'unset' }, run: () => this.clear(field) })\n else plan.push({ field, op: { field, op: 'set', value: write.value }, run: () => this.store(field, write.value) })\n }\n return plan\n }\n\n private async clear(field: string): Promise<boolean> {\n await this.scope.unset(field)\n return !this.stored(field)\n }\n\n private async store(field: string, value: unknown): Promise<boolean> {\n await this.scope.set(field, value)\n // A redacted secret never appears in the user layer read-back; judging it\n // by value would misreport a successful secret save as failed. The bridge\n // reports secret writes through its secret-set markers (batch path); on\n // the per-field path the scope resolved, so the write is landed.\n if (this.specOf(field).secret) return true\n return this.userLayer()?.[field] === value\n }\n\n private stage(field: string, edit: StagedEdit): void {\n this.staged.set(field, edit)\n this.failed = false\n this.failedReason = undefined\n this.publish()\n }\n\n private specOf(field: string): FieldSpec {\n const spec = this.specs.get(field)\n // Every call site names a field this card declared; a missing one is a\n // wiring mistake that must not degrade into a silently inert control.\n if (spec === undefined) throw new Error(`settings card has no field ${field}`)\n return spec\n }\n\n private snapshotOf(): SettingsScopeSnapshot<T> {\n return this.scope.getSnapshot()\n }\n\n private sectionValue(field: string): unknown {\n return (this.snapshotOf().value as Record<string, unknown> | undefined)?.[field]\n }\n\n private baseValue(field: string): unknown {\n return (this.snapshotOf().base as Record<string, unknown> | undefined)?.[field]\n }\n\n private userLayer(): Record<string, unknown> | undefined {\n return this.snapshotOf().user as Record<string, unknown> | undefined\n }\n\n private stored(field: string): boolean {\n const user = this.userLayer()\n return user !== undefined && Object.hasOwn(user, field)\n }\n\n private publish(): void {\n for (const listener of this.listeners) listener()\n }\n}\n","/**\n * AUTO-GENERATED by scripts/community-index — do not edit by hand.\n * Community plugin index for the settings page: every entry links to the\n * contributor's own repository. This repository never vendors the listed\n * plugins — it only points users at them.\n * Regenerate with `node scripts/community-index`.\n */\n\n/** Stable category ids rendered as marketplace-style filter pills (the runtime guard imports this). */\nexport const COMMUNITY_CATEGORIES = ['ui', 'agent', 'tools', 'knowledge', 'integration', 'security', 'utility'] as const\n\n/** One category id. */\nexport type CommunityPluginCategory = typeof COMMUNITY_CATEGORIES[number]\n\n/** One community plugin entry: contributor metadata plus the repository link. */\nexport interface CommunityPluginEntry {\n /** Stable entry id (unique in community.json). */\n id: string\n /** Display name (zh). */\n name: string\n /** Display name (en). */\n nameEn: string\n /** Contributor (GitHub user or organization). */\n author: string\n /** One-line description (zh). */\n description?: string\n /** One-line description (en). */\n descriptionEn?: string\n /** The contributor's own repository URL. */\n repo: string\n /** npm package name, when the plugin is published there. */\n npm?: string\n /** Category id for the marketplace filter pills. */\n category?: CommunityPluginCategory\n}\n\n/** Every community plugin, in community.json order. */\nexport const COMMUNITY_PLUGINS: readonly CommunityPluginEntry[] = [\n {\"id\":\"dsh-data-agent\",\"name\":\"Data Agent\",\"nameEn\":\"Data Agent\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-data-agent\",\"description\":\"为 DSH 定义专用 Data Agent 预设,让 AI 帮你查询、更新、分析数据。\",\"descriptionEn\":\"Defines a dedicated Data Agent preset for DSH so the AI can query, update and analyze data.\",\"category\":\"agent\"},\n {\"id\":\"dsh-tui\",\"name\":\"dsh-TUI\",\"nameEn\":\"dsh-TUI\",\"author\":\"ccch1mneyyy\",\"repo\":\"https://github.com/ccch1mneyyy/dsh-TUI\",\"description\":\"Claude Code 风格全屏交互终端插件:像素鲸鱼顶栏、实时工作状态行、思考流式展开、双击 Esc 回滚、上下文进度条与 TPS 仪表。\",\"descriptionEn\":\"A Claude Code style fullscreen interactive terminal plugin: pixel-whale header, live working-state line, streaming reasoning expansion, double-Esc rollback, context progress bar and TPS gauges.\",\"category\":\"ui\"},\n {\"id\":\"dsh-tianshu-tui\",\"name\":\"天书 TUI\",\"nameEn\":\"Tianshu TUI\",\"author\":\"huiliyi37\",\"repo\":\"https://github.com/huiliyi37/dsh-tianshu-tui\",\"description\":\"基于官方 DeepSeek Harness 的交互式终端 UI 插件,在官方基础上增加 TDD 与证据门等工作流。\",\"descriptionEn\":\"An interactive terminal UI plugin for DeepSeek Harness that adds TDD and evidence-gate workflows on top of the official base.\",\"category\":\"ui\"},\n {\"id\":\"dsh-chat-summary\",\"name\":\"Chat Summary\",\"nameEn\":\"Chat Summary\",\"author\":\"v833\",\"repo\":\"https://github.com/v833/dsh-chat-summary\",\"description\":\"总结当前对话并导出为 Markdown / DOCX / PDF,可选 LLM 智能总结(用户自配 API Key)。\",\"descriptionEn\":\"Summarize the current conversation and export it as Markdown / DOCX / PDF, with optional LLM summarization using your own API key.\",\"npm\":\"@linxin666/dsh-client-ui-chat-summary\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-builtin-toggles\",\"name\":\"内置能力检查器\",\"nameEn\":\"Built-in Capability Inspector\",\"author\":\"Starfie1d1272\",\"repo\":\"https://github.com/Starfie1d1272/dsh-builtin-toggles\",\"description\":\"Evidence-backed 内置 capability Inspector:展示 DSH Web built-in capability 的 provenance、compatibility 与 structural drift;仅对 9 个经过审阅的 UI leaves 提供 fail-closed 开关。\",\"descriptionEn\":\"Evidence-backed built-in capability Inspector: surfaces provenance, compatibility and structural drift of DSH Web built-ins, with fail-closed toggles for only the nine reviewed UI leaves.\",\"npm\":\"dsh-builtin-toggles\",\"category\":\"tools\"},\n {\"id\":\"dsh-pilot\",\"name\":\"Pilot 浏览器驾驶舱\",\"nameEn\":\"Pilot Browser Cockpit\",\"author\":\"guo6x\",\"repo\":\"https://github.com/guo6x/dsh-pilot\",\"description\":\"给 agent 一双会开车的手:零依赖 CDP 浏览器操控(8 个 pilot_* 工具:导航/点击/输入/按键/JS/截图)+ Web GUI 可拖拽驾驶舱面板,无需 Playwright、无需 API key。\",\"descriptionEn\":\"Give your agent hands: zero-dependency CDP browser control (8 pilot_* tools: navigate/click/type/keys/eval/screenshot) plus a draggable cockpit panel in the Web GUI - no Playwright, no API key.\",\"category\":\"tools\"},\n {\"id\":\"dsh-housekeeper\",\"name\":\"环境管家\",\"nameEn\":\"Environment Housekeeper\",\"author\":\"guo6x\",\"repo\":\"https://github.com/guo6x/dsh-housekeeper\",\"description\":\"管住 agent 的脏手:工具链台账(node/pnpm/git/gh/ffmpeg 等自动探测)、缓存与临时目录扫描 + 白名单安全一键清理、机器规则 AGENTS.md 查看编辑,全在设置面板完成。\",\"descriptionEn\":\"Keep your agent's hands clean: toolchain inventory, scratch/cache scan with whitelist-guarded one-click cleanup, and the machine rules file (AGENTS.md) view/edit - all in the settings panel.\",\"category\":\"utility\"},\n {\"id\":\"dsh-deepread\",\"name\":\"DeepRead 精读助手\",\"nameEn\":\"DeepRead Assistant\",\"author\":\"xiehuan123\",\"repo\":\"https://github.com/xiehuan123/dsh-deepread\",\"description\":\"五种模式精读插件(quick / deep / map / feynman / book),支持公众号链接与文件输入、批量对比、预算预检与后台任务进度透明,导出 md / mm / html,Web UI 提供工具结果卡片与精读面板。\",\"descriptionEn\":\"A five-mode deep reading plugin (quick / deep / map / feynman / book) for links and files, with batch comparison, budget preflight, transparent background-job progress, md / mm / html exports, and Web UI tool-result cards plus a reading panel.\",\"npm\":\"dsh-deepread\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-mnemon\",\"name\":\"Mnemon 记忆系统\",\"nameEn\":\"Mnemon Memory\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-mnemon\",\"description\":\"与 Mnemon CLI 集成的跨 Agent、本地优先持久记忆插件:用户画像 / 工作记忆 / 项目档案与长期 Memory Spaces,支持导入导出。\",\"descriptionEn\":\"A cross-agent, local-first persistent memory plugin integrating the Mnemon CLI: profiles, working memory, project documents and long-term Memory Spaces, with import and export.\",\"npm\":\"dsh-mnemon\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-plugin-hub\",\"name\":\"插件中心(dsh-plugin-hub)\",\"nameEn\":\"Plugin Hub\",\"author\":\"Noob-stupid\",\"repo\":\"https://github.com/Noob-stupid/dsh-plugin-hub\",\"description\":\"插件管理面板:已安装插件一键启用/停用,内置 GitHub dsh-plugin 插件市场(官方/聚合识别、子包浏览、一键安装与本地 AI 兜底修复、删除卸载)。\",\"descriptionEn\":\"Plugin management panel: one-click enable/disable, a GitHub dsh-plugin marketplace with official/aggregate detection, subpackage browsing, one-click installs with local-AI fallback repair, and uninstall.\",\"category\":\"tools\"},\n {\"id\":\"dsh-genui\",\"name\":\"GenUI 生成式 UI\",\"nameEn\":\"GenUI\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-genui\",\"description\":\"给模型输出配交互式 UI:助手回复内联渲染 dsh-ui fence(布局、图表、表单、Mermaid、3D),支持流式渲染与面板停靠,组件交互可回传模型。\",\"descriptionEn\":\"Interactive UI inside assistant replies via the dsh-ui fence: layouts, charts, forms, Mermaid and 3D with streaming rendering, panel docking and actions that loop back to the model.\",\"category\":\"ui\"},\n {\"id\":\"dsh-annotation\",\"name\":\"选中批注\",\"nameEn\":\"Selection Annotation\",\"author\":\"omdsh-dev\",\"repo\":\"https://github.com/omdsh-dev/dsh-annotation\",\"description\":\"选中助手文字即可批注,回车随消息发送;自己的气泡只显示问题与「批注 ×N」标签,模型按 Annotation N 逐条对照回复(悬浮芯片)。\",\"descriptionEn\":\"Select text in an assistant reply to annotate it; annotations are sent with your next message, hidden from your own bubble behind an Annotations xN chip, and the model replies per Annotation N with hoverable chips.\",\"category\":\"ui\"},\n {\"id\":\"deepseek-harness-auth\",\"name\":\"DeepSeek Harness Auth\",\"nameEn\":\"DeepSeek Harness Auth\",\"author\":\"taichuy\",\"repo\":\"https://github.com/taichuy/deepseek-harness-auth\",\"description\":\"为 DSH Web 公网部署提供登录认证前置代理,支持账号密码、验证码、失败锁定和 IP/CIDR 白名单。\",\"descriptionEn\":\"An authentication proxy for public DSH Web deployments with password login, captcha, failed-attempt locking, and IP/CIDR allowlists.\",\"npm\":\"deepseek-harness-auth\",\"category\":\"security\"},\n {\"id\":\"dsh-cloud-sync\",\"name\":\"云同步服务\",\"nameEn\":\"Cloud Sync\",\"author\":\"dickpy\",\"repo\":\"https://github.com/dickpy/dsh-cloud-sync\",\"description\":\"支持 WebDAV、S3、阿里云 OSS、腾讯云 COS 与 MinIO 的 DSH 云同步插件,可同步 profile、插件配置及本地插件源码归档。\",\"descriptionEn\":\"DSH cloud sync for WebDAV, S3, Alibaba Cloud OSS, Tencent Cloud COS and MinIO, syncing profiles, plugin settings and local plugin source archives.\",\"npm\":\"@dickpy/dsh-cloud-sync\",\"category\":\"integration\"},\n {\"id\":\"dsh-auto-memory\",\"name\":\"自动记忆\",\"nameEn\":\"Auto Memory\",\"author\":\"Aik358\",\"repo\":\"https://github.com/Aik358/dsh-auto-memory\",\"description\":\"三层自动记忆插件:用户级/项目笔记/每日日志自动注入与检索、每轮自动沉淀、AI 时段问候、智能检索、日历与工作区思维导图,支持继承 WorkBuddy/CodeBuddy/Claude Code/Codex 等其他 AI 工具的记忆。\",\"descriptionEn\":\"Three-layer auto memory for DSH: user-level/project-notes/daily-logs with automatic injection and retrieval, per-turn auto-consolidation, AI greetings, smart search, calendar, workspace mind map, and inheritance from WorkBuddy/CodeBuddy/Claude Code/Codex.\",\"npm\":\"@a9i5k4/dsh-auto-memory\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-memoir\",\"name\":\"项目记忆 Memoir\",\"nameEn\":\"Project Memory Memoir\",\"author\":\"Qinling-Melon-Farmers\",\"repo\":\"https://github.com/Qinling-Melon-Farmers/dsh-memoir\",\"description\":\"项目持久化记忆与会话经验沉淀:memoir_record / memoir_read 工具(BM25 相关度排序检索)、每轮工作自动蒸馏、记忆诊断面板与跨项目全局检索,纯本地零外部依赖。\",\"descriptionEn\":\"Project persistent memory and session-lessons distillation: memoir_record / memoir_read tools with BM25-ranked retrieval, per-turn auto-distill, a memory diagnostics panel and cross-project search - fully local, no external dependency.\",\"npm\":\"dsh-memoir\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-worktime-board\",\"name\":\"牛马修仙看板\",\"nameEn\":\"Worktime Cultivation Board\",\"author\":\"spacexun2\",\"repo\":\"https://github.com/spacexun2/dsh-worktime-board\",\"description\":\"DeepSeek Harness 工时统计 × 修仙养成:日/周/月/学年四档汇总 agent 活跃时长、token、输入与工具调用,十二重境界(炼气→宇宙洪荒)量化进度,纯本地存储。\",\"descriptionEn\":\"Worktime statistics meets cultivation: daily / weekly / monthly / yearly agent activity, token, input and tool-call summaries with a twelve-realm progression (Qi Refining to Cosmic Chaos), fully local.\",\"npm\":\"dsh-worktime-board\",\"category\":\"utility\"},\n {\"id\":\"dsh-skill-explorer\",\"name\":\"技能中心(Skill Explorer)\",\"nameEn\":\"Skill Explorer\",\"author\":\"wingsky-1\",\"repo\":\"https://github.com/wingsky-1/dsh-skill-explorer\",\"description\":\"DSH 技能中心:按来源分级浏览已加载 skill(系统内置 / 项目 / 用户 / 自定义 / 运行时),支持启用/禁用、创建与删除(移入 .trash)。\",\"descriptionEn\":\"DSH skill center: browse loaded skills grouped by source (bundled / project / user / custom / runtime), with enable/disable, create and delete (move to .trash).\",\"npm\":\"@linxin666/dsh-client-ui-skill-explorer\",\"category\":\"tools\"},\n {\"id\":\"dsh-dream-skin\",\"name\":\"dsh-dream-skin\",\"nameEn\":\"dsh-dream-skin\",\"author\":\"RevolutionLA\",\"repo\":\"https://github.com/RevolutionLA/dsh-dream-skin\",\"description\":\"DSH Web 一键换肤插件:8 套原创主题、背景壁纸(透明度/模糊/渐变/URL)、每用户强调色、主题包导入导出与分享链接、收藏与随机,纯原生 token 系统。\",\"descriptionEn\":\"One-command skinning for DSH Web: 8 original themes, wallpaper (opacity/blur/gradient/URL), per-user accent, shareable theme packs with favorites and surprise-me. Purely native token system.\",\"category\":\"ui\"},\n {\"id\":\"dsh-friendly-steps\",\"name\":\"过程精简 Friendly Steps\",\"nameEn\":\"Friendly Steps\",\"author\":\"dongwenxiu83-web\",\"repo\":\"https://github.com/dongwenxiu83-web/dsh-friendly-steps\",\"description\":\"面向文字工作者的过程精简:纯 CSS 折叠 Think / 工具调用等技术过程行,右下角浮条「已完成 N 步」一键展开收起,失败步骤红色计数反馈;不注入 React 列表、无全量扫描,零侵入。\",\"descriptionEn\":\"Writer-friendly process collapse: hides Think / tool-call rows via pure CSS behind a floating 'N steps done' pill with red failure counts and one-click expand/collapse. No foreign nodes in React lists, no full-DOM scans — zero interference.\",\"category\":\"ui\"},\n {\"id\":\"dsh-full-remote\",\"name\":\"全功能远程访问\",\"nameEn\":\"Full Remote Access\",\"author\":\"JUANWANG-BUAA\",\"repo\":\"https://github.com/JUANWANG-BUAA/dsh-full-remote\",\"description\":\"令牌门控反向代理:公网隧道或局域网下,在手机等设备上远程使用 DeepSeek Harness,设置、凭据与文件访问保持可用,支持按设备会话。\",\"descriptionEn\":\"Token-gated reverse proxy for remote access: use DeepSeek Harness over public tunnels or LAN from phones and other devices, with settings, credentials and file access kept working and per-device sessions.\",\"npm\":\"dsh-full-remote\",\"category\":\"integration\"},\n {\"id\":\"dsh-palate\",\"name\":\"Palate 品味训练\",\"nameEn\":\"Palate Design Taste\",\"author\":\"guo6x\",\"repo\":\"https://github.com/guo6x/dsh-palate\",\"description\":\"会长大的眼:可积累的设计品味语料库(好/坏例子 + 编码原则),喂得越多评审越准;6 个 palate_* 工具(review/add/learn/list/principles/stats)+ 成长面板,node:sqlite + 人可读 Markdown 镜像,零运行时依赖。\",\"descriptionEn\":\"An eye that grows: an accumulated design-taste corpus (good/bad examples plus codified principles) that sharpens with every example you feed; six palate_* tools (review/add/learn/list/principles/stats) plus a growth panel, node:sqlite with human-readable Markdown mirrors, zero runtime dependencies.\",\"category\":\"knowledge\"},\n {\"id\":\"dsh-archive-manager\",\"name\":\"归档管理\",\"nameEn\":\"Archive Manager\",\"author\":\"z953218350\",\"repo\":\"https://github.com/z953218350/dsh-archive-manager\",\"description\":\"设置页 Codex 风格会话归档管理:按项目分组、搜索筛选、预览对话内容、一键恢复与彻底物理删除,内置 zstd 解压引擎。\",\"descriptionEn\":\"Codex-style archived session manager in settings: group by project, search and filter, preview conversation history, restore to sidebar, and permanently delete from disk; built-in zstd decompression.\",\"npm\":\"@mlgbnb/dsh-archive-manager\",\"category\":\"utility\"},\n {\"id\":\"dsh-history-tree\",\"name\":\"历史树\",\"nameEn\":\"History Tree\",\"author\":\"z953218350\",\"repo\":\"https://github.com/z953218350/dsh-history-tree\",\"description\":\"在聊天消息左侧提供 Codex 风格对话轮次时间线点阵与悬浮历史概览卡片,支持鱼眼放大动效与点击直达对应轮次。\",\"descriptionEn\":\"Codex-style conversation turn timeline rail and hover overview cards beside chat messages, with fish-eye magnification and click-to-jump navigation.\",\"npm\":\"dsh-history-tree\",\"category\":\"ui\"},\n {\"id\":\"dsh-gzip\",\"name\":\"dsh-gzip\",\"nameEn\":\"dsh-gzip\",\"author\":\"wingsky-1\",\"repo\":\"https://github.com/wingsky-1/dsh-plugin-hub/tree/main/packages/dsh-gzip\",\"description\":\"/api 响应 gzip 压缩插件:为远程 / 低带宽链路开启 /api 响应压缩,解决会话历史因大响应无压缩而超时加载失败的问题;SSE / zip / 已编码响应自动豁免,无全局副作用。\",\"descriptionEn\":\"API response gzip plugin for DSH Web GUI: enables gzip on /api responses for remote / low-bandwidth links, fixing session-history loads that fail on the timeout of large uncompressed responses; SSE, zip and already-encoded responses are passed through untouched, with no global side effects.\",\"npm\":\"@wingsky-1/dsh-gzip\"},\n {\"id\":\"dsh-wsl-bridge\",\"name\":\"WSL Windows 桥\",\"nameEn\":\"WSL Windows Bridge\",\"author\":\"ch1bug\",\"repo\":\"https://github.com/ch1bug/dsh-wsl-bridge\",\"description\":\"让 WSL 里的 agent 访问 Windows 侧:读写 C:\\\\ 文件、运行 .exe、Explorer 打开、wslpath 路径互转与盘符枚举(win_ls/read/write/run/open/path/drives)。\",\"descriptionEn\":\"Lets a WSL agent reach the Windows host: read/write C:\\\\ files, run .exe programs, open in Explorer, convert paths via wslpath and list drives (win_ls/read/write/run/open/path/drives).\",\"category\":\"integration\"},\n {\"id\":\"dsh-mimo-agent-tools\",\"name\":\"MiMo 多模态工具\",\"nameEn\":\"MiMo Multimodal Tools\",\"author\":\"ch1bug\",\"repo\":\"https://github.com/ch1bug/dsh-mimo-agent-tools\",\"description\":\"把小米 MiMo API 封装为 agent 工具:联网搜索、图像/音频/视频理解、语音转写、语音合成与音色克隆(mimo_search/vision/audio/video/asr/tts/voiceclone)。\",\"descriptionEn\":\"Turns the Xiaomi MiMo API into agent tools: web search, image/audio/video understanding, speech-to-text, text-to-speech and voice cloning (mimo_search/vision/audio/video/asr/tts/voiceclone).\",\"category\":\"tools\"},\n {\"id\":\"dsh-skill-fuzzy\",\"name\":\"技能模糊搜索\",\"nameEn\":\"Skill Fuzzy Search\",\"author\":\"ch1bug\",\"repo\":\"https://github.com/ch1bug/dsh-skill-fuzzy\",\"description\":\"Codex 风格模糊技能搜索:/bug、/diag、/regression 都能在 / 技能菜单里命中 diagnosing-bugs(名称子序列 + 描述连续子串匹配)。\",\"descriptionEn\":\"Codex-style fuzzy skill search: /bug, /diag and /regression all find diagnosing-bugs in the / skill menu (name subsequence + description substring matching).\",\"category\":\"ui\"},\n {\"id\":\"dsh-secret-redactor\",\"name\":\"敏感信息脱敏\",\"nameEn\":\"Secret Redactor\",\"author\":\"DamonKoy\",\"repo\":\"https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-secret-redactor\",\"description\":\"自动掩码工具输出中的 API key、token、JWT、私钥与配置密钥。\",\"descriptionEn\":\"Auto-masks API keys, tokens, JWTs and private keys in tool results shown to the model.\"},\n {\"id\":\"dsh-approve-for-me\",\"name\":\"自动审批审核\",\"nameEn\":\"Approve for Me\",\"author\":\"DamonKoy\",\"repo\":\"https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-approve-for-me\",\"description\":\"只读工具自动放行、危险命令自动拒绝,可配置全自动模式。\",\"descriptionEn\":\"Auto-approves read-only tools, auto-denies dangerous commands, optional full-auto mode.\"},\n {\"id\":\"dsh-mcp-client-v2\",\"name\":\"MCP 客户端 v2\",\"nameEn\":\"MCP Client v2\",\"author\":\"DamonKoy\",\"repo\":\"https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-mcp-client-v2\",\"description\":\"MCP 客户端增强:分页工具发现、非阻塞启动、工具搜索。\",\"descriptionEn\":\"Enhanced MCP client: paginated tool discovery, non-blocking startup, tool search.\"},\n {\"id\":\"dsh-memories\",\"name\":\"项目记忆\",\"nameEn\":\"Project Memories\",\"author\":\"DamonKoy\",\"repo\":\"https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-memories\",\"description\":\"按项目作用域持久化的键值记忆,支持增删查列与搜索。\",\"descriptionEn\":\"Project-scoped persistent key-value memories with set/get/list/delete/search.\"},\n {\"id\":\"dsh-system-proxy\",\"name\":\"系统代理\",\"nameEn\":\"System Proxy\",\"author\":\"DamonKoy\",\"repo\":\"https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-system-proxy\",\"description\":\"检测系统代理(scutil/环境变量/PAC)并为子进程导出代理环境变量。\",\"descriptionEn\":\"Detects system proxy (scutil/env/PAC) and exports proxy env for child processes.\"},\n {\"id\":\"dsh-usage-cost\",\"name\":\"用量成本提醒\",\"nameEn\":\"Usage & Cost\",\"author\":\"DamonKoy\",\"repo\":\"https://github.com/DamonKoy/dsh-plugins/tree/main/packages/dsh-usage-cost\",\"description\":\"统计会话与每日 token 用量和估算成本,超预算提醒。\",\"descriptionEn\":\"Tracks token usage and estimated cost per session/day with budget alerts.\"},\n]\n","/**\n * Runtime guard for the generated community index entries. The index is\n * build-time generated data, but the card renders whatever the module\n * carries; a hand-written narrowing keeps one malformed entry from breaking\n * the whole list at render time.\n */\n\nimport { COMMUNITY_CATEGORIES, type CommunityPluginCategory, type CommunityPluginEntry } from './generated/community.ts'\n\n/** Category ids the card knows how to label; others are treated as uncategorized. */\nconst KNOWN_CATEGORIES: readonly CommunityPluginCategory[] = COMMUNITY_CATEGORIES\n\n/**\n * The install command is pasted into a shell, so repo/npm must be free of\n * shell metacharacters: repo is a plain https URL of path-safe characters,\n * npm a standard (optionally scoped) package name.\n */\nconst REPO_SAFE_RE = /^https:\\/\\/[A-Za-z0-9._~\\/-]+$/\nconst NPM_SAFE_RE = /^(@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$/\n\n/** True when the value is a well-formed community plugin entry. */\nexport function isCommunityPluginEntry(value: unknown): value is CommunityPluginEntry {\n if (typeof value !== 'object' || value === null) return false\n const entry = value as Record<string, unknown>\n if (typeof entry.id !== 'string' || entry.id === '') return false\n if (typeof entry.name !== 'string' || typeof entry.nameEn !== 'string') return false\n if (typeof entry.author !== 'string' || entry.author === '') return false\n if (typeof entry.repo !== 'string' || !REPO_SAFE_RE.test(entry.repo)) return false\n if (entry.description !== undefined && typeof entry.description !== 'string') return false\n if (entry.descriptionEn !== undefined && typeof entry.descriptionEn !== 'string') return false\n if (entry.npm !== undefined && (typeof entry.npm !== 'string' || !NPM_SAFE_RE.test(entry.npm))) return false\n if (entry.category !== undefined && (typeof entry.category !== 'string' || !KNOWN_CATEGORIES.includes(entry.category as CommunityPluginCategory))) return false\n return true\n}\n","/**\n * The community plugin index card: a first-level settings section that is\n * always open. Its own enable switch (backed by the community-plugins\n * settings namespace) gates the list, which is presented marketplace-style:\n * a search box, category filter pills with counts, and a two-column card grid\n * whose entries link to contributors' own repositories — this package only\n * indexes them, it never vendors their code.\n */\n\nimport { useMemo, useState, type ReactNode } from 'react'\nimport type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\n// Type-only: pulls the settings-surface SlotMap merge (the 'settings.section' entry).\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'\nimport { PluginSettingsCard, BooleanField } from './PluginSettingsCard.tsx'\nimport { CardForm, booleanField, type CardActions, type CardShell, type FieldState as CardFieldState } from './settings-form.ts'\nimport type { CommunityPluginKey } from './locales.ts'\nimport { COMMUNITY_PLUGINS, type CommunityPluginCategory, type CommunityPluginEntry } from './generated/community.ts'\nimport { isCommunityPluginEntry } from './community-guard.ts'\nimport css from './community.module.css'\n\n/** The settings fields this card edits (the namespace's full schema). */\nexport interface CommunityPluginsSettings {\n /** Master switch for the index card. */\n enabled?: boolean\n}\n\n/** What the community plugin card renders. */\nexport interface CommunityPluginsCardState extends CardShell {\n /** Master switch. */\n enabled: CardFieldState\n}\n\n/** The registration-side face the card's slot entry injects. */\nexport interface CommunityPluginsCardFace extends CardActions {\n hooks: {\n /** Card snapshot bound by the renderer as useCommunityPluginsCard. */\n communityPluginsCard: SnapshotStore<CommunityPluginsCardState>\n }\n}\n\n/** Bridges the community-plugins scope onto the card's staged form. */\nexport class CommunityPluginsCardController {\n private readonly form: CardForm<CommunityPluginsSettings>\n private readonly store: SnapshotStore<CommunityPluginsCardState>\n\n /** @param scope - the bound settings scope for the community-plugins namespace. */\n constructor(scope: SettingsScope<CommunityPluginsSettings>) {\n this.form = new CardForm(scope, [\n booleanField('enabled'),\n ])\n this.store = this.form.bind(() => this.projection())\n }\n\n private projection(): CommunityPluginsCardState {\n return {\n ...this.form.shell(),\n enabled: this.form.field('enabled'),\n }\n }\n\n /**\n * Build the face the card's slot registration injects.\n * @returns the card's snapshot and its form actions.\n */\n inject(): CommunityPluginsCardFace {\n return { hooks: { communityPluginsCard: this.store }, ...this.form.actions() }\n }\n\n /**\n * Release the card's scope subscription and bound stores; the slot\n * disposer calls this on teardown.\n */\n dispose(): void {\n this.form.dispose()\n }\n}\n\n/** The one-line install command for an entry: npm package when published, else the contributor repository URL. */\nfunction installCommand(entry: CommunityPluginEntry): string {\n return `dsh plugin --profile web add ${entry.npm ?? entry.repo}`\n}\n\n/**\n * Localized entry copy read through the card's `t`. Falls back to the raw\n * entry field when the key is missing — the dictionary only carries the\n * generated registry, so injected test entries land on the fallback.\n */\nfunction entryCopy(t: (key: string) => string, key: string, fallback: string): string {\n const value = t(key)\n return value === key ? fallback : value\n}\n\n/** Maps a category id onto its locale dictionary key (kept in the generated union). */\nconst CATEGORY_KEY: Record<CommunityPluginCategory, `category.${CommunityPluginCategory}`> = {\n ui: 'category.ui',\n agent: 'category.agent',\n tools: 'category.tools',\n knowledge: 'category.knowledge',\n integration: 'category.integration',\n security: 'category.security',\n utility: 'category.utility',\n}\n\n/** Props the renderer binds for the community plugin card. */\nexport type CommunityPluginsCardProps =\n PropsLocale<'community-plugins'>\n & InjectFace<CommunityPluginsCardFace>\n & {\n /** Index entries; defaults to the generated registry (injected for tests). */\n plugins?: readonly CommunityPluginEntry[]\n }\n\n/**\n * Render the community plugin index card.\n * @param props - locale copy, the card snapshot, its form actions, and the\n * (default-generated) entry list.\n * @returns the card.\n */\nexport function CommunityPluginsCard(props: CommunityPluginsCardProps): ReactNode {\n const { t } = props\n const state = props.useCommunityPluginsCard(snapshot => snapshot)\n // Memoized so the categoryCounts/visiblePlugins caches below only\n // recompute when the registry actually changes, not on every keystroke.\n const plugins = useMemo(() => (props.plugins ?? COMMUNITY_PLUGINS).filter(isCommunityPluginEntry), [props.plugins])\n const [query, setQuery] = useState('')\n const [category, setCategory] = useState<CommunityPluginCategory | null>(null)\n const [copiedId, setCopiedId] = useState<string | null>(null)\n\n const copyCommand = (id: string, command: string): void => {\n const mark = (): void => { setCopiedId(id) }\n const clipboard = typeof navigator !== 'undefined' ? navigator.clipboard : undefined\n if (clipboard?.writeText !== undefined) {\n void clipboard.writeText(command).then(mark, mark)\n return\n }\n // Fallback for browsers without the async clipboard API (or tests).\n try {\n const area = document.createElement('textarea')\n area.value = command\n area.setAttribute('readonly', '')\n area.style.position = 'fixed'\n area.style.opacity = '0'\n document.body.append(area)\n area.select()\n document.execCommand('copy')\n area.remove()\n } catch { /* the command stays visible to select by hand */ }\n mark()\n }\n const disabled = !state.writable\n // The draft text drives the list: '' (inherit) and 'true' keep it visible,\n // 'false' hides it until the switch is turned back on.\n const visible = state.enabled.text !== 'false'\n const fieldProps = {\n overriddenLabel: t('settings.overridden'),\n resetLabel: t('settings.reset'),\n invalidLabel: t('settings.invalidNumber'),\n disabled,\n }\n\n // Category pills in descending count (stable tie-break by id).\n const categoryCounts = useMemo(() => {\n const counts = new Map<CommunityPluginCategory, number>()\n for (const plugin of plugins) {\n if (plugin.category) counts.set(plugin.category, (counts.get(plugin.category) ?? 0) + 1)\n }\n return [...counts.entries()].sort(\n (a, b) => b[1] - a[1] || a[0].localeCompare(b[0]),\n )\n }, [plugins])\n\n // Both the active pill and the search text narrow the list (AND).\n const visiblePlugins = useMemo(() => {\n const needle = query.trim().toLowerCase()\n return plugins.filter((plugin) => {\n if (category !== null && plugin.category !== category) return false\n if (!needle) return true\n const categoryLabel = plugin.category ? t(CATEGORY_KEY[plugin.category]) : ''\n const haystack = [plugin.name, plugin.nameEn, plugin.author, plugin.description, plugin.descriptionEn, plugin.npm ?? '', categoryLabel]\n .join(' ')\n .toLowerCase()\n return haystack.includes(needle)\n })\n }, [plugins, query, category, t])\n\n return (\n <PluginSettingsCard\n t={t}\n titleKey=\"settings.title\"\n descriptionKey=\"settings.description\"\n state={state}\n alwaysOpen\n onSave={props.save}\n onDiscard={props.discard}\n >\n <BooleanField\n id=\"settings-community-enabled\"\n label={t('settings.enabled')}\n hint={t('settings.enabledHint')}\n inheritLabel={t('settings.inherit')}\n onLabel={t('settings.on')}\n offLabel={t('settings.off')}\n {...fieldProps}\n {...state.enabled}\n onEdit={(text) => { props.edit('enabled', text) }}\n onReset={() => { props.resetField('enabled') }}\n />\n {visible\n ? (\n <div className={css.market}>\n <div className={css.toolbar}>\n <input\n id=\"settings-community-search\"\n className={css.search}\n type=\"search\"\n placeholder={t('search.placeholder')}\n aria-label={t('search.label')}\n value={query}\n disabled={disabled}\n onChange={(event) => { setQuery(event.target.value) }}\n />\n </div>\n <div className={css.filters} role=\"group\" aria-label={t('filter.all')}>\n <button\n type=\"button\"\n className={category === null ? `${css.pill} ${css.pillActive}` : css.pill}\n aria-pressed={category === null}\n disabled={disabled}\n onClick={() => { setCategory(null) }}\n >\n {t('filter.all')} {plugins.length}\n </button>\n {categoryCounts.map(([id, count]) => (\n <button\n key={id}\n type=\"button\"\n className={category === id ? `${css.pill} ${css.pillActive}` : css.pill}\n aria-pressed={category === id}\n disabled={disabled}\n onClick={() => { setCategory(category === id ? null : id) }}\n >\n {t(CATEGORY_KEY[id])} {count}\n </button>\n ))}\n </div>\n <p className={css.resultCount} role=\"status\">\n {t('result.count', { shown: visiblePlugins.length, total: plugins.length })}\n </p>\n {plugins.length === 0\n ? <p className={css.empty} role=\"status\">{t('empty')}</p>\n : visiblePlugins.length === 0\n ? <p className={css.empty} role=\"status\">{t('noMatch')}</p>\n : (\n <ul className={css.grid}>\n {visiblePlugins.map((plugin) => {\n const command = installCommand(plugin)\n const copied = copiedId === plugin.id\n const name = entryCopy(t, `name.${plugin.id}`, plugin.nameEn || plugin.name)\n const description = entryCopy(t, `desc.${plugin.id}`, plugin.descriptionEn ?? plugin.description ?? '')\n return (\n <li key={plugin.id} className={css.card}>\n <span className={css.cardHead}>\n <span className={css.cardName} title={name}>{name}</span>\n <span\n className={plugin.npm ? `${css.badge} ${css.badgePublished}` : css.badge}\n title={plugin.npm ?? plugin.repo}\n >\n {plugin.npm ? t('badge.published') : t('badge.source')}\n </span>\n </span>\n <span className={css.cardMeta}>\n {plugin.category ? <span className={css.cardCategory}>{t(CATEGORY_KEY[plugin.category])}</span> : null}\n {plugin.category ? <span className={css.cardDot} aria-hidden=\"true\">·</span> : null}\n <span className={css.cardAuthor} title={plugin.author}>{plugin.author}</span>\n </span>\n {description ? <p className={css.cardDescription}>{description}</p> : null}\n <span className={css.cardFooter}>\n <span className={css.cardTop}>\n <a className={css.cardLink} href={plugin.repo} target=\"_blank\" rel=\"noreferrer\">{t('repository')}</a>\n <button\n type=\"button\"\n className={copied ? `${css.installButton} ${css.installButtonCopied}` : css.installButton}\n title={command}\n onClick={() => { copyCommand(plugin.id, command) }}\n >\n {copied ? t('copied') : t('install')}\n </button>\n </span>\n <code className={css.cardCommand} title={command}>{command}</code>\n </span>\n </li>\n )\n })}\n </ul>\n )}\n </div>\n )\n : <p className={css.off} role=\"status\">{t('off')}</p>}\n <p className={css.installNote} role=\"note\">{t('installHint')}</p>\n <p className={css.notice} role=\"note\">{t('notice')}</p>\n </PluginSettingsCard>\n )\n}\n\n/** Props the settings section binds for the community plugin page. */\nexport type CommunityPluginsSectionProps =\n PropsRuntime<'settings.section'>\n & PropsLocale<'community-plugins'>\n & InjectFace<CommunityPluginsCardFace>\n & {\n /** Index entries; defaults to the generated registry (injected for tests). */\n plugins?: readonly CommunityPluginEntry[]\n }\n\n/** Render the community plugin index as a first-level settings page. */\nexport function CommunityPluginsSection(props: CommunityPluginsSectionProps): ReactNode {\n const { t, useCommunityPluginsCard, save, discard, edit, resetField, plugins } = props\n return (\n <ul className={css.sectionList}>\n <CommunityPluginsCard t={t} useCommunityPluginsCard={useCommunityPluginsCard} save={save} discard={discard} edit={edit} resetField={resetField} plugins={plugins} />\n </ul>\n )\n}\n","/**\n * The community-plugins locale dictionaries for the index card. Static copy\n * for the card chrome plus one localized name/description pair per index\n * entry (`name.<id>` / `desc.<id>`), so the card localizes data-driven text\n * through the same `t` the rest of the settings UI uses — the document\n * `<html lang>` attribute is not a reliable locale signal in the GUI.\n */\n\nimport { COMMUNITY_PLUGINS } from './generated/community.ts'\n\n/** Simplified Chinese copy for the card chrome (the key-set source of truth). */\nconst STATIC_ZH = {\n 'settings.title': '社区插件',\n 'settings.description': '社区贡献者开发与维护的插件,链接指向作者自己的仓库。',\n 'settings.enabled': '启用社区插件索引',\n 'settings.enabledHint': '此开关只控制索引列表的显示与否,关闭后在这里重新打开。',\n 'settings.inherit': '继承',\n 'settings.on': '开',\n 'settings.off': '关',\n 'settings.overridden': '已覆盖',\n 'settings.reset': '恢复默认',\n 'settings.notExposed': '当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 ~/.dsh/settings.yaml 直接配置,或为 dsh-host-apiproxy 的 WEB_SETTINGS_NAMESPACES 白名单补充本命名空间后重启。',\n 'settings.readOnly': '当前部署的设置只读。',\n 'settings.expand': '展开设置',\n 'settings.collapse': '收起设置',\n 'settings.save': '保存',\n 'settings.saving': '保存中…',\n 'settings.discard': '放弃',\n 'settings.unsaved': '未保存',\n 'settings.saveFailed': '部署未接受这些值,已保留供你修改。',\n 'settings.invalidNumber': '请输入数字,留空则使用默认值。',\n 'author': '作者',\n 'repository': '仓库',\n 'copy': '复制',\n 'copied': '已复制',\n 'install': '复制安装命令',\n 'noMatch': '没有匹配的社区插件。',\n 'search.placeholder': '搜索名称、作者或简介',\n 'search.label': '搜索社区插件',\n 'filter.all': '全部',\n 'result.count': '显示 {shown} / {total} 个',\n 'badge.published': 'npm 已发布',\n 'badge.source': '仓库安装',\n 'category.ui': '界面与体验',\n 'category.agent': 'Agent 与自动化',\n 'category.tools': '开发者工具',\n 'category.knowledge': '记忆与知识',\n 'category.integration': '集成与分享',\n 'category.security': '安全与运维',\n 'category.utility': '实用工具',\n 'installHint': '索引只登记、不安装代码。要运行某个插件,复制它的安装命令到终端执行;安装后,插件自带的开关与配置(若有)会出现在插件配置里。',\n 'empty': '暂无社区插件登记。',\n 'off': '社区插件索引已关闭。',\n 'notice': '条目由贡献者自行登记,与 dsh-web-ui 的发布内容无关;使用前请自行评估。',\n} satisfies Record<string, string>\n\n/** English copy for the card chrome, checked complete against the zh key set. */\nconst STATIC_EN = {\n 'settings.title': 'Community Plugins',\n 'settings.description': \"Plugins developed and maintained by community contributors, linking to each author's own repository.\",\n 'settings.enabled': 'Enable the community plugin index',\n 'settings.enabledHint': 'This switch only controls whether the index list is shown; turn it back on here.',\n 'settings.inherit': 'Inherit',\n 'settings.on': 'On',\n 'settings.off': 'Off',\n 'settings.overridden': 'Overridden',\n 'settings.reset': 'Reset to default',\n 'settings.notExposed': \"This DSH version does not expose this plugin's settings namespace to the configuration page, so the form is unavailable. Edit ~/.dsh/settings.yaml directly, or add the namespace to dsh-host-apiproxy's WEB_SETTINGS_NAMESPACES allowlist and restart.\",\n 'settings.readOnly': 'This deployment stores settings read-only.',\n 'settings.expand': 'Show settings',\n 'settings.collapse': 'Hide settings',\n 'settings.save': 'Save',\n 'settings.saving': 'Saving…',\n 'settings.discard': 'Discard',\n 'settings.unsaved': 'Unsaved',\n 'settings.saveFailed': 'The deployment did not accept these values; they were left for you to correct.',\n 'settings.invalidNumber': 'Enter a number, or leave blank to use the default.',\n 'author': 'Author',\n 'repository': 'Repository',\n 'copy': 'Copy',\n 'copied': 'Copied',\n 'install': 'Copy install command',\n 'noMatch': 'No matching community plugin found.',\n 'search.placeholder': 'Search name, author or description',\n 'search.label': 'Search community plugins',\n 'filter.all': 'All',\n 'result.count': 'Showing {shown} / {total}',\n 'badge.published': 'Published on npm',\n 'badge.source': 'Install from repo',\n 'category.ui': 'UI & Experience',\n 'category.agent': 'Agents & Automation',\n 'category.tools': 'Developer Tools',\n 'category.knowledge': 'Memory & Knowledge',\n 'category.integration': 'Integration & Sharing',\n 'category.security': 'Security & Ops',\n 'category.utility': 'Utilities',\n 'installHint': 'The index only registers entries, it never installs code. To run a plugin, copy its install command into a terminal; once installed, the plugin provides its own switch and config (if any) in the plugin configuration section.',\n 'empty': 'No community plugins registered yet.',\n 'off': 'The community plugin index is turned off.',\n 'notice': 'Entries are contributed by their authors and are separate from dsh-web-ui releases; evaluate before use.',\n} satisfies Record<keyof typeof STATIC_ZH, string>\n\n/** Build the runtime dictionary: static copy plus one localized name/description pair per index entry. */\nfunction build(base: Record<string, string>, lang: 'zh' | 'en'): Record<string, string> {\n const dict: Record<string, string> = { ...base }\n for (const entry of COMMUNITY_PLUGINS) {\n dict[`name.${entry.id}`] = lang === 'zh' ? entry.name : entry.nameEn\n dict[`desc.${entry.id}`] = lang === 'zh'\n ? (entry.description ?? entry.descriptionEn ?? '')\n : (entry.descriptionEn ?? entry.description ?? '')\n }\n return dict\n}\n\n/** Simplified Chinese dictionary for the index card (chrome + per-entry copy). */\nexport const zh = build(STATIC_ZH, 'zh')\n\n/** English dictionary, built from the same key set. */\nexport const en = build(STATIC_EN, 'en')\n\n/** Key union for this namespace (chrome keys plus per-entry name/description keys). */\nexport type CommunityPluginKey = keyof typeof zh\n","/**\n * Community plugin index, browser half. Registers the community-plugins\n * dictionaries and one section into the settings panel's first-level nav\n * (settings.section; the promoted family sections sit beside the built-in\n * general / models / plugins / agent-presets entries). The card carries its\n * own enable switch (backed by the community-plugins settings namespace) and\n * lists community plugins with links to each contributor's own repository.\n * @module @linxin666/dsh-client-ui-community-plugins/client\n */\n\nimport type { ClientContext, SettingsScope, SettingsScopeSpec } from '@deepseek-ai/dsh-client-runtime/client'\n// Type-only: pulls the locale plugin's Context merge (ctx.locale).\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\n// Type-only: pulls the settings-surface Context merge (ctx.settingsScope).\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n// Type-only: pulls the slot-surface types (the settings.section seat).\nimport type {} from '@deepseek-ai/dsh-client-ui-slots'\nimport { CommunityPluginsCardController, CommunityPluginsSection, type CommunityPluginsSettings } from './CommunityPluginsCard.tsx'\nimport { en, zh, type CommunityPluginKey } from './locales.ts'\n\nexport type { CommunityPluginsCardProps, CommunityPluginsSectionProps } from './CommunityPluginsCard.tsx'\n\n/** Settings namespace the card's enable switch edits (the Host plugin registers it). */\nconst COMMUNITY_PLUGINS_NS = 'community-plugins'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** Community plugin index card copy. */\n 'community-plugins': CommunityPluginKey\n }\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n /**\n * Optional rc.6 compatibility binder provided by dsh-web-ui-settings;\n * absent when that group plugin is not installed, so callers fall back to\n * the official settings scope.\n */\n webUiSettings?: { bind<S>(spec: SettingsScopeSpec<S>): SettingsScope<S> }\n }\n}\n\n/** Required services. */\nexport const inject = ['slots', 'locale', 'connection', 'settingsScope', 'remote']\n\n/**\n * Register the community plugin index as a first-level settings section, with\n * its own enable switch over the community-plugins settings namespace.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register('community-plugins', { zh, en }), 'community-plugins: dictionaries')\n\n const binder = ctx.get('webUiSettings') ?? ctx.settingsScope\n const settingsScope = binder.bind<CommunityPluginsSettings>({ namespace: COMMUNITY_PLUGINS_NS })\n const controller = new CommunityPluginsCardController(settingsScope)\n\n ctx.slots.inject('settings.section', () => {\n const unregister = ctx.slots.register({\n name: 'settings.section',\n id: 'community-plugins',\n order: 140,\n label: () => ctx.locale.bind('community-plugins')('settings.title'),\n locale: 'community-plugins',\n inject: () => controller.inject(),\n }, CommunityPluginsSection)\n return () => {\n controller.dispose()\n unregister()\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEA,SAAgB,mBAAiD,OAAsC;GACrG,MAAM,CAAC,MAAM,YAAA,GAAA,MAAA,SAAA,CAAoB,MAAM,eAAe,IAAI;GAC1D,MAAM,EAAE,OAAO,eAAe;GAC9B,IAAI,CAAC,MAAM,WAAW,OAAO;GAC7B,MAAM,QAAQ,MAAM,EAAE,MAAM,QAAQ;GACpC,MAAM,cAAc,MAAM,EAAE,MAAM,cAAc;GAChD,MAAM,UAAU,CAAC,MAAM,SAAS,MAAM,WAAW,MAAM;GACvD,MAAM,WAAW,eAAe,QAAQ;GACxC,MAAM,YAAY,WAAW,GAAGA,iCAAI,SAAS,GAAGA,iCAAI,SAASA,iCAAI;GAGjE,MAAM,SAAS,eAAe,OAE1B,iBAAA,GAAA,kBAAA,KAA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IAAI,MAAM,SAAS;KACpC,MAAM;KACN,IAAI;KACJ,OAAO;KACP,aAAa,IAAI,OAAO,KAAK,mBAAmB,CAAC,CAAC,gBAAgB;KAClE,QAAQ;KACR,cAAc,WAAW,OAAO;IAClC,GAAG,uBAAuB;IAC1B,aAAa;KACX,WAAW,QAAQ;KACnB,WAAW;IACb;GACF,CAAC;EACH"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linxin666/dsh-client-ui-community-plugins",
|
|
3
3
|
"description": "Community plugin index card for the dsh web GUI settings page: lists community-contributed plugins with links to each contributor's own repository, gated by its own enable switch in the plugin configuration section.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|