dsh-composer-live 0.2.17 → 0.2.18
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 +9 -0
- package/README.md +28 -3
- package/README.zh-CN.md +30 -3
- package/docs/screenshots/demo.gif +0 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
> 更新日志以中文记录。Changelog entries are written in Chinese.
|
|
4
4
|
|
|
5
|
+
## 0.2.18(2026-11-01)
|
|
6
|
+
|
|
7
|
+
**文档与发布物料更新(功能零变更)——README 双语大修 + 首个动态演示 GIF。**
|
|
8
|
+
|
|
9
|
+
- **新增动态演示 GIF**(`docs/screenshots/demo.gif`,960×540、109 帧、1.8MB):真实逐字打字过程——行内四件套(粗体/行内代码胶囊/斜体/删除线)、列表与任务项、```` ```js ```` 围栏自动补全成代码块并语法高亮,一镜到底。录制脚本 `e2e/capture-demo-gif.mjs`(CDP screencast + trusted 逐字打字通道,随仓库工具链留档,发布白名单不含)。
|
|
10
|
+
- README(中英双语)五处增强:顶部嵌入演示 GIF;徽章更新为「206 单测 · 129 E2E」;新增「实测版本」表(0.1.5-rc.2 / 0.2.0-rc.2 / 0.2.1-rc.5 三代全绿,双环境 E2E 是本插件独有的质量承诺);新增「与其它输入框插件的关系」对比表(composer-plus / composer-enter / prompt-history 互不重叠可共存);新增「反馈」段(issue 入口)。
|
|
11
|
+
- 修正过时数字:单测 188→206、E2E 62→129 场景。
|
|
12
|
+
- npm keywords 增补(live-preview / toolbar / format / paste)。
|
|
13
|
+
|
|
5
14
|
## 0.2.17(2026-10-24)
|
|
6
15
|
|
|
7
16
|
**渲染性能大优化:空闲主线程占用 98% → 0、打字帧率 6fps → 125fps(200 行文档实测)。**
|
package/README.md
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|

|
|
9
|
-

|
|
10
|
+
|
|
11
|
+

|
|
10
12
|
|
|
11
13
|
dsh-composer-live turns the DSH Web input box into an Open-WebUI-style live editor: you type Markdown, it renders as you type — bold, italic, code blocks with syntax highlighting, lists, quotes, tables — while the draft itself stays plain Markdown source, so what you send is exactly what you typed.
|
|
12
14
|
|
|
@@ -100,6 +102,14 @@ The official composer already provides — and this plugin deliberately does not
|
|
|
100
102
|
- A **Chromium-based browser** (Chrome, Edge, …): the transparency technique relies on `-webkit-text-fill-color`.
|
|
101
103
|
- OS-independent — it is pure DOM/CSS with no native dependencies.
|
|
102
104
|
|
|
105
|
+
**Verified DSH versions** — every release runs the full 129-scenario E2E suite on two live instances covering both supported generations:
|
|
106
|
+
|
|
107
|
+
| DSH version | Status |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| 0.1.5-rc.2 | ✅ E2E tested |
|
|
110
|
+
| 0.2.0-rc.2 | ✅ E2E tested |
|
|
111
|
+
| 0.2.1-rc.5 | ✅ E2E tested (primary) |
|
|
112
|
+
|
|
103
113
|
## Installation
|
|
104
114
|
|
|
105
115
|
```bash
|
|
@@ -149,11 +159,22 @@ See [docs/architecture.md](./docs/architecture.md) for the full deep dive.
|
|
|
149
159
|
- "Stop generating" is matched by aria-label (English and Chinese enumerated); if upstream renames the label, use the button directly.
|
|
150
160
|
- `web` profile only; Chromium-family browsers only.
|
|
151
161
|
|
|
162
|
+
## Complementary plugins
|
|
163
|
+
|
|
164
|
+
This plugin focuses purely on the **editing experience**. Other composer plugins focus on different things — they do not overlap, and can be installed together:
|
|
165
|
+
|
|
166
|
+
| Plugin | What it does | Overlap with dsh-composer-live |
|
|
167
|
+
| --- | --- | --- |
|
|
168
|
+
| **dsh-composer-live** (this one) | Live Markdown rendering, code blocks, lists/quotes/tables, format toolbars, paste handling | — |
|
|
169
|
+
| dsh-composer-plus | Model picker, reasoning-effort rail, account display in the composer | none — different layer |
|
|
170
|
+
| dsh-client-composer-enter | Swaps Enter/Shift+Enter send behaviour | none — keymap only |
|
|
171
|
+
| dsh-prompt-history | ↑ history recall with prefix search | none — recall, not rendering |
|
|
172
|
+
|
|
152
173
|
## Development
|
|
153
174
|
|
|
154
175
|
```bash
|
|
155
|
-
node test-live.cjs #
|
|
156
|
-
node e2e/run-e2e.mjs #
|
|
176
|
+
node test-live.cjs # 206 unit tests (pure functions, no browser needed)
|
|
177
|
+
node e2e/run-e2e.mjs # 129-scenario × 10-invariant E2E suite against a live instance
|
|
157
178
|
```
|
|
158
179
|
|
|
159
180
|
The E2E runner expects a DSH web instance with this source deployed and derives everything from environment variables: `DSH_CL_PORT` (default 8124) and `DSH_CL_DSH_HOME` (defaults to `DSH_HOME`, then `~/.dsh`) locate the deployed copy for a version check; the auth cookie is fetched automatically. See [e2e/README.md](./e2e/README.md) for the full variable list.
|
|
@@ -176,6 +197,10 @@ It is batched per render frame and merged into a few absolutely-positioned spans
|
|
|
176
197
|
**Will a DSH update break it?**
|
|
177
198
|
Zero service injection plus `data-`-attribute anchoring make it resilient to routine updates (class-name hash churn, client API refactors). When the official composer *architecture itself* changes — as 0.1.1 → 0.1.5 did, textarea → Lexical — the plugin needs a port. This plugin *is* that port: `dsh-composer-md` was its 0.1.x predecessor and is now discontinued.
|
|
178
199
|
|
|
200
|
+
## Feedback
|
|
201
|
+
|
|
202
|
+
Found a bug, a misaligned character, or a DSH version that misbehaves? Please [open an issue](https://github.com/zeusxx/dsh-composer-live/issues) — screenshots plus your DSH version help a lot. Feature ideas (new shortcuts, highlighting languages, block styles) are equally welcome.
|
|
203
|
+
|
|
179
204
|
## License
|
|
180
205
|
|
|
181
206
|
[MIT](./LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|

|
|
9
|
-

|
|
10
|
+
|
|
11
|
+

|
|
10
12
|
|
|
11
13
|
dsh-composer-live 把 DSH Web 的输入框变成 Open WebUI 风格的实时编辑器:你打 Markdown,它边打边渲染——加粗、斜体、带语法高亮的代码块、列表、引用、表格——而草稿本身始终是纯 Markdown 源文本,发送出去的就是你输入的原文。
|
|
12
14
|
|
|
@@ -94,6 +96,16 @@ dsh-composer-live 把 DSH Web 的输入框变成 Open WebUI 风格的实时编
|
|
|
94
96
|
| ↓ | 已闭合块最后一个内容行 | 跳到块后 |
|
|
95
97
|
| Esc | 菜单开着→官方 · 展开态→收起 · 生成中→停止 | 按语境分发 |
|
|
96
98
|
|
|
99
|
+
## 实测版本
|
|
100
|
+
|
|
101
|
+
每个版本发布前都在两个真实实例上跑完整 129 场景 E2E(覆盖两代支持的架构):
|
|
102
|
+
|
|
103
|
+
| DSH 版本 | 状态 |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| 0.1.5-rc.2 | ✅ E2E 实测通过 |
|
|
106
|
+
| 0.2.0-rc.2 | ✅ E2E 实测通过 |
|
|
107
|
+
| 0.2.1-rc.5 | ✅ E2E 实测通过(主力环境) |
|
|
108
|
+
|
|
97
109
|
## 环境要求
|
|
98
110
|
|
|
99
111
|
- **DSH ≥ 0.1.5-rc.2**,`web` profile——本插件面向 0.1.5 的 Lexical contenteditable 输入框。
|
|
@@ -152,8 +164,8 @@ DSH_HOME=/path/to/your/.dsh dsh plugin --profile web add dsh-composer-live
|
|
|
152
164
|
## 开发
|
|
153
165
|
|
|
154
166
|
```bash
|
|
155
|
-
node test-live.cjs #
|
|
156
|
-
node e2e/run-e2e.mjs #
|
|
167
|
+
node test-live.cjs # 206 项单测(纯函数,无需浏览器)
|
|
168
|
+
node e2e/run-e2e.mjs # 129 场景 × 10 不变量的 E2E 套件(对着运行中的实例测)
|
|
157
169
|
```
|
|
158
170
|
|
|
159
171
|
E2E runner 要求被测实例已部署当前源码,路径全部由环境变量推导:`DSH_CL_PORT`(默认 8124)与 `DSH_CL_DSH_HOME`(默认取 `DSH_HOME`,再默认 `~/.dsh`)定位部署副本做版本对照,鉴权 cookie 自动获取。完整变量表见 [e2e/README.md](./e2e/README.md)。
|
|
@@ -162,6 +174,17 @@ E2E runner 要求被测实例已部署当前源码,路径全部由环境变量
|
|
|
162
174
|
|
|
163
175
|
版本纪律:每次改动 bump `package.json` 并在 [CHANGELOG.md](./CHANGELOG.md) 记一笔。
|
|
164
176
|
|
|
177
|
+
## 与其它输入框插件的关系
|
|
178
|
+
|
|
179
|
+
本插件只做**编辑体验**这一层。其它输入框类插件做的是别的事情——互不重叠,可以同时安装:
|
|
180
|
+
|
|
181
|
+
| 插件 | 做什么 | 与本插件的重叠 |
|
|
182
|
+
| --- | --- | --- |
|
|
183
|
+
| **dsh-composer-live**(本插件) | Markdown 实时渲染、代码块、列表/引用/表格、格式工具栏、粘贴处理 | — |
|
|
184
|
+
| dsh-composer-plus | 输入框里的模型切换、推理力度、账号显示 | 无——不同层面 |
|
|
185
|
+
| dsh-client-composer-enter | 交换 Enter/Shift+Enter 的发送行为 | 无——只改键位映射 |
|
|
186
|
+
| dsh-prompt-history | ↑ 调历史输入(带前缀搜索) | 无——是回忆,不是渲染 |
|
|
187
|
+
|
|
165
188
|
## FAQ
|
|
166
189
|
|
|
167
190
|
**为什么只支持 Chromium 系?**
|
|
@@ -176,6 +199,10 @@ E2E runner 要求被测实例已部署当前源码,路径全部由环境变量
|
|
|
176
199
|
**DSH 升级会弄坏它吗?**
|
|
177
200
|
零服务注入 + `data-` 属性锚定让它对日常升级(类名哈希变化、client API 重构)免疫。当官方输入框**架构本身**变化时——比如 0.1.1 → 0.1.5 从 textarea 换成 Lexical——插件需要重写。本插件正是那次重写的产物:`dsh-composer-md` 是它的 0.1.x 前身,现已停止维护。
|
|
178
201
|
|
|
202
|
+
## 反馈
|
|
203
|
+
|
|
204
|
+
发现 bug、字符错位、或某个 DSH 版本上表现异常?欢迎[提 issue](https://github.com/zeusxx/dsh-composer-live/issues)——附上截图和 DSH 版本号会很有帮助。功能建议(新快捷键、高亮语言、块样式)同样欢迎。
|
|
205
|
+
|
|
179
206
|
## 许可证
|
|
180
207
|
|
|
181
208
|
[MIT](./LICENSE)
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-composer-live",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "DSH Web 0.1.5+ 输入框增强(Lexical contenteditable 架构版):markdown 实时渲染 + 代码块语法高亮/段落级等宽 + 格式工具栏(常驻顶条 + 选区浮动条)+ 70vh 展开 + 大段粘贴包代码块 + Esc 分发。纯浏览器端插件,零依赖,不改官方源码。仿 Open WebUI 输入体验。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
"markdown",
|
|
45
45
|
"composer",
|
|
46
46
|
"input",
|
|
47
|
+
"live-preview",
|
|
47
48
|
"preview",
|
|
49
|
+
"toolbar",
|
|
50
|
+
"format",
|
|
51
|
+
"paste",
|
|
48
52
|
"lexical",
|
|
49
53
|
"syntax-highlighting",
|
|
50
54
|
"open-webui"
|