dsh-plugin-inspiration-workbench 0.5.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/README.md +4 -4
- package/lib/client.js +44 -7
- package/lib/client.js.map +2 -2
- package/package.json +1 -1
- package/src/client/board.js +30 -5
- package/src/client/index.jsx +16 -2
package/package.json
CHANGED
package/src/client/board.js
CHANGED
|
@@ -1665,12 +1665,15 @@ export function createBoard({ host, adapter, approvals, t, onOpenSession }) {
|
|
|
1665
1665
|
.replace('{title}', card.title || t('untitled'))
|
|
1666
1666
|
.replace('{time}', canvasStamp())
|
|
1667
1667
|
.replace('{text}', text);
|
|
1668
|
-
|
|
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;
|
|
1669
1672
|
area.dispatchEvent(new Event('input', { bubbles: true }));
|
|
1670
1673
|
targetCard.pipeDepth = depth;
|
|
1671
1674
|
card.pipedFingerprints[key] = fingerprint;
|
|
1672
1675
|
ensureVisible(targetCard);
|
|
1673
|
-
toast(t('pipe.noted').replace('{name}', targetCard.title || t('untitled')));
|
|
1676
|
+
toast(t(replace ? 'pipe.notedReplaced' : 'pipe.noted').replace('{name}', targetCard.title || t('untitled')));
|
|
1674
1677
|
continue;
|
|
1675
1678
|
}
|
|
1676
1679
|
|
|
@@ -1743,9 +1746,31 @@ export function createBoard({ host, adapter, approvals, t, onOpenSession }) {
|
|
|
1743
1746
|
pop.appendChild(row);
|
|
1744
1747
|
}
|
|
1745
1748
|
} else {
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1748
|
-
|
|
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
|
+
}
|
|
1749
1774
|
}
|
|
1750
1775
|
|
|
1751
1776
|
const remove = el('button', 'iwb-model-row iwb-link-remove');
|
package/src/client/index.jsx
CHANGED
|
@@ -130,7 +130,14 @@ const zh = {
|
|
|
130
130
|
'pipe.noted': '结果已追加到便签「{name}」',
|
|
131
131
|
'pipe.noteBlock': '## 来自「{title}」 · {time}\n\n{text}',
|
|
132
132
|
'pipe.noteTarget': '流水线 → 便签',
|
|
133
|
-
'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}」为最新结果',
|
|
134
141
|
'pipe.removeNote': '删除这条便签流水线',
|
|
135
142
|
'pipe.port': '拖这条线到另一张卡,建立流水线',
|
|
136
143
|
'pipe.created': '流水线已连到「{name}」',
|
|
@@ -423,7 +430,14 @@ const en = {
|
|
|
423
430
|
'pipe.noted': 'Result appended to note “{name}”',
|
|
424
431
|
'pipe.noteBlock': '## From “{title}” · {time}\n\n{text}',
|
|
425
432
|
'pipe.noteTarget': 'Pipeline → note',
|
|
426
|
-
'pipe.noteHint': 'Note downstream: the result is
|
|
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',
|
|
427
441
|
'pipe.removeNote': 'Remove this note pipeline',
|
|
428
442
|
'pipe.port': 'Drag this line onto another card to wire a pipeline',
|
|
429
443
|
'pipe.created': 'Pipeline wired to “{name}”',
|