dsh-custom-mode 1.9.8 → 1.9.9

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.
Files changed (2) hide show
  1. package/client.js +13 -1
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -683,6 +683,13 @@ try {
683
683
  ".cpfe-btn-ghost{border-color:transparent;background:transparent}",
684
684
  ".cpfe-input{box-sizing:border-box;width:100%;height:34px;padding:0 12px;border-radius:8px;border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}",
685
685
  ".cpfe-switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;line-height:19px;color:var(--dsw-alias-label-primary)}",
686
+ // 忙碌期间禁掉草稿类控件的交互(issue #6)。
687
+ // 状态层已经拦住了改动(`update()` 在 busy 时直接返回),但对**受控组件**来说,
688
+ // 光拦状态还不够:DOM 会先显示用户敲进去的字/翻过去的开关,等下一次重渲染才被拉回来 ——
689
+ // 那就是"我明明改了,它自己弹回去了"。`pointer-events` 让点击根本到不了控件,
690
+ // 视觉上也给一个明确的"此刻不能动"。
691
+ ".cpfe-busy .cpfe-switch,.cpfe-busy .cpfe-row-toggle,.cpfe-busy .cpfe-input,.cpfe-busy .cpfe-field,.cpfe-busy .cpfe-editor{pointer-events:none;opacity:.65}",
692
+ ".cpfe-busy .cpfe-editor{cursor:progress}",
686
693
  ".cpfe-tag{font-size:11px;line-height:16px;padding:0 5px;border-radius:4px;border:.5px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary)}",
687
694
  ".cpfe-tag-success,.cpfe-tag-info{color:var(--dsw-alias-state-success-primary)}",
688
695
  ".cpfe-tag-warning{color:var(--dsw-alias-state-warn-primary)}",
@@ -1597,6 +1604,9 @@ try {
1597
1604
  className: "cpfe-field cpfe-desc",
1598
1605
  value: draft.description,
1599
1606
  rows: 2,
1607
+ // 忙碌期间只读(issue #6)。**描述框在 DOM 里排在提示词编辑器前面**,
1608
+ // 所以只给 `.cpfe-editor` 加 readOnly 是不够的 —— 实测就是这么漏掉的。
1609
+ readOnly: busy === true,
1600
1610
  placeholder: t("name.descriptionPlaceholder"),
1601
1611
  "aria-label": t("name.descriptionPlaceholder"),
1602
1612
  onChange: (event) => update({ description: event.target.value }),
@@ -1835,7 +1845,9 @@ try {
1835
1845
 
1836
1846
  return react.createElement(
1837
1847
  "div",
1838
- { className: "cpfe" },
1848
+ // `cpfe-busy` 是 issue #6 的兜底:面板里**所有**会改草稿的控件在忙碌期间一律不可交互。
1849
+ // 逐个控件加 `disabled` 会漏(本轮就漏了行开关与描述框),一个根类 + 一条 CSS 反而漏不掉。
1850
+ { className: busy === true ? "cpfe cpfe-busy" : "cpfe" },
1839
1851
  assistantList,
1840
1852
  react.createElement("p", { className: "cpfe-note" }, t("assistant.switchHint")),
1841
1853
  // 配了却不生效的项:主动点名,而不是让用户对着"我明明写了"发呆。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-custom-mode",
3
- "version": "1.9.8",
3
+ "version": "1.9.9",
4
4
  "description": "Custom modes and custom prompts for DeepSeek Harness (dsh): edit a mode's system prompt on the settings page (it takes effect on the next model step), pick its base mode, switch plugin rows one by one, and keep several assistants side by side — coding, chat or roleplay (RP) personas (multi-mode / multi-agent).",
5
5
  "license": "MIT",
6
6
  "type": "module",