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/README.md +5 -1
- package/lib/client.js +47 -7
- package/lib/client.js.map +2 -2
- package/package.json +1 -1
- package/src/client/board.js +36 -5
- package/src/client/index.jsx +18 -2
package/README.md
CHANGED
|
@@ -38,6 +38,10 @@ DSH 一次只能打开一个会话:想同时看三条线的进展,只能来
|
|
|
38
38
|
|---|---|
|
|
39
39
|
|  |  |
|
|
40
40
|
|
|
41
|
+
| 便签投递带标题和时间戳 | 便签可设为「只保留最新」 |
|
|
42
|
+
|---|---|
|
|
43
|
+
|  |  |
|
|
44
|
+
|
|
41
45
|
---
|
|
42
46
|
|
|
43
47
|
## 功能 / Features
|
|
@@ -46,7 +50,7 @@ DSH 一次只能打开一个会话:想同时看三条线的进展,只能来
|
|
|
46
50
|
- 侧栏会话行的 `+` 把会话加成卡片;侧栏点击行为不变
|
|
47
51
|
- 拖动 / 缩放 / 叠成一摞 / 双击居中 / 点空白平移 / ⌘+滚轮缩放
|
|
48
52
|
- **命名画布**:保存当前这面墙、切换回之前保存的画布、覆盖 / 删除;数据存 Host,刷新不丢
|
|
49
|
-
-
|
|
53
|
+
- **流水线**:从卡片右侧端口拖一条线到另一张卡即建立;**一条卡可连多个下游**(扇出),下游可以是会话卡,也可以是**便签卡**(结果按 `## 来自「卡片名」 · 时间` 分块写入;便签可选「追加」或「只保留最新一段」);点连线切换「自动发送 / 只填草稿」或删除
|
|
50
54
|
- 卡片头部操作常驻显示(流水线 / 大纲 / 搜索 / ⋯ / 关闭),次要操作用「⋯」收纳,窄卡片也不挤
|
|
51
55
|
- 便签卡(随手记)、钉住位置、未读圆点、复制为 Markdown、在原生会话打开
|
|
52
56
|
|
package/lib/client.js
CHANGED
|
@@ -3967,12 +3967,14 @@ function createBoard({ host, adapter, approvals, t: t2, onOpenSession }) {
|
|
|
3967
3967
|
if (!targetCard) continue;
|
|
3968
3968
|
const area = targetCard.el?.querySelector(".iwb-note-input");
|
|
3969
3969
|
if (!area) continue;
|
|
3970
|
-
|
|
3970
|
+
const block = t2("pipe.noteBlock").replace("{title}", card.title || t2("untitled")).replace("{time}", canvasStamp()).replace("{text}", text);
|
|
3971
|
+
const replace = target.write === "replace";
|
|
3972
|
+
area.value = replace ? block : area.value.trim() ? area.value.replace(/\s*$/, "\n\n") + block : block;
|
|
3971
3973
|
area.dispatchEvent(new Event("input", { bubbles: true }));
|
|
3972
3974
|
targetCard.pipeDepth = depth;
|
|
3973
3975
|
card.pipedFingerprints[key] = fingerprint;
|
|
3974
3976
|
ensureVisible(targetCard);
|
|
3975
|
-
toast(t2("pipe.noted").replace("{name}", targetCard.title || t2("untitled")));
|
|
3977
|
+
toast(t2(replace ? "pipe.notedReplaced" : "pipe.noted").replace("{name}", targetCard.title || t2("untitled")));
|
|
3976
3978
|
continue;
|
|
3977
3979
|
}
|
|
3978
3980
|
if (target.mode === "draft") {
|
|
@@ -4040,9 +4042,31 @@ function createBoard({ host, adapter, approvals, t: t2, onOpenSession }) {
|
|
|
4040
4042
|
pop.appendChild(row);
|
|
4041
4043
|
}
|
|
4042
4044
|
} else {
|
|
4043
|
-
const
|
|
4044
|
-
|
|
4045
|
-
|
|
4045
|
+
const write = target.write === "replace" ? "replace" : "append";
|
|
4046
|
+
const writes = [
|
|
4047
|
+
{ id: "append", label: t2("pipe.noteAppend"), hint: t2("pipe.noteAppendHint") },
|
|
4048
|
+
{ id: "replace", label: t2("pipe.noteReplace"), hint: t2("pipe.noteReplaceHint") }
|
|
4049
|
+
];
|
|
4050
|
+
for (const option of writes) {
|
|
4051
|
+
const row = el("button", "iwb-model-row" + (write === option.id ? " current" : ""));
|
|
4052
|
+
row.type = "button";
|
|
4053
|
+
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">\u2713</span>' : "");
|
|
4054
|
+
row.querySelector(".iwb-model-name").textContent = option.label;
|
|
4055
|
+
row.querySelector(".iwb-model-desc").textContent = option.hint;
|
|
4056
|
+
row.addEventListener("click", (event) => {
|
|
4057
|
+
event.stopPropagation();
|
|
4058
|
+
const targets = pipeTargets(card).map(
|
|
4059
|
+
(entry) => entry.kind === target.kind && entry.id === target.id ? { ...entry, write: option.id } : entry
|
|
4060
|
+
);
|
|
4061
|
+
setPipeTargets(card, targets);
|
|
4062
|
+
renderPipeBadge(card);
|
|
4063
|
+
schedulePipelines();
|
|
4064
|
+
saveSoon();
|
|
4065
|
+
closePipeMenu();
|
|
4066
|
+
toast(option.id === "replace" ? t2("pipe.modeReplace") : t2("pipe.modeAppend"));
|
|
4067
|
+
});
|
|
4068
|
+
pop.appendChild(row);
|
|
4069
|
+
}
|
|
4046
4070
|
}
|
|
4047
4071
|
const remove = el("button", "iwb-model-row iwb-link-remove");
|
|
4048
4072
|
remove.type = "button";
|
|
@@ -6219,8 +6243,16 @@ var zh = {
|
|
|
6219
6243
|
"pipe.already": "\u5DF2\u7ECF\u8FDE\u8FC7\u300C{name}\u300D\u4E86",
|
|
6220
6244
|
"pipe.multi": "\u2192 {n} \u4E2A\u4E0B\u6E38",
|
|
6221
6245
|
"pipe.noted": "\u7ED3\u679C\u5DF2\u8FFD\u52A0\u5230\u4FBF\u7B7E\u300C{name}\u300D",
|
|
6246
|
+
"pipe.noteBlock": "## \u6765\u81EA\u300C{title}\u300D \xB7 {time}\n\n{text}",
|
|
6222
6247
|
"pipe.noteTarget": "\u6D41\u6C34\u7EBF \u2192 \u4FBF\u7B7E",
|
|
6223
|
-
"pipe.noteHint": "\u4E0B\u6E38\u662F\u4FBF\u7B7E\uFF1A\u8DD1\u5B8C\u628A\u7ED3\u679C\
|
|
6248
|
+
"pipe.noteHint": "\u4E0B\u6E38\u662F\u4FBF\u7B7E\uFF1A\u8DD1\u5B8C\u628A\u7ED3\u679C\u5199\u8FDB\u53BB\uFF0C\u4E0D\u53D1\u9001",
|
|
6249
|
+
"pipe.noteAppend": "\u8FFD\u52A0\u5230\u4FBF\u7B7E",
|
|
6250
|
+
"pipe.noteAppendHint": "\u6BCF\u8F6E\u90FD\u63A5\u5728\u540E\u9762\uFF0C\u50CF\u65E5\u5FD7",
|
|
6251
|
+
"pipe.noteReplace": "\u53EA\u4FDD\u7559\u6700\u65B0\u4E00\u6BB5",
|
|
6252
|
+
"pipe.noteReplaceHint": "\u8986\u76D6\u65E7\u5185\u5BB9\uFF0C\u5F53\u6C47\u603B\u680F\u7528",
|
|
6253
|
+
"pipe.modeAppend": "\u4FBF\u7B7E\uFF1A\u8FFD\u52A0\u6A21\u5F0F",
|
|
6254
|
+
"pipe.modeReplace": "\u4FBF\u7B7E\uFF1A\u53EA\u4FDD\u7559\u6700\u65B0\u4E00\u6BB5",
|
|
6255
|
+
"pipe.notedReplaced": "\u5DF2\u8986\u76D6\u4FBF\u7B7E\u300C{name}\u300D\u4E3A\u6700\u65B0\u7ED3\u679C",
|
|
6224
6256
|
"pipe.removeNote": "\u5220\u9664\u8FD9\u6761\u4FBF\u7B7E\u6D41\u6C34\u7EBF",
|
|
6225
6257
|
"pipe.port": "\u62D6\u8FD9\u6761\u7EBF\u5230\u53E6\u4E00\u5F20\u5361\uFF0C\u5EFA\u7ACB\u6D41\u6C34\u7EBF",
|
|
6226
6258
|
"pipe.created": "\u6D41\u6C34\u7EBF\u5DF2\u8FDE\u5230\u300C{name}\u300D",
|
|
@@ -6510,8 +6542,16 @@ var en = {
|
|
|
6510
6542
|
"pipe.already": "\u201C{name}\u201D is already connected",
|
|
6511
6543
|
"pipe.multi": "\u2192 {n} downstream",
|
|
6512
6544
|
"pipe.noted": "Result appended to note \u201C{name}\u201D",
|
|
6545
|
+
"pipe.noteBlock": "## From \u201C{title}\u201D \xB7 {time}\n\n{text}",
|
|
6513
6546
|
"pipe.noteTarget": "Pipeline \u2192 note",
|
|
6514
|
-
"pipe.noteHint": "Note downstream: the result is
|
|
6547
|
+
"pipe.noteHint": "Note downstream: the result is written into the note, never sent",
|
|
6548
|
+
"pipe.noteAppend": "Append to the note",
|
|
6549
|
+
"pipe.noteAppendHint": "Keep every run, like a log",
|
|
6550
|
+
"pipe.noteReplace": "Keep only the latest",
|
|
6551
|
+
"pipe.noteReplaceHint": "Overwrite, for a summary pane",
|
|
6552
|
+
"pipe.modeAppend": "Note: append mode",
|
|
6553
|
+
"pipe.modeReplace": "Note: keep only the latest",
|
|
6554
|
+
"pipe.notedReplaced": "Note \u201C{name}\u201D replaced with the latest result",
|
|
6515
6555
|
"pipe.removeNote": "Remove this note pipeline",
|
|
6516
6556
|
"pipe.port": "Drag this line onto another card to wire a pipeline",
|
|
6517
6557
|
"pipe.created": "Pipeline wired to \u201C{name}\u201D",
|