dsh-plugin-capabilities 0.3.0 → 0.3.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/lib/client.js +11 -3
- package/lib/client.js.map +2 -2
- package/lib/index.js +22 -2
- package/lib/index.js.map +2 -2
- package/market/mcp.json +313 -27
- package/market/skills.json +531 -4
- package/package.json +1 -1
- package/src/client/MarketTab.tsx +14 -5
- package/src/client/css.ts +4 -0
- package/src/client/index.ts +12 -1
- package/src/market.test.ts +6 -4
- package/src/market.ts +37 -3
package/lib/client.js
CHANGED
|
@@ -145,6 +145,10 @@ var CSS = `
|
|
|
145
145
|
.dpc-detailSection{margin-top:12px;display:flex;flex-direction:column;gap:6px}
|
|
146
146
|
.dpc-detailLabel{font-size:11px;line-height:16px;color:var(--dsw-alias-label-secondary)}
|
|
147
147
|
.dpc-detailTags{display:flex;flex-wrap:wrap;gap:4px}
|
|
148
|
+
.dpc-skillList{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px}
|
|
149
|
+
.dpc-skillItem{display:flex;gap:8px;align-items:baseline;font-size:12px;line-height:18px;min-width:0}
|
|
150
|
+
.dpc-skillName{font-family:var(--ds-font-family-code);color:var(--dsw-alias-label-primary);white-space:nowrap;flex:none}
|
|
151
|
+
.dpc-skillDesc{color:var(--dsw-alias-label-secondary);min-width:0}
|
|
148
152
|
@media(max-width:680px){.dpc-cards{grid-template-columns:minmax(0,1fr)}}
|
|
149
153
|
`;
|
|
150
154
|
|
|
@@ -246,6 +250,7 @@ function MarketTab(props) {
|
|
|
246
250
|
const pick = (base, zh2) => zhUi() && zh2 !== void 0 ? zh2 : base;
|
|
247
251
|
const title = (entry) => pick(entry.name, entry.nameZh);
|
|
248
252
|
const desc = (entry) => pick(entry.description, entry.descriptionZh);
|
|
253
|
+
const longText = (entry) => entry.detail !== void 0 ? pick(entry.detail, entry.detailZh) : desc(entry);
|
|
249
254
|
const cardStop = (event) => {
|
|
250
255
|
event.stopPropagation();
|
|
251
256
|
};
|
|
@@ -360,14 +365,17 @@ function MarketTab(props) {
|
|
|
360
365
|
] }),
|
|
361
366
|
children: [
|
|
362
367
|
detailRepo !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
363
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dpc-detailDesc", children:
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dpc-detailDesc", children: longText(detailRepo) }),
|
|
364
369
|
detailRepo.skills !== void 0 && detailRepo.skills.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpc-detailSection", children: [
|
|
365
370
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpc-detailLabel", children: t("marketSkillListLabel") }),
|
|
366
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "dpc-skillList", children: detailRepo.skills.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "dpc-skillItem", children: [
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: "dpc-skillName", children: item.name }),
|
|
373
|
+
item.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpc-skillDesc", children: pick(item.description, item.descriptionZh) })
|
|
374
|
+
] }, item.name)) })
|
|
367
375
|
] })
|
|
368
376
|
] }),
|
|
369
377
|
detailServer !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
370
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dpc-detailDesc", children:
|
|
378
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dpc-detailDesc", children: longText(detailServer) }),
|
|
371
379
|
detailServer.command !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpc-detailSection", children: [
|
|
372
380
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpc-detailLabel", children: t("marketCommandLabel") }),
|
|
373
381
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: "dpc-code", children: [detailServer.command, ...detailServer.args ?? []].join(" ") })
|