dsh-reading-focus 0.0.0-stage → 0.8.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-reading-focus contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,103 @@
1
+ <p align="center"><img src="icon.svg" width="88" alt="Reading Focus"></p>
2
+
3
+ <h1 align="center">Reading Focus for DeepSeek Harness</h1>
4
+
5
+ <p align="center">Gradient text, a reading ruler, line and block focus, and colour bands for the DeepSeek Harness chat transcript.</p>
6
+
7
+ <p align="center">
8
+ <a href="https://github.com/smallflycar/dsh-reading-focus"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-repo-24292f.svg"></a>
9
+ <a href="https://www.npmjs.com/package/dsh-reading-focus"><img alt="npm" src="https://img.shields.io/npm/v/dsh-reading-focus"></a>
10
+ <a href="https://github.com/smallflycar/dsh-reading-focus/releases"><img alt="Release" src="https://img.shields.io/github/v/release/smallflycar/dsh-reading-focus"></a>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="README.md">简体中文</a> · <a href="README.en.md">English</a>
15
+ </p>
16
+
17
+ ## Why this exists
18
+
19
+ I spend more and more of my day in an agent. Its output is long and keeps piling up: an answer runs to a thousand words, and a few turns become screen after screen of transcript. The way I work with it is stop-start as well — send a task, wait, come back and keep reading. Reading that much text is tiring, and attention drifts.
20
+
21
+ Reading rulers, line focus and colour bands have existed in browsers for a long time, to make long text easier to read. Agent transcripts are longer and denser, and I think they need those aids more, so I brought a few of them into the DSH transcript.
22
+
23
+ ## Features
24
+
25
+ - **Gradient reading** — gradient text that advances line by line, switching hue every two lines.
26
+ - **Reading ruler** — a faint band with a solid line on each edge, following the pointer.
27
+ - **Line focus** — the rows near the pointer stay clear while the rest is dimmed.
28
+ - **Block focus** — the current paragraph stays as it is and the rest fades or dims.
29
+ - **Colour bands** — adjacent passages separated by cycling colour blocks; code and headings stay plain.
30
+
31
+ ## Screenshots
32
+
33
+ ![Gradient reading](docs/screenshots/gradient-dark.png)
34
+
35
+ *Gradient reading: body text only, advancing line by line.*
36
+
37
+ ![Colour bands](docs/screenshots/bands-dark.png)
38
+
39
+ *Colour bands: adjacent passages separated by cycling colours; code and headings stay plain.*
40
+
41
+ ![Reading ruler](docs/screenshots/ruler-light.png)
42
+
43
+ *Reading ruler: a faint band with a solid line on each edge.*
44
+
45
+ ![Block focus](docs/screenshots/blocks-dark.png)
46
+
47
+ *Block focus: the current paragraph stays as it is, the rest fades or dims.*
48
+
49
+ *Screenshots come from the local preview page `preview.html` and are illustrative.*
50
+
51
+ ## Install
52
+
53
+ **DSH Desktop**: open **Settings → Plugins → Add plugin**, enter `dsh-reading-focus`, install, then refresh the page.
54
+
55
+ **Command line**:
56
+
57
+ ```bash
58
+ dsh plugin --profile <profile> add dsh-reading-focus
59
+ ```
60
+
61
+ Requires DSH 0.2.x. You can also install the tarball from the [latest release](https://github.com/smallflycar/dsh-reading-focus/releases/latest).
62
+
63
+ ## Compatibility
64
+
65
+ | DSH version | Reading body | Markdown root | Status |
66
+ | --- | --- | --- | --- |
67
+ | 0.2.3-alpha.1 and later | `xMeOpW_body` | `<hash>_markdown` (e.g. `-TmMFa_markdown`) | ✅ tested on 0.2.3-alpha.2 |
68
+ | 0.2.2 rc line | `xMeOpW_body` | `_markdown_<hash>_<n>` | ✅ |
69
+ | 0.2.1 and earlier | `v5IAXa_body` | `_markdown_<hash>_<n>` | ✅ by structure, not tested |
70
+
71
+ Build hashes inside those class names are build artefacts and have nothing to do with the operating system; the plugin depends on neither the hash nor the order inside a class name:
72
+
73
+ - a reading body is a container whose class token ends in `_body`, that holds a markdown root directly, and that is not inside a non-`assistant-step` flow item (tool rows, command rows);
74
+ - a markdown root is a direct child whose class token contains `markdown`, so both `_markdown_<hash>_<n>` and `<hash>_markdown` are accepted;
75
+ - if a host renames the `body` local too, the plugin falls back to structure: the container of markdown roots inside a chat flow.
76
+
77
+ A DSH patch release, another machine or another OS therefore needs no selector update. The one case that still needs work is the host renaming the `markdown` local or moving markdown roots into another container.
78
+
79
+ ## Changelog
80
+
81
+ **0.8.6** — adapts to the class-name change in DSH 0.2.3-alpha.1. That release moved `dsh-client-ui-primitives` into the frontend bundle, so the markdown root went from `_markdown_<hash>_<n>` to `<hash>_markdown` and the old selector found no reading block at all. Both orders and any hash are recognised now, and tool/command rows that also end in `_body` are kept out of the reading body.
82
+
83
+ **0.8.5** — stops hard-coding the body hash; the line-height override anchors on the plugin's own `data-reading-focus-body` marker and is removed together with the override.
84
+
85
+ ## Usage
86
+
87
+ 1. Open **Settings → Reading Focus** and turn on the switch.
88
+ 2. Pick a mode; the panel shows only the controls that apply.
89
+ 3. Use **Adjust in the transcript** to tune it while reading.
90
+ 4. Everything is saved and restored on the next open.
91
+
92
+ Light and dark themes both work. Code, tables and headings are always left alone.
93
+
94
+ ## Notes
95
+
96
+ - Switch between the five modes at any time; no need to reopen the conversation.
97
+ - Bug reports and suggestions are welcome in [Issues](https://github.com/smallflycar/dsh-reading-focus/issues).
98
+
99
+ ## License
100
+
101
+ MIT. See [LICENSE](LICENSE).
102
+
103
+ [![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
package/README.md CHANGED
@@ -1,3 +1,103 @@
1
- # Temporary Holding Version
1
+ <p align="center"><img src="icon.svg" width="88" alt="阅读辅助"></p>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <h1 align="center">DSH 阅读辅助</h1>
4
+
5
+ <p align="center">在 DeepSeek Harness 的聊天正文里,提供渐变文字、阅读尺、行/段聚焦和色块分段。</p>
6
+
7
+ <p align="center">
8
+ <a href="https://github.com/smallflycar/dsh-reading-focus"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-repo-24292f.svg"></a>
9
+ <a href="https://www.npmjs.com/package/dsh-reading-focus"><img alt="npm" src="https://img.shields.io/npm/v/dsh-reading-focus"></a>
10
+ <a href="https://github.com/smallflycar/dsh-reading-focus/releases"><img alt="Release" src="https://img.shields.io/github/v/release/smallflycar/dsh-reading-focus"></a>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="README.md">简体中文</a> · <a href="README.en.md">English</a>
15
+ </p>
16
+
17
+ ## 为什么做这个
18
+
19
+ 我每天在 Agent 里花的时间越来越长。它的输出很长,还会一直往后堆:一条回答上千字,聊几轮就是一整屏接一整屏的记录;用它的节奏又是断断续续的——发任务、等结果、再回来接着读。这种时候读长文容易累,注意力也容易散。
20
+
21
+ 浏览器里早就有阅读尺、行聚焦、色块这类辅助,本来就是为了让长文读起来轻松一点。Agent 的正文更长、更密,我想这个场景更需要它们,所以把其中几种搬进了 DSH 的聊天正文。
22
+
23
+ ## 功能
24
+
25
+ - **渐变阅读** —— 按视觉行推进的渐变文字,每两行换一次色相。
26
+ - **阅读尺** —— 跟随指针的一条淡色带,上下各一条实线。
27
+ - **多行聚焦** —— 指针附近的几行保持清晰,其余压暗。
28
+ - **段落聚焦** —— 当前段落保持原样,其余文字变淡或压暗。
29
+ - **色块分段** —— 相邻内容用轮换的色块分开,代码和标题保持原样。
30
+
31
+ ## 截图
32
+
33
+ ![渐变阅读](docs/screenshots/gradient-dark.png)
34
+
35
+ *渐变阅读:只给正文着色,逐行推进。*
36
+
37
+ ![色块分段](docs/screenshots/bands-dark.png)
38
+
39
+ *色块分段:相邻内容用轮换的色块分开,代码和标题保持原样。*
40
+
41
+ ![阅读尺](docs/screenshots/ruler-light.png)
42
+
43
+ *阅读尺:跟随指针的淡色带,上下各一条实线。*
44
+
45
+ ![段落聚焦](docs/screenshots/blocks-dark.png)
46
+
47
+ *段落聚焦:当前段落保持原样,其余内容变淡或压暗。*
48
+
49
+ *截图来自仓库自带的本地预览页 `preview.html`,仅作效果示意。*
50
+
51
+ ## 安装
52
+
53
+ **DSH Desktop**:打开 **Settings → Plugins → Add plugin**,输入 `dsh-reading-focus`,安装后刷新页面。
54
+
55
+ **命令行**:
56
+
57
+ ```bash
58
+ dsh plugin --profile <profile> add dsh-reading-focus
59
+ ```
60
+
61
+ 需要 DSH 0.2.x。也可以从 [Release](https://github.com/smallflycar/dsh-reading-focus/releases/latest) 下载 tarball 安装。
62
+
63
+ ## 兼容性
64
+
65
+ | DSH 版本 | 正文容器 | Markdown 根 | 状态 |
66
+ | --- | --- | --- | --- |
67
+ | 0.2.3-alpha.1 及以后 | `xMeOpW_body` | `哈希_markdown`(如 `-TmMFa_markdown`) | ✅ 0.2.3-alpha.2 实测 |
68
+ | 0.2.2 rc 系列 | `xMeOpW_body` | `_markdown_哈希_序号` | ✅ |
69
+ | 0.2.1 及更早 | `v5IAXa_body` | `_markdown_哈希_序号` | ✅ 结构识别,未实机 |
70
+
71
+ 宿主类名里的哈希是构建产物,和操作系统无关;插件不依赖具体哈希,也不依赖类名里的顺序:
72
+
73
+ - 正文容器认「类名以 `_body` 结尾、直子含 Markdown 根、且不在工具行等非 `assistant-step` 流项目里」;
74
+ - Markdown 根认「类名含 `markdown`、且是正文容器的直子」,`_markdown_哈希_序号` 和 `哈希_markdown` 两种都接受;
75
+ - 万一宿主连 `body` 这个局部名都改了,退回结构识别:聊天流里包裹 Markdown 根的容器。
76
+
77
+ 所以 DSH 小版本升级、换机器、换系统都不需要重新适配。唯一还需要人工介入的情况是宿主改了 `markdown` 这个局部名,或把 Markdown 根挪进别的容器。
78
+
79
+ ## 更新记录
80
+
81
+ **0.8.6** —— 适配 DSH 0.2.3-alpha.1 起的类名变化。那一版把 `dsh-client-ui-primitives` 改为随前端 bundle 构建,Markdown 根从 `_markdown_哈希_序号` 变成 `哈希_markdown`,旧选择器因此一个正文块都找不到。现在两种顺序、任意哈希都认;同时区分正文容器与工具行、命令行那类同样以 `_body` 结尾的容器。
82
+
83
+ **0.8.5** —— 不再写死正文容器的哈希;行高覆盖规则改挂在插件自己写的 `data-reading-focus-body` 标记上,清除覆盖时一并移除。
84
+
85
+ ## 使用
86
+
87
+ 1. 打开 **设置 → 阅读辅助**,打开右上角开关。
88
+ 2. 选一种效果,下面只出现它用得上的参数。
89
+ 3. 想边读边调,点「在正文中实时调节」。
90
+ 4. 所有设置都会自动保存,下次打开恢复上次的状态。
91
+
92
+ 深浅主题都适配。代码、表格和标题始终保持原样。
93
+
94
+ ## 说明
95
+
96
+ - 五种效果可以随时切换,不需要重开对话。
97
+ - 遇到问题或有建议,欢迎在 [Issues](https://github.com/smallflycar/dsh-reading-focus/issues) 里提。
98
+
99
+ ## 许可证
100
+
101
+ MIT,详见 [LICENSE](LICENSE)。
102
+
103
+ [![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: reading-focus
3
+ name: dsh-reading-focus
package/icon.svg ADDED
@@ -0,0 +1,29 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Reading Focus">
2
+ <defs>
3
+ <linearGradient id="ramp" x1="0" y1="0" x2="1" y2="0">
4
+ <stop offset="0" stop-color="#4e9ee0"/>
5
+ <stop offset="1" stop-color="#9e70da"/>
6
+ </linearGradient>
7
+ <linearGradient id="ink" x1="0" y1="0" x2="0" y2="1">
8
+ <stop offset="0" stop-color="#f6f8fb"/>
9
+ <stop offset="1" stop-color="#c8d3e2"/>
10
+ </linearGradient>
11
+ <filter id="glow" x="-40%" y="-40%" width="180%" height="180%">
12
+ <feGaussianBlur stdDeviation="10" result="blur"/>
13
+ <feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
14
+ </filter>
15
+ </defs>
16
+ <rect width="512" height="512" rx="112" fill="#131a24"/>
17
+ <rect x="1.5" y="1.5" width="509" height="509" rx="110.5" fill="none" stroke="#2a3646" stroke-width="3"/>
18
+ <g fill="url(#ink)" opacity=".55">
19
+ <rect x="112" y="148" width="288" height="18" rx="9"/>
20
+ <rect x="112" y="346" width="288" height="18" rx="9"/>
21
+ </g>
22
+ <g filter="url(#glow)">
23
+ <rect x="92" y="238" width="328" height="36" rx="18" fill="#f0b633"/>
24
+ </g>
25
+ <g opacity=".9">
26
+ <rect x="112" y="196" width="196" height="18" rx="9" fill="url(#ramp)"/>
27
+ <rect x="112" y="298" width="256" height="18" rx="9" fill="url(#ramp)"/>
28
+ </g>
29
+ </svg>