dsh-plugin-inspiration-workbench 0.4.0 → 0.6.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-inspiration-workbench",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Open many DeepSeek Harness sessions side by side as draggable, stackable cards on a free canvas.",
@@ -1655,16 +1655,25 @@ export function createBoard({ host, adapter, approvals, t, onOpenSession }) {
1655
1655
  const targetCard = cardOfPipeTarget(target);
1656
1656
 
1657
1657
  // A note downstream just collects the text, whatever its mode says.
1658
+ // Several cards may land in the same note, so each delivery is wrapped in
1659
+ // a titled block with a timestamp.
1658
1660
  if (target.kind === 'note') {
1659
1661
  if (!targetCard) continue;
1660
1662
  const area = targetCard.el?.querySelector('.iwb-note-input');
1661
1663
  if (!area) continue;
1662
- area.value = area.value ? area.value.replace(/\s*$/, '\n\n') + text : text;
1664
+ const block = t('pipe.noteBlock')
1665
+ .replace('{title}', card.title || t('untitled'))
1666
+ .replace('{time}', canvasStamp())
1667
+ .replace('{text}', text);
1668
+ // 'replace' keeps the note as a single latest block (a summary pane);
1669
+ // 'append' (default) grows a log of every delivery.
1670
+ const replace = target.write === 'replace';
1671
+ area.value = replace ? block : area.value.trim() ? area.value.replace(/\s*$/, '\n\n') + block : block;
1663
1672
  area.dispatchEvent(new Event('input', { bubbles: true }));
1664
1673
  targetCard.pipeDepth = depth;
1665
1674
  card.pipedFingerprints[key] = fingerprint;
1666
1675
  ensureVisible(targetCard);
1667
- toast(t('pipe.noted').replace('{name}', targetCard.title || t('untitled')));
1676
+ toast(t(replace ? 'pipe.notedReplaced' : 'pipe.noted').replace('{name}', targetCard.title || t('untitled')));
1668
1677
  continue;
1669
1678
  }
1670
1679
 
@@ -1737,9 +1746,31 @@ export function createBoard({ host, adapter, approvals, t, onOpenSession }) {
1737
1746
  pop.appendChild(row);
1738
1747
  }
1739
1748
  } else {
1740
- const statusRow = el('div', 'iwb-popover-note');
1741
- statusRow.textContent = t('pipe.noteHint');
1742
- pop.appendChild(statusRow);
1749
+ const write = target.write === 'replace' ? 'replace' : 'append';
1750
+ const writes = [
1751
+ { id: 'append', label: t('pipe.noteAppend'), hint: t('pipe.noteAppendHint') },
1752
+ { id: 'replace', label: t('pipe.noteReplace'), hint: t('pipe.noteReplaceHint') },
1753
+ ];
1754
+ for (const option of writes) {
1755
+ const row = el('button', 'iwb-model-row' + (write === option.id ? ' current' : ''));
1756
+ row.type = 'button';
1757
+ row.innerHTML = '<span class="iwb-model-main"><span class="iwb-model-name"></span><span class="iwb-model-desc"></span></span>' + (write === option.id ? '<span class="iwb-check">✓</span>' : '');
1758
+ row.querySelector('.iwb-model-name').textContent = option.label;
1759
+ row.querySelector('.iwb-model-desc').textContent = option.hint;
1760
+ row.addEventListener('click', (event) => {
1761
+ event.stopPropagation();
1762
+ const targets = pipeTargets(card).map((entry) =>
1763
+ entry.kind === target.kind && entry.id === target.id ? { ...entry, write: option.id } : entry
1764
+ );
1765
+ setPipeTargets(card, targets);
1766
+ renderPipeBadge(card);
1767
+ schedulePipelines();
1768
+ saveSoon();
1769
+ closePipeMenu();
1770
+ toast(option.id === 'replace' ? t('pipe.modeReplace') : t('pipe.modeAppend'));
1771
+ });
1772
+ pop.appendChild(row);
1773
+ }
1743
1774
  }
1744
1775
 
1745
1776
  const remove = el('button', 'iwb-model-row iwb-link-remove');
@@ -128,8 +128,16 @@ const zh = {
128
128
  'pipe.already': '已经连过「{name}」了',
129
129
  'pipe.multi': '→ {n} 个下游',
130
130
  'pipe.noted': '结果已追加到便签「{name}」',
131
+ 'pipe.noteBlock': '## 来自「{title}」 · {time}\n\n{text}',
131
132
  'pipe.noteTarget': '流水线 → 便签',
132
- 'pipe.noteHint': '下游是便签:跑完把结果追加进去,不发送',
133
+ 'pipe.noteHint': '下游是便签:跑完把结果写进去,不发送',
134
+ 'pipe.noteAppend': '追加到便签',
135
+ 'pipe.noteAppendHint': '每轮都接在后面,像日志',
136
+ 'pipe.noteReplace': '只保留最新一段',
137
+ 'pipe.noteReplaceHint': '覆盖旧内容,当汇总栏用',
138
+ 'pipe.modeAppend': '便签:追加模式',
139
+ 'pipe.modeReplace': '便签:只保留最新一段',
140
+ 'pipe.notedReplaced': '已覆盖便签「{name}」为最新结果',
133
141
  'pipe.removeNote': '删除这条便签流水线',
134
142
  'pipe.port': '拖这条线到另一张卡,建立流水线',
135
143
  'pipe.created': '流水线已连到「{name}」',
@@ -420,8 +428,16 @@ const en = {
420
428
  'pipe.already': '“{name}” is already connected',
421
429
  'pipe.multi': '→ {n} downstream',
422
430
  'pipe.noted': 'Result appended to note “{name}”',
431
+ 'pipe.noteBlock': '## From “{title}” · {time}\n\n{text}',
423
432
  'pipe.noteTarget': 'Pipeline → note',
424
- 'pipe.noteHint': 'Note downstream: the result is appended, never sent',
433
+ 'pipe.noteHint': 'Note downstream: the result is written into the note, never sent',
434
+ 'pipe.noteAppend': 'Append to the note',
435
+ 'pipe.noteAppendHint': 'Keep every run, like a log',
436
+ 'pipe.noteReplace': 'Keep only the latest',
437
+ 'pipe.noteReplaceHint': 'Overwrite, for a summary pane',
438
+ 'pipe.modeAppend': 'Note: append mode',
439
+ 'pipe.modeReplace': 'Note: keep only the latest',
440
+ 'pipe.notedReplaced': 'Note “{name}” replaced with the latest result',
425
441
  'pipe.removeNote': 'Remove this note pipeline',
426
442
  'pipe.port': 'Drag this line onto another card to wire a pipeline',
427
443
  'pipe.created': 'Pipeline wired to “{name}”',