dsh-agent-skills 0.1.5 → 0.1.6

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 CHANGED
@@ -212,7 +212,7 @@ function DirCard({
212
212
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-dir-actions", children: [
213
213
  dir.auto === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-tag as-tag-auto", children: t("autoBadge") }),
214
214
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-tag", children: dir.tag === "builtin" ? t("dirTagBuiltin") : t("dirTagUser") }),
215
- dir.kind === "custom" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "as-btn as-btn-danger", onClick: onRemove, title: t("removeDir"), children: t("removeDir") }),
215
+ dir.kind === "custom" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "as-btn as-btn-danger as-dir-remove", onClick: onRemove, title: t("removeDir"), children: t("removeDir") }),
216
216
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Switch, { checked: dir.enabled, onChange: onToggleEnabled, label: dir.enabled ? t("enabled") : t("disabled") })
217
217
  ] })
218
218
  ] }),
@@ -429,51 +429,58 @@ function AgentSkillsSection({ api, t }) {
429
429
  ] });
430
430
  }
431
431
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-wrap", "data-plugin": "dsh-agent-skills", children: [
432
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "as-title", children: t("title") }),
433
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "as-subtitle", children: t("subtitle") }),
434
- takeover !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: takeover.enabled ? "as-takeover as-takeover-enabled" : "as-takeover", children: [
435
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-takeover-icon", "aria-hidden": "true", children: takeover.enabled ? "\u2713" : "\u2192" }),
436
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-takeover-copy", children: [
437
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: takeover.enabled ? t("takeoverEnabledTitle") : t("takeoverTitle") }),
438
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: takeoverRestartRequired ? takeover.enabled ? t("takeoverRestartDescription") : t("takeoverDisableRestartDescription") : takeover.enabled ? t("takeoverEnabledDescription") : takeover.available && takeover.configured > 0 ? t("takeoverPartialDescription", { configured: takeover.configured, total: takeover.total }) : takeover.available ? t("takeoverDescription") : t("takeoverUnavailableDescription") })
432
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-sticky-top", children: [
433
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "as-title", children: t("title") }),
434
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "as-subtitle", children: t("subtitle") }),
435
+ takeover !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: takeover.enabled ? "as-takeover as-takeover-enabled" : "as-takeover", children: [
436
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-takeover-icon", "aria-hidden": "true", children: takeover.enabled ? "\u2713" : "\u2192" }),
437
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-takeover-copy", children: [
438
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: takeover.enabled ? t("takeoverEnabledTitle") : t("takeoverTitle") }),
439
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: takeoverRestartRequired ? takeover.enabled ? t("takeoverRestartDescription") : t("takeoverDisableRestartDescription") : takeover.enabled ? t("takeoverEnabledDescription") : takeover.available && takeover.configured > 0 ? t("takeoverPartialDescription", { configured: takeover.configured, total: takeover.total }) : takeover.available ? t("takeoverDescription") : t("takeoverUnavailableDescription") })
440
+ ] }),
441
+ takeover.available && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-takeover-actions", children: [
442
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
443
+ "button",
444
+ {
445
+ type: "button",
446
+ className: takeover.enabled || takeoverRestartRequired ? "as-btn as-takeover-action" : "as-btn as-btn-primary as-takeover-action",
447
+ disabled: saving || restarting,
448
+ onClick: () => void changeTakeover(!takeover.enabled),
449
+ children: takeover.enabled ? t("takeoverDisableAction") : t("takeoverAction")
450
+ }
451
+ ),
452
+ takeoverRestartRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
453
+ "button",
454
+ {
455
+ type: "button",
456
+ className: "as-btn as-btn-primary as-takeover-action",
457
+ disabled: saving || restarting,
458
+ onClick: () => void restartDsh(),
459
+ children: [
460
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: "\u21BB" }),
461
+ " ",
462
+ restarting ? t("restartingDsh") : t("restartDsh")
463
+ ]
464
+ }
465
+ )
466
+ ] })
439
467
  ] }),
