@max-null/dsh-node-appearance 0.3.4 → 0.3.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
@@ -168,10 +168,10 @@ window.__ModuleLoader__.load({
168
168
  background-color: color-mix(in srgb, var(--ncolor-accent) 8%, transparent);
169
169
  padding-left: 3px;
170
170
  }`);
171
- lines.push(`[data-chat-flow-kind="steering"] [data-time-hover-root] > :first-child {
171
+ lines.push(`[data-chat-flow-kind="steering"] [data-actions-reveal] > :first-child {
172
172
  position: relative;
173
173
  }`);
174
- lines.push(`[data-chat-flow-kind="steering"] [data-time-hover-root] > :first-child::before {
174
+ lines.push(`[data-chat-flow-kind="steering"] [data-actions-reveal] > :first-child::before {
175
175
  content: '';
176
176
  position: absolute;
177
177
  right: 100%;
@@ -192,7 +192,7 @@ window.__ModuleLoader__.load({
192
192
  }
193
193
  //#endregion
194
194
  //#region \0dsh-css:H:\MaxNull\WorkStation\max-null-plugins\dsh-node-appearance\src\client\card.module.css.mjs
195
- const css = ".CDqThG_group{border-bottom:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:10px;padding:12px 0;display:flex}.CDqThG_header{appearance:none;width:100%;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;padding:0;display:flex}.CDqThG_title{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.CDqThG_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.CDqThG_chevronOpen{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s;transform:rotate(180deg)}.CDqThG_body{flex-direction:column;display:flex}.CDqThG_row{align-items:center;gap:10px;padding:6px 0;font-size:13px;display:flex}.CDqThG_rowLabel{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:1.5}.CDqThG_rowHint{color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:none;font-size:12px;line-height:1.5}.CDqThG_checkbox{accent-color:var(--dsw-alias-brand-primary);cursor:pointer;width:15px;height:15px}.CDqThG_switch{cursor:pointer;background:var(--dsw-alias-border-l4,#00000029);border:none;border-radius:11px;flex:none;width:40px;height:22px;margin-left:auto;padding:0;transition:background .15s}.CDqThG_switch.CDqThG_on{background:var(--dsw-alias-state-business-primary,#4fc3f7)}.CDqThG_switch .CDqThG_knob{background:#fff;border-radius:8px;width:16px;height:16px;margin-left:2px;transition:margin-left .15s;display:block}.CDqThG_switch.CDqThG_on .CDqThG_knob{margin-left:22px}.CDqThG_colorInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);cursor:pointer;border-radius:6px;width:44px;height:26px;margin-left:auto;padding:2px}.CDqThG_colorInput:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.CDqThG_colorValue{color:var(--dsw-alias-label-secondary);font-family:ui-monospace,monospace;font-size:12px}.CDqThG_sectionTitle{letter-spacing:.06em;text-transform:uppercase;color:var(--dsw-alias-label-tertiary);border-top:1px solid var(--dsw-alias-border-l2);margin-top:10px;padding:10px 0 4px;font-size:12px;font-weight:600;line-height:1.5}.CDqThG_toolRow{align-items:center;gap:10px;padding:6px 0;font-size:13px;display:flex}.CDqThG_toolName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary);flex:1;font-family:ui-monospace,monospace;font-size:12px;line-height:1.5;overflow:hidden}.CDqThG_removeButton,.CDqThG_addButton{appearance:none;font:inherit;cursor:pointer;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:7px;padding:5px 8px;font-size:12.5px;line-height:1.5}.CDqThG_removeButton:hover:not(:disabled),.CDqThG_addButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.CDqThG_removeButton:disabled,.CDqThG_addButton:disabled{opacity:.4;cursor:default}.CDqThG_removeButton:focus-visible,.CDqThG_addButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.CDqThG_addRow{align-items:center;gap:10px;padding:10px 0 4px;display:flex}.CDqThG_toolInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);min-width:0;height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:0 12px;font-size:13px;line-height:1.5}.CDqThG_toolInput:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.CDqThG_statusLine{color:var(--dsw-alias-label-tertiary);margin:0 0 8px;font-size:12px;line-height:1.5}.CDqThG_disabled{opacity:.5;pointer-events:none}";
195
+ const css = ".CDqThG_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}.CDqThG_card:hover{border-color:var(--dsw-alias-label-dimmed)}.CDqThG_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.CDqThG_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}.CDqThG_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.CDqThG_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.CDqThG_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.CDqThG_description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.CDqThG_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.CDqThG_chevronOpen{transform:rotate(180deg)}.CDqThG_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.CDqThG_readOnly,.CDqThG_statusLine{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.5}.CDqThG_disabled{opacity:.55;pointer-events:none}.CDqThG_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:16px 0 4px;display:flex}.CDqThG_reset{appearance:none;border:1px solid var(--dsw-alias-border-l2);font:inherit;cursor:pointer;color:var(--dsw-alias-label-secondary);background:0 0;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.CDqThG_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.CDqThG_resetConfirm{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.CDqThG_reset:disabled{opacity:.4;cursor:default}.CDqThG_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.CDqThG_row{border-top:1px solid var(--dsw-alias-border-l2);align-items:center;gap:10px;margin-top:10px;padding:10px 0 4px;display:flex;position:relative}.CDqThG_row:first-child{border-top:none;margin-top:4px}.CDqThG_rowLabel{min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1;gap:2px;font-size:13px;font-weight:500;line-height:1.5;display:flex}.CDqThG_rowHint{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:1.5}.CDqThG_colorInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);cursor:pointer;border-radius:8px;flex:none;width:34px;height:28px;padding:2px}.CDqThG_colorValue{width:64px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:12px;line-height:1.5}.CDqThG_sectionTitle{color:var(--dsw-alias-label-primary);margin:14px 0 0;font-size:13px;font-weight:600;line-height:1.5}.CDqThG_toolName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:1.5;overflow:hidden}.CDqThG_removeButton{appearance:none;border:1px solid var(--dsw-alias-border-l2);font:inherit;cursor:pointer;color:var(--dsw-alias-label-secondary);background:0 0;border-radius:8px;flex:none;padding:3px 10px;font-size:12px;line-height:1.5}.CDqThG_removeButton:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.CDqThG_addRow{align-items:center;gap:8px;margin-top:10px;margin-bottom:12px;display:flex}.CDqThG_toolInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);min-width:0;height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:0 12px;font-size:13px;line-height:1.5}.CDqThG_toolInput:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.CDqThG_toolInput::placeholder{color:var(--dsw-alias-label-tertiary)}.CDqThG_addButton{appearance:none;font:inherit;cursor:pointer;background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border:1px solid #0000;border-radius:8px;flex:none;padding:5px 14px;font-size:13px;line-height:1.5}.CDqThG_addButton:disabled{opacity:.4;cursor:default}.CDqThG_switch{cursor:pointer;background:var(--dsw-alias-border-l4,#00000029);border:none;border-radius:11px;flex:none;width:40px;height:22px;padding:0;transition:background .15s}.CDqThG_switch.CDqThG_on{background:var(--dsw-alias-state-business-primary,#4fc3f7)}.CDqThG_knob{pointer-events:none;background:#fff;border-radius:8px;width:16px;height:16px;margin-left:2px;transition:margin-left .15s;display:block}.CDqThG_switch.CDqThG_on .CDqThG_knob{margin-left:22px}";
196
196
  const tagId = "@max-null/dsh-node-appearance/card.module.css";
197
197
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
198
198
  const tag = document.createElement("style");
@@ -202,41 +202,50 @@ window.__ModuleLoader__.load({
202
202
  document.head.appendChild(tag);
203
203
  }
204
204
  var card_module_css_default = {
205
- "switch": "CDqThG_switch",
206
- "removeButton": "CDqThG_removeButton",
205
+ "reset": "CDqThG_reset",
207
206
  "header": "CDqThG_header",
208
- "body": "CDqThG_body",
209
- "colorValue": "CDqThG_colorValue",
210
- "row": "CDqThG_row",
211
- "title": "CDqThG_title",
212
- "rowLabel": "CDqThG_rowLabel",
213
- "toolRow": "CDqThG_toolRow",
214
- "statusLine": "CDqThG_statusLine",
215
- "checkbox": "CDqThG_checkbox",
216
207
  "disabled": "CDqThG_disabled",
217
- "group": "CDqThG_group",
218
- "chevronOpen": "CDqThG_chevronOpen",
208
+ "toolInput": "CDqThG_toolInput",
219
209
  "chevron": "CDqThG_chevron",
220
- "addButton": "CDqThG_addButton",
221
210
  "rowHint": "CDqThG_rowHint",
222
- "on": "CDqThG_on",
211
+ "statusLine": "CDqThG_statusLine",
212
+ "addButton": "CDqThG_addButton",
213
+ "sectionTitle": "CDqThG_sectionTitle",
214
+ "headText": "CDqThG_headText",
223
215
  "colorInput": "CDqThG_colorInput",
216
+ "removeButton": "CDqThG_removeButton",
217
+ "readOnly": "CDqThG_readOnly",
218
+ "resetConfirm": "CDqThG_resetConfirm",
219
+ "on": "CDqThG_on",
220
+ "description": "CDqThG_description",
221
+ "row": "CDqThG_row",
222
+ "addRow": "CDqThG_addRow",
223
+ "footer": "CDqThG_footer",
224
+ "body": "CDqThG_body",
224
225
  "knob": "CDqThG_knob",
226
+ "chevronOpen": "CDqThG_chevronOpen",
227
+ "rowLabel": "CDqThG_rowLabel",
228
+ "switch": "CDqThG_switch",
229
+ "name": "CDqThG_name",
225
230
  "toolName": "CDqThG_toolName",
226
- "addRow": "CDqThG_addRow",
227
- "toolInput": "CDqThG_toolInput",
228
- "sectionTitle": "CDqThG_sectionTitle"
231
+ "cardOpen": "CDqThG_cardOpen",
232
+ "card": "CDqThG_card",
233
+ "colorValue": "CDqThG_colorValue"
229
234
  };
230
235
  //#endregion
231
236
  //#region src/client/settings-card.tsx
232
237
  /**
233
- * The plugin's General-settings row: a "节点外观" title with the standard
234
- * chevron, expanding to palette rows, tool overrides, and the Think
235
- * visibility switch. Reads the namespace scope through the injected hooks
236
- * face and writes through the injected actions; every change applies
237
- * immediately. Drawn by hand (no value import from ui-settings-plugins — the
238
- * client bundle purity gate forbids cross-plugin value imports), styled with
239
- * the DSH design tokens like the shipped Appearance row.
238
+ * The node-appearance plugin config card. Mirrors the official
239
+ * `settings.plugin.item` card chrome (PluginCard: card shell, name-over-
240
+ * description header, chevron disclosure) with the DSH design tokens —
241
+ * drawn by hand because a feature plugin must not runtime-import another
242
+ * feature plugin's values (bundle purity gate).
243
+ *
244
+ * Writes are immediate: picking a color or flipping the Think switch applies
245
+ * it right away (a palette is a live preview, not a staged form). The footer
246
+ * carries one「恢复初始设置」button that resets the whole namespace to the
247
+ * shipped defaults — two-click confirmation so a miss cannot wipe a custom
248
+ * palette.
240
249
  */
241
250
  /** Chinese labels per category (product copy is Chinese). */
242
251
  const CATEGORY_LABELS = {
@@ -253,20 +262,59 @@ window.__ModuleLoader__.load({
253
262
  };
254
263
  /** Tools shown in the add-override autocomplete-free text input placeholder. */
255
264
  const TOOL_SUGGESTIONS = Object.values(TOOL_CATEGORIES).flat().join("、");
265
+ /** The card copy (one locale). */
266
+ const COPY = {
267
+ title: "节点外观",
268
+ description: "消息节点外观与颜色的偏好设置",
269
+ reset: "恢复初始设置",
270
+ resetConfirm: "再次点击确认恢复",
271
+ resetting: "恢复中…",
272
+ readOnly: "配置只读:插件主机侧未挂载或连接非本机。",
273
+ loading: "配置加载中…",
274
+ showThinking: "显示思考过程",
275
+ showThinkingHint: "关闭后会话中的 Think 思考行隐藏",
276
+ toolColors: "工具颜色覆盖(可选)",
277
+ addTool: "添加",
278
+ removeTool: "删除"
279
+ };
280
+ /** The shipped defaults, one face call away from any custom palette. */
281
+ const INITIAL_SETTINGS = {
282
+ showThinking: true,
283
+ colors: DEFAULT_COLORS,
284
+ toolColors: {}
285
+ };
256
286
  /**
257
- * Render the node-appearance General row.
258
- * @param props - the injected scope snapshot hook and write actions.
259
- * @returns the row, always visible once its namespace is served.
287
+ * Render the node-appearance config card.
288
+ * @param props - the injected scope snapshot hook, its write actions.
289
+ * @returns the card, matching the official plugin-card chrome.
260
290
  */
261
- function NodeAppearanceRow({ useNodeAppearance, setShowThinking, setCategoryColor, setToolColor, removeToolColor }) {
291
+ function NodeAppearanceRow({ useNodeAppearance, apply, setShowThinking, setCategoryColor, setToolColor, removeToolColor }) {
262
292
  const [open, setOpen] = (0, react.useState)(false);
293
+ const [confirmReset, setConfirmReset] = (0, react.useState)(false);
294
+ const [resetting, setResetting] = (0, react.useState)(false);
263
295
  const [toolName, setToolName] = (0, react.useState)("");
264
296
  const [toolColor, setToolColorDraft] = (0, react.useState)("#64748b");
265
297
  const snapshot = useNodeAppearance((snapshot) => snapshot);
266
- const colors = resolveColors(snapshot.value ?? {});
267
- const toolColors = snapshot.value?.toolColors ?? {};
268
- const showThinking = snapshot.value?.showThinking ?? true;
298
+ const served = snapshot.value ?? {};
299
+ const colors = resolveColors(served);
300
+ const toolColors = served.toolColors ?? {};
301
+ const showThinking = served.showThinking ?? true;
269
302
  const disabled = snapshot.writable === false;
303
+ const unavailable = snapshot.status !== "ready";
304
+ const resetInitial = async () => {
305
+ if (resetting) return;
306
+ setResetting(true);
307
+ try {
308
+ await apply(INITIAL_SETTINGS);
309
+ setConfirmReset(false);
310
+ } catch {} finally {
311
+ setResetting(false);
312
+ }
313
+ };
314
+ const handleReset = () => {
315
+ if (confirmReset) resetInitial();
316
+ else setConfirmReset(true);
317
+ };
270
318
  const addTool = (event) => {
271
319
  event.preventDefault();
272
320
  const name = toolName.trim();
@@ -274,135 +322,160 @@ window.__ModuleLoader__.load({
274
322
  setToolColor(name, toolColor);
275
323
  setToolName("");
276
324
  };
277
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
278
- className: card_module_css_default.group,
325
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
326
+ className: card_module_css_default.card + (open ? " " + card_module_css_default.cardOpen : ""),
279
327
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
280
328
  type: "button",
281
329
  className: card_module_css_default.header,
282
330
  "aria-expanded": open,
331
+ "aria-label": `${open ? "收起" : "展开"}:${COPY.title}`,
283
332
  onClick: () => {
284
333
  setOpen(!open);
285
334
  },
286
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
287
- className: card_module_css_default.title,
288
- children: "节点外观"
289
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { className: open ? card_module_css_default.chevronOpen : card_module_css_default.chevron })]
335
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
336
+ className: card_module_css_default.headText,
337
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
338
+ className: card_module_css_default.name,
339
+ children: COPY.title
340
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
341
+ className: card_module_css_default.description,
342
+ children: COPY.description
343
+ })]
344
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { className: card_module_css_default.chevron + (open ? " " + card_module_css_default.chevronOpen : "") })]
290
345
  }), open && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
291
346
  className: card_module_css_default.body,
292
- children: [snapshot.status !== "ready" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
293
- className: card_module_css_default.statusLine,
294
- children: snapshot.status === "unavailable" ? "配置暂不可用:插件主机侧未挂载或连接非本机。" : "配置加载中…"
295
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
296
- className: `${disabled ? card_module_css_default.disabled : ""}`,
297
- children: [
298
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
299
- className: card_module_css_default.row,
300
- children: [
301
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
302
- className: card_module_css_default.rowLabel,
303
- htmlFor: "node-appearance-show-thinking",
304
- children: "显示思考过程"
305
- }),
306
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
307
- className: card_module_css_default.rowHint,
308
- children: "关闭后会话中的 Think 思考行隐藏"
309
- }),
310
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
311
- id: "node-appearance-show-thinking",
312
- className: `${card_module_css_default.switch}${showThinking ? ` ${card_module_css_default.on}` : ""}`,
313
- type: "button",
314
- "aria-pressed": showThinking,
315
- onClick: () => {
316
- setShowThinking(!showThinking);
317
- },
318
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: card_module_css_default.knob })
319
- })
320
- ]
321
- }),
322
- Object.keys(CATEGORY_LABELS).map((category) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
323
- className: card_module_css_default.row,
324
- children: [
325
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
326
- className: card_module_css_default.rowLabel,
327
- htmlFor: `node-appearance-color-${category}`,
328
- children: CATEGORY_LABELS[category]
329
- }),
330
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
331
- id: `node-appearance-color-${category}`,
332
- className: card_module_css_default.colorInput,
333
- type: "color",
334
- value: colors[category],
335
- onChange: (event) => {
336
- setCategoryColor(category, event.target.value);
337
- }
338
- }),
339
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
340
- className: card_module_css_default.colorValue,
341
- children: colors[category]
342
- })
343
- ]
344
- }, category)),
345
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
346
- className: card_module_css_default.sectionTitle,
347
- children: "工具颜色覆盖(可选)"
348
- }),
349
- Object.entries(toolColors).map(([tool, color]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
350
- className: card_module_css_default.toolRow,
351
- children: [
352
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
353
- className: card_module_css_default.toolName,
354
- title: tool,
355
- children: tool
356
- }),
357
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
358
- className: card_module_css_default.colorInput,
359
- type: "color",
360
- value: isCssColor(color) ? color : DEFAULT_COLORS.other,
361
- onChange: (event) => {
362
- setToolColor(tool, event.target.value);
363
- }
364
- }),
365
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
366
- type: "button",
367
- className: card_module_css_default.removeButton,
368
- onClick: () => {
369
- removeToolColor(tool);
370
- },
371
- children: "删除"
372
- })
373
- ]
374
- }, tool)),
375
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
376
- className: card_module_css_default.addRow,
377
- onSubmit: addTool,
378
- children: [
379
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
380
- className: card_module_css_default.toolInput,
381
- type: "text",
382
- placeholder: `工具名,如 ${TOOL_SUGGESTIONS}`,
383
- value: toolName,
384
- onChange: (event) => {
385
- setToolName(event.target.value);
386
- }
387
- }),
388
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
389
- className: card_module_css_default.colorInput,
390
- type: "color",
391
- value: toolColor,
392
- onChange: (event) => {
393
- setToolColorDraft(event.target.value);
394
- }
395
- }),
396
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
397
- type: "submit",
398
- className: card_module_css_default.addButton,
399
- disabled: toolName.trim() === "",
400
- children: "添加"
401
- })
402
- ]
347
+ children: [
348
+ unavailable && !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
349
+ className: card_module_css_default.statusLine,
350
+ children: COPY.loading
351
+ }),
352
+ disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
353
+ className: card_module_css_default.readOnly,
354
+ role: "status",
355
+ children: COPY.readOnly
356
+ }),
357
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
358
+ className: disabled ? card_module_css_default.disabled : "",
359
+ children: [
360
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
361
+ className: card_module_css_default.row,
362
+ children: [
363
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
364
+ className: card_module_css_default.rowLabel,
365
+ htmlFor: "node-appearance-show-thinking",
366
+ children: COPY.showThinking
367
+ }),
368
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
369
+ className: card_module_css_default.rowHint,
370
+ children: COPY.showThinkingHint
371
+ }),
372
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
373
+ id: "node-appearance-show-thinking",
374
+ className: card_module_css_default.switch + (showThinking ? " " + card_module_css_default.on : ""),
375
+ type: "button",
376
+ "aria-pressed": showThinking,
377
+ onClick: () => {
378
+ setShowThinking(!showThinking);
379
+ },
380
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: card_module_css_default.knob })
381
+ })
382
+ ]
383
+ }),
384
+ Object.keys(CATEGORY_LABELS).map((category) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
385
+ className: card_module_css_default.row,
386
+ children: [
387
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
388
+ className: card_module_css_default.rowLabel,
389
+ htmlFor: `node-appearance-color-${category}`,
390
+ children: CATEGORY_LABELS[category]
391
+ }),
392
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
393
+ id: `node-appearance-color-${category}`,
394
+ className: card_module_css_default.colorInput,
395
+ type: "color",
396
+ value: colors[category],
397
+ onChange: (event) => {
398
+ setCategoryColor(category, event.target.value);
399
+ }
400
+ }),
401
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
402
+ className: card_module_css_default.colorValue,
403
+ children: colors[category]
404
+ })
405
+ ]
406
+ }, category)),
407
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
408
+ className: card_module_css_default.sectionTitle,
409
+ children: COPY.toolColors
410
+ }),
411
+ Object.entries(toolColors).map(([tool, color]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
412
+ className: card_module_css_default.row,
413
+ children: [
414
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
415
+ className: card_module_css_default.toolName,
416
+ title: tool,
417
+ children: tool
418
+ }),
419
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
420
+ className: card_module_css_default.colorInput,
421
+ type: "color",
422
+ value: isCssColor(color) ? color : DEFAULT_COLORS.other,
423
+ onChange: (event) => {
424
+ setToolColor(tool, event.target.value);
425
+ }
426
+ }),
427
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
428
+ type: "button",
429
+ className: card_module_css_default.removeButton,
430
+ onClick: () => {
431
+ removeToolColor(tool);
432
+ },
433
+ children: COPY.removeTool
434
+ })
435
+ ]
436
+ }, tool)),
437
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
438
+ className: card_module_css_default.addRow,
439
+ onSubmit: addTool,
440
+ children: [
441
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
442
+ className: card_module_css_default.toolInput,
443
+ type: "text",
444
+ placeholder: `工具名,如 ${TOOL_SUGGESTIONS}`,
445
+ value: toolName,
446
+ onChange: (event) => {
447
+ setToolName(event.target.value);
448
+ }
449
+ }),
450
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
451
+ className: card_module_css_default.colorInput,
452
+ type: "color",
453
+ value: toolColor,
454
+ onChange: (event) => {
455
+ setToolColorDraft(event.target.value);
456
+ }
457
+ }),
458
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
459
+ type: "submit",
460
+ className: card_module_css_default.addButton,
461
+ disabled: toolName.trim() === "",
462
+ children: COPY.addTool
463
+ })
464
+ ]
465
+ })
466
+ ]
467
+ }),
468
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
469
+ className: card_module_css_default.footer,
470
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
471
+ type: "button",
472
+ className: card_module_css_default.reset + (confirmReset ? " " + card_module_css_default.resetConfirm : ""),
473
+ disabled: resetting,
474
+ onClick: handleReset,
475
+ children: resetting ? COPY.resetting : confirmReset ? COPY.resetConfirm : COPY.reset
403
476
  })
