@240xu/dsh-message-ops 0.3.1 → 0.3.2
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 +9 -2
- package/package.json +1 -1
- package/src/client.js +15 -10
package/README.md
CHANGED
|
@@ -161,8 +161,8 @@ MIT
|
|
|
161
161
|
针对 dsh 0.2.0-rc.2 的用户级操作面(agent 工具保留,但 UI 为主推入口):
|
|
162
162
|
|
|
163
163
|
- **每条 AI 消息旁的原生回撤按钮**:注入官方 `conversation.chat.assistant-actions`
|
|
164
|
-
槽(0.2.0 正式扩展点,条目收持久化 messageId
|
|
165
|
-
|
|
164
|
+
槽(0.2.0 正式扩展点,条目收持久化 messageId)——「回滚到此 / 删除此条 /
|
|
165
|
+
从此分支」直接出现在消息操作行,与官方点赞/点踩并列;0.1.x 无此槽自动 no-op。
|
|
166
166
|
messageId→seq 反查经 `/api/message-ops/messages`(每会话索引缓存)。
|
|
167
167
|
- **分支双路径**:0.2.0+ 优先官方 `sessions.fork({sessionId, atSeq, increaseTitle})`
|
|
168
168
|
(子会话自动进宿主列表,成功后可一键 `uiWorkspace.openSession` 打开);
|
|
@@ -181,3 +181,10 @@ MIT
|
|
|
181
181
|
(限已完成轮次最后一条);任意位置分支保留在对话框(官方没有的能力)。
|
|
182
182
|
- **原生观感**:按钮改用官方 primitives 图标(IconClockOutline/IconTrashOutline,
|
|
183
183
|
require 失败回退内联 SVG);S3 命中区 ≥44px;S11 双提交防护(busy 互斥)。
|
|
184
|
+
|
|
185
|
+
### 0.3.2 · 图标规范化
|
|
186
|
+
|
|
187
|
+
- 槽按钮去掉文字 emoji——0.2.0+ 直接用官方 primitives 图标(与原生操作行 1:1 同款);
|
|
188
|
+
回退路径的 SVG 也改为官方 IconClockOutline/IconTrashOutline 的精确 path 数据
|
|
189
|
+
(1px stroke,与 Regular 变体一致),不再手绘。
|
|
190
|
+
- 字典文案去 emoji(label 仅用于 tooltip/aria,不参与渲染)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@240xu/dsh-message-ops",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Roll back, branch, and export any DSH conversation — from the UI or straight from the agent via a message_ops tool. Non-destructive: logs stay append-only and recoverable. 消息回滚/删除/分支/导出四合一,内置 message_ops agent 工具;非破坏语义,日志只追加可恢复。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/client.js
CHANGED
|
@@ -94,9 +94,9 @@ window.__ModuleLoader__.load({
|
|
|
94
94
|
'op.branchDesc': 'Copies everything up to and including the picked message into a new session (original untouched, non-destructive).',
|
|
95
95
|
'op.restore': 'Restore (replay shadowed messages)',
|
|
96
96
|
'op.restoreDesc': 'Only when the selected row is a revert/delete marker. This is a replay, not an un-shadow: shadowed user/assistant messages are re-appended with NEW seqs and a [Restored] prefix; non-replayable events (tool calls) are skipped and counted.',
|
|
97
|
-
'slot.revert': '
|
|
98
|
-
'slot.delete': '
|
|
99
|
-
'slot.branch': '
|
|
97
|
+
'slot.revert': 'Revert to here',
|
|
98
|
+
'slot.delete': 'Delete this message',
|
|
99
|
+
'slot.branch': 'Branch from here',
|
|
100
100
|
'toast.openNew': 'Open new session',
|
|
101
101
|
'fork.official': 'Branched (official fork): new session {id}',
|
|
102
102
|
'fork.disk': 'Branched: new session {id} (visible after list refresh)',
|
|
@@ -559,14 +559,19 @@ window.__ModuleLoader__.load({
|
|
|
559
559
|
IconClock = P && P.IconClockOutlineRegular
|
|
560
560
|
IconTrash = P && P.IconTrashOutlineRegular
|
|
561
561
|
} catch { /* fallback below */ }
|
|
562
|
-
if (!IconClock) IconClock = function () {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
React.createElement('path', { d: 'M8 4.
|
|
562
|
+
if (!IconClock) IconClock = function ClockFallback() {
|
|
563
|
+
// 官方 IconClockOutlineArtwork 1:1 路径( Regular = 1px stroke)
|
|
564
|
+
return React.createElement('svg', { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true, stroke: 'currentColor', strokeWidth: 1 },
|
|
565
|
+
React.createElement('path', { d: 'M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' }),
|
|
566
|
+
React.createElement('path', { d: 'M8 4.31V8.46L11 10.08' }))
|
|
566
567
|
}
|
|
567
|
-
if (!IconTrash) IconTrash = function () {
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
if (!IconTrash) IconTrash = function TrashFallback() {
|
|
569
|
+
// 官方 IconTrashOutlineArtwork 1:1 路径
|
|
570
|
+
return React.createElement('svg', { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true, stroke: 'currentColor', strokeWidth: 1 },
|
|
571
|
+
React.createElement('path', { d: 'M1.28149 3.88831H14.7187' }),
|
|
572
|
+
React.createElement('path', { d: 'M5.41602 3.88833V2.47962C5.41602 2.29282 5.52492 2.11366 5.71876 1.98157C5.9126 1.84948 6.17551 1.77527 6.44964 1.77527H9.55053C9.82466 1.77527 10.0876 1.84948 10.2814 1.98157C10.4752 2.11366 10.5841 2.29282 10.5841 2.47962V3.88833' }),
|
|
573
|
+
React.createElement('path', { d: 'M3.29749 5.10193L4.06585 13.0192C4.10899 13.4595 4.48223 13.7942 4.92504 13.7942H11.0751C11.5179 13.7942 11.8912 13.4595 11.9343 13.0192L12.7027 5.10193' }),
|
|
574
|
+
React.createElement('path', { d: 'M6.27637 7.51831V11.1829M9.72378 7.51831V11.1829' }))
|
|
570
575
|
}
|
|
571
576
|
|
|
572
577
|
// --- 0.3.0 assistant-actions 官方槽:每条 AI 消息旁的原生回撤按钮 ------------
|