@dungsil/dsh-plugin-ui-setting-skills 0.3.0 → 0.3.2

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/dist/client.js CHANGED
@@ -13,12 +13,13 @@ function installStyles(css) {
13
13
  return () => style.remove();
14
14
  }
15
15
  // ../../tools/ui/src/settings.tsx
16
- /** The rc.5 settings shell has no icon slot, so decorate only the matching navigation rows. */
16
+ /** Decorate matching navigation rows in both the rc.5 and 0.2.2 settings shells. */
17
17
  function installSettingsIcon(id, labels, icon) {
18
18
  const attribute = "data-dsh-settings-icon";
19
19
  const selector = `[${attribute}="${id}"]`;
20
20
  const removeStyles = installStyles(`
21
- ${selector} > svg { display: none; }
21
+ ${selector} > svg,
22
+ ${selector} > [aria-hidden="true"]:not([data-dsh-settings-icon-glyph]) { display: none; }
22
23
  ${typeof icon === "string" ? `${selector}::before { content: ''; display: block; flex: none; width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,${encodeURIComponent(icon)}") center / contain no-repeat; }` : ""}
23
24
  ${selector} > [data-dsh-settings-icon-glyph] { display: inline-flex; flex: none; }
24
25
  `);
@@ -267,9 +268,8 @@ function SkillsSettings({ ctx }) {
267
268
  const [error, setError] = (0, react.useState)(false);
268
269
  const [saveError, setSaveError] = (0, react.useState)(false);
269
270
  const [busy, setBusy] = (0, react.useState)(false);
270
- const [opening, setOpening] = (0, react.useState)();
271
- const [openError, setOpenError] = (0, react.useState)();
272
- const openingPending = (0, react.useRef)(false);
271
+ const [folderStatus, setFolderStatus] = (0, react.useState)({});
272
+ const openingPending = (0, react.useRef)(/* @__PURE__ */ new Set());
273
273
  const pending = (0, react.useRef)(false);
274
274
  const mounted = (0, react.useRef)(false);
275
275
  const [expanded, setExpanded] = (0, react.useState)({});
@@ -323,17 +323,25 @@ function SkillsSettings({ ctx }) {
323
323
  }
324
324
  }
325
325
  async function openFolder(path) {
326
- if (openingPending.current) return;
327
- openingPending.current = true;
328
- setOpening(path);
329
- setOpenError(void 0);
326
+ if (openingPending.current.has(path)) return;
327
+ openingPending.current.add(path);
328
+ setFolderStatus((current) => ({
329
+ ...current,
330
+ [path]: "opening"
331
+ }));
330
332
  try {
331
333
  if (!(await connection.rpc.call("/api", "dungsil-ui-setting-skills/open-folder", { path })).ok) throw new Error("Could not open skill folder");
334
+ if (mounted.current) setFolderStatus((current) => ({
335
+ ...current,
336
+ [path]: void 0
337
+ }));
332
338
  } catch {
333
- if (mounted.current) setOpenError(path);
339
+ if (mounted.current) setFolderStatus((current) => ({
340
+ ...current,
341
+ [path]: "error"
342
+ }));
334
343
  } finally {
335
- openingPending.current = false;
336
- if (mounted.current) setOpening(void 0);
344
+ openingPending.current.delete(path);
337
345
  }
338
346
  }
339
347
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
@@ -441,19 +449,19 @@ function SkillsSettings({ ctx }) {
441
449
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
442
450
  className: "dsh-skills-actions",
443
451
  children: [skill.path && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
444
- label: opening === skill.path ? text.openingFolder : text.openFolder,
452
+ label: folderStatus[skill.path] === "opening" ? text.openingFolder : text.openFolder,
445
453
  side: "top",
446
454
  portal: true,
447
455
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
448
456
  className: "dsh-skills-folder",
449
457
  variant: "ghost",
450
458
  size: "sm",
451
- "aria-label": `${opening === skill.path ? text.openingFolder : text.openFolder}: ${skill.name}`,
452
- "aria-busy": opening === skill.path,
453
- disabled: !view.folderOpenAvailable || opening !== void 0,
459
+ "aria-label": `${folderStatus[skill.path] === "opening" ? text.openingFolder : text.openFolder}: ${skill.name}`,
460
+ "aria-busy": folderStatus[skill.path] === "opening",
461
+ disabled: !view.folderOpenAvailable || folderStatus[skill.path] === "opening",
454
462
  "aria-description": view.folderOpenAvailable ? text.openFolderHint : text.openFolderUnavailable,
455
463
  onClick: () => void openFolder(skill.path),
456
- icon: opening === skill.path ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, {
464
+ icon: folderStatus[skill.path] === "opening" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, {
457
465
  size: 16,
458
466
  "aria-hidden": "true"
459
467
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutlineRegular, {
@@ -468,7 +476,7 @@ function SkillsSettings({ ctx }) {
468
476
  onChange: (enabled) => void save(skill.name, !enabled)
469
477
  })]
470
478
  }),
471
- skill.path && openError === skill.path && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
479
+ skill.path && folderStatus[skill.path] === "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
472
480
  className: "dsh-skills-open-error",
473
481
  role: "alert",
474
482
  children: text.openFolderError
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { dshCachePath } from "@deepseek-ai/dsh-home-paths";
7
7
  import { canOpenNativePath, openNativePath } from "@deepseek-ai/dsh-native-command";
8
8
  import { SkillRegistry } from "@deepseek-ai/dsh-skill";
9
9
  import { FileSystemSkillProvider } from "@deepseek-ai/dsh-skill-filesystem";
10
- // ../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.6/node_modules/@deepseek-ai/cosmokit/lib/index.js
10
+ // ../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.9.0/node_modules/@deepseek-ai/cosmokit/lib/index.js
11
11
  /** Return true when a value is `null` or `undefined`. */
12
12
  function isNullable(value) {
13
13
  return value === null || value === void 0;
@@ -260,7 +260,7 @@ var Time;
260
260
  }
261
261
  Time.template = template;
262
262
  })(Time || (Time = {}));
263
- // ../../node_modules/.pnpm/@deepseek-ai+schemastery@3.18.5/node_modules/@deepseek-ai/schemastery/lib/index.mjs
263
+ // ../../node_modules/.pnpm/@deepseek-ai+schemastery@3.19.0/node_modules/@deepseek-ai/schemastery/lib/index.mjs
264
264
  const kSchema = Symbol.for("schemastery");
265
265
  const kValidationError = Symbol.for("ValidationError");
266
266
  globalThis.__schemastery_index__ ??= 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dungsil/dsh-plugin-ui-setting-skills",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "View loaded user skills in DeepSeek Harness settings.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,23 +25,23 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@deepseek-ai/dsh-atomic-write": "0.2.1-rc.5",
29
- "@deepseek-ai/dsh-home-paths": "0.2.1-rc.5",
30
- "@deepseek-ai/dsh-native-command": "0.2.1-rc.5"
28
+ "@deepseek-ai/dsh-atomic-write": "0.2.2-rc.1",
29
+ "@deepseek-ai/dsh-home-paths": "0.2.2-rc.1",
30
+ "@deepseek-ai/dsh-native-command": "0.2.2-rc.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@deepseek-ai/cordis": "4.0.5",
34
- "@deepseek-ai/dsh-app-boot": "0.2.1-rc.5",
35
- "@deepseek-ai/dsh-client-connection": "0.2.1-rc.5",
36
- "@deepseek-ai/dsh-client-locale": "0.2.1-rc.5",
37
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.5",
38
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.5",
39
- "@deepseek-ai/dsh-config-editor": "0.2.1-rc.5",
40
- "@deepseek-ai/dsh-credentials-local": "0.2.1-rc.5",
41
- "@deepseek-ai/dsh-experimental-client-ui-cot-translation": "0.2.1-rc.5",
42
- "@deepseek-ai/dsh-skill": "0.2.1-rc.5",
43
- "@deepseek-ai/dsh-skill-filesystem": "0.2.1-rc.5",
44
- "@deepseek-ai/schemastery": "3.18.5",
33
+ "@deepseek-ai/cordis": "4.1.0",
34
+ "@deepseek-ai/dsh-app-boot": "0.2.2-rc.1",
35
+ "@deepseek-ai/dsh-client-connection": "0.2.2-rc.1",
36
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
37
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
38
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.1",
39
+ "@deepseek-ai/dsh-config-editor": "0.2.2-rc.1",
40
+ "@deepseek-ai/dsh-credentials-local": "0.2.2-rc.1",
41
+ "@deepseek-ai/dsh-experimental-client-ui-cot-translation": "0.2.2-rc.1",
42
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.1",
43
+ "@deepseek-ai/dsh-skill-filesystem": "0.2.2-rc.1",
44
+ "@deepseek-ai/schemastery": "3.19.0",
45
45
  "@dungsil/dsh-tsconfig": "0.0.0",
46
46
  "@dungsil/dsh-tsdown": "0.0.0",
47
47
  "@dungsil/dsh-ui": "0.0.0",
@@ -54,14 +54,14 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@deepseek-ai/cordis": "^4.0.5",
57
- "@deepseek-ai/dsh-client-connection": "^0.2.1-rc.5",
58
- "@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-rc.5",
59
- "@deepseek-ai/dsh-config-editor": "^0.2.1-rc.5",
60
- "@deepseek-ai/dsh-skill": "^0.2.1-rc.5",
61
- "@deepseek-ai/dsh-skill-filesystem": "^0.2.1-rc.5"
57
+ "@deepseek-ai/dsh-client-connection": "^0.2.1-rc.5 || ^0.2.2-rc.1",
58
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-rc.5 || ^0.2.2-rc.1",
59
+ "@deepseek-ai/dsh-config-editor": "^0.2.1-rc.5 || ^0.2.2-rc.1",
60
+ "@deepseek-ai/dsh-skill": "^0.2.1-rc.5 || ^0.2.2-rc.1",
61
+ "@deepseek-ai/dsh-skill-filesystem": "^0.2.1-rc.5 || ^0.2.2-rc.1"
62
62
  },
63
63
  "engines": {
64
- "dsh": "^0.2.1-rc.5",
64
+ "dsh": "^0.2.1-rc.5 || ^0.2.2-rc.1",
65
65
  "node": ">=24.9.0"
66
66
  },
67
67
  "dsh": {