404
- ]
405
- })]
477
+ })
478
+ ]
406
479
  })]
407
480
  });
408
481
  }
@@ -437,6 +510,11 @@ window.__ModuleLoader__.load({
437
510
  }), "dsh-node-appearance: repaint on settings change");
438
511
  const face = {
439
512
  hooks: { nodeAppearance: scope },
513
+ apply: async (value) => {
514
+ await scope.set("showThinking", value.showThinking ?? true);
515
+ await scope.set("colors", value.colors ?? {});
516
+ await scope.set("toolColors", value.toolColors ?? {});
517
+ },
440
518
  setShowThinking: (show) => {
441
519
  scope.set("showThinking", show);
442
520
  },
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["useState","css","IconChevronDownOutline14"],"sources":["../src/client/palette.ts","../src/client/settings-card.tsx","../src/client/index.ts"],"sourcesContent":["/**\n * Node appearance palette: category/tool mapping, default colors, and the pure\n * CSS-rule generator that paints the chat flow. Browser-half owned; the Host\n * half mirrors the same defaults through its schemastery schema (the two\n * cannot share a value import — the browser bundle purity gate forbids\n * cross-package value imports).\n */\n\n/** The settings namespace this plugin owns (spelled identically in both halves). */\nexport const NODE_APPEARANCE_NS = 'node-appearance'\n\n/** The plugin's style tag identity (removed/replaced on every re-paint). */\nexport const STYLE_TAG_ID = `${NODE_APPEARANCE_NS}/rules`\n\n/** One paintable node category. `command`, `thinking`, `context` are non-tool rows. */\nexport type NodeCategory =\n | 'search' | 'agent' | 'execute' | 'file' | 'task' | 'command' | 'thinking' | 'context' | 'steering' | 'other'\n\n/** Accent color per category (CSS colors). */\nexport type NodeAppearanceColors = Record<NodeCategory, string>\n\n/** The settings value this plugin reads from its namespace scope. */\nexport interface NodeAppearanceSettings {\n /** Show assistant reasoning blocks as Think rows; false hides them. */\n showThinking?: boolean | undefined\n /** Per-category accent colors; missing keys fall back to defaults. */\n colors?: Partial<NodeAppearanceColors> | undefined\n /** Per-tool accent overrides keyed by wire tool name. */\n toolColors?: Record<string, string> | undefined\n}\n\n/** Initial palette: mid-luminance hues readable on both light and dark themes. */\nexport const DEFAULT_COLORS: NodeAppearanceColors = {\n search: '#3b82f6', // blue — web_search / web_fetch\n agent: '#a855f7', // purple — subagent / workflow / send_message …\n execute: '#f59e0b', // amber — bash / pwsh / run_code / terminal_*\n file: '#22c55e', // green — read / write / edit / glob / grep\n task: '#ec4899', // pink — todo_write / goal / job_* / schedule_*\n command: '#f97316', // orange — /command nodes\n thinking: '#c4b5fd', // light purple — Think rows\n context: '#8a9bb5', // slate blue — injected context rows (informational)\n steering: '#14b8a6', // teal — steering rows (rc.8)\n other: '#64748b', // slate — every unlisted tool\n}\n\n/** Wire tool name → category for the shipped mapping. */\nexport const TOOL_CATEGORIES: Record<Exclude<NodeCategory, 'command' | 'thinking' | 'context' | 'steering'>, readonly string[]> = {\n search: ['web_search', 'web_fetch'],\n agent: ['subagent', 'subagent_acp', 'subagent_fork', 'send_message', 'interrupt_agent', 'list_agents', 'report', 'workflow'],\n execute: ['bash', 'pwsh', 'run_code', 'terminal_open', 'terminal_close', 'terminal_list', 'terminal_read', 'terminal_send', 'terminal_signal', 'str_replace_editor'],\n file: ['read', 'write', 'edit', 'read_image', 'glob', 'grep'],\n task: ['todo_write', 'create_goal', 'get_goal', 'update_goal', 'job_kill', 'job_list', 'job_output', 'schedule_create', 'schedule_delete', 'schedule_list', 'exit_plan_mode'],\n other: [],\n}\n\n/** Selector matching every tool row inside a tool-call node. */\nconst TOOL_ROW = '[data-chat-flow-kind=\"tool-call\"] [data-tool]'\n/** The ToolRow root itself (carries data-variant; the wrapper callRow does not). */\nconst TOOL_ROW_ROOT = '[data-chat-flow-kind=\"tool-call\"] [data-tool][data-variant]'\n/** Selector of the command node wrapper. */\nconst COMMAND_ROW = '[data-chat-flow-kind=\"command\"]'\n/** Selector of the Think reasoning row. */\nconst THINK_ROW = '[data-variant=\"think\"]'\n/** Selector of the injected-context row (the flow-item wrapper). */\nconst CONTEXT_ROW = '[data-chat-flow-kind=\"context\"]'\n/** Selector of a settled tool-result row (rc.8: tool results render as their own row). */\nconst TOOL_RESULT_ROW = '[data-chat-flow-kind=\"tool-result\"]'\n\n/**\n * The rows that carry the accent paint: the ToolRow root (not its wrapper\n * callRow — both carry data-tool, only the inner row carries data-variant),\n * command nodes, Think rows, injected-context rows, and tool-result rows.\n * User input rows are excluded — right-alignment already\n * distinguishes them (2026-08-20 用户反馈);steering rows 也走独立规则\n * (见 buildCss:在 userStack 层做 wash,不涂整行 rail)。\n * The 3px inset rail is compensated\n * with a matching padding-left so the rail never covers the row's leading icon.\n */\nconst ACCENTED_ROWS = [\n TOOL_ROW_ROOT, COMMAND_ROW, THINK_ROW, CONTEXT_ROW, TOOL_RESULT_ROW,\n].join(',\\n')\n\n/**\n * Accept a configured CSS color (hex, color functions) or reject it so an\n * invalid value falls back to the category default instead of poisoning CSS.\n * @param value - configured color string.\n * @returns whether the value is a plausible CSS color literal.\n */\nexport function isCssColor(value: string): boolean {\n const trimmed = value.trim()\n if (trimmed === '') return false\n if (/^#[0-9a-f]{3,8}$/i.test(trimmed)) return true\n return /^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|device-cmyk)\\(/i.test(trimmed)\n}\n\n/** Resolve the effective palette from user settings merged over defaults. */\nexport function resolveColors(settings: NodeAppearanceSettings): NodeAppearanceColors {\n const colors: NodeAppearanceColors = { ...DEFAULT_COLORS }\n const configured = settings.colors\n if (configured !== undefined && typeof configured === 'object' && configured !== null) {\n for (const key of Object.keys(DEFAULT_COLORS) as NodeCategory[]) {\n const value = configured[key]\n if (typeof value === 'string' && isCssColor(value)) colors[key] = value\n }\n }\n return colors\n}\n\n/** Escape a tool name into a CSS attribute selector string literal. */\nfunction attributeLiteral(value: string): string {\n return value.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')\n}\n\n/**\n * Steering marker icon: a corner-up-left arrow (mid-turn guidance inserted\n * into the running answer), drawn as a mask so the icon inherits the\n * configured steering color. Encoded data URI, no external asset.\n */\nconst STEERING_ICON = \"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 14 4 9 9 4'/%3E%3Cpath d='M20 20v-7a4 4 0 0 0-4-4H4'/%3E%3C/svg%3E\"\n\n/**\n * Build the complete stylesheet text for one settings snapshot.\n * @param settings - the namespace scope value (may be partial or undefined).\n * @returns CSS text painting accent rows and (optionally) hiding Think rows.\n */\nexport function buildCss(settings: NodeAppearanceSettings | undefined): string {\n const colors = resolveColors(settings ?? {})\n const toolOverrides = settings?.toolColors\n const lines: string[] = []\n\n // Unlisted tools keep the neutral fallback. Declared BEFORE the per-tool\n // rules: both selectors carry equal specificity (two attribute selectors),\n // so of two conflicting declarations the later one wins — a fallback\n // declared after the category rules would override every category color.\n lines.push(`${TOOL_ROW} { --ncolor-accent: ${colors.other}; }`)\n\n // Per-tool accent assignments (explicit overrides win over category color).\n for (const [category, tools] of Object.entries(TOOL_CATEGORIES)) {\n const key = category as keyof typeof TOOL_CATEGORIES\n for (const tool of tools) {\n const override = toolOverrides?.[tool]\n const color = typeof override === 'string' && isCssColor(override)\n ? override\n : colors[key]\n lines.push(`[data-chat-flow-kind=\"tool-call\"] [data-tool=\"${attributeLiteral(tool)}\"] { --ncolor-accent: ${color}; }`)\n }\n }\n\n // Non-tool accent rows.\n lines.push(`${COMMAND_ROW} { --ncolor-accent: ${colors.command}; }`)\n lines.push(`${THINK_ROW} { --ncolor-accent: ${colors.thinking}; }`)\n lines.push(`${CONTEXT_ROW} { --ncolor-accent: ${colors.context}; }`)\n lines.push(`${TOOL_RESULT_ROW} { --ncolor-accent: ${colors.file}; }`)\n\n // One shared paint rule: 3px inset left rail (layout-free) + 8% wash. The\n // matching padding-left moves the row content off the rail so the leading\n // icon is never covered.\n lines.push(`${ACCENTED_ROWS} {\n box-shadow: inset 3px 0 0 var(--ncolor-accent);\n background-color: color-mix(in srgb, var(--ncolor-accent) 8%, transparent);\n padding-left: 3px;\n}`)\n\n // Steering rows (mid-turn user steering) stay visually distinct from plain\n // user rows with a compass marker beside the right-aligned bubble. The\n // marker is a mask over the user-stack — the container that hugs the bubble\n // — positioned to the left of it, so the tint reads as a glyph next to the\n // message rather than a detached full-width rail (2026-08-21 用户反馈:\n // 整行 rail 突兀,改在 userStack 层做图标区分;slot 方案不可行:\n // conversation.message.images 是 single 槽且已被官方 ui-attachment 占用).\n lines.push(`[data-chat-flow-kind=\"steering\"] [data-time-hover-root] > :first-child {\n position: relative;\n}`)\n lines.push(`[data-chat-flow-kind=\"steering\"] [data-time-hover-root] > :first-child::before {\n content: '';\n position: absolute;\n right: 100%;\n margin-right: 6px;\n top: 50%;\n width: 14px;\n height: 14px;\n transform: translateY(-50%);\n background-color: ${colors.steering};\n -webkit-mask: url(\"${STEERING_ICON}\") center / contain no-repeat;\n mask: url(\"${STEERING_ICON}\") center / contain no-repeat;\n}`)\n\n // Visibility switch: hide Think rows entirely on the frontend. `!important`\n // outranks the module stylesheet's `.root { display: flex }` (same\n // specificity, but the plugin style tag is injected before the module's).\n if (settings?.showThinking === false) {\n lines.push(`${THINK_ROW} { display: none !important; }`)\n // A think-only node leaves its flowItem seat with zero height: the seat\n // still consumes the column's 16px flex gap on both sides, doubling the\n // spacing between the neighbors. Hide the whole seat when the think row\n // is the only child of its block container — block-internal thinks\n // (text + reasoning in one node) stay gap-neutral after hiding the row.\n lines.push(\n `[data-chat-flow-kind=\"assistant\"]:has(${THINK_ROW}:only-child),`,\n `[data-chat-flow-kind=\"assistant-step\"]:has(${THINK_ROW}:only-child) { display: none !important; }`,\n )\n }\n\n return lines.join('\\n')\n}\n","/**\n * The plugin's General-settings row: a \"节点外观\" title with the standard\n * chevron, expanding to palette rows, tool overrides, and the Think\n * visibility switch. Reads the namespace scope through the injected hooks\n * face and writes through the injected actions; every change applies\n * immediately. Drawn by hand (no value import from ui-settings-plugins — the\n * client bundle purity gate forbids cross-plugin value imports), styled with\n * the DSH design tokens like the shipped Appearance row.\n */\n\nimport { useState, type ChangeEvent, type FormEvent } from 'react'\nimport type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { SettingsScope, SettingsScopeSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client'\nimport { IconChevronDownOutline14 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport {\n DEFAULT_COLORS, isCssColor, resolveColors, TOOL_CATEGORIES,\n type NodeAppearanceSettings, type NodeCategory,\n} from './palette.ts'\nimport css from './card.module.css'\n\n/** The row's inject face: the read-only scope snapshot plus write actions. */\nexport interface NodeAppearanceRowFace {\n hooks: {\n /** The bound settings-scope snapshot, rendered as useNodeAppearance. */\n nodeAppearance: ObservableSnapshot<SettingsScopeSnapshot<NodeAppearanceSettings>>\n }\n /** Write the Think visibility switch. */\n setShowThinking(show: boolean): void\n /** Merge one category color into the palette section. */\n setCategoryColor(category: NodeCategory, color: string): void\n /** Merge one tool override into the toolColors section. */\n setToolColor(tool: string, color: string): void\n /** Remove one tool override. */\n removeToolColor(tool: string): void\n}\n\n/** Props the renderer binds for this plugin config card. */\nexport type NodeAppearanceRowProps =\n PropsRuntime<'settings.plugin.item'>\n & InjectFace<NodeAppearanceRowFace>\n\n/** Chinese labels per category (product copy is Chinese). */\nconst CATEGORY_LABELS: Record<NodeCategory, string> = {\n search: '联网搜索',\n agent: '智能体调用',\n execute: '代码 / 指令执行',\n file: '文件操作',\n task: '任务 / 目标',\n command: '指令节点',\n thinking: '思考过程',\n context: '上下文注入',\n steering: '模型引导',\n other: '其他工具',\n}\n\n/** Tools shown in the add-override autocomplete-free text input placeholder. */\nconst TOOL_SUGGESTIONS = Object.values(TOOL_CATEGORIES).flat().join('、')\n\n/**\n * Render the node-appearance General row.\n * @param props - the injected scope snapshot hook and write actions.\n * @returns the row, always visible once its namespace is served.\n */\nexport function NodeAppearanceRow({ useNodeAppearance, setShowThinking, setCategoryColor, setToolColor, removeToolColor }: NodeAppearanceRowProps) {\n const [open, setOpen] = useState(false)\n const [toolName, setToolName] = useState('')\n const [toolColor, setToolColorDraft] = useState('#64748b')\n const snapshot = useNodeAppearance(snapshot => snapshot)\n const colors = resolveColors(snapshot.value ?? {})\n const toolColors = snapshot.value?.toolColors ?? {}\n const showThinking = snapshot.value?.showThinking ?? true\n const disabled = snapshot.writable === false\n\n const addTool = (event: FormEvent) => {\n event.preventDefault()\n const name = toolName.trim()\n if (name === '' || !isCssColor(toolColor)) return\n setToolColor(name, toolColor)\n setToolName('')\n }\n\n return (\n <div className={css.group}>\n <button\n type=\"button\"\n className={css.header}\n aria-expanded={open}\n onClick={() => { setOpen(!open) }}\n >\n <span className={css.title}>节点外观</span>\n <IconChevronDownOutline14 className={open ? css.chevronOpen : css.chevron} />\n </button>\n {open && (\n <div className={css.body}>\n {snapshot.status !== 'ready' && (\n <p className={css.statusLine}>\n {snapshot.status === 'unavailable'\n ? '配置暂不可用:插件主机侧未挂载或连接非本机。'\n : '配置加载中…'}\n </p>\n )}\n <div className={`${disabled ? css.disabled : ''}`}>\n <div className={css.row}>\n <label className={css.rowLabel} htmlFor=\"node-appearance-show-thinking\">显示思考过程</label>\n <span className={css.rowHint}>关闭后会话中的 Think 思考行隐藏</span>\n <button\n id=\"node-appearance-show-thinking\"\n className={`${css.switch}${showThinking ? ` ${css.on}` : ''}`}\n type=\"button\"\n aria-pressed={showThinking}\n onClick={() => { setShowThinking(!showThinking) }}\n >\n <span className={css.knob} />\n </button>\n </div>\n {(Object.keys(CATEGORY_LABELS) as NodeCategory[]).map(category => (\n <div className={css.row} key={category}>\n <label className={css.rowLabel} htmlFor={`node-appearance-color-${category}`}>\n {CATEGORY_LABELS[category]}\n </label>\n <input\n id={`node-appearance-color-${category}`}\n className={css.colorInput}\n type=\"color\"\n value={colors[category]}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setCategoryColor(category, event.target.value) }}\n />\n <span className={css.colorValue}>{colors[category]}</span>\n </div>\n ))}\n <div className={css.sectionTitle}>工具颜色覆盖(可选)</div>\n {Object.entries(toolColors).map(([tool, color]) => (\n <div className={css.toolRow} key={tool}>\n <span className={css.toolName} title={tool}>{tool}</span>\n <input\n className={css.colorInput}\n type=\"color\"\n value={isCssColor(color) ? color : DEFAULT_COLORS.other}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setToolColor(tool, event.target.value) }}\n />\n <button type=\"button\" className={css.removeButton} onClick={() => { removeToolColor(tool) }}>删除</button>\n </div>\n ))}\n <form className={css.addRow} onSubmit={addTool}>\n <input\n className={css.toolInput}\n type=\"text\"\n placeholder={`工具名,如 ${TOOL_SUGGESTIONS}`}\n value={toolName}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setToolName(event.target.value) }}\n />\n <input\n className={css.colorInput}\n type=\"color\"\n value={toolColor}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setToolColorDraft(event.target.value) }}\n />\n <button type=\"submit\" className={css.addButton} disabled={toolName.trim() === ''}>添加</button>\n </form>\n </div>\n </div>\n )}\n </div>\n )\n}\n","/**\n * Browser half: binds the `node-appearance` settings scope, paints the chat\n * flow from it (a single <style data-plugin-css> tag rebuilt on every\n * snapshot change), and registers the settings card.\n */\n\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\nimport type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client'\n// Type-only: the ctx.settingsScope Context merge and the slot's declaration.\n// Cross-plugin collaboration goes through cordis services; a value import\n// would fail the client bundle-purity gate.\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-settings-plugins/client'\n// Type-only: the ctx.slots Context merge comes from the renderer package\n// (slot registry), not from the removed dsh-client-runtime module.\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport { buildCss, NODE_APPEARANCE_NS, STYLE_TAG_ID, type NodeAppearanceSettings } from './palette.ts'\nimport { NodeAppearanceRow, type NodeAppearanceRowFace } from './settings-card.tsx'\n\nexport const inject = ['slots', 'connection', 'remote', 'settingsScope']\n\n/** Upsert the plugin's paint stylesheet with the current snapshot's CSS. */\nfunction paint(scope: SettingsScope<NodeAppearanceSettings>): void {\n let tag = document.querySelector<HTMLStyleElement>(`style[data-plugin-css=\"${STYLE_TAG_ID}\"]`)\n if (tag === null) {\n tag = document.createElement('style')\n tag.dataset.plugin = NODE_APPEARANCE_NS\n tag.dataset.pluginCss = STYLE_TAG_ID\n document.head.appendChild(tag)\n }\n tag.textContent = buildCss(scope.getSnapshot().value)\n}\n\n/**\n * Mount the node-appearance plugin on the page.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n // settingsScope 由官方 ui-settings 服务提供(DSH 0.1.2-alpha 内核 client\n // 模块表);bind 返回该命名空间的强类型 scope(read/set/unset/subscribe)。\n const scope = ctx.settingsScope.bind<NodeAppearanceSettings>({ namespace: NODE_APPEARANCE_NS })\n // Paint once from the current snapshot (defaults before the first Host read).\n paint(scope)\n ctx.effect(\n () => scope.subscribe(() => { paint(scope) }),\n 'dsh-node-appearance: repaint on settings change',\n )\n\n const face: NodeAppearanceRowFace = {\n hooks: { nodeAppearance: scope },\n setShowThinking: (show) => { void scope.set('showThinking', show) },\n setCategoryColor: (category, color) => {\n const value = scope.getSnapshot().value\n void scope.set('colors', { ...value?.colors, [category]: color })\n },\n setToolColor: (tool, color) => {\n const value = scope.getSnapshot().value\n void scope.set('toolColors', { ...value?.toolColors, [tool]: color })\n },\n removeToolColor: (tool) => {\n const value = scope.getSnapshot().value\n const toolColors = { ...value?.toolColors }\n delete toolColors[tool]\n void scope.set('toolColors', toolColors)\n },\n }\n\n // alpha.2:General 区 slot(settings.general.item)已退役,接入官方\n // 「可配置插件」Tab 的 settings.plugin.item(keyed by namespace)——官方\n // 卡片姿势见 dsh-client-ui-settings-plugins/src/client/index.ts(BashCard 等)。\n ctx.slots.inject('settings.plugin.item', () => ctx.slots.register({\n name: 'settings.plugin.item',\n key: NODE_APPEARANCE_NS,\n inject: () => face,\n // npm ui-slots (0.0.1-rc.1) 类型未合并 keyed-slot 选项(官方 monorepo 类型\n // 才有)——运行时与官方源码一致,类型期放宽(官方类型同步后收紧)。\n } as never, Node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cAAc;MAAE,GAAG,OAAO;OAAa,OAAO;KAAM,CAAC;IACtE;IACA,kBAAkB,SAAS;KAEzB,MAAM,aAAa,EAAE,GADP,MAAM,YAAY,CAAC,CAAC,OACH,WAAW;KAC1C,OAAO,WAAW;KAClB,MAAW,IAAI,cAAc,UAAU;IACzC;GACF;GAKA,IAAI,MAAM,OAAO,8BAA8B,IAAI,MAAM,SAAS;IAChE,MAAM;IACN,KAAK;IACL,cAAc;GAGhB,GAAY,iBAAiB,CAAC;EAChC"}
1
+ {"version":3,"file":"client.js","names":["useState","css","IconChevronDownOutline14"],"sources":["../src/client/palette.ts","../src/client/settings-card.tsx","../src/client/index.ts"],"sourcesContent":["/**\n * Node appearance palette: category/tool mapping, default colors, and the pure\n * CSS-rule generator that paints the chat flow. Browser-half owned; the Host\n * half mirrors the same defaults through its schemastery schema (the two\n * cannot share a value import — the browser bundle purity gate forbids\n * cross-package value imports).\n */\n\n/** The settings namespace this plugin owns (spelled identically in both halves). */\nexport const NODE_APPEARANCE_NS = 'node-appearance'\n\n/** The plugin's style tag identity (removed/replaced on every re-paint). */\nexport const STYLE_TAG_ID = `${NODE_APPEARANCE_NS}/rules`\n\n/** One paintable node category. `command`, `thinking`, `context` are non-tool rows. */\nexport type NodeCategory =\n | 'search' | 'agent' | 'execute' | 'file' | 'task' | 'command' | 'thinking' | 'context' | 'steering' | 'other'\n\n/** Accent color per category (CSS colors). */\nexport type NodeAppearanceColors = Record<NodeCategory, string>\n\n/** The settings value this plugin reads from its namespace scope. */\nexport interface NodeAppearanceSettings {\n /** Show assistant reasoning blocks as Think rows; false hides them. */\n showThinking?: boolean | undefined\n /** Per-category accent colors; missing keys fall back to defaults. */\n colors?: Partial<NodeAppearanceColors> | undefined\n /** Per-tool accent overrides keyed by wire tool name. */\n toolColors?: Record<string, string> | undefined\n}\n\n/** Initial palette: mid-luminance hues readable on both light and dark themes. */\nexport const DEFAULT_COLORS: NodeAppearanceColors = {\n search: '#3b82f6', // blue — web_search / web_fetch\n agent: '#a855f7', // purple — subagent / workflow / send_message …\n execute: '#f59e0b', // amber — bash / pwsh / run_code / terminal_*\n file: '#22c55e', // green — read / write / edit / glob / grep\n task: '#ec4899', // pink — todo_write / goal / job_* / schedule_*\n command: '#f97316', // orange — /command nodes\n thinking: '#c4b5fd', // light purple — Think rows\n context: '#8a9bb5', // slate blue — injected context rows (informational)\n steering: '#14b8a6', // teal — steering rows (rc.8)\n other: '#64748b', // slate — every unlisted tool\n}\n\n/** Wire tool name → category for the shipped mapping. */\nexport const TOOL_CATEGORIES: Record<Exclude<NodeCategory, 'command' | 'thinking' | 'context' | 'steering'>, readonly string[]> = {\n search: ['web_search', 'web_fetch'],\n agent: ['subagent', 'subagent_acp', 'subagent_fork', 'send_message', 'interrupt_agent', 'list_agents', 'report', 'workflow'],\n execute: ['bash', 'pwsh', 'run_code', 'terminal_open', 'terminal_close', 'terminal_list', 'terminal_read', 'terminal_send', 'terminal_signal', 'str_replace_editor'],\n file: ['read', 'write', 'edit', 'read_image', 'glob', 'grep'],\n task: ['todo_write', 'create_goal', 'get_goal', 'update_goal', 'job_kill', 'job_list', 'job_output', 'schedule_create', 'schedule_delete', 'schedule_list', 'exit_plan_mode'],\n other: [],\n}\n\n/** Selector matching every tool row inside a tool-call node. */\nconst TOOL_ROW = '[data-chat-flow-kind=\"tool-call\"] [data-tool]'\n/** The ToolRow root itself (carries data-variant; the wrapper callRow does not). */\nconst TOOL_ROW_ROOT = '[data-chat-flow-kind=\"tool-call\"] [data-tool][data-variant]'\n/** Selector of the command node wrapper. */\nconst COMMAND_ROW = '[data-chat-flow-kind=\"command\"]'\n/** Selector of the Think reasoning row. */\nconst THINK_ROW = '[data-variant=\"think\"]'\n/** Selector of the injected-context row (the flow-item wrapper). */\nconst CONTEXT_ROW = '[data-chat-flow-kind=\"context\"]'\n/** Selector of a settled tool-result row (rc.8: tool results render as their own row). */\nconst TOOL_RESULT_ROW = '[data-chat-flow-kind=\"tool-result\"]'\n\n/**\n * The rows that carry the accent paint: the ToolRow root (not its wrapper\n * callRow — both carry data-tool, only the inner row carries data-variant),\n * command nodes, Think rows, injected-context rows, and tool-result rows.\n * User input rows are excluded — right-alignment already\n * distinguishes them (2026-08-20 用户反馈);steering rows 也走独立规则\n * (见 buildCss:在 userStack 层做 wash,不涂整行 rail)。\n * The 3px inset rail is compensated\n * with a matching padding-left so the rail never covers the row's leading icon.\n */\nconst ACCENTED_ROWS = [\n TOOL_ROW_ROOT, COMMAND_ROW, THINK_ROW, CONTEXT_ROW, TOOL_RESULT_ROW,\n].join(',\\n')\n\n/**\n * Accept a configured CSS color (hex, color functions) or reject it so an\n * invalid value falls back to the category default instead of poisoning CSS.\n * @param value - configured color string.\n * @returns whether the value is a plausible CSS color literal.\n */\nexport function isCssColor(value: string): boolean {\n const trimmed = value.trim()\n if (trimmed === '') return false\n if (/^#[0-9a-f]{3,8}$/i.test(trimmed)) return true\n return /^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|device-cmyk)\\(/i.test(trimmed)\n}\n\n/** Resolve the effective palette from user settings merged over defaults. */\nexport function resolveColors(settings: NodeAppearanceSettings): NodeAppearanceColors {\n const colors: NodeAppearanceColors = { ...DEFAULT_COLORS }\n const configured = settings.colors\n if (configured !== undefined && typeof configured === 'object' && configured !== null) {\n for (const key of Object.keys(DEFAULT_COLORS) as NodeCategory[]) {\n const value = configured[key]\n if (typeof value === 'string' && isCssColor(value)) colors[key] = value\n }\n }\n return colors\n}\n\n/** Escape a tool name into a CSS attribute selector string literal. */\nfunction attributeLiteral(value: string): string {\n return value.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')\n}\n\n/**\n * Steering marker icon: a corner-up-left arrow (mid-turn guidance inserted\n * into the running answer), drawn as a mask so the icon inherits the\n * configured steering color. Encoded data URI, no external asset.\n */\nconst STEERING_ICON = \"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 14 4 9 9 4'/%3E%3Cpath d='M20 20v-7a4 4 0 0 0-4-4H4'/%3E%3C/svg%3E\"\n\n/**\n * Build the complete stylesheet text for one settings snapshot.\n * @param settings - the namespace scope value (may be partial or undefined).\n * @returns CSS text painting accent rows and (optionally) hiding Think rows.\n */\nexport function buildCss(settings: NodeAppearanceSettings | undefined): string {\n const colors = resolveColors(settings ?? {})\n const toolOverrides = settings?.toolColors\n const lines: string[] = []\n\n // Unlisted tools keep the neutral fallback. Declared BEFORE the per-tool\n // rules: both selectors carry equal specificity (two attribute selectors),\n // so of two conflicting declarations the later one wins — a fallback\n // declared after the category rules would override every category color.\n lines.push(`${TOOL_ROW} { --ncolor-accent: ${colors.other}; }`)\n\n // Per-tool accent assignments (explicit overrides win over category color).\n for (const [category, tools] of Object.entries(TOOL_CATEGORIES)) {\n const key = category as keyof typeof TOOL_CATEGORIES\n for (const tool of tools) {\n const override = toolOverrides?.[tool]\n const color = typeof override === 'string' && isCssColor(override)\n ? override\n : colors[key]\n lines.push(`[data-chat-flow-kind=\"tool-call\"] [data-tool=\"${attributeLiteral(tool)}\"] { --ncolor-accent: ${color}; }`)\n }\n }\n\n // Non-tool accent rows.\n lines.push(`${COMMAND_ROW} { --ncolor-accent: ${colors.command}; }`)\n lines.push(`${THINK_ROW} { --ncolor-accent: ${colors.thinking}; }`)\n lines.push(`${CONTEXT_ROW} { --ncolor-accent: ${colors.context}; }`)\n lines.push(`${TOOL_RESULT_ROW} { --ncolor-accent: ${colors.file}; }`)\n\n // One shared paint rule: 3px inset left rail (layout-free) + 8% wash. The\n // matching padding-left moves the row content off the rail so the leading\n // icon is never covered.\n lines.push(`${ACCENTED_ROWS} {\n box-shadow: inset 3px 0 0 var(--ncolor-accent);\n background-color: color-mix(in srgb, var(--ncolor-accent) 8%, transparent);\n padding-left: 3px;\n}`)\n\n // Steering rows (mid-turn user steering) stay visually distinct from plain\n // user rows with a compass marker beside the right-aligned bubble. The\n // marker is a mask over the user-stack — the container that hugs the bubble\n // — positioned to the left of it, so the tint reads as a glyph next to the\n // message rather than a detached full-width rail (2026-08-21 用户反馈:\n // 整行 rail 突兀,改在 userStack 层做图标区分;slot 方案不可行:\n // conversation.message.images 是 single 槽且已被官方 ui-attachment 占用).\n // alpha.2 锚点迁移(2026-08-31):消息行\"时间悬浮\"标识 data-time-hover-root\n // 已被 TurnTail/MessageItem 的 data-actions-reveal(always|hover)取代;\n // kind 与 首子=userStack 结构不变(ChatNodeSeat L206 / MessageItem L178 验证)。\n lines.push(`[data-chat-flow-kind=\"steering\"] [data-actions-reveal] > :first-child {\n position: relative;\n}`)\n lines.push(`[data-chat-flow-kind=\"steering\"] [data-actions-reveal] > :first-child::before {\n content: '';\n position: absolute;\n right: 100%;\n margin-right: 6px;\n top: 50%;\n width: 14px;\n height: 14px;\n transform: translateY(-50%);\n background-color: ${colors.steering};\n -webkit-mask: url(\"${STEERING_ICON}\") center / contain no-repeat;\n mask: url(\"${STEERING_ICON}\") center / contain no-repeat;\n}`)\n\n // Visibility switch: hide Think rows entirely on the frontend. `!important`\n // outranks the module stylesheet's `.root { display: flex }` (same\n // specificity, but the plugin style tag is injected before the module's).\n if (settings?.showThinking === false) {\n lines.push(`${THINK_ROW} { display: none !important; }`)\n // A think-only node leaves its flowItem seat with zero height: the seat\n // still consumes the column's 16px flex gap on both sides, doubling the\n // spacing between the neighbors. Hide the whole seat when the think row\n // is the only child of its block container — block-internal thinks\n // (text + reasoning in one node) stay gap-neutral after hiding the row.\n lines.push(\n `[data-chat-flow-kind=\"assistant\"]:has(${THINK_ROW}:only-child),`,\n `[data-chat-flow-kind=\"assistant-step\"]:has(${THINK_ROW}:only-child) { display: none !important; }`,\n )\n }\n\n return lines.join('\\n')\n}\n","/**\n * The node-appearance plugin config card. Mirrors the official\n * `settings.plugin.item` card chrome (PluginCard: card shell, name-over-\n * description header, chevron disclosure) with the DSH design tokens —\n * drawn by hand because a feature plugin must not runtime-import another\n * feature plugin's values (bundle purity gate).\n *\n * Writes are immediate: picking a color or flipping the Think switch applies\n * it right away (a palette is a live preview, not a staged form). The footer\n * carries one「恢复初始设置」button that resets the whole namespace to the\n * shipped defaults — two-click confirmation so a miss cannot wipe a custom\n * palette.\n */\n\nimport { useState, type ChangeEvent, type FormEvent } from 'react'\nimport type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { SettingsScope, SettingsScopeSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client'\nimport { IconChevronDownOutline14 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport {\n DEFAULT_COLORS, isCssColor, resolveColors, TOOL_CATEGORIES,\n type NodeAppearanceSettings, type NodeCategory,\n} from './palette.ts'\nimport css from './card.module.css'\n\n/** The card's inject face: the read-only scope snapshot plus write actions. */\nexport interface NodeAppearanceRowFace {\n hooks: {\n /** The bound settings-scope snapshot, rendered as useNodeAppearance. */\n nodeAppearance: ObservableSnapshot<SettingsScopeSnapshot<NodeAppearanceSettings>>\n }\n /** Persist one full value (reset-to-defaults path; resolves on Host settlement). */\n apply(value: NodeAppearanceSettings): Promise<void>\n /** Write the Think visibility switch. */\n setShowThinking(show: boolean): void\n /** Merge one category color into the palette section. */\n setCategoryColor(category: NodeCategory, color: string): void\n /** Merge one tool override into the toolColors section. */\n setToolColor(tool: string, color: string): void\n /** Remove one tool override. */\n removeToolColor(tool: string): void\n}\n\n/** Props the renderer binds for this plugin config card. */\nexport type NodeAppearanceRowProps =\n PropsRuntime<'settings.plugin.item'>\n & InjectFace<NodeAppearanceRowFace>\n\n/** Chinese labels per category (product copy is Chinese). */\nconst CATEGORY_LABELS: Record<NodeCategory, string> = {\n search: '联网搜索',\n agent: '智能体调用',\n execute: '代码 / 指令执行',\n file: '文件操作',\n task: '任务 / 目标',\n command: '指令节点',\n thinking: '思考过程',\n context: '上下文注入',\n steering: '模型引导',\n other: '其他工具',\n}\n\n/** Tools shown in the add-override autocomplete-free text input placeholder. */\nconst TOOL_SUGGESTIONS = Object.values(TOOL_CATEGORIES).flat().join('、')\n\n/** The card copy (one locale). */\nconst COPY = {\n title: '节点外观',\n description: '消息节点外观与颜色的偏好设置',\n reset: '恢复初始设置',\n resetConfirm: '再次点击确认恢复',\n resetting: '恢复中…',\n readOnly: '配置只读:插件主机侧未挂载或连接非本机。',\n loading: '配置加载中…',\n showThinking: '显示思考过程',\n showThinkingHint: '关闭后会话中的 Think 思考行隐藏',\n toolColors: '工具颜色覆盖(可选)',\n addTool: '添加',\n removeTool: '删除',\n}\n\n/** The shipped defaults, one face call away from any custom palette. */\nconst INITIAL_SETTINGS: NodeAppearanceSettings = {\n showThinking: true,\n colors: DEFAULT_COLORS,\n toolColors: {},\n}\n\n/**\n * Render the node-appearance config card.\n * @param props - the injected scope snapshot hook, its write actions.\n * @returns the card, matching the official plugin-card chrome.\n */\nexport function NodeAppearanceRow({ useNodeAppearance, apply, setShowThinking, setCategoryColor, setToolColor, removeToolColor }: NodeAppearanceRowProps) {\n const [open, setOpen] = useState(false)\n const [confirmReset, setConfirmReset] = useState(false)\n const [resetting, setResetting] = useState(false)\n const [toolName, setToolName] = useState('')\n const [toolColor, setToolColorDraft] = useState('#64748b')\n const snapshot = useNodeAppearance(snapshot => snapshot)\n const served = snapshot.value ?? {}\n const colors = resolveColors(served)\n const toolColors = served.toolColors ?? {}\n const showThinking = served.showThinking ?? true\n const disabled = snapshot.writable === false\n const unavailable = snapshot.status !== 'ready'\n\n const resetInitial = async (): Promise<void> => {\n if (resetting) return\n setResetting(true)\n try {\n await apply(INITIAL_SETTINGS)\n setConfirmReset(false)\n } catch {\n // A refused reset just leaves the current palette in place.\n } finally {\n setResetting(false)\n }\n }\n\n const handleReset = (): void => {\n if (confirmReset) {\n void resetInitial()\n } else {\n setConfirmReset(true)\n }\n }\n\n const addTool = (event: FormEvent): void => {\n event.preventDefault()\n const name = toolName.trim()\n if (name === '' || !isCssColor(toolColor)) return\n setToolColor(name, toolColor)\n setToolName('')\n }\n\n return (\n <li className={css.card + (open ? ' ' + css.cardOpen : '')}>\n <button\n type=\"button\"\n className={css.header}\n aria-expanded={open}\n aria-label={`${open ? '收起' : '展开'}:${COPY.title}`}\n onClick={() => { setOpen(!open) }}\n >\n <span className={css.headText}>\n <span className={css.name}>{COPY.title}</span>\n <span className={css.description}>{COPY.description}</span>\n </span>\n <IconChevronDownOutline14 className={css.chevron + (open ? ' ' + css.chevronOpen : '')} />\n </button>\n {open && (\n <div className={css.body}>\n {unavailable && !disabled && <p className={css.statusLine}>{COPY.loading}</p>}\n {disabled && <p className={css.readOnly} role=\"status\">{COPY.readOnly}</p>}\n <div className={disabled ? css.disabled : ''}>\n <div className={css.row}>\n <label className={css.rowLabel} htmlFor=\"node-appearance-show-thinking\">{COPY.showThinking}</label>\n <span className={css.rowHint}>{COPY.showThinkingHint}</span>\n <button\n id=\"node-appearance-show-thinking\"\n className={css.switch + (showThinking ? ' ' + css.on : '')}\n type=\"button\"\n aria-pressed={showThinking}\n onClick={() => { setShowThinking(!showThinking) }}\n >\n <span className={css.knob} />\n </button>\n </div>\n {(Object.keys(CATEGORY_LABELS) as NodeCategory[]).map(category => (\n <div className={css.row} key={category}>\n <label className={css.rowLabel} htmlFor={`node-appearance-color-${category}`}>{CATEGORY_LABELS[category]}</label>\n <input\n id={`node-appearance-color-${category}`}\n className={css.colorInput}\n type=\"color\"\n value={colors[category]}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setCategoryColor(category, event.target.value) }}\n />\n <span className={css.colorValue}>{colors[category]}</span>\n </div>\n ))}\n <div className={css.sectionTitle}>{COPY.toolColors}</div>\n {Object.entries(toolColors).map(([tool, color]) => (\n <div className={css.row} key={tool}>\n <span className={css.toolName} title={tool}>{tool}</span>\n <input\n className={css.colorInput}\n type=\"color\"\n value={isCssColor(color) ? color : DEFAULT_COLORS.other}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setToolColor(tool, event.target.value) }}\n />\n <button type=\"button\" className={css.removeButton} onClick={() => { removeToolColor(tool) }}>{COPY.removeTool}</button>\n </div>\n ))}\n <form className={css.addRow} onSubmit={addTool}>\n <input\n className={css.toolInput}\n type=\"text\"\n placeholder={`工具名,如 ${TOOL_SUGGESTIONS}`}\n value={toolName}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setToolName(event.target.value) }}\n />\n <input className={css.colorInput} type=\"color\" value={toolColor} onChange={(event: ChangeEvent<HTMLInputElement>) => { setToolColorDraft(event.target.value) }} />\n <button type=\"submit\" className={css.addButton} disabled={toolName.trim() === ''}>{COPY.addTool}</button>\n </form>\n </div>\n <div className={css.footer}>\n <button\n type=\"button\"\n className={css.reset + (confirmReset ? ' ' + css.resetConfirm : '')}\n disabled={resetting}\n onClick={handleReset}\n >{resetting ? COPY.resetting : confirmReset ? COPY.resetConfirm : COPY.reset}</button>\n </div>\n </div>\n )}\n </li>\n )\n}\n","/**\n * Browser half: binds the `node-appearance` settings scope, paints the chat\n * flow from it (a single <style data-plugin-css> tag rebuilt on every\n * snapshot change), and registers the settings card.\n */\n\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\nimport type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client'\n// Type-only: the ctx.settingsScope Context merge and the slot's declaration.\n// Cross-plugin collaboration goes through cordis services; a value import\n// would fail the client bundle-purity gate.\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-settings-plugins/client'\n// Type-only: the ctx.slots Context merge comes from the renderer package\n// (slot registry), not from the removed dsh-client-runtime module.\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport { buildCss, NODE_APPEARANCE_NS, STYLE_TAG_ID, type NodeAppearanceSettings } from './palette.ts'\nimport { NodeAppearanceRow, type NodeAppearanceRowFace } from './settings-card.tsx'\n\nexport const inject = ['slots', 'connection', 'remote', 'settingsScope']\n\n/** Upsert the plugin's paint stylesheet with the current snapshot's CSS. */\nfunction paint(scope: SettingsScope<NodeAppearanceSettings>): void {\n let tag = document.querySelector<HTMLStyleElement>(`style[data-plugin-css=\"${STYLE_TAG_ID}\"]`)\n if (tag === null) {\n tag = document.createElement('style')\n tag.dataset.plugin = NODE_APPEARANCE_NS\n tag.dataset.pluginCss = STYLE_TAG_ID\n document.head.appendChild(tag)\n }\n tag.textContent = buildCss(scope.getSnapshot().value)\n}\n\n/**\n * Mount the node-appearance plugin on the page.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n // settingsScope 由官方 ui-settings 服务提供(DSH 0.1.2-alpha 内核 client\n // 模块表);bind 返回该命名空间的强类型 scope(read/set/unset/subscribe)。\n const scope = ctx.settingsScope.bind<NodeAppearanceSettings>({ namespace: NODE_APPEARANCE_NS })\n // Paint once from the current snapshot (defaults before the first Host read).\n paint(scope)\n ctx.effect(\n () => scope.subscribe(() => { paint(scope) }),\n 'dsh-node-appearance: repaint on settings change',\n )\n\n const face: NodeAppearanceRowFace = {\n hooks: { nodeAppearance: scope },\n // Staged-edit save: write the three keys in one face call (Host settles\n // the whole namespace; per-key resolution keeps observable semantics).\n apply: async (value) => {\n await scope.set('showThinking', value.showThinking ?? true)\n await scope.set('colors', value.colors ?? {})\n await scope.set('toolColors', value.toolColors ?? {})\n },\n setShowThinking: (show) => { void scope.set('showThinking', show) },\n setCategoryColor: (category, color) => {\n const value = scope.getSnapshot().value\n void scope.set('colors', { ...value?.colors, [category]: color })\n },\n setToolColor: (tool, color) => {\n const value = scope.getSnapshot().value\n void scope.set('toolColors', { ...value?.toolColors, [tool]: color })\n },\n removeToolColor: (tool) => {\n const value = scope.getSnapshot().value\n const toolColors = { ...value?.toolColors }\n delete toolColors[tool]\n void scope.set('toolColors', toolColors)\n },\n }\n\n // alpha.2:General 区 slot(settings.general.item)已退役,接入官方\n // 「可配置插件」Tab 的 settings.plugin.item(keyed by namespace)——官方\n // 卡片姿势见 dsh-client-ui-settings-plugins/src/client/index.ts(BashCard 等)。\n ctx.slots.inject('settings.plugin.item', () => ctx.slots.register({\n name: 'settings.plugin.item',\n key: NODE_APPEARANCE_NS,\n inject: () => face,\n // npm ui-slots (0.0.1-rc.1) 类型未合并 keyed-slot 选项(官方 monorepo 类型\n // 才有)——运行时与官方源码一致,类型期放宽(官方类型同步后收紧)。\n } as never, NodeAppearanceRow))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;EASA,MAAa,qBAAqB;;EAGlC,MAAa,eAAe,GAAG,mBAAmB;;EAoBlD,MAAa,iBAAuC;GAClD,QAAQ;GACR,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;GACV,SAAS;GACT,UAAU;GACV,OAAO;EACT;;EAGA,MAAa,kBAAqH;GAChI,QAAQ,CAAC,cAAc,WAAW;GAClC,OAAO;IAAC;IAAY;IAAgB;IAAiB;IAAgB;IAAmB;IAAe;IAAU;GAAU;GAC3H,SAAS;IAAC;IAAQ;IAAQ;IAAY;IAAiB;IAAkB;IAAiB;IAAiB;IAAiB;IAAmB;GAAoB;GACnK,MAAM;IAAC;IAAQ;IAAS;IAAQ;IAAc;IAAQ;GAAM;GAC5D,MAAM;IAAC;IAAc;IAAe;IAAY;IAAe;IAAY;IAAY;IAAc;IAAmB;IAAmB;IAAiB;GAAgB;GAC5K,OAAO,CAAC;EACV;;EAGA,MAAM,WAAW;;EAEjB,MAAM,gBAAgB;;EAEtB,MAAM,cAAc;;EAEpB,MAAM,YAAY;;EAElB,MAAM,cAAc;;EAEpB,MAAM,kBAAkB;;;;;;;;;;;EAYxB,MAAM,gBAAgB;GACpB;GAAe;GAAa;GAAW;GAAa;EACtD,CAAC,CAAC,KAAK,KAAK;;;;;;;EAQZ,SAAgB,WAAW,OAAwB;GACjD,MAAM,UAAU,MAAM,KAAK;GAC3B,IAAI,YAAY,IAAI,OAAO;GAC3B,IAAI,oBAAoB,KAAK,OAAO,GAA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;GAAE,CAAC,GAC5C,iDACF;GAEA,MAAM,OAA8B;IAClC,OAAO,EAAE,gBAAgB,MAAM;IAG/B,OAAO,OAAO,UAAU;KACtB,MAAM,MAAM,IAAI,gBAAgB,MAAM,gBAAgB,IAAI;KAC1D,MAAM,MAAM,IAAI,UAAU,MAAM,UAAU,CAAC,CAAC;KAC5C,MAAM,MAAM,IAAI,cAAc,MAAM,cAAc,CAAC,CAAC;IACtD;IACA,kBAAkB,SAAS;KAAE,MAAW,IAAI,gBAAgB,IAAI;IAAE;IAClE,mBAAmB,UAAU,UAAU;KACrC,MAAM,QAAQ,MAAM,YAAY,CAAC,CAAC;KAClC,MAAW,IAAI,UAAU;MAAE,GAAG,OAAO;OAAS,WAAW;KAAM,CAAC;IAClE;IACA,eAAe,MAAM,UAAU;KAC7B,MAAM,QAAQ,MAAM,YAAY,CAAC,CAAC;KAClC,MAAW,IAAI,cAAc;MAAE,GAAG,OAAO;OAAa,OAAO;KAAM,CAAC;IACtE;IACA,kBAAkB,SAAS;KAEzB,MAAM,aAAa,EAAE,GADP,MAAM,YAAY,CAAC,CAAC,OACH,WAAW;KAC1C,OAAO,WAAW;KAClB,MAAW,IAAI,cAAc,UAAU;IACzC;GACF;GAKA,IAAI,MAAM,OAAO,8BAA8B,IAAI,MAAM,SAAS;IAChE,MAAM;IACN,KAAK;IACL,cAAc;GAGhB,GAAY,iBAAiB,CAAC;EAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAanE,eAAO,MAAM,MAAM,UAAqD,CAAA;AAcxE;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAwC9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":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AK,EAAE,MAAM,GAAG,OAAO,CAKjD;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,sBAAsB,GAAG,oBAAoB,CAUpF;AAcD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,GAAG,SAAS,GAAG,MAAM,CAkF7E"}
@@ -1,22 +1,28 @@
1
1
  /**
2
- * The plugin's General-settings row: a "节点外观" title with the standard
3
- * chevron, expanding to palette rows, tool overrides, and the Think
4
- * visibility switch. Reads the namespace scope through the injected hooks
5
- * face and writes through the injected actions; every change applies
6
- * immediately. Drawn by hand (no value import from ui-settings-plugins — the
7
- * client bundle purity gate forbids cross-plugin value imports), styled with
8
- * the DSH design tokens like the shipped Appearance row.
2
+ * The node-appearance plugin config card. Mirrors the official
3
+ * `settings.plugin.item` card chrome (PluginCard: card shell, name-over-
4
+ * description header, chevron disclosure) with the DSH design tokens —
5
+ * drawn by hand because a feature plugin must not runtime-import another
6
+ * feature plugin's values (bundle purity gate).
7
+ *
8
+ * Writes are immediate: picking a color or flipping the Think switch applies
9
+ * it right away (a palette is a live preview, not a staged form). The footer
10
+ * carries one「恢复初始设置」button that resets the whole namespace to the
11
+ * shipped defaults — two-click confirmation so a miss cannot wipe a custom
12
+ * palette.
9
13
  */
10
14
  import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
11
15
  import type { SettingsScopeSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client';
12
16
  import type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
13
17
  import { type NodeAppearanceSettings, type NodeCategory } from './palette.ts';
14
- /** The row's inject face: the read-only scope snapshot plus write actions. */
18
+ /** The card's inject face: the read-only scope snapshot plus write actions. */
15
19
  export interface NodeAppearanceRowFace {
16
20
  hooks: {
17
21
  /** The bound settings-scope snapshot, rendered as useNodeAppearance. */
18
22
  nodeAppearance: ObservableSnapshot<SettingsScopeSnapshot<NodeAppearanceSettings>>;
19
23
  };
24
+ /** Persist one full value (reset-to-defaults path; resolves on Host settlement). */
25
+ apply(value: NodeAppearanceSettings): Promise<void>;
20
26
  /** Write the Think visibility switch. */
21
27
  setShowThinking(show: boolean): void;
22
28
  /** Merge one category color into the palette section. */
@@ -29,9 +35,9 @@ export interface NodeAppearanceRowFace {
29
35
  /** Props the renderer binds for this plugin config card. */
30
36
  export type NodeAppearanceRowProps = PropsRuntime<'settings.plugin.item'> & InjectFace<NodeAppearanceRowFace>;
31
37
  /**
32
- * Render the node-appearance General row.
33
- * @param props - the injected scope snapshot hook and write actions.
34
- * @returns the row, always visible once its namespace is served.
38
+ * Render the node-appearance config card.
39
+ * @param props - the injected scope snapshot hook, its write actions.
40
+ * @returns the card, matching the official plugin-card chrome.
35
41
  */
36
- export declare function NodeAppearanceRow({ useNodeAppearance, setShowThinking, setCategoryColor, setToolColor, removeToolColor }: NodeAppearanceRowProps): import("react").JSX.Element;
42
+ export declare function NodeAppearanceRow({ useNodeAppearance, apply, setShowThinking, setCategoryColor, setToolColor, removeToolColor }: NodeAppearanceRowProps): import("react").JSX.Element;
37
43
  //# sourceMappingURL=settings-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings-card.d.ts","sourceRoot":"","sources":["../../../src/client/settings-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,KAAK,EAAiB,qBAAqB,EAAE,MAAM,4CAA4C,CAAA;AAEtG,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAEhF,OAAO,EAEL,KAAK,sBAAsB,EAAE,KAAK,YAAY,EAC/C,MAAM,cAAc,CAAA;AAGrB,8EAA8E;AAC9E,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE;QACL,wEAAwE;QACxE,cAAc,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CA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AAyC;IACzC,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpC,yDAAyD;IACzD,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7D,2DAA2D;IAC3D,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/C,gCAAgC;IAChC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC;AAED,4DAA4D;AAC5D,MAAM,MAAM,sBAAsB,GAChC,YAAY,CAAC,sBAAsB,CAAC,GAClC,UAAU,CAAC,qBAAqB,CAAC,CAAA;AA0CrC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,sBAAsB,+BA8HvJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@max-null/dsh-node-appearance",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "会话节点外观插件:按节点类型/工具名着色的可配置配色,思考过程显示开关(DeepSeek Harness Web GUI)",
5
5
  "license": "MIT",
6
6
  "publishConfig": {