440
- takeover.available && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-takeover-actions", children: [
441
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
442
- "button",
443
- {
444
- type: "button",
445
- className: takeover.enabled || takeoverRestartRequired ? "as-btn as-takeover-action" : "as-btn as-btn-primary as-takeover-action",
446
- disabled: saving || restarting,
447
- onClick: () => void changeTakeover(!takeover.enabled),
448
- children: takeover.enabled ? t("takeoverDisableAction") : t("takeoverAction")
449
- }
450
- ),
451
- takeoverRestartRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
452
- "button",
453
- {
454
- type: "button",
455
- className: "as-btn as-btn-primary as-takeover-action",
456
- disabled: saving || restarting,
457
- onClick: () => void restartDsh(),
458
- children: [
459
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: "\u21BB" }),
460
- " ",
461
- restarting ? t("restartingDsh") : t("restartDsh")
462
- ]
463
- }
464
- )
465
- ] })
468
+ pendingSkillCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-refresh-card", role: "status", children: [
469
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-refresh-icon", "aria-hidden": "true", children: "\u21BB" }),
470
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-refresh-message", children: t("refreshPending", { n: pendingSkillCount }) }),
471
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "as-btn as-refresh-action", onClick: () => window.location.reload(), children: t("refreshPage") })
472
+ ] }),
473
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
474
+ "input",
475
+ {
476
+ className: "as-search",
477
+ type: "search",
478
+ value: query,
479
+ onChange: (event) => setQuery(event.target.value),
480
+ placeholder: t("searchPlaceholder")
481
+ }
482
+ )
466
483
  ] }),
467
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
468
- "input",
469
- {
470
- className: "as-search",
471
- type: "search",
472
- value: query,
473
- onChange: (event) => setQuery(event.target.value),
474
- placeholder: t("searchPlaceholder")
475
- }
476
- ),
477
484
  error51 !== "" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "as-error", children: error51 }),
478
485
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-sources-row", children: [
479
486
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-sources-label", children: t("sources") }),
@@ -589,11 +596,6 @@ function AgentSkillsSection({ api, t }) {
589
596
  builtin: view.counts.builtin
590
597
  }) })
591
598
  ] }),
592
- pendingSkillCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "as-refresh-card", role: "status", children: [
593
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-refresh-icon", "aria-hidden": "true", children: "\u21BB" }),
594
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "as-refresh-message", children: t("refreshPending", { n: pendingSkillCount }) }),
595
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "as-btn as-refresh-action", onClick: () => window.location.reload(), children: t("refreshPage") })
596
- ] }),
597
599
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "as-skill-grid", children: filteredSkills.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "as-empty", children: query.trim() === "" ? t("noSkills") : t("noMatch") }) : filteredSkills.map((skill) => {
598
600
  const tagClass = skill.kind === "custom" ? "as-tag-custom" : skill.kind === "builtin" ? "as-tag-builtin" : "as-tag-global";
599
601
  const tagLabel = skill.kind === "custom" ? t("tagCustom") : skill.kind === "builtin" ? t("tagBuiltin") : t("tagGlobal");
@@ -643,6 +645,7 @@ var CSS = `
643
645
  }
644
646
 
645
647
  .as-wrap { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 860px; }
648
+ .as-sticky-top { position: sticky; top: 0; z-index: 4; display: flex; flex-direction: column; gap: 14px; padding-bottom: 1px; background: var(--dsw-alias-bg-layer-1, Canvas); }
646
649
  .as-title { font-size: 20px; font-weight: 650; margin: 0; line-height: 1.3; }
647
650
  .as-subtitle { font-size: 13px; color: var(--as-muted); margin: 0; line-height: 1.5; }
648
651
  .as-search { width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--as-border); background: transparent; color: inherit; font-size: 13px; outline: none; }
@@ -687,6 +690,8 @@ var CSS = `
687
690
  .as-dir-path { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: break-all; }
688
691
  .as-dir-meta { font-size: 11px; color: var(--as-muted); }
689
692
  .as-dir-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
693
+ .as-dir-remove { position: relative; min-height: 24px; padding: 2px 8px; border-radius: 6px; font-size: 11px; line-height: 1.2; }
694
+ .as-dir-remove::after { content: ""; position: absolute; inset: -7px -4px; }
690
695
  .as-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--as-border); color: var(--as-muted); white-space: nowrap; }
691
696
  .as-tag-custom { color: #58a6ff; border-color: rgba(88, 166, 255, 0.4); }
692
697
  .as-tag-global { color: #d29922; border-color: rgba(210, 153, 34, 0.4); }