@sh1robana/dsh-plugin-message-edit 0.3.0 → 0.3.3
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/CHANGELOG.md +34 -0
- package/LICENSE +1 -1
- package/NOTICE.md +4 -2
- package/README.md +16 -9
- package/build-info.json +6 -6
- package/client.js +131 -88
- package/client.js.map +1 -1
- package/docs//345/217/221/345/270/203/346/214/207/345/215/227.md +22 -8
- package/index.mjs +37 -20
- package/package.json +48 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# 更新记录
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
适配 DSH 桌面端 `0.2.1-rc.5`,保留 `0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2` 的兼容声明与既有功能。
|
|
6
|
+
|
|
7
|
+
- `0.3.2` 及更早版本未声明 rc.5,会被宿主兼容检查跳过加载;本版在兼容声明中加入 `0.2.1-rc.5`。未验证的 `0.2.1-rc.3`、`0.2.1-rc.4` 不声明。
|
|
8
|
+
- 对齐目标宿主开发依赖与客户端加载器检查,继续复用宿主运行时;rc.5 的宿主侧接口与 rc.2 一致,保存、分支、附件与版本切换逻辑不变。
|
|
9
|
+
- 贡献署名加入 Claude(Anthropic AI 编程助手,经 Claude Code)。
|
|
10
|
+
|
|
11
|
+
类型检查、构建及 111 项自动检查通过(含目标模块加载器和原生拖放集成检查)。维护者已在 rc.5 桌面端完成验收。
|
|
12
|
+
|
|
13
|
+
## 0.3.2
|
|
14
|
+
|
|
15
|
+
适配 DSH 桌面端 `0.2.1-rc.2`,保留 `0.2.0-rc.2`、`0.2.1-rc.1` 的兼容声明与既有功能。
|
|
16
|
+
|
|
17
|
+
- 对齐目标宿主开发依赖、兼容声明及客户端加载器检查,继续复用宿主运行时。
|
|
18
|
+
- 修复编辑首回合助手回复后继续对话可能生成非法历史日志的问题:手工首回合预留受保护的系统首节点,后续请求正常更新系统提示。
|
|
19
|
+
- Timeline 隔离不可读的其他版本,避免一个坏分支导致正常会话的编辑和重试按钮消失;保留错误节点并禁止切换到不可读版本。
|
|
20
|
+
- 当前历史加载失败时显示明确提示,提供手动重新载入;完整错误保留在 Timeline,不反复自动重试。
|
|
21
|
+
- 客户端构建注释改用项目相对路径,避免发行文件带入本机绝对目录;清理过时诊断截图和临时项目资料,保留正式回归测试。
|
|
22
|
+
|
|
23
|
+
类型检查、构建及 111 项自动检查通过(默认 109 项,另含目标模块加载器和原生拖放集成检查),覆盖真实 AgentLoop 与完整 V4 恢复。`rc.2` 完整桌面回归记录待补齐。安装新版不会自动改写或恢复已经损坏的历史文件;需保留原件并单独恢复。
|
|
24
|
+
|
|
25
|
+
## 0.3.1
|
|
26
|
+
|
|
27
|
+
适配 DSH 桌面端 `0.2.1-rc.1`,保留 `0.2.0-rc.2` 的兼容支持。
|
|
28
|
+
|
|
29
|
+
- 对齐目标宿主的开发依赖、兼容声明和客户端共享模块表,保持原地保存与保存并发送的既有行为。
|
|
30
|
+
- 文件相对引用按会话的当前工作目录打开,支持目录变更后的重开与分支继承。
|
|
31
|
+
- 修复拖入消息编辑框的文件同时进入原生输入框的问题;弹窗内拖放只添加到编辑草稿。
|
|
32
|
+
- 编辑与重试按钮改用原生颜色、点击区和间距,支持明暗主题、悬停及禁用态,保留 16px 图标。
|
|
33
|
+
- 修复 Windows PowerShell 安装检查脚本的中文编码问题。
|
|
34
|
+
|
|
35
|
+
维护者已完成 Windows 桌面验收。`0.3.1` 类型检查、构建及 101 项自动化检查全部通过(默认 100 项,另含目标宿主原生拖放集成检查)。本版通过 GitHub Release 提供安装包,npm 渠道仍为 `0.3.0`。
|
|
36
|
+
|
|
3
37
|
## 0.3.0
|
|
4
38
|
|
|
5
39
|
首个正式版本,适配 DSH 桌面端 `0.2.0-rc.2`。
|
package/LICENSE
CHANGED
package/NOTICE.md
CHANGED
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
- 基础提交:`b78a167064ca612f1c400060d2bfc1dc9bc46436`
|
|
8
8
|
- 上游 `package.json` 声明的许可证:`MIT`
|
|
9
9
|
|
|
10
|
-
本项目现以 **dsh-plugin-message-edit** 独立维护,新增 DSH 桌面端 `0.2.0-rc.2` 的接口适配、原地保存、完整附件编辑、Windows 构建支持及自动化测试。保留上游原始作者信息;本项目不将原作者代码声明为新维护者原创。
|
|
10
|
+
本项目现以 **dsh-plugin-message-edit** 独立维护,新增 DSH 桌面端 `0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.5` 的接口适配、原地保存、完整附件编辑、Windows 构建支持及自动化测试。保留上游原始作者信息;本项目不将原作者代码声明为新维护者原创。
|
|
11
11
|
|
|
12
|
-
桌面端适配由 [shirobana](https://github.com/sh1robana) 与 Codex(OpenAI AI 编程助手)协作完成,Codex
|
|
12
|
+
桌面端适配由 [shirobana](https://github.com/sh1robana) 与 Codex(OpenAI AI 编程助手)协作完成,Codex 参与兼容代码、测试、安装脚本和文档的编写;DSH `0.2.1-rc.5` 适配由 Claude(Anthropic AI 编程助手,经 Claude Code)参与接口取证、兼容声明、测试与文档。贡献记录见 README。
|
|
13
13
|
|
|
14
14
|
上游仓库在上述提交中未附完整 `LICENSE` 文件,但 `package.json` 明确声明 `MIT`,Git 历史确认原作者为 Moeblack。本分支据此补充标准 MIT 文本,保留 Moeblack 的版权归属,不虚构其版权年份;这份文本由本分支补足,并非声称上游已经提供该文件。完整条款见 `LICENSE`。
|
|
15
15
|
|
|
16
16
|
`scripts/dsh-client-preset.ts` 保留了来自 DeepSeek Harness 的构建预设来源。其 MIT 许可文本和 `Copyright (c) 2026 DeepSeek` 声明已与本地官方 `@deepseek-ai/dsh-session@0.2.0-rc.2/LICENSE` 核对,并保留在 `LICENSE` 中。新增修改同样以 MIT 发布。
|
|
17
17
|
|
|
18
|
+
`tests/composer-drop.test.mjs` 保留了官方 `@deepseek-ai/dsh-client-ui-attachment@0.2.1-rc.1` 的文档级拖放实现快照,用于复现原生输入框与编辑弹窗的事件顺序。来源版本与桌面构建提交见测试文件头部;该段沿用 DeepSeek Harness 的 MIT 许可和 DeepSeek 版权声明,不作为本项目原创实现。
|
|
19
|
+
|
|
18
20
|
无修改保存、输入法候选确认保护、构建诊断及修订互通接口的设计参考了 [DDDMUC/dsh-edit-turn@0.2.20](https://github.com/DDDMUC/dsh-edit-turn),本次没有复制其实现代码。
|
|
19
21
|
|
|
20
22
|
感谢 [dsh-market](https://github.com/dsh-market/dsh-market)、[awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 的市场与贡献说明,以及 [dsh-find-plugin](https://github.com/awesome-dsh-plugin/dsh-find-plugin) 的 README 组织方式参考。README 的功能说明与使用步骤根据本项目实际实现重新撰写。
|
package/README.md
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
- **编辑与重试**:编辑助手回复或思考、重生成最后回复、重试历史回合;通过 Timeline 查看记录、切换版本。
|
|
11
11
|
- **完整编辑框**:支持 `@` 文件与会话引用、权限、模型和推理等级选择,以及取消编辑的二次确认。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`0.3.3` 适配 DSH **`0.2.1-rc.5`**,详见 [更新记录](CHANGELOG.md)。兼容声明保留 `0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`;其中已完成桌面验证的为 `0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.5`,`rc.2` 已通过自动检查、本地原生读取及浏览器演示验证,完整桌面回归记录待补齐。未声明的 `0.2.1-rc.3`、`0.2.1-rc.4` 会被宿主拒绝,请升级到 rc.5。首次打开会话时请等待历史消息加载完成。
|
|
14
|
+
|
|
15
|
+
安装新版不会自动修复已损坏的历史文件。遇到历史加载失败时请保留原件,先备份再单独恢复。
|
|
14
16
|
|
|
15
17
|

|
|
16
18
|
|
|
@@ -20,22 +22,22 @@
|
|
|
20
22
|
|
|
21
23
|
### 安装
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
使用 GitHub Release 的 `0.3.3` 预构建安装包:
|
|
24
26
|
|
|
25
27
|
```sh
|
|
26
|
-
dsh plugin --profile desktop add -w
|
|
28
|
+
dsh plugin --profile desktop add -w https://github.com/sh1robana/dsh-plugin-message-edit/releases/download/v0.3.3/dsh-plugin-message-edit-0.3.3.tgz
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
Windows 桌面端没有全局 `dsh` 命令时,使用安装目录里的 CLI,按实际安装位置修改路径:
|
|
30
32
|
|
|
31
|
-
```
|
|
32
|
-
dsh plugin --profile desktop add -w https://github.com/sh1robana/dsh-plugin-message-edit/releases/download/v0.3.
|
|
33
|
+
```powershell
|
|
34
|
+
& 'D:\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add -w https://github.com/sh1robana/dsh-plugin-message-edit/releases/download/v0.3.3/dsh-plugin-message-edit-0.3.3.tgz
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
也可通过 npm 安装同一版本:
|
|
36
38
|
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
+
```sh
|
|
40
|
+
dsh plugin --profile desktop add -w @sh1robana/dsh-plugin-message-edit@0.3.3
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
**安装后保存工作,彻底退出 DSH,再重新启动。** 如果已安装旧的 `dsh-message-edit` 或其他消息编辑插件,请先停用,避免重复按钮和接口冲突。迁移本项目旧版时,可先执行 `dsh plugin --profile desktop remove -w dsh-message-edit`。
|
|
@@ -55,7 +57,12 @@ Windows 桌面端没有全局 `dsh` 命令时,使用安装目录里的 CLI,
|
|
|
55
57
|
|
|
56
58
|
- **[shirobana](https://github.com/sh1robana)**:需求设计、桌面验收与项目维护。
|
|
57
59
|
- **Codex(OpenAI AI 编程助手)**:协作完成兼容适配、功能实现、测试和文档。
|
|
60
|
+
- **Claude(Anthropic AI 编程助手,经 Claude Code)**:协作完成 DSH `0.2.1-rc.5` 的接口取证、兼容适配、测试与安装验证。
|
|
58
61
|
|
|
59
62
|
基于 [Moeblack/dsh-message-edit](https://github.com/Moeblack/dsh-message-edit) 继续开发;感谢 [DDDMUC/dsh-edit-turn](https://github.com/DDDMUC/dsh-edit-turn) 的设计参考、DeepSeek Harness 的插件接口与构建预设,以及 [dsh-market](https://github.com/dsh-market/dsh-market)、[awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 社区的发布文档。
|
|
60
63
|
|
|
61
64
|
以 MIT 许可发布。来源与许可见 [NOTICE.md](NOTICE.md) 和 [LICENSE](LICENSE);开发与发布步骤见 [发布指南](docs/发布指南.md)。
|
|
65
|
+
|
|
66
|
+
维护源码时先阅读仓库根目录的 `CLAUDE.md` 和 `log/README.md`;开发过程记录在 `log/` 的日期日志中。
|
|
67
|
+
|
|
68
|
+
DSH 更新后,可使用仓库内的 `dsh-plugin-upgrade` Skill 进行插件适配,见 [使用方式](docs/DSH升级适配Skill使用.md)。
|
package/build-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
3
|
-
"buildId": "
|
|
4
|
-
"targetDshVersion": "0.2.
|
|
2
|
+
"version": "0.3.3",
|
|
3
|
+
"buildId": "8b68760be79248960bd3",
|
|
4
|
+
"targetDshVersion": "0.2.1-rc.5",
|
|
5
5
|
"files": {
|
|
6
|
-
"index.mjs": "
|
|
7
|
-
"client.js": "
|
|
8
|
-
"client.js.map": "
|
|
6
|
+
"index.mjs": "fa2e8eace8710fcc9e65c51b7f8754fae9e5ca1a8df7d745fa4958f61aa7b8e5",
|
|
7
|
+
"client.js": "a07e591e747d915b9dc2ec065d48f8ce552ba4d0936e367bdb5a30305af99c49",
|
|
8
|
+
"client.js.map": "8f788a0c0edc8d26a8d294c368a97c09930f8d898abf583df89bbdbe4f6aae0c"
|
|
9
9
|
}
|
|
10
10
|
}
|
package/client.js
CHANGED
|
@@ -30,9 +30,9 @@ window.__ModuleLoader__.load({
|
|
|
30
30
|
//#region src/build-info.ts
|
|
31
31
|
/** 由构建脚本生成;前后端共享同一份构建身份。 */
|
|
32
32
|
const MESSAGE_EDIT_BUILD_INFO = Object.freeze({
|
|
33
|
-
"version": "0.3.
|
|
34
|
-
"buildId": "
|
|
35
|
-
"targetDshVersion": "0.2.
|
|
33
|
+
"version": "0.3.3",
|
|
34
|
+
"buildId": "8b68760be79248960bd3",
|
|
35
|
+
"targetDshVersion": "0.2.1-rc.5"
|
|
36
36
|
});
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/client/attachmentTools.ts
|
|
@@ -211,7 +211,8 @@ window.__ModuleLoader__.load({
|
|
|
211
211
|
...row["targetTurn"] === void 0 ? {} : { targetTurn: numberValue(row["targetTurn"], "版本 targetTurn") },
|
|
212
212
|
...kind === void 0 ? {} : { blockKind: kind },
|
|
213
213
|
...row["before"] === void 0 ? {} : { before: stringValue(row["before"], "版本 before") },
|
|
214
|
-
...row["after"] === void 0 ? {} : { after: stringValue(row["after"], "版本 after") }
|
|
214
|
+
...row["after"] === void 0 ? {} : { after: stringValue(row["after"], "版本 after") },
|
|
215
|
+
...row["unavailableReason"] === void 0 ? {} : { unavailableReason: stringValue(row["unavailableReason"], "版本 unavailableReason") }
|
|
215
216
|
};
|
|
216
217
|
}
|
|
217
218
|
function arrayValue(value, label) {
|
|
@@ -545,8 +546,8 @@ window.__ModuleLoader__.load({
|
|
|
545
546
|
}
|
|
546
547
|
};
|
|
547
548
|
//#endregion
|
|
548
|
-
//#region \0dsh-css:
|
|
549
|
-
const css$2 = ".jW03kW_overlay,.jW03kW_composer{--message-edit-panel:#fafbfc;--message-edit-hover:#eef0f3;--message-edit-border:#dce0e7;--message-edit-text:#1d2430;--message-edit-secondary:#687487;--message-edit-danger:#c62828;--message-edit-link:#406bf0;color:var(--message-edit-text);color-scheme:light}body[data-ds-dark-theme] .jW03kW_overlay,body[data-ds-dark-theme] .jW03kW_composer{--message-edit-panel:#25272b;--message-edit-hover:#33363d;--message-edit-border:#494d56;--message-edit-text:#eef0f5;--message-edit-secondary:#b0b7c4;--message-edit-danger:#ff8e8e;--message-edit-link:#8da9ff;color-scheme:dark}.jW03kW_overlay{z-index:1000;background:var(--dsw-alias-bg-mask,#00000073);box-sizing:border-box;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.jW03kW_panel{box-sizing:border-box;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);border-radius:10px;width:min(960px,100%);max-height:calc(100dvh - 48px);padding:20px 24px;overflow:auto}.jW03kW_title{color:var(--message-edit-text);padding:4px 0 10px;font-size:15px}.jW03kW_input{box-sizing:border-box;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);width:100%;height:min(52dvh,560px);min-height:min(320px,40dvh);max-height:calc(100dvh - 180px);color:var(--message-edit-text);font:inherit;resize:vertical;border-radius:8px;padding:10px;line-height:1.6}.jW03kW_footer{flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:10px 0 0;display:flex}.jW03kW_footer button{border:1px solid var(--message-edit-border);background:var(--message-edit-hover);color:var(--message-edit-text);cursor:pointer;border-radius:6px;padding:6px 14px}.jW03kW_footer button:disabled{cursor:wait;opacity:.6}.jW03kW_attachmentEditor{padding:0 0 10px}.jW03kW_attachmentList{flex-wrap:wrap;gap:10px;max-height:180px;display:flex;overflow:auto}.jW03kW_attachmentList:empty{display:none}.jW03kW_attachmentCard{box-sizing:border-box;border:1px solid var(--message-edit-border);width:240px;min-height:72px;color:var(--message-edit-text);background:var(--message-edit-panel);border-radius:8px;align-items:center;gap:10px;padding:8px 30px 8px 8px;display:flex;position:relative}.jW03kW_attachmentPreview{object-fit:contain;width:64px;height:64px;color:var(--message-edit-secondary);background:var(--message-edit-hover);border-radius:6px;flex:0 0 64px;justify-content:center;align-items:center;font-size:12px;display:flex}.jW03kW_attachmentInfo{flex-direction:column;gap:4px;min-width:0;font-size:13px;display:flex}.jW03kW_attachmentInfo>span:first-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.jW03kW_attachmentStatus{color:var(--message-edit-secondary);overflow-wrap:anywhere;font-size:11px}.jW03kW_attachmentRemove{background:var(--message-edit-hover);width:22px;height:22px;color:var(--message-edit-text);cursor:pointer;border:none;border-radius:50%;padding:0;font-size:18px;position:absolute;top:4px;right:4px}.jW03kW_attachmentRemove:disabled{opacity:.5;cursor:wait}.jW03kW_attachmentAdd{border:1px solid var(--message-edit-border);background:var(--message-edit-hover);color:var(--message-edit-text);cursor:pointer;border-radius:6px;margin:8px 0 0;padding:6px 10px}.jW03kW_footer .jW03kW_attachmentAdd{margin:0 auto 0 0}.jW03kW_attachmentNotice{color:var(--message-edit-danger);padding-top:4px;font-size:12px}.jW03kW_attachmentNotice:empty{display:none}.jW03kW_confirmationOverlay{z-index:1001}.jW03kW_confirmPanel{box-sizing:border-box;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);border-radius:10px;width:min(400px,100%);padding:20px 24px}@media (width<=600px){.jW03kW_overlay{padding:12px}.jW03kW_panel{max-height:calc(100dvh - 24px);padding:16px}}.jW03kW_iconButton{width:
|
|
549
|
+
//#region \0dsh-css:src/client/InlineMessageEdit.module.css.mjs
|
|
550
|
+
const css$2 = ".jW03kW_overlay,.jW03kW_composer{--message-edit-panel:#fafbfc;--message-edit-hover:#eef0f3;--message-edit-border:#dce0e7;--message-edit-text:#1d2430;--message-edit-secondary:#687487;--message-edit-danger:#c62828;--message-edit-link:#406bf0;color:var(--message-edit-text);color-scheme:light}body[data-ds-dark-theme] .jW03kW_overlay,body[data-ds-dark-theme] .jW03kW_composer{--message-edit-panel:#25272b;--message-edit-hover:#33363d;--message-edit-border:#494d56;--message-edit-text:#eef0f5;--message-edit-secondary:#b0b7c4;--message-edit-danger:#ff8e8e;--message-edit-link:#8da9ff;color-scheme:dark}.jW03kW_overlay{z-index:1000;background:var(--dsw-alias-bg-mask,#00000073);box-sizing:border-box;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.jW03kW_panel{box-sizing:border-box;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);border-radius:10px;width:min(960px,100%);max-height:calc(100dvh - 48px);padding:20px 24px;overflow:auto}.jW03kW_title{color:var(--message-edit-text);padding:4px 0 10px;font-size:15px}.jW03kW_input{box-sizing:border-box;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);width:100%;height:min(52dvh,560px);min-height:min(320px,40dvh);max-height:calc(100dvh - 180px);color:var(--message-edit-text);font:inherit;resize:vertical;border-radius:8px;padding:10px;line-height:1.6}.jW03kW_footer{flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:10px 0 0;display:flex}.jW03kW_footer button{border:1px solid var(--message-edit-border);background:var(--message-edit-hover);color:var(--message-edit-text);cursor:pointer;border-radius:6px;padding:6px 14px}.jW03kW_footer button:disabled{cursor:wait;opacity:.6}.jW03kW_attachmentEditor{padding:0 0 10px}.jW03kW_attachmentList{flex-wrap:wrap;gap:10px;max-height:180px;display:flex;overflow:auto}.jW03kW_attachmentList:empty{display:none}.jW03kW_attachmentCard{box-sizing:border-box;border:1px solid var(--message-edit-border);width:240px;min-height:72px;color:var(--message-edit-text);background:var(--message-edit-panel);border-radius:8px;align-items:center;gap:10px;padding:8px 30px 8px 8px;display:flex;position:relative}.jW03kW_attachmentPreview{object-fit:contain;width:64px;height:64px;color:var(--message-edit-secondary);background:var(--message-edit-hover);border-radius:6px;flex:0 0 64px;justify-content:center;align-items:center;font-size:12px;display:flex}.jW03kW_attachmentInfo{flex-direction:column;gap:4px;min-width:0;font-size:13px;display:flex}.jW03kW_attachmentInfo>span:first-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.jW03kW_attachmentStatus{color:var(--message-edit-secondary);overflow-wrap:anywhere;font-size:11px}.jW03kW_attachmentRemove{background:var(--message-edit-hover);width:22px;height:22px;color:var(--message-edit-text);cursor:pointer;border:none;border-radius:50%;padding:0;font-size:18px;position:absolute;top:4px;right:4px}.jW03kW_attachmentRemove:disabled{opacity:.5;cursor:wait}.jW03kW_attachmentAdd{border:1px solid var(--message-edit-border);background:var(--message-edit-hover);color:var(--message-edit-text);cursor:pointer;border-radius:6px;margin:8px 0 0;padding:6px 10px}.jW03kW_footer .jW03kW_attachmentAdd{margin:0 auto 0 0}.jW03kW_attachmentNotice{color:var(--message-edit-danger);padding-top:4px;font-size:12px}.jW03kW_attachmentNotice:empty{display:none}.jW03kW_confirmationOverlay{z-index:1001}.jW03kW_confirmPanel{box-sizing:border-box;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);border-radius:10px;width:min(400px,100%);padding:20px 24px}@media (width<=600px){.jW03kW_overlay{padding:12px}.jW03kW_panel{max-height:calc(100dvh - 24px);padding:16px}}.jW03kW_iconButton{box-sizing:border-box;width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}.jW03kW_iconButton>svg{flex:none;width:16px;height:16px}.jW03kW_iconButton:not(:disabled):hover{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover)}.jW03kW_iconButton:disabled{cursor:default;opacity:.4}.jW03kW_picker{flex-direction:column;gap:6px;padding:4px 0 12px;display:flex}.jW03kW_pickerItem{border:1px solid var(--message-edit-border);background:var(--message-edit-hover);color:var(--message-edit-text);text-align:left;cursor:pointer;border-radius:6px;padding:8px 10px;font-size:12px}.jW03kW_pickerItem:hover{background:var(--message-edit-panel)}.jW03kW_pickerItemActive{border:1px solid var(--message-edit-border);background:var(--message-edit-hover);color:var(--message-edit-text);cursor:pointer;border-radius:6px;align-self:flex-end;padding:6px 14px}.jW03kW_composer{border:1px solid var(--message-edit-border);background:var(--message-edit-panel);border-radius:20px;padding:14px 16px 10px;position:relative}.jW03kW_composer:focus-within{border-color:var(--dsw-alias-brand-primary,#4d77f5)}.jW03kW_richInput{white-space:pre-wrap;overflow-wrap:anywhere;resize:none;border:none;border-radius:0;outline:none;height:min(42dvh,500px);min-height:min(250px,32dvh);padding:8px 0;overflow:auto}.jW03kW_richInput:empty:before{content:attr(data-placeholder);color:var(--message-edit-secondary);pointer-events:none}.jW03kW_fileReference{color:var(--message-edit-link);cursor:pointer;white-space:pre-wrap;border-radius:4px;padding:0 2px;display:inline}.jW03kW_fileReference:hover{background:var(--message-edit-hover)}.jW03kW_composerToolbar{flex-wrap:wrap;align-items:center;gap:8px;padding-top:8px;display:flex}.jW03kW_composerToolbar button{color:var(--message-edit-secondary);font:inherit;cursor:pointer;background:0 0;border:none}.jW03kW_composerToolbar button:hover{background:var(--message-edit-hover)}.jW03kW_composerToolbar .jW03kW_composerPlus{background:var(--message-edit-hover);border-radius:50%;width:34px;height:34px;padding:0;font-size:24px;line-height:1}.jW03kW_composerControl,.jW03kW_composerModel{border-radius:8px;padding:6px 8px;font-size:13px}.jW03kW_composerModel{overflow-wrap:anywhere;max-width:70%;margin-left:auto}.jW03kW_composerMenu,.jW03kW_referenceSuggestions{z-index:2;border:1px solid var(--message-edit-border);background:var(--message-edit-panel);border-radius:14px;max-height:min(44dvh,400px);padding:8px;position:absolute;bottom:52px;left:12px;right:12px;overflow:auto;box-shadow:0 4px 20px #0001}.jW03kW_composerMenu[hidden],.jW03kW_referenceSuggestions[hidden]{display:none}.jW03kW_composerMenu button,.jW03kW_referenceSuggestions button{width:100%;color:var(--message-edit-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:space-between;align-items:center;gap:16px;padding:9px 10px;font-size:13px;display:flex}.jW03kW_composerMenu button:hover,.jW03kW_referenceSuggestions button:hover,.jW03kW_referenceSuggestions button[aria-selected=true]{background:var(--message-edit-hover)}.jW03kW_composerMenu .jW03kW_menuValue{color:var(--message-edit-secondary);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;overflow:hidden}.jW03kW_composerMenu[data-kind=permission],.jW03kW_composerMenu[data-kind=model],.jW03kW_composerMenu[data-kind=modelList]{box-sizing:border-box;border-radius:16px;width:min(320px,100% - 32px);padding:6px;left:auto;right:16px}.jW03kW_composerMenu[data-kind=permission]{width:min(220px,100% - 70px);left:54px;right:auto}.jW03kW_composerMenu[data-kind=modelList]{max-height:none;overflow:hidden}.jW03kW_composerMenu[data-kind=permission] button,.jW03kW_composerMenu[data-kind=model] button,.jW03kW_composerMenu[data-kind=modelList] button{white-space:nowrap;min-height:38px;padding:8px 10px;font-size:14px;overflow:hidden}.jW03kW_composerMenu button[role=menuitemradio] .jW03kW_menuValue{color:var(--message-edit-text);text-align:right;flex:0 0 16px}.jW03kW_composerMenu .jW03kW_menuBack{min-height:28px;color:var(--message-edit-secondary);font-size:12px}.jW03kW_menuItemLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.jW03kW_composerMenu button[role=menuitemradio] .jW03kW_menuItemLabel{flex:1}.jW03kW_composerMenu .jW03kW_modelSearch{border:none;outline:none;padding:8px 10px;font-size:14px}.jW03kW_modelSearch:focus-visible{box-shadow:inset 0 0 0 1px var(--message-edit-border)}.jW03kW_modelList{max-height:min(38dvh,280px);overflow-y:auto}.jW03kW_composerMenu input{box-sizing:border-box;border:1px solid var(--message-edit-border);background:inherit;width:100%;color:var(--message-edit-text);font:inherit;border-radius:8px;padding:10px}.jW03kW_menuHeading{color:var(--message-edit-secondary);padding:8px 10px 4px;font-size:12px}.jW03kW_attachmentAdd.jW03kW_attachmentAddCircle{border-radius:50%;width:34px;height:34px;padding:0;font-size:24px;line-height:1}.jW03kW_attachmentOpen{width:100%;min-width:0;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:10px;padding:0;display:flex}.jW03kW_attachmentOpen[data-kind=image]{cursor:zoom-in}.jW03kW_attachmentOpen:disabled{cursor:wait}.jW03kW_attachmentOpen:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4d77f5);outline-offset:3px;border-radius:6px}.jW03kW_attachmentLightbox{z-index:1100;box-sizing:border-box;background:#000000d6;justify-content:center;align-items:center;padding:40px;display:flex;position:fixed;inset:0}.jW03kW_attachmentOriginal{object-fit:contain;width:auto;max-width:100%;height:auto;max-height:100%;display:block}.jW03kW_attachmentPreviewClose{color:#fff;cursor:pointer;background:#ffffff29;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:28px;display:flex;position:absolute;top:14px;right:18px}.jW03kW_attachmentPreviewClose:focus-visible{outline-offset:3px;outline:2px solid #fff}";
|
|
550
551
|
const tagId$2 = "@sh1robana/dsh-plugin-message-edit/InlineMessageEdit.module.css";
|
|
551
552
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
552
553
|
const tag = document.createElement("style");
|
|
@@ -556,46 +557,46 @@ window.__ModuleLoader__.load({
|
|
|
556
557
|
document.head.appendChild(tag);
|
|
557
558
|
}
|
|
558
559
|
var InlineMessageEdit_module_css_default = {
|
|
559
|
-
"input": "jW03kW_input",
|
|
560
|
-
"attachmentInfo": "jW03kW_attachmentInfo",
|
|
561
|
-
"attachmentStatus": "jW03kW_attachmentStatus",
|
|
562
|
-
"menuBack": "jW03kW_menuBack",
|
|
563
|
-
"attachmentOpen": "jW03kW_attachmentOpen",
|
|
564
|
-
"composerPlus": "jW03kW_composerPlus",
|
|
565
|
-
"attachmentOriginal": "jW03kW_attachmentOriginal",
|
|
566
560
|
"title": "jW03kW_title",
|
|
567
|
-
"menuItemLabel": "jW03kW_menuItemLabel",
|
|
568
|
-
"attachmentCard": "jW03kW_attachmentCard",
|
|
569
|
-
"pickerItemActive": "jW03kW_pickerItemActive",
|
|
570
|
-
"attachmentAddCircle": "jW03kW_attachmentAddCircle",
|
|
571
|
-
"attachmentLightbox": "jW03kW_attachmentLightbox",
|
|
572
|
-
"picker": "jW03kW_picker",
|
|
573
561
|
"attachmentPreview": "jW03kW_attachmentPreview",
|
|
574
|
-
"menuValue": "jW03kW_menuValue",
|
|
575
|
-
"referenceSuggestions": "jW03kW_referenceSuggestions",
|
|
576
|
-
"attachmentRemove": "jW03kW_attachmentRemove",
|
|
577
562
|
"overlay": "jW03kW_overlay",
|
|
563
|
+
"attachmentStatus": "jW03kW_attachmentStatus",
|
|
578
564
|
"pickerItem": "jW03kW_pickerItem",
|
|
579
|
-
"footer": "jW03kW_footer",
|
|
580
|
-
"confirmPanel": "jW03kW_confirmPanel",
|
|
581
|
-
"composer": "jW03kW_composer",
|
|
582
|
-
"modelSearch": "jW03kW_modelSearch",
|
|
583
|
-
"attachmentEditor": "jW03kW_attachmentEditor",
|
|
584
565
|
"fileReference": "jW03kW_fileReference",
|
|
585
|
-
"
|
|
566
|
+
"attachmentAdd": "jW03kW_attachmentAdd",
|
|
567
|
+
"pickerItemActive": "jW03kW_pickerItemActive",
|
|
568
|
+
"attachmentList": "jW03kW_attachmentList",
|
|
569
|
+
"composerPlus": "jW03kW_composerPlus",
|
|
570
|
+
"referenceSuggestions": "jW03kW_referenceSuggestions",
|
|
586
571
|
"menuHeading": "jW03kW_menuHeading",
|
|
587
|
-
"
|
|
572
|
+
"attachmentCard": "jW03kW_attachmentCard",
|
|
573
|
+
"input": "jW03kW_input",
|
|
574
|
+
"composerControl": "jW03kW_composerControl",
|
|
575
|
+
"menuValue": "jW03kW_menuValue",
|
|
576
|
+
"attachmentInfo": "jW03kW_attachmentInfo",
|
|
588
577
|
"iconButton": "jW03kW_iconButton",
|
|
589
|
-
"
|
|
578
|
+
"attachmentAddCircle": "jW03kW_attachmentAddCircle",
|
|
579
|
+
"attachmentEditor": "jW03kW_attachmentEditor",
|
|
590
580
|
"confirmationOverlay": "jW03kW_confirmationOverlay",
|
|
591
581
|
"composerMenu": "jW03kW_composerMenu",
|
|
592
|
-
"
|
|
593
|
-
"composerControl": "jW03kW_composerControl",
|
|
582
|
+
"menuItemLabel": "jW03kW_menuItemLabel",
|
|
594
583
|
"modelList": "jW03kW_modelList",
|
|
584
|
+
"footer": "jW03kW_footer",
|
|
585
|
+
"attachmentLightbox": "jW03kW_attachmentLightbox",
|
|
586
|
+
"confirmPanel": "jW03kW_confirmPanel",
|
|
587
|
+
"attachmentPreviewClose": "jW03kW_attachmentPreviewClose",
|
|
588
|
+
"menuBack": "jW03kW_menuBack",
|
|
589
|
+
"composer": "jW03kW_composer",
|
|
590
|
+
"picker": "jW03kW_picker",
|
|
591
|
+
"attachmentOriginal": "jW03kW_attachmentOriginal",
|
|
592
|
+
"attachmentRemove": "jW03kW_attachmentRemove",
|
|
595
593
|
"richInput": "jW03kW_richInput",
|
|
596
|
-
"
|
|
594
|
+
"modelSearch": "jW03kW_modelSearch",
|
|
597
595
|
"composerModel": "jW03kW_composerModel",
|
|
598
|
-
"
|
|
596
|
+
"composerToolbar": "jW03kW_composerToolbar",
|
|
597
|
+
"attachmentOpen": "jW03kW_attachmentOpen",
|
|
598
|
+
"attachmentNotice": "jW03kW_attachmentNotice",
|
|
599
|
+
"panel": "jW03kW_panel"
|
|
599
600
|
};
|
|
600
601
|
//#endregion
|
|
601
602
|
//#region src/client/confirmCancelEdit.ts
|
|
@@ -1661,6 +1662,27 @@ window.__ModuleLoader__.load({
|
|
|
1661
1662
|
if (!popup.hidden && (popup.dataset["kind"] === "model" || popup.dataset["kind"] === "modelList")) closeMenu();
|
|
1662
1663
|
else modelMenu();
|
|
1663
1664
|
};
|
|
1665
|
+
const dropTarget = container.closest("[role=\"dialog\"]") ?? frame;
|
|
1666
|
+
const fileDrag = (event) => {
|
|
1667
|
+
const transfer = event.dataTransfer;
|
|
1668
|
+
if (transfer === null || !Array.from(transfer.types).includes("Files")) return;
|
|
1669
|
+
event.preventDefault();
|
|
1670
|
+
event.stopPropagation();
|
|
1671
|
+
if (event.type === "dragenter" || event.type === "dragover") transfer.dropEffect = disabled ? "none" : "copy";
|
|
1672
|
+
if (event.type !== "drop" || disabled || disposed) return;
|
|
1673
|
+
try {
|
|
1674
|
+
addFiles(Array.from(transfer.files));
|
|
1675
|
+
} catch (error) {
|
|
1676
|
+
showError(error);
|
|
1677
|
+
}
|
|
1678
|
+
};
|
|
1679
|
+
const fileDragEvents = [
|
|
1680
|
+
"dragenter",
|
|
1681
|
+
"dragover",
|
|
1682
|
+
"dragleave",
|
|
1683
|
+
"drop"
|
|
1684
|
+
];
|
|
1685
|
+
for (const name of fileDragEvents) dropTarget.addEventListener(name, fileDrag, true);
|
|
1664
1686
|
frame.addEventListener("keydown", (event) => {
|
|
1665
1687
|
if (event.isComposing || event.keyCode === 229) return;
|
|
1666
1688
|
if (event.key === "Escape" && !popup.hidden) {
|
|
@@ -1707,6 +1729,7 @@ window.__ModuleLoader__.load({
|
|
|
1707
1729
|
search?.abort();
|
|
1708
1730
|
if (searchTimer !== void 0) clearTimeout(searchTimer);
|
|
1709
1731
|
document.removeEventListener("click", outside);
|
|
1732
|
+
for (const name of fileDragEvents) dropTarget.removeEventListener(name, fileDrag, true);
|
|
1710
1733
|
attachmentEditor.dispose();
|
|
1711
1734
|
richInput.dispose();
|
|
1712
1735
|
frame.remove();
|
|
@@ -1981,7 +2004,7 @@ window.__ModuleLoader__.load({
|
|
|
1981
2004
|
let frame;
|
|
1982
2005
|
let scheduled = false;
|
|
1983
2006
|
const sync = () => {
|
|
1984
|
-
const actionRows = Array.from(document.querySelectorAll("[
|
|
2007
|
+
const actionRows = Array.from(document.querySelectorAll("[data-clock=\"start\"], [data-clock=\"end\"]"));
|
|
1985
2008
|
const presentRows = new Set(actionRows);
|
|
1986
2009
|
for (const [row, binding] of bindings) {
|
|
1987
2010
|
if (presentRows.has(row)) continue;
|
|
@@ -2037,6 +2060,7 @@ window.__ModuleLoader__.load({
|
|
|
2037
2060
|
marker.__messageEditInjected = true;
|
|
2038
2061
|
marker.__messageEditEventSeq = eventSeq;
|
|
2039
2062
|
const editButton = document.createElement("button");
|
|
2063
|
+
editButton.type = "button";
|
|
2040
2064
|
editButton.className = STYLE.iconButton;
|
|
2041
2065
|
editButton.setAttribute("aria-label", "编辑消息");
|
|
2042
2066
|
editButton.title = "编辑消息";
|
|
@@ -2050,6 +2074,7 @@ window.__ModuleLoader__.load({
|
|
|
2050
2074
|
};
|
|
2051
2075
|
editButton.addEventListener("click", editMessage);
|
|
2052
2076
|
const retryButton = document.createElement("button");
|
|
2077
|
+
retryButton.type = "button";
|
|
2053
2078
|
retryButton.className = STYLE.iconButton;
|
|
2054
2079
|
retryButton.setAttribute("aria-label", "重试此回合");
|
|
2055
2080
|
retryButton.title = "重试此回合";
|
|
@@ -2062,7 +2087,7 @@ window.__ModuleLoader__.load({
|
|
|
2062
2087
|
if (targetTurn !== void 0) retry(targetTurn, "truncate");
|
|
2063
2088
|
};
|
|
2064
2089
|
retryButton.addEventListener("click", retryTurn);
|
|
2065
|
-
const lastOfficial = Array.from(row.querySelectorAll("button")).filter((button) => button !== editButton && button !== retryButton).at(-1);
|
|
2090
|
+
const lastOfficial = Array.from(row.querySelectorAll("button")).filter((button) => button.parentElement === row && button !== editButton && button !== retryButton).at(-1);
|
|
2066
2091
|
if (lastOfficial !== void 0) {
|
|
2067
2092
|
lastOfficial.insertAdjacentElement("afterend", retryButton);
|
|
2068
2093
|
lastOfficial.insertAdjacentElement("afterend", editButton);
|
|
@@ -2126,8 +2151,8 @@ window.__ModuleLoader__.load({
|
|
|
2126
2151
|
return null;
|
|
2127
2152
|
}
|
|
2128
2153
|
//#endregion
|
|
2129
|
-
//#region \0dsh-css:
|
|
2130
|
-
const css$1 = ".g0PbfG_root{align-items:center;gap:4px;display:inline-flex}.g0PbfG_iconButton,.g0PbfG_rerollButton{box-sizing:border-box;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0}.g0PbfG_iconButton{border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:20px;display:inline-flex}.g0PbfG_rerollButton{border:1px solid var(--dsw-alias-border-l2);border-radius:14px;height:28px;padding:0 10px;font-size:12px;line-height:18px}.g0PbfG_iconButton:hover:not(:disabled),.g0PbfG_rerollButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.g0PbfG_iconButton:focus-visible,.g0PbfG_rerollButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.g0PbfG_iconButton:disabled,.g0PbfG_rerollButton:disabled{cursor:default;opacity:.4}.g0PbfG_counter{min-width:108px;color:var(--dsw-alias-label-tertiary);text-align:center;font-size:11px;line-height:18px}@media (width<=760px){.g0PbfG_counter{display:none}}";
|
|
2154
|
+
//#region \0dsh-css:src/client/MessageEditHeader.module.css.mjs
|
|
2155
|
+
const css$1 = ".g0PbfG_root{align-items:center;gap:4px;display:inline-flex}.g0PbfG_iconButton,.g0PbfG_rerollButton{box-sizing:border-box;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0}.g0PbfG_iconButton{border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:20px;display:inline-flex}.g0PbfG_rerollButton{border:1px solid var(--dsw-alias-border-l2);border-radius:14px;height:28px;padding:0 10px;font-size:12px;line-height:18px}.g0PbfG_iconButton:hover:not(:disabled),.g0PbfG_rerollButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.g0PbfG_iconButton:focus-visible,.g0PbfG_rerollButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.g0PbfG_iconButton:disabled,.g0PbfG_rerollButton:disabled{cursor:default;opacity:.4}.g0PbfG_counter{min-width:108px;color:var(--dsw-alias-label-tertiary);text-align:center;font-size:11px;line-height:18px}.g0PbfG_counter[role=alert]{color:var(--dsw-alias-state-error-primary);font-size:13px;line-height:20px}@media (width<=760px){.g0PbfG_counter:not([role=alert]){display:none}}";
|
|
2131
2156
|
const tagId$1 = "@sh1robana/dsh-plugin-message-edit/MessageEditHeader.module.css";
|
|
2132
2157
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
2133
2158
|
const tag = document.createElement("style");
|
|
@@ -2137,10 +2162,10 @@ window.__ModuleLoader__.load({
|
|
|
2137
2162
|
document.head.appendChild(tag);
|
|
2138
2163
|
}
|
|
2139
2164
|
var MessageEditHeader_module_css_default = {
|
|
2140
|
-
"root": "g0PbfG_root",
|
|
2141
2165
|
"counter": "g0PbfG_counter",
|
|
2142
|
-
"
|
|
2143
|
-
"
|
|
2166
|
+
"rerollButton": "g0PbfG_rerollButton",
|
|
2167
|
+
"root": "g0PbfG_root",
|
|
2168
|
+
"iconButton": "g0PbfG_iconButton"
|
|
2144
2169
|
};
|
|
2145
2170
|
//#endregion
|
|
2146
2171
|
//#region src/client/MessageEditHeader.tsx
|
|
@@ -2158,6 +2183,7 @@ window.__ModuleLoader__.load({
|
|
|
2158
2183
|
const redoSessionId = timeline?.redoSessionIds.at(-1);
|
|
2159
2184
|
const effectDepth = timeline?.undoStack.length ?? 0;
|
|
2160
2185
|
const busy = state.pending !== null || state.status !== "ready";
|
|
2186
|
+
const loadFailed = state.status === "error";
|
|
2161
2187
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineMessageEdit, {
|
|
2162
2188
|
messages: timeline?.messages ?? [],
|
|
2163
2189
|
edit,
|
|
@@ -2181,7 +2207,8 @@ window.__ModuleLoader__.load({
|
|
|
2181
2207
|
}),
|
|
2182
2208
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2183
2209
|
className: MessageEditHeader_module_css_default["counter"],
|
|
2184
|
-
|
|
2210
|
+
role: loadFailed ? "alert" : void 0,
|
|
2211
|
+
children: loadFailed ? "消息加载失败" : state.status === "idle" || state.status === "loading" ? "正在载入…" : versions.length === 0 ? "效果 —" : `效果 ${String(effectDepth)} 层 · ${String(versions.length)} 版`
|
|
2185
2212
|
}),
|
|
2186
2213
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2187
2214
|
type: "button",
|
|
@@ -2194,7 +2221,13 @@ window.__ModuleLoader__.load({
|
|
|
2194
2221
|
},
|
|
2195
2222
|
children: "→"
|
|
2196
2223
|
}),
|
|
2197
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2224
|
+
loadFailed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2225
|
+
type: "button",
|
|
2226
|
+
className: MessageEditHeader_module_css_default["rerollButton"],
|
|
2227
|
+
"aria-label": "重新载入消息时间线",
|
|
2228
|
+
onClick: load,
|
|
2229
|
+
children: "重新载入"
|
|
2230
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2198
2231
|
type: "button",
|
|
2199
2232
|
className: MessageEditHeader_module_css_default["rerollButton"],
|
|
2200
2233
|
disabled: busy || state.timeline === null,
|
|
@@ -2207,8 +2240,8 @@ window.__ModuleLoader__.load({
|
|
|
2207
2240
|
})] });
|
|
2208
2241
|
}
|
|
2209
2242
|
//#endregion
|
|
2210
|
-
//#region \0dsh-css:
|
|
2211
|
-
const css = ".Si12YW_root{box-sizing:border-box;width:100%;height:100%;min-height:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);padding:24px;overflow:auto}.Si12YW_pageHeader{justify-content:space-between;align-items:flex-start;gap:20px;max-width:1480px;margin:0 auto 16px;display:flex}.Si12YW_title,.Si12YW_intro,.Si12YW_subtitle,.Si12YW_notice,.Si12YW_error,.Si12YW_empty,.Si12YW_turnTitle,.Si12YW_turnPreview,.Si12YW_messageText{margin:0}.Si12YW_title{font-size:22px;font-weight:600;line-height:30px}.Si12YW_intro{max-width:700px;color:var(--dsw-alias-label-tertiary);margin-top:4px;font-size:13px;line-height:20px}.Si12YW_headerActions{flex:none;align-items:flex-end;gap:8px;display:flex}.Si12YW_cascadeField{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:4px;font-size:11px;line-height:16px;display:flex}.Si12YW_select,.Si12YW_textarea,.Si12YW_primaryButton,.Si12YW_secondaryButton,.Si12YW_textButton,.Si12YW_versionButton{box-sizing:border-box;font:inherit}.Si12YW_select,.Si12YW_textarea{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border-radius:8px}.Si12YW_select{height:34px;padding:0 30px 0 9px;font-size:12px}.Si12YW_primaryButton,.Si12YW_secondaryButton,.Si12YW_textButton,.Si12YW_versionButton{cursor:pointer;border:0}.Si12YW_primaryButton,.Si12YW_secondaryButton{border-radius:17px;justify-content:center;align-items:center;min-height:34px;padding:0 13px;font-size:12px;line-height:18px;display:inline-flex}.Si12YW_primaryButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill)}.Si12YW_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.Si12YW_secondaryButton{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.Si12YW_secondaryButton:hover:not(:disabled),.Si12YW_textButton:hover:not(:disabled),.Si12YW_versionButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Si12YW_primaryButton:disabled,.Si12YW_secondaryButton:disabled,.Si12YW_textButton:disabled,.Si12YW_versionButton:disabled,.Si12YW_select:disabled{cursor:default;opacity:.45}.Si12YW_primaryButton:focus-visible,.Si12YW_secondaryButton:focus-visible,.Si12YW_textButton:focus-visible,.Si12YW_versionButton:focus-visible,.Si12YW_select:focus-visible,.Si12YW_textarea:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.Si12YW_notice,.Si12YW_error{max-width:1480px;margin:0 auto 10px;font-size:12px;line-height:18px}.Si12YW_notice{color:var(--dsw-alias-state-warn-label)}.Si12YW_error{color:var(--dsw-alias-state-error-primary)}.Si12YW_status{box-sizing:border-box;width:100%;height:100%;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);flex-direction:column;align-items:flex-start;gap:12px;padding:24px;display:flex}.Si12YW_status .Si12YW_error{margin:0}.Si12YW_columns{grid-template-columns:minmax(280px,.72fr) minmax(520px,1.75fr);align-items:start;gap:18px;max-width:1480px;margin:0 auto;display:grid}.Si12YW_versionsPanel,.Si12YW_turnsPanel{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);border-radius:14px;min-width:0;padding:16px}.Si12YW_versionsPanel{position:sticky;top:0}.Si12YW_sectionHeading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;display:flex}.Si12YW_effectControls{background:var(--dsw-alias-bg-module-platform);border-radius:9px;flex-direction:column;gap:8px;margin-bottom:12px;padding:10px;display:flex}.Si12YW_effectDepth{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:17px}.Si12YW_effectButtons{flex-wrap:wrap;gap:6px;display:flex}.Si12YW_effectButtons .Si12YW_secondaryButton{min-height:28px;padding:0 10px;font-size:11px}.Si12YW_subtitle{font-size:16px;font-weight:500;line-height:24px}.Si12YW_count{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.Si12YW_versionList,.Si12YW_turnList{margin:0;padding:0;list-style:none}.Si12YW_versionList{flex-direction:column;gap:4px;display:flex}.Si12YW_versionItem{--message-edit-depth:0;padding-left:calc(var(--message-edit-depth) * 14px);position:relative}.Si12YW_versionButton{width:100%;min-width:0;color:var(--dsw-alias-label-secondary);text-align:left;background:0 0;border-radius:9px;align-items:flex-start;gap:9px;padding:9px;display:flex;position:relative}.Si12YW_versionButton[data-current]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);opacity:1}.Si12YW_versionButton:not([data-current]) .Si12YW_pathBadge{opacity:.8}.Si12YW_versionLine{background:var(--dsw-alias-border-l2);width:1px;position:absolute;top:0;bottom:0;left:14px}.Si12YW_versionDot{z-index:1;border:2px solid var(--dsw-alias-bg-layer-1);background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:7px;height:7px;margin-top:6px}.Si12YW_versionButton[data-current] .Si12YW_versionDot{border-color:var(--dsw-alias-bg-module-platform);background:var(--dsw-alias-brand-primary)}.Si12YW_versionMain{flex-direction:column;flex:1;min-width:0;display:flex}.Si12YW_versionTitle{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.Si12YW_versionMeta{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:16px;overflow:hidden}.Si12YW_versionDiff{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:2px;margin-top:5px;font-size:10px;line-height:15px;display:flex}.Si12YW_versionDiff span{-webkit-line-clamp:2;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.Si12YW_currentBadge,.Si12YW_pathBadge,.Si12YW_kindBadge{border-radius:9px;flex:none;padding:1px 6px;font-size:10px;line-height:17px}.Si12YW_currentBadge{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_pathBadge{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_turnList{flex-direction:column;gap:14px;display:flex}.Si12YW_turnSection{border:1px solid var(--dsw-alias-border-l2);border-radius:11px;padding:13px}.Si12YW_turnHeader,.Si12YW_messageHeader,.Si12YW_editorActions{justify-content:space-between;align-items:center;gap:10px;display:flex}.Si12YW_turnHeader{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:flex-start;padding-bottom:11px}.Si12YW_turnTitle{font-size:14px;font-weight:500;line-height:22px}.Si12YW_turnPreview{max-width:700px;color:var(--dsw-alias-label-tertiary);-webkit-line-clamp:2;white-space:pre-wrap;-webkit-box-orient:vertical;font-size:11px;line-height:17px;display:-webkit-box;overflow:hidden}.Si12YW_messageList{flex-direction:column;gap:8px;margin-top:10px;display:flex}.Si12YW_messageCard{background:var(--dsw-alias-bg-module-platform);border-radius:9px;padding:10px}.Si12YW_messageHeader{justify-content:flex-start}.Si12YW_kindBadge{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_kindBadge[data-kind=assistant\\.reasoning]{color:var(--dsw-alias-label-tertiary)}.Si12YW_messageTime{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:17px}.Si12YW_textButton{color:var(--dsw-alias-label-secondary);background:0 0;border-radius:12px;margin-left:auto;padding:3px 8px;font-size:11px;line-height:17px}.Si12YW_messageText{max-height:220px;color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px;font-family:inherit;font-size:12px;line-height:19px;overflow:auto}.Si12YW_editor{margin-top:8px}.Si12YW_textarea{resize:vertical;width:100%;min-height:120px;padding:9px;font-size:12px;line-height:19px}.Si12YW_editorActions{margin-top:8px}.Si12YW_editorHint{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:16px}.Si12YW_empty{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);border-radius:10px;padding:18px;font-size:13px;line-height:20px}@media (width<=1000px){.Si12YW_columns{grid-template-columns:1fr}.Si12YW_versionsPanel{position:static}}@media (width<=680px){.Si12YW_root{padding:16px}.Si12YW_pageHeader,.Si12YW_headerActions,.Si12YW_turnHeader,.Si12YW_editorActions{flex-direction:column;align-items:stretch}.Si12YW_headerActions,.Si12YW_primaryButton,.Si12YW_secondaryButton{width:100%}}";
|
|
2243
|
+
//#region \0dsh-css:src/client/MessageEditTimelineView.module.css.mjs
|
|
2244
|
+
const css = ".Si12YW_root{box-sizing:border-box;width:100%;height:100%;min-height:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);padding:24px;overflow:auto}.Si12YW_pageHeader{justify-content:space-between;align-items:flex-start;gap:20px;max-width:1480px;margin:0 auto 16px;display:flex}.Si12YW_title,.Si12YW_intro,.Si12YW_subtitle,.Si12YW_notice,.Si12YW_error,.Si12YW_empty,.Si12YW_turnTitle,.Si12YW_turnPreview,.Si12YW_messageText{margin:0}.Si12YW_title{font-size:22px;font-weight:600;line-height:30px}.Si12YW_intro{max-width:700px;color:var(--dsw-alias-label-tertiary);margin-top:4px;font-size:13px;line-height:20px}.Si12YW_headerActions{flex:none;align-items:flex-end;gap:8px;display:flex}.Si12YW_cascadeField{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:4px;font-size:11px;line-height:16px;display:flex}.Si12YW_select,.Si12YW_textarea,.Si12YW_primaryButton,.Si12YW_secondaryButton,.Si12YW_textButton,.Si12YW_versionButton{box-sizing:border-box;font:inherit}.Si12YW_select,.Si12YW_textarea{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border-radius:8px}.Si12YW_select{height:34px;padding:0 30px 0 9px;font-size:12px}.Si12YW_primaryButton,.Si12YW_secondaryButton,.Si12YW_textButton,.Si12YW_versionButton{cursor:pointer;border:0}.Si12YW_primaryButton,.Si12YW_secondaryButton{border-radius:17px;justify-content:center;align-items:center;min-height:34px;padding:0 13px;font-size:12px;line-height:18px;display:inline-flex}.Si12YW_primaryButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill)}.Si12YW_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.Si12YW_secondaryButton{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.Si12YW_secondaryButton:hover:not(:disabled),.Si12YW_textButton:hover:not(:disabled),.Si12YW_versionButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Si12YW_primaryButton:disabled,.Si12YW_secondaryButton:disabled,.Si12YW_textButton:disabled,.Si12YW_versionButton:disabled,.Si12YW_select:disabled{cursor:default;opacity:.45}.Si12YW_primaryButton:focus-visible,.Si12YW_secondaryButton:focus-visible,.Si12YW_textButton:focus-visible,.Si12YW_versionButton:focus-visible,.Si12YW_select:focus-visible,.Si12YW_textarea:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.Si12YW_notice,.Si12YW_error{max-width:1480px;margin:0 auto 10px;font-size:12px;line-height:18px}.Si12YW_notice{color:var(--dsw-alias-state-warn-label)}.Si12YW_error{color:var(--dsw-alias-state-error-primary)}.Si12YW_status{box-sizing:border-box;width:100%;height:100%;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);flex-direction:column;align-items:flex-start;gap:12px;padding:24px;display:flex}.Si12YW_status .Si12YW_error{margin:0}.Si12YW_columns{grid-template-columns:minmax(280px,.72fr) minmax(520px,1.75fr);align-items:start;gap:18px;max-width:1480px;margin:0 auto;display:grid}.Si12YW_versionsPanel,.Si12YW_turnsPanel{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);border-radius:14px;min-width:0;padding:16px}.Si12YW_versionsPanel{position:sticky;top:0}.Si12YW_sectionHeading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;display:flex}.Si12YW_effectControls{background:var(--dsw-alias-bg-module-platform);border-radius:9px;flex-direction:column;gap:8px;margin-bottom:12px;padding:10px;display:flex}.Si12YW_effectDepth{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:17px}.Si12YW_effectButtons{flex-wrap:wrap;gap:6px;display:flex}.Si12YW_effectButtons .Si12YW_secondaryButton{min-height:28px;padding:0 10px;font-size:11px}.Si12YW_subtitle{font-size:16px;font-weight:500;line-height:24px}.Si12YW_count{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.Si12YW_versionList,.Si12YW_turnList{margin:0;padding:0;list-style:none}.Si12YW_versionList{flex-direction:column;gap:4px;display:flex}.Si12YW_versionItem{--message-edit-depth:0;padding-left:calc(var(--message-edit-depth) * 14px);position:relative}.Si12YW_versionButton{width:100%;min-width:0;color:var(--dsw-alias-label-secondary);text-align:left;background:0 0;border-radius:9px;align-items:flex-start;gap:9px;padding:9px;display:flex;position:relative}.Si12YW_versionButton[data-current]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);opacity:1}.Si12YW_versionButton[data-unavailable]{opacity:1}.Si12YW_versionButton:not([data-current]) .Si12YW_pathBadge{opacity:.8}.Si12YW_versionLine{background:var(--dsw-alias-border-l2);width:1px;position:absolute;top:0;bottom:0;left:14px}.Si12YW_versionDot{z-index:1;border:2px solid var(--dsw-alias-bg-layer-1);background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:7px;height:7px;margin-top:6px}.Si12YW_versionButton[data-current] .Si12YW_versionDot{border-color:var(--dsw-alias-bg-module-platform);background:var(--dsw-alias-brand-primary)}.Si12YW_versionMain{flex-direction:column;flex:1;min-width:0;display:flex}.Si12YW_versionTitle{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.Si12YW_versionMeta{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:16px;overflow:hidden}.Si12YW_versionDiff{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:2px;margin-top:5px;font-size:10px;line-height:15px;display:flex}.Si12YW_versionDiff span{-webkit-line-clamp:2;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.Si12YW_versionUnavailable{color:var(--dsw-alias-state-error-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin-top:5px;font-size:14px;line-height:22px}.Si12YW_currentBadge,.Si12YW_pathBadge,.Si12YW_unavailableBadge,.Si12YW_kindBadge{border-radius:9px;flex:none;padding:1px 6px;font-size:10px;line-height:17px}.Si12YW_currentBadge{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_pathBadge{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_unavailableBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_turnList{flex-direction:column;gap:14px;display:flex}.Si12YW_turnSection{border:1px solid var(--dsw-alias-border-l2);border-radius:11px;padding:13px}.Si12YW_turnHeader,.Si12YW_messageHeader,.Si12YW_editorActions{justify-content:space-between;align-items:center;gap:10px;display:flex}.Si12YW_turnHeader{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:flex-start;padding-bottom:11px}.Si12YW_turnTitle{font-size:14px;font-weight:500;line-height:22px}.Si12YW_turnPreview{max-width:700px;color:var(--dsw-alias-label-tertiary);-webkit-line-clamp:2;white-space:pre-wrap;-webkit-box-orient:vertical;font-size:11px;line-height:17px;display:-webkit-box;overflow:hidden}.Si12YW_messageList{flex-direction:column;gap:8px;margin-top:10px;display:flex}.Si12YW_messageCard{background:var(--dsw-alias-bg-module-platform);border-radius:9px;padding:10px}.Si12YW_messageHeader{justify-content:flex-start}.Si12YW_kindBadge{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1)}.Si12YW_kindBadge[data-kind=assistant\\.reasoning]{color:var(--dsw-alias-label-tertiary)}.Si12YW_messageTime{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:17px}.Si12YW_textButton{color:var(--dsw-alias-label-secondary);background:0 0;border-radius:12px;margin-left:auto;padding:3px 8px;font-size:11px;line-height:17px}.Si12YW_messageText{max-height:220px;color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px;font-family:inherit;font-size:12px;line-height:19px;overflow:auto}.Si12YW_editor{margin-top:8px}.Si12YW_textarea{resize:vertical;width:100%;min-height:120px;padding:9px;font-size:12px;line-height:19px}.Si12YW_editorActions{margin-top:8px}.Si12YW_editorHint{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:16px}.Si12YW_empty{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);border-radius:10px;padding:18px;font-size:13px;line-height:20px}@media (width<=1000px){.Si12YW_columns{grid-template-columns:1fr}.Si12YW_versionsPanel{position:static}}@media (width<=680px){.Si12YW_root{padding:16px}.Si12YW_pageHeader,.Si12YW_headerActions,.Si12YW_turnHeader,.Si12YW_editorActions{flex-direction:column;align-items:stretch}.Si12YW_headerActions,.Si12YW_primaryButton,.Si12YW_secondaryButton{width:100%}}";
|
|
2212
2245
|
const tagId = "@sh1robana/dsh-plugin-message-edit/MessageEditTimelineView.module.css";
|
|
2213
2246
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
2214
2247
|
const tag = document.createElement("style");
|
|
@@ -2218,55 +2251,57 @@ window.__ModuleLoader__.load({
|
|
|
2218
2251
|
document.head.appendChild(tag);
|
|
2219
2252
|
}
|
|
2220
2253
|
var MessageEditTimelineView_module_css_default = {
|
|
2221
|
-
"versionItem": "Si12YW_versionItem",
|
|
2222
|
-
"error": "Si12YW_error",
|
|
2223
|
-
"versionButton": "Si12YW_versionButton",
|
|
2224
|
-
"secondaryButton": "Si12YW_secondaryButton",
|
|
2225
|
-
"versionsPanel": "Si12YW_versionsPanel",
|
|
2226
|
-
"headerActions": "Si12YW_headerActions",
|
|
2227
|
-
"textButton": "Si12YW_textButton",
|
|
2228
|
-
"versionTitle": "Si12YW_versionTitle",
|
|
2229
|
-
"pathBadge": "Si12YW_pathBadge",
|
|
2230
|
-
"versionDot": "Si12YW_versionDot",
|
|
2231
2254
|
"versionList": "Si12YW_versionList",
|
|
2232
|
-
"
|
|
2233
|
-
"
|
|
2234
|
-
"
|
|
2235
|
-
"
|
|
2236
|
-
"
|
|
2255
|
+
"versionMain": "Si12YW_versionMain",
|
|
2256
|
+
"currentBadge": "Si12YW_currentBadge",
|
|
2257
|
+
"messageText": "Si12YW_messageText",
|
|
2258
|
+
"turnSection": "Si12YW_turnSection",
|
|
2259
|
+
"editor": "Si12YW_editor",
|
|
2260
|
+
"root": "Si12YW_root",
|
|
2237
2261
|
"messageTime": "Si12YW_messageTime",
|
|
2238
|
-
"
|
|
2262
|
+
"editorHint": "Si12YW_editorHint",
|
|
2263
|
+
"cascadeField": "Si12YW_cascadeField",
|
|
2264
|
+
"columns": "Si12YW_columns",
|
|
2265
|
+
"select": "Si12YW_select",
|
|
2239
2266
|
"empty": "Si12YW_empty",
|
|
2240
|
-
"
|
|
2241
|
-
"
|
|
2267
|
+
"notice": "Si12YW_notice",
|
|
2268
|
+
"versionButton": "Si12YW_versionButton",
|
|
2269
|
+
"pathBadge": "Si12YW_pathBadge",
|
|
2270
|
+
"effectControls": "Si12YW_effectControls",
|
|
2242
2271
|
"versionLine": "Si12YW_versionLine",
|
|
2243
|
-
"
|
|
2244
|
-
"
|
|
2272
|
+
"messageHeader": "Si12YW_messageHeader",
|
|
2273
|
+
"messageList": "Si12YW_messageList",
|
|
2274
|
+
"effectButtons": "Si12YW_effectButtons",
|
|
2245
2275
|
"count": "Si12YW_count",
|
|
2246
|
-
"
|
|
2247
|
-
"
|
|
2248
|
-
"
|
|
2249
|
-
"
|
|
2250
|
-
"
|
|
2251
|
-
"editorActions": "Si12YW_editorActions",
|
|
2252
|
-
"editorHint": "Si12YW_editorHint",
|
|
2253
|
-
"intro": "Si12YW_intro",
|
|
2276
|
+
"textarea": "Si12YW_textarea",
|
|
2277
|
+
"turnPreview": "Si12YW_turnPreview",
|
|
2278
|
+
"error": "Si12YW_error",
|
|
2279
|
+
"secondaryButton": "Si12YW_secondaryButton",
|
|
2280
|
+
"turnsPanel": "Si12YW_turnsPanel",
|
|
2254
2281
|
"sectionHeading": "Si12YW_sectionHeading",
|
|
2255
2282
|
"turnList": "Si12YW_turnList",
|
|
2256
|
-
"
|
|
2257
|
-
"
|
|
2283
|
+
"versionTitle": "Si12YW_versionTitle",
|
|
2284
|
+
"pageHeader": "Si12YW_pageHeader",
|
|
2285
|
+
"intro": "Si12YW_intro",
|
|
2286
|
+
"status": "Si12YW_status",
|
|
2287
|
+
"textButton": "Si12YW_textButton",
|
|
2258
2288
|
"title": "Si12YW_title",
|
|
2259
|
-
"
|
|
2260
|
-
"
|
|
2261
|
-
"
|
|
2289
|
+
"headerActions": "Si12YW_headerActions",
|
|
2290
|
+
"versionUnavailable": "Si12YW_versionUnavailable",
|
|
2291
|
+
"unavailableBadge": "Si12YW_unavailableBadge",
|
|
2292
|
+
"versionItem": "Si12YW_versionItem",
|
|
2293
|
+
"turnHeader": "Si12YW_turnHeader",
|
|
2294
|
+
"versionDot": "Si12YW_versionDot",
|
|
2295
|
+
"editorActions": "Si12YW_editorActions",
|
|
2296
|
+
"turnTitle": "Si12YW_turnTitle",
|
|
2297
|
+
"effectDepth": "Si12YW_effectDepth",
|
|
2298
|
+
"kindBadge": "Si12YW_kindBadge",
|
|
2299
|
+
"versionMeta": "Si12YW_versionMeta",
|
|
2262
2300
|
"versionDiff": "Si12YW_versionDiff",
|
|
2263
|
-
"editor": "Si12YW_editor",
|
|
2264
|
-
"messageText": "Si12YW_messageText",
|
|
2265
2301
|
"subtitle": "Si12YW_subtitle",
|
|
2266
|
-
"
|
|
2267
|
-
"
|
|
2268
|
-
"
|
|
2269
|
-
"versionMeta": "Si12YW_versionMeta"
|
|
2302
|
+
"messageCard": "Si12YW_messageCard",
|
|
2303
|
+
"primaryButton": "Si12YW_primaryButton",
|
|
2304
|
+
"versionsPanel": "Si12YW_versionsPanel"
|
|
2270
2305
|
};
|
|
2271
2306
|
//#endregion
|
|
2272
2307
|
//#region src/client/MessageEditTimelineView.tsx
|
|
@@ -2298,7 +2333,7 @@ window.__ModuleLoader__.load({
|
|
|
2298
2333
|
}
|
|
2299
2334
|
function VersionRow({ version, disabled, onOpen }) {
|
|
2300
2335
|
const depthStyle = { "--message-edit-depth": String(version.depth) };
|
|
2301
|
-
const operation = version.operation === void 0 ? version.parentSessionId === void 0 ? "原始版本" : "外部分支" : OPERATION_LABEL[version.operation];
|
|
2336
|
+
const operation = version.unavailableReason !== void 0 ? "历史版本" : version.operation === void 0 ? version.parentSessionId === void 0 ? "原始版本" : "外部分支" : OPERATION_LABEL[version.operation];
|
|
2302
2337
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
2303
2338
|
className: MessageEditTimelineView_module_css_default["versionItem"],
|
|
2304
2339
|
style: depthStyle,
|
|
@@ -2306,9 +2341,10 @@ window.__ModuleLoader__.load({
|
|
|
2306
2341
|
type: "button",
|
|
2307
2342
|
className: MessageEditTimelineView_module_css_default["versionButton"],
|
|
2308
2343
|
"data-current": version.current || void 0,
|
|
2309
|
-
|
|
2344
|
+
"data-unavailable": version.unavailableReason === void 0 ? void 0 : true,
|
|
2345
|
+
disabled: version.current || disabled || version.unavailableReason !== void 0,
|
|
2310
2346
|
onClick: () => {
|
|
2311
|
-
onOpen(version.sessionId);
|
|
2347
|
+
if (version.unavailableReason === void 0) onOpen(version.sessionId);
|
|
2312
2348
|
},
|
|
2313
2349
|
children: [
|
|
2314
2350
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -2334,13 +2370,20 @@ window.__ModuleLoader__.load({
|
|
|
2334
2370
|
version.sessionId.slice(0, 12)
|
|
2335
2371
|
]
|
|
2336
2372
|
}),
|
|
2373
|
+
version.unavailableReason === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2374
|
+
className: MessageEditTimelineView_module_css_default["versionUnavailable"],
|
|
2375
|
+
children: version.unavailableReason
|
|
2376
|
+
}),
|
|
2337
2377
|
version.before === void 0 && version.after === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2338
2378
|
className: MessageEditTimelineView_module_css_default["versionDiff"],
|
|
2339
2379
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: ["原:", version.before || "(空)"] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: ["新:", version.after || "(空)"] })]
|
|
2340
2380
|
})
|
|
2341
2381
|
]
|
|
2342
2382
|
}),
|
|
2343
|
-
version.
|
|
2383
|
+
version.unavailableReason !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2384
|
+
className: MessageEditTimelineView_module_css_default["unavailableBadge"],
|
|
2385
|
+
children: "无法读取"
|
|
2386
|
+
}) : version.current ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2344
2387
|
className: MessageEditTimelineView_module_css_default["currentBadge"],
|
|
2345
2388
|
children: "当前"
|
|
2346
2389
|
}) : version.onCurrentEffectPath ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|