dsh-edit-turn 0.2.5 → 0.2.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/README.md +4 -0
- package/lib/client.js +13 -7
- package/lib/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -218,6 +218,10 @@ ln -s /path/to/dsh-install/node_modules ./node_modules
|
|
|
218
218
|
|
|
219
219
|
### 更新日志
|
|
220
220
|
|
|
221
|
+
**0.2.6** —— 修「改写过的提示词,再点它的笔没反应」。
|
|
222
|
+
|
|
223
|
+
- **修复:折叠改写行上的铅笔是死的**。改写后的提示词由一个替换事件承载,而平台**不为替换事件渲染行**——于是"哪一行覆盖被编辑的 seq"永远匹配不上,编辑器根本不渲染,点击无声无息(无报错)。现在"覆盖"也认**该行的替换指向**(`revisions.get(行seq) === 编辑seq`),并且编辑器自 0.2.3 起挂在独立浮层上,折叠行承载它没有任何问题。新增用例「改写过的提示词,点笔仍能打开编辑器(预填替代文本)」+ 1 条静态检查;真机复现:重载后点击折叠行上的笔,编辑器打开并预填「回复2」。
|
|
224
|
+
|
|
221
225
|
**0.2.5** —— 修「每保存一次,模型的回答往下掉一格」。
|
|
222
226
|
|
|
223
227
|
- **修复:被回滚的「轮次尾巴」没有隐藏,堆成了一列空条**。回复编辑会留下旧轮次的尾巴(用时/用量/动作条)——它不是消息行,属于它的消息已经被回滚,尾巴上没有任何可操作的东西。此前我们按"消息行"的规则给它保留了动作条(那条规则本是为了让被回滚的用户消息还能复制/删除),于是**每保存一次就多一条空条**,把对话一格格顶下去。现在按 `data-chat-flow-kind="turn-tail"` 识别:尾巴整条隐藏(并清理旧版本给它打过的 `data-dshet-keep-actions`),消息行照旧保留动作条。新增用例「被回滚的轮次尾巴整条消失,而不是叠一条空条」+ 2 条静态检查;`verify:ui` 的现场断言改为三条事实——轮次尾巴整条隐藏、没有动作条的行整条隐藏、有动作条的消息行必须保住动作条(真机 6 条孤儿尾巴全部按新规则消失)。
|
package/lib/client.js
CHANGED
|
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
|
|
|
30
30
|
const ROUTE_PREFIX = '/dsh-edit-turn'
|
|
31
31
|
|
|
32
32
|
/** Keep in sync with package.json and lib/index.js. */
|
|
33
|
-
const PLUGIN_VERSION = '0.2.
|
|
33
|
+
const PLUGIN_VERSION = '0.2.6'
|
|
34
34
|
|
|
35
35
|
// --- copy -----------------------------------------------------------------
|
|
36
36
|
|
|
@@ -1252,12 +1252,18 @@ window.__ModuleLoader__.load({
|
|
|
1252
1252
|
// The editor anchors to whichever row covers the seq being edited, not to
|
|
1253
1253
|
// the row that owns the entry: a reply's entry now lives in the turn-tail
|
|
1254
1254
|
// action strip, while its editor still belongs under the reply text.
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1255
|
+
//
|
|
1256
|
+
// A rewritten prompt is covered by no row at all: the revision is a
|
|
1257
|
+
// replacement event and the platform draws no row for those, so its seq
|
|
1258
|
+
// appears in no node. The row that STANDS for it - the collapsed one
|
|
1259
|
+
// whose pencil was just pressed - covers it through its revision
|
|
1260
|
+
// mapping, and the editor is hosted on the layer anyway, so rendering it
|
|
1261
|
+
// under a collapsed row costs nothing and works.
|
|
1262
|
+
const editing = view.editing
|
|
1263
|
+
const coversEditing = editing !== null && typeof editing.seq === 'number' &&
|
|
1264
|
+
(seqsFor(node).includes(editing.seq) ||
|
|
1265
|
+
seqsFor(node).some((seq) => view.revisions.get(seq) === editing.seq))
|
|
1266
|
+
if (coversEditing && (!hidden || row.style.display !== 'none')) {
|
|
1261
1267
|
renderEditor(row, controller, view, t)
|
|
1262
1268
|
}
|
|
1263
1269
|
}
|
package/lib/index.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// admission path. It resumes the Session when cold and starts exactly one
|
|
23
23
|
// new turn from the revised text.
|
|
24
24
|
//
|
|
25
|
-
// The silent replacement carrier is an EMPTY `developer/message` (0.2.
|
|
25
|
+
// The silent replacement carrier is an EMPTY `developer/message` (0.2.6;
|
|
26
26
|
// before that an empty `system/message`, which no reader accepts - see the
|
|
27
27
|
// README). Empty content projects to no model message, so the rollback adds
|
|
28
28
|
// nothing the model can see and the derived context after an edit is exactly
|
|
@@ -60,7 +60,7 @@ export const PLUGIN_ID = 'dsh-edit-turn'
|
|
|
60
60
|
export const name = PLUGIN_ID
|
|
61
61
|
|
|
62
62
|
/** Keep in sync with package.json and lib/client.js. */
|
|
63
|
-
export const PLUGIN_VERSION = '0.2.
|
|
63
|
+
export const PLUGIN_VERSION = '0.2.6'
|
|
64
64
|
|
|
65
65
|
// A ring of the last few requests, answering "did the browser half even ask, and
|
|
66
66
|
// what did it get?" without needing its console. Read-only diagnostics: the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-edit-turn",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Edit any user turn in DeepSeek Harness and re-run it: an inline editor on the message row rolls the conversation back to just before that turn through the official surface-replace contract, then re-prompts the agent with the revised text. The append-only session log is never rewritten.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|