dsh-document-view 1.2.0 → 1.2.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/CHANGELOG.md +11 -0
- package/README.md +110 -110
- package/README.zh.md +225 -0
- package/docs/COMPATIBILITY.md +1 -1
- package/docs/screenshots/01-overview.png +0 -0
- package/docs/screenshots/02-annotations.png +0 -0
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -2
- package/README.en.md +0 -225
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 1.2.2(2026-11-21)
|
|
4
|
+
|
|
5
|
+
- 宿主要求与验证口径更新到 DSH `0.2.2-rc.5`:README 徽章与「要求与兼容性」、插件描述(中英)、兼容性说明同步;`dsh.engines.dsh` 仍为 `>=0.2.2-rc.3`,不收紧下限。
|
|
6
|
+
- 本版在 `0.2.2-rc.5` 上复核批注、改动高亮与分栏布局。
|
|
7
|
+
|
|
8
|
+
## 1.2.1(2026-11-21)
|
|
9
|
+
|
|
10
|
+
- 文档默认语言改为英文:`README.md` 用英文、中文移到 `README.zh.md`,npm 包页与 GitHub 首页默认显示英文,顶部保留语言切换。
|
|
11
|
+
- 截图改为只对文字打码(左侧会话名、右侧对话文字、文件路径),面板、图标与工具栏保持清晰可见。
|
|
12
|
+
- 详情页预览图同步替换。
|
|
13
|
+
|
|
3
14
|
## 1.2.0(2026-11-21)
|
|
4
15
|
|
|
5
16
|
- 文档批注:在 Word / PDF / PPT 的 PDF 阅读页里选中文字,浮条提供「删除线」与「批注」;页面按矩形画删除线或虚线下划线 + 编号,缩放、翻页、重渲染后按引文重新定位。
|
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
<h1>dsh-document-view</h1>
|
|
5
5
|
|
|
6
|
-
<p><strong
|
|
6
|
+
<p><strong>Read the document. Keep the conversation. Mark it up.</strong><br />A split document view for DeepSeek Harness: the file stays in the center, your AI chat stays on the right; strike out or comment on the page, send the review to the AI, and see each edit highlighted.</p>
|
|
7
7
|
|
|
8
|
-
<p
|
|
8
|
+
<p>English · <a href="README.zh.md">简体中文 →</a></p>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
[](https://github.com/Frank-Fan-1058/dsh-document-view/stargazers)
|
|
@@ -13,213 +13,213 @@
|
|
|
13
13
|
[](https://github.com/Frank-Fan-1058/dsh-document-view/issues)
|
|
14
14
|
[](https://www.npmjs.com/package/dsh-document-view)
|
|
15
15
|
[](LICENSE)
|
|
16
|
-
[](https://github.com/deepseek-ai/DeepSeek-Harness)
|
|
17
17
|
[](SECURITY.md)
|
|
18
18
|
|
|
19
|
-
> ⭐
|
|
19
|
+
> ⭐ If this saves you a few round trips, star the repo — it helps other DeepSeek Harness users discover the plugin in marketplaces.
|
|
20
20
|
|
|
21
|
-

|
|
22
22
|
|
|
23
|
-
>
|
|
23
|
+
> Screenshots are **real captures**: the session sidebar and conversation are masked, and the document is a sample agreement with fictional parties and prices.
|
|
24
24
|
|
|
25
25
|
<details>
|
|
26
|
-
<summary
|
|
27
|
-
|
|
28
|
-
- [30
|
|
29
|
-
- [
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
33
|
-
- [
|
|
34
|
-
- [
|
|
35
|
-
- [
|
|
36
|
-
- [
|
|
37
|
-
- [
|
|
38
|
-
- [
|
|
39
|
-
- [
|
|
26
|
+
<summary>Table of contents</summary>
|
|
27
|
+
|
|
28
|
+
- [Install in 30 seconds](#install-in-30-seconds)
|
|
29
|
+
- [The problem](#the-problem)
|
|
30
|
+
- [Who it is for](#who-it-is-for)
|
|
31
|
+
- [Features](#features)
|
|
32
|
+
- [Privacy & security](#privacy--security)
|
|
33
|
+
- [Requirements & compatibility](#requirements--compatibility)
|
|
34
|
+
- [Install](#install)
|
|
35
|
+
- [Usage](#usage)
|
|
36
|
+
- [FAQ](#faq)
|
|
37
|
+
- [Roadmap](#roadmap)
|
|
38
|
+
- [Contributing](#contributing)
|
|
39
|
+
- [License](#license)
|
|
40
40
|
|
|
41
41
|
</details>
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
45
|
-
## 30
|
|
45
|
+
## Install in 30 seconds
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Published on npm — one command:
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
#
|
|
50
|
+
# Official CLI
|
|
51
51
|
dsh plugin --profile web add dsh-document-view
|
|
52
52
|
|
|
53
|
-
#
|
|
53
|
+
# Or 1024 Store
|
|
54
54
|
dsh1024 plugin --profile web add dsh-document-view
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Package: [npm / dsh-document-view](https://www.npmjs.com/package/dsh-document-view) (currently `1.2.0`). Enable it in the DSH plugin list and refresh the page. Other install options are in [Install](#install).
|
|
58
58
|
|
|
59
|
-
##
|
|
59
|
+
## The problem
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Open a file in DSH and it takes over the right sidebar, pushing your conversation away. Asking the AI to explain, summarize or rewrite against that document means constantly switching between "reading" and "chatting" — and losing context every time. Pasting the content into the chat means repeated copy-paste and truncated context.
|
|
62
62
|
|
|
63
|
-
`dsh-document-view`
|
|
63
|
+
`dsh-document-view` does exactly one thing: **keeps both on screen**. It does not take over the editor, change save behavior, or touch your files. It only rearranges the window so DSH native document / Office preview and the chat panel work side by side.
|
|
64
64
|
|
|
65
|
-
| |
|
|
65
|
+
| | Default | Document view on |
|
|
66
66
|
| --- | --- | --- |
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
67
|
+
| Document | Takes the right sidebar | Center area |
|
|
68
|
+
| Conversation | Pushed away | Always visible on the right |
|
|
69
|
+
| Ask AI about the document | Switch back and forth / paste | Same screen |
|
|
70
|
+
| Editing / saving / preview | Native | **Still native** |
|
|
71
71
|
|
|
72
|
-
##
|
|
72
|
+
## Who it is for
|
|
73
73
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
74
|
+
- Reading papers, reports, contracts or specs while asking the AI about them
|
|
75
|
+
- Checking Excel / PowerPoint data and following up on a specific row or slide
|
|
76
|
+
- Editing code or Markdown while getting AI review, without switching tabs
|
|
77
|
+
- Using a large or multi-monitor setup and wanting document and chat side by side
|
|
78
78
|
|
|
79
|
-
##
|
|
79
|
+
## Features
|
|
80
80
|
|
|
81
|
-
### 1.
|
|
81
|
+
### 1. Document and chat, side by side
|
|
82
82
|
|
|
83
|
-

|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Open any file, then click **Document view** in the conversation header actions or the file tab actions. Drag the divider to resize; `←` / `→` nudge it, `Home` resets the ratio, and double-clicking the divider restores the default. The toggle and ratio are **saved per session**.
|
|
86
86
|
|
|
87
|
-
### 2.
|
|
87
|
+
### 2. Mark up the page, hand the review to the agent
|
|
88
88
|
|
|
89
|
-

|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Select text in the Word / PDF / PowerPoint page and a small toolbar appears:
|
|
92
92
|
|
|
93
|
-
-
|
|
94
|
-
-
|
|
93
|
+
- **Strikethrough** marks a passage for deletion and draws the line on the page.
|
|
94
|
+
- **Comment** records your change request; the page shows an amber highlight with a dashed underline and a numbered badge.
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
The **Annotate N** button in the document toolbar opens the review list: jump to a mark, edit the comment, delete it. **Send to AI** turns the whole list into one structured message (file path, page, exact target text, surrounding context, request, working conventions) in the right-hand conversation. The agent edits the original file, and the native preview follows the disk change. Annotations are kept per file path in browser storage, so a refresh or restart keeps them.
|
|
97
97
|
|
|
98
|
-
> Excel
|
|
99
|
-
> Word
|
|
98
|
+
> Excel previews are an in-plugin canvas without a text layer, so they are outside this version.
|
|
99
|
+
> Manual Word editing is not part of this release: the preview toolbar already has an "open in app" control that hands the file to Word / WPS; saving there refreshes the preview.
|
|
100
100
|
|
|
101
|
-
### 3.
|
|
101
|
+
### 3. See where the edit landed
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
Once a review is sent, the quoted text no longer exists in the edited file. The plugin then re-anchors the mark with the text that surrounded it:
|
|
104
104
|
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
105
|
+
- a replaced passage gets a green highlight, a green underline and a **✓** badge;
|
|
106
|
+
- a deleted passage gets a 2px green caret in the seam between its neighbours;
|
|
107
|
+
- a mark whose text did not change stays as it was (dimmed) and is never marked green.
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
Each mark is resolved on its own; a mark without surrounding context is reported, not guessed.
|
|
110
110
|
|
|
111
|
-
### 4.
|
|
111
|
+
### 4. Settings and auto-enter
|
|
112
112
|
|
|
113
|
-

|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
The arrow next to the toggle opens settings:
|
|
116
116
|
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
117
|
+
- **Auto-enter on document view** (off by default) — fires only when *you* click a file or file tab; background file operations never open it. After you exit manually, the same file will not re-open repeatedly.
|
|
118
|
+
- **Document-first / Balanced / Chat-first** presets, saved per session.
|
|
119
|
+
- **Auto update / Paused** — reuses the host native file watcher. Pause when you want to read carefully; resuming shows the latest content while preserving the native viewer page and zoom state.
|
|
120
120
|
|
|
121
|
-
### 5.
|
|
121
|
+
### 5. Works in narrow windows
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
When the window is too narrow it switches to a single-column **Document / Chat** toggle. **Unsent input is preserved**, and focus moves to the visible switch if the current focus would be hidden.
|
|
124
124
|
|
|
125
|
-
### 6.
|
|
125
|
+
### 6. Native all the way down
|
|
126
126
|
|
|
127
|
-
Markdown
|
|
127
|
+
Rendering, editing, saving and preview of Markdown, PDF, Word, Excel, PowerPoint and local HTML files remain entirely with DSH own viewers and Office engine. The plugin **never reads, writes or uploads your files** and reimplements no editing feature. Disable it and the default layout returns.
|
|
128
128
|
|
|
129
|
-
##
|
|
129
|
+
## Privacy & security
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
The plugin touches your workspace UI, so every claim below is verifiable from the source:
|
|
132
132
|
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
133
|
+
- **No network calls** — no `http(s)://` address, `XMLHttpRequest` or `WebSocket`. The single `fetch` reads the HTML file you just opened, through the host's own local `dsh-resource://` protocol.
|
|
134
|
+
- **No file reads or writes** — no filesystem or editor read/write APIs. Annotations only read the selected text from the rendered page text layer; the original file is never opened.
|
|
135
|
+
- **No credentials** — no API keys, tokens, passwords, cookies, `.env` or config files ship in the package.
|
|
136
|
+
- **Two local stores only** — `dsh.document-view.v1` holds the auto-enter toggle and per-session ratios; `dsh.document-view.annotations.v2/` holds one key per annotation (file path, page, quoted text, request, status), so several windows can add marks without overwriting each other. Both stay in browser `localStorage`; nothing is uploaded or written back to a file.
|
|
137
|
+
- **Narrow CSS scope** — all styles are scoped to the plugin own `[data-fdc-*]` attributes. No host components are moved, cloned or remounted; only the window grid geometry changes.
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
See [SECURITY.md](SECURITY.md) and [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
140
140
|
|
|
141
|
-
##
|
|
141
|
+
## Requirements & compatibility
|
|
142
142
|
|
|
143
|
-
- [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness)
|
|
144
|
-
- Node.js >= 20
|
|
145
|
-
-
|
|
143
|
+
- [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) Desktop / Web, verified on **v0.2.2-rc.5**.
|
|
144
|
+
- Node.js >= 20 — **only for rebuilding from source**; not needed to install or use.
|
|
145
|
+
- **Host requirement declared**: `dsh.engines.dsh = ">=0.2.2-rc.3"` (verified through rc.5). On older DSH versions the host refuses the install with `incompatible-version` instead of loading a plugin that would blank the page. Granular boundaries are in the [compatibility notes](docs/COMPATIBILITY.md).
|
|
146
146
|
|
|
147
|
-
>
|
|
147
|
+
> The plugin relies on the host DOM structure and slot names. If a DSH upgrade changes them, the plugin **disables itself safely and the page keeps working** (no white screen). Re-verify with the [upgrade checklist](docs/COMPATIBILITY.md).
|
|
148
148
|
|
|
149
|
-
##
|
|
149
|
+
## Install
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
**Option 0 — from npm (recommended, unlocks one-line install)**
|
|
152
152
|
|
|
153
153
|
```sh
|
|
154
154
|
dsh1024 plugin --profile web add dsh-document-view
|
|
155
|
-
#
|
|
155
|
+
# or
|
|
156
156
|
dsh plugin --profile web add dsh-document-view
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
**Option 1 — local directory**
|
|
160
160
|
|
|
161
161
|
```sh
|
|
162
162
|
git clone https://github.com/Frank-Fan-1058/dsh-document-view.git
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Then in DSH: **Plugins → Add plugin**, pick the `dsh-document-view` directory, enable it, and refresh the page (or restart DSH).
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
**Option 2 — tarball**
|
|
168
168
|
|
|
169
169
|
```sh
|
|
170
170
|
npm pack
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
Extract `dsh-document-view-*.tgz` anywhere, then point step 2 of Option 1 at that directory.
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
**Option 3 — build from source**
|
|
176
176
|
|
|
177
177
|
```sh
|
|
178
|
-
npm install #
|
|
178
|
+
npm install # only needed to rebuild
|
|
179
179
|
node scripts/build.mjs
|
|
180
180
|
node scripts/verify.mjs
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
`src/`
|
|
183
|
+
`src/` is the source; `client.js` is the self-contained build artifact (all CSS inlined, no runtime dependencies). **Rebuild `client.js` after any `src/` change** — do not hand-edit the artifact.
|
|
184
184
|
|
|
185
|
-
> `file:`
|
|
185
|
+
> `file:` dependencies are physical copies: after editing source, remove `node_modules/<package>` and reinstall so the running copy updates.
|
|
186
186
|
|
|
187
|
-
##
|
|
187
|
+
## Usage
|
|
188
188
|
|
|
189
|
-
1.
|
|
190
|
-
2.
|
|
191
|
-
3.
|
|
192
|
-
4.
|
|
193
|
-
5.
|
|
189
|
+
1. Open a file in the right sidebar (Markdown / PDF / Office).
|
|
190
|
+
2. Click **Document view** in the conversation header or file tab actions.
|
|
191
|
+
3. Drag the divider; `←` / `→` to nudge, `Home` or double-click to reset.
|
|
192
|
+
4. Open settings via the arrow for auto-enter and layout presets.
|
|
193
|
+
5. Click the toggle again (or the exit entry in the session / file header) to return to the default layout.
|
|
194
194
|
|
|
195
|
-
##
|
|
195
|
+
## FAQ
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
**Will it affect my editors or Office plugins?** No. It changes layout only — Univer, Office converters and native editors are untouched.
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
**Are my files read or uploaded?** No. No network requests, no file I/O, only the toggle and ratios are stored.
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
**Does anything remain after disabling?** No. All injected styles, attributes, the divider and listeners are removed on teardown.
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
**What if a DSH upgrade breaks it?** It disables itself safely and the page stays usable. Open an [Issue](https://github.com/Frank-Fan-1058/dsh-document-view/issues) with your DSH version.
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
**Which file types are supported?** Whatever the host supports natively — Markdown, PDF, Word, Excel, PowerPoint, local HTML, etc. The plugin adds no format restrictions.
|
|
206
206
|
|
|
207
|
-
##
|
|
207
|
+
## Roadmap
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
Shipped: v1.0.0 first third-party installable release, v1.1.0 bilingual docs and safe-deactivation fallback, v1.1.1 npm trusted publishing, v1.2.0 page annotations and edit highlighting.
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
Already listed: npm package, 1024 Store / awesome catalog (PR #942 merged), and the GitHub `dsh-plugin` topic. Next (feedback-driven): follow up on the dsh-market catalog PR review; re-verify after new DSH releases; add more locales and layout presets. See [ROADMAP.md](ROADMAP.md) and [CHANGELOG.md](CHANGELOG.md).
|
|
212
212
|
|
|
213
|
-
##
|
|
213
|
+
## Contributing
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
Issues and PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Rebuild `client.js` when changing `src/`; update both `locale/en.json` and `locale/zh.json` when changing UI copy. Never put real sessions, file names, accounts or personal data into illustrations or examples.
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
Want more people to find it inside DSH? See **[docs/PUBLISHING.md](docs/PUBLISHING.md)** for the full playbook (1024 Store, dsh-market, the `dsh-plugin` GitHub topic, npm publishing) and the ready-to-use [catalog entry](docs/awesome-dsh-catalog-entry.json).
|
|
218
218
|
|
|
219
|
-
##
|
|
219
|
+
## License
|
|
220
220
|
|
|
221
221
|
[MIT](LICENSE) © 2026 dsh-document-view contributors
|
|
222
222
|
|
|
223
223
|
---
|
|
224
224
|
|
|
225
|
-
<p align="center"
|
|
225
|
+
<p align="center">Found it useful? <a href="https://github.com/Frank-Fan-1058/dsh-document-view">Give it a ⭐ Star</a> · <a href="https://github.com/Frank-Fan-1058/dsh-document-view/issues">Report an issue</a> · <a href="README.zh.md">中文 README</a></p>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="icon.svg" alt="dsh-document-view" width="96" />
|
|
3
|
+
|
|
4
|
+
<h1>dsh-document-view</h1>
|
|
5
|
+
|
|
6
|
+
<p><strong>边看文档,边聊 AI,边划批注。</strong><br />文档居中显示,当前会话留在右侧;在页面上划线批注,一键交给 AI 逐条改,改完改动处标绿。</p>
|
|
7
|
+
|
|
8
|
+
<p>简体中文 · <a href="README.md">English →</a></p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
[](https://github.com/Frank-Fan-1058/dsh-document-view/stargazers)
|
|
12
|
+
[](https://github.com/Frank-Fan-1058/dsh-document-view/network/members)
|
|
13
|
+
[](https://github.com/Frank-Fan-1058/dsh-document-view/issues)
|
|
14
|
+
[](https://www.npmjs.com/package/dsh-document-view)
|
|
15
|
+
[](LICENSE)
|
|
16
|
+
[](https://github.com/deepseek-ai/DeepSeek-Harness)
|
|
17
|
+
[](SECURITY.md)
|
|
18
|
+
|
|
19
|
+
> ⭐ 如果它帮你省下了来回切换,给仓库点个 Star —— 这能让更多 DSH 用户在插件市场里发现它。
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
> 以上为**真实界面截图**:会话栏与对话内容已打码,文档为示例协议(主体与价格均为虚构)。
|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>目录</summary>
|
|
27
|
+
|
|
28
|
+
- [30 秒装上](#30-秒装上)
|
|
29
|
+
- [为什么需要它](#为什么需要它)
|
|
30
|
+
- [适合谁](#适合谁)
|
|
31
|
+
- [核心能力](#核心能力)
|
|
32
|
+
- [隐私与安全](#隐私与安全)
|
|
33
|
+
- [要求与兼容性](#要求与兼容性)
|
|
34
|
+
- [安装](#安装)
|
|
35
|
+
- [使用](#使用)
|
|
36
|
+
- [常见问题](#常见问题)
|
|
37
|
+
- [路线图](#路线图)
|
|
38
|
+
- [参与贡献](#参与贡献)
|
|
39
|
+
- [许可证](#许可证)
|
|
40
|
+
|
|
41
|
+
</details>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 30 秒装上
|
|
46
|
+
|
|
47
|
+
已发布到 npm,一行命令即可:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
# 官方 CLI
|
|
51
|
+
dsh plugin --profile web add dsh-document-view
|
|
52
|
+
|
|
53
|
+
# 或 1024 Store
|
|
54
|
+
dsh1024 plugin --profile web add dsh-document-view
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
包地址:[npm / dsh-document-view](https://www.npmjs.com/package/dsh-document-view)(当前 `1.2.0`)。装完在 DSH 插件列表启用、刷新页面即可。其它装法见 [安装](#安装)。
|
|
58
|
+
|
|
59
|
+
## 为什么需要它
|
|
60
|
+
|
|
61
|
+
在 DSH 里打开一个文件,文档会占满右侧栏,正在进行的对话被挤走。想让 AI 对照文档解释、总结、改写,只能在「看文档」和「看对话」之间反复切换,上下文一直在丢;把内容复制进对话,又得反复粘贴、还容易截断。
|
|
62
|
+
|
|
63
|
+
`dsh-document-view` 只做一件事:**把这两块同时留在屏幕上**。它不接管编辑器、不改动保存逻辑、也不碰你的文件 —— 只是重新排布窗口,让 DSH 原生的文档 / Office 预览和对话框并排工作。
|
|
64
|
+
|
|
65
|
+
| | 默认布局 | 开启文档视图 |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| 看文档 | 右侧栏独占 | 中间区域显示 |
|
|
68
|
+
| 当前对话 | 被挤走,需要切回 | 右侧始终可见 |
|
|
69
|
+
| 让 AI 对照文档回答 | 来回切换 / 反复粘贴 | 同屏完成 |
|
|
70
|
+
| 编辑、保存、预览 | 原生功能 | **仍是原生功能** |
|
|
71
|
+
|
|
72
|
+
## 适合谁
|
|
73
|
+
|
|
74
|
+
- 读论文、报告、合同、需求文档时,想让 AI 边看边解释
|
|
75
|
+
- 对着 Excel / PPT 核对数据,随时追问某一行、某一页
|
|
76
|
+
- 一边改代码或 Markdown,一边让 AI 评审,不想来回切标签
|
|
77
|
+
- 用大屏或多显示器,希望文档和对话各占一块
|
|
78
|
+
|
|
79
|
+
## 核心能力
|
|
80
|
+
|
|
81
|
+
### 1. 文档与对话同屏
|
|
82
|
+
|
|
83
|
+

|
|
84
|
+
|
|
85
|
+
打开任意文件后,在会话头部或文件标签的操作区点 **「文档协作」** 即可开启。拖动分隔线调整宽度,也可以用 `←` / `→` 微调、`Home` 复位、双击分隔线恢复默认比例。开关和比例**按会话分别记住**。
|
|
86
|
+
|
|
87
|
+
### 2. 划线批注,一键交给 AI
|
|
88
|
+
|
|
89
|
+

|
|
90
|
+
|
|
91
|
+
在 Word / PDF / PPT 的阅读页里选中文字,浮条上会出现两个动作:
|
|
92
|
+
|
|
93
|
+
- **删除线**:标记这段应删掉,页面上直接画删除线。
|
|
94
|
+
- **批注**:写一句修改意见,页面上以黄底虚线下划线加编号标出。
|
|
95
|
+
|
|
96
|
+
文档工具栏的 **「批注 N」** 打开汇总面板:按页列出每条批注,可定位、改意见、删除。点 **「提交给 AI」**,插件把「文件路径 + 页码 + 目标原文 + 前后文 + 意见 + 处理约定」整理成一条结构化消息发进右侧对话,AI 按条改原文件,改完原生预览自动跟随磁盘更新。批注按文件路径保存在浏览器本地,刷新或重启后仍在。
|
|
97
|
+
|
|
98
|
+
> Excel 预览是插件自绘表格,没有文字层,因此不在本版批注范围内。
|
|
99
|
+
> Word 的人工编辑本轮未做:预览工具栏自带的「用应用打开」可把文件交给系统 Word / WPS,保存后预览会自动刷新。
|
|
100
|
+
|
|
101
|
+
### 3. 改完的位置会标绿
|
|
102
|
+
|
|
103
|
+
批注提交后,原引文在新文件里已经找不到(说明这段被改过),插件就用批注存下的前后文锚点重新定位:
|
|
104
|
+
|
|
105
|
+
- 被替换的段落:绿色底 + 绿底边,角标变成 **✓**;
|
|
106
|
+
- 整段被删:前文与后文的接缝处一条 2px 绿色竖线;
|
|
107
|
+
- 文字没动的批注保持原样(变淡显示),不会误标。
|
|
108
|
+
|
|
109
|
+
多处批注各自独立定位;找不到前后文的批注不猜、不标。
|
|
110
|
+
|
|
111
|
+
### 4. 设置与自动进入
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
开关旁的箭头打开设置:
|
|
116
|
+
|
|
117
|
+
- **查看文档时自动进入**(默认关闭):只在你主动点击文件或文件标签时触发,后台文件操作不会打扰你;手动退出后,同一个文件不会反复自动打开。
|
|
118
|
+
- **文档优先 / 均衡 / 对话优先** 三种预设,按会话保存。
|
|
119
|
+
- **自动更新 / 已暂停**:沿用宿主原生的文件变化监听,需要仔细阅读时可暂停跟随,继续后显示最新内容,并保留原生预览的页码与缩放状态。
|
|
120
|
+
|
|
121
|
+
### 5. 窄窗口也能用
|
|
122
|
+
|
|
123
|
+
窗口不够宽时自动切换为「文档 / 对话」单栏切换,**未发送的输入不会丢**;宽转窄时若焦点落在即将隐藏的区域,会移到可见的切换按钮上。
|
|
124
|
+
|
|
125
|
+
### 6. 只用原生能力
|
|
126
|
+
|
|
127
|
+
Markdown、PDF、Word、Excel、PPT 与**本地 HTML 文件**的渲染、编辑、保存与预览,全部继续由 DSH 自带的查看器和 Office 引擎负责。本插件**不读取、不写入、不上传**你的文件,也不重复实现任何编辑功能。停用插件即恢复默认布局。
|
|
128
|
+
|
|
129
|
+
## 隐私与安全
|
|
130
|
+
|
|
131
|
+
插件会接触你的工作界面,所以这一点值得单独说清楚 —— 以下每条都能从源码核对:
|
|
132
|
+
|
|
133
|
+
- **零网络请求**:没有任何 `http(s)://` 地址、`XMLHttpRequest`、`WebSocket`。唯一的 `fetch` 是读你刚打开的那个 HTML 文件(走宿主自己的 `dsh-resource://` 本地协议),用于自建 HTML 预览。
|
|
134
|
+
- **零文件读写**:不调用任何读写文件的接口,不碰编辑器内容。批注只读取页面文字层里的选中文字,不打开原文件。
|
|
135
|
+
- **零凭据**:包内不含 API Key、Token、密码、Cookie 或任何密钥;没有 `.env`、没有配置文件。
|
|
136
|
+
- **只存两类本地数据**:`dsh.document-view.v1` 保存「自动进入开关 + 每个会话的分栏比例」;`dsh.document-view.annotations.v2/` 下每条批注一个键(文件路径、页码、选中文字、意见与状态),多个窗口同时打开时互不覆盖;两者都只在浏览器 `localStorage`,不上传、不写回文件。
|
|
137
|
+
- **作用域收窄**:所有样式限定在插件自己加的 `[data-fdc-*]` 属性下,不改宿主全局样式;不移动、不克隆、不重新挂载任何 React 组件,只调整窗口网格的几何尺寸。
|
|
138
|
+
|
|
139
|
+
详见 [SECURITY.md](SECURITY.md) 与 [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md)。
|
|
140
|
+
|
|
141
|
+
## 要求与兼容性
|
|
142
|
+
|
|
143
|
+
- [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) 桌面版 / Web 版,已在 **v0.2.2-rc.5** 上验证通过。
|
|
144
|
+
- Node.js >= 20 —— **仅从源码重建时需要**;单纯安装使用不需要 Node.js。
|
|
145
|
+
- **已声明宿主要求**:`dsh.engines.dsh = ">=0.2.2-rc.3"`(已验证到 rc.5)——低于该版本 DSH 会拒绝安装并提示 `incompatible-version`,避免装上去白屏。更细的兼容边界见 [兼容性说明](docs/COMPATIBILITY.md)。
|
|
146
|
+
|
|
147
|
+
> 插件依赖宿主的 DOM 结构与 slot 名称。DSH 升级后若这些内部结构变化,插件会**自动停用并保持页面可用**(不会白屏),随后按 [升级复核清单](docs/COMPATIBILITY.md#升级复核清单) 重验即可。
|
|
148
|
+
|
|
149
|
+
## 安装
|
|
150
|
+
|
|
151
|
+
**方式零:从 npm 安装(推荐,解锁一键安装)**
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
dsh1024 plugin --profile web add dsh-document-view
|
|
155
|
+
# 或
|
|
156
|
+
dsh plugin --profile web add dsh-document-view
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**方式一:本地目录安装**
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
git clone https://github.com/Frank-Fan-1058/dsh-document-view.git
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
然后打开 DSH → **插件 → 添加插件**,选中 `dsh-document-view` 目录 → 在插件列表启用 → 刷新页面(或重启 DSH)。
|
|
166
|
+
|
|
167
|
+
**方式二:打包成 tarball**
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
npm pack
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
把生成的 `dsh-document-view-*.tgz` 解压到任意目录,再按方式一第 2 步指向该目录。
|
|
174
|
+
|
|
175
|
+
**方式三:从源码构建**
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
npm install # 仅构建时需要
|
|
179
|
+
node scripts/build.mjs
|
|
180
|
+
node scripts/verify.mjs
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
`src/` 是源码,`client.js` 是自包含构建产物(内联全部 CSS,无运行时依赖)。**改了 `src/` 必须重建** `client.js`,不要手改产物。
|
|
184
|
+
|
|
185
|
+
> `file:` 依赖是实体拷贝:改了源码要删掉 `node_modules/<包名>` 再重装,运行副本才会更新。
|
|
186
|
+
|
|
187
|
+
## 使用
|
|
188
|
+
|
|
189
|
+
1. 在右侧栏打开一个文件(Markdown / PDF / Office 均可)。
|
|
190
|
+
2. 点会话头部或文件标签上的 **「文档视图」**。
|
|
191
|
+
3. 拖动分隔线调宽度;`←` / `→` 微调,`Home` 或双击分隔线复位。
|
|
192
|
+
4. 点开关旁的箭头进设置,按需开启「自动进入」或选布局预设。
|
|
193
|
+
5. 再点一次开关(或会话顶部 / 文件顶部的退出入口)即可退出,恢复默认布局。
|
|
194
|
+
|
|
195
|
+
## 常见问题
|
|
196
|
+
|
|
197
|
+
**会影响我已有的文档编辑器或 Office 插件吗?** 不会。本插件不改 Univer、Office 转换服务或任何原生编辑器,只调整窗口布局。
|
|
198
|
+
|
|
199
|
+
**我的文件会被读取或上传吗?** 不会。插件不发网络请求、不读写文件,只保存开关与比例两项偏好。
|
|
200
|
+
|
|
201
|
+
**关掉插件后布局会残留吗?** 不会。卸载时会移除所有注入的样式、属性、分隔线与监听,恢复宿主原生布局。
|
|
202
|
+
|
|
203
|
+
**升级 DSH 后失效了怎么办?** 插件会安全地自动停用(页面照常可用)。请提 [Issue](https://github.com/Frank-Fan-1058/dsh-document-view/issues) 并附上 DSH 版本,维护者按 [升级复核清单](docs/COMPATIBILITY.md#升级复核清单) 适配。
|
|
204
|
+
|
|
205
|
+
**支持哪些文件类型?** 宿主原生支持什么就支持什么:Markdown、PDF、Word、Excel、PPT、本地 HTML 等,本插件不做格式限制。
|
|
206
|
+
|
|
207
|
+
## 路线图
|
|
208
|
+
|
|
209
|
+
已发布:v1.0.0 首个第三方可安装版本、v1.1.0 双语文档与安全兜底、v1.1.1 npm trusted publishing、v1.2.0 文档批注与改动高亮。
|
|
210
|
+
|
|
211
|
+
已收录:npm 包、1024 Store / awesome 目录(PR #942 已合并)、GitHub `dsh-plugin` topic。接下来(按反馈排期):跟进 dsh-market 目录 PR 审核;DSH 新版本发布后按升级复核清单重验;视反馈补充更多语言与布局预设。完整清单见 [ROADMAP.md](ROADMAP.md),版本记录见 [CHANGELOG.md](CHANGELOG.md)。
|
|
212
|
+
|
|
213
|
+
## 参与贡献
|
|
214
|
+
|
|
215
|
+
欢迎提 [Issue](https://github.com/Frank-Fan-1058/dsh-document-view/issues) 与 PR,流程见 [CONTRIBUTING.md](CONTRIBUTING.md)。改 `src/` 后请一并提交重建后的 `client.js`;涉及界面文案时同步更新 `locale/en.json` 与 `locale/zh.json`。提交界面截图前请先对会话、文件名、账号等打码。
|
|
216
|
+
|
|
217
|
+
想让更多人在 DSH 内直接搜到并安装?完整流程(1024 Store / dsh-market 的收录方式、`dsh-plugin` topic、npm 发布、目录 PR 模板)见 **[docs/PUBLISHING.md](docs/PUBLISHING.md)**,仓库内已备好可直接复用的 [目录条目](docs/awesome-dsh-catalog-entry.json)。
|
|
218
|
+
|
|
219
|
+
## 许可证
|
|
220
|
+
|
|
221
|
+
[MIT](LICENSE) © 2026 dsh-document-view contributors
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
<p align="center">觉得有用?<a href="https://github.com/Frank-Fan-1058/dsh-document-view">给个 ⭐ Star</a> · <a href="https://github.com/Frank-Fan-1058/dsh-document-view/issues">反馈问题</a> · <a href="README.md">English README</a></p>
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
## 宿主要求怎么声明
|
|
42
42
|
|
|
43
|
-
写在 `package.json` 的 `dsh.engines.dsh`,当前为 `>=0.2.2-rc.3
|
|
43
|
+
写在 `package.json` 的 `dsh.engines.dsh`,当前为 `>=0.2.2-rc.3`;上游已到 `0.2.2-rc.5`,本版在该版本上完整复核。
|
|
44
44
|
|
|
45
45
|
- 采用**下界**而非 `^` 或精确值:本插件的失效方式是「自动停用 + 页面照常可用」,不会拖垮宿主,所以新版本 DSH 不该被这个字段挡住。
|
|
46
46
|
- 这条声明的作用是:低于验证基线时由宿主直接拒绝安装并提示 `incompatible-version`,而不是装上去才发现不生效。
|
|
Binary file
|
|
Binary file
|
package/locale/en.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Document view",
|
|
4
|
-
"description": "Adds a split document view to DeepSeek Harness: the opened document stays in the center while the current conversation remains visible on the right, so you can read a file and ask the AI about it on the same screen. Open a file from the right sidebar, then enable 'Document view' in the conversation header actions or the file tab actions. The arrow next to the toggle opens settings: 'Auto-enter on document view' (off by default, triggered only by your own file clicks), three layout presets (Document-first / Balanced / Chat-first), and an Auto update / Paused control that reuses the host's native file watcher. Drag the divider to resize; Left/Right arrows nudge, Home or double-click resets the ratio. In a narrow window, switch between Document and Chat with unsent input preserved. The toggle and ratio are saved per session. Select text in Word / PDF / PowerPoint to add a strikethrough or a comment; the review panel lists marks by page, supports jump / edit / delete, and sends the whole review to the AI as one structured message. After the agent edits the file, the text that changed is highlighted in green (a deleted passage gets a green caret), so you can see exactly what moved. Annotations are stored per file path under dsh.document-view.annotations.v2/ with one key per mark, so multiple windows do not overwrite each other. The plugin makes no network requests, reads or writes no original files, ships no credentials, and leaves editing, saving and preview to DSH's native document and Office viewers. Disabling the plugin restores the default layout. Verified on DSH Desktop 0.2.2-rc.
|
|
4
|
+
"description": "Adds a split document view to DeepSeek Harness: the opened document stays in the center while the current conversation remains visible on the right, so you can read a file and ask the AI about it on the same screen. Open a file from the right sidebar, then enable 'Document view' in the conversation header actions or the file tab actions. The arrow next to the toggle opens settings: 'Auto-enter on document view' (off by default, triggered only by your own file clicks), three layout presets (Document-first / Balanced / Chat-first), and an Auto update / Paused control that reuses the host's native file watcher. Drag the divider to resize; Left/Right arrows nudge, Home or double-click resets the ratio. In a narrow window, switch between Document and Chat with unsent input preserved. The toggle and ratio are saved per session. Select text in Word / PDF / PowerPoint to add a strikethrough or a comment; the review panel lists marks by page, supports jump / edit / delete, and sends the whole review to the AI as one structured message. After the agent edits the file, the text that changed is highlighted in green (a deleted passage gets a green caret), so you can see exactly what moved. Annotations are stored per file path under dsh.document-view.annotations.v2/ with one key per mark, so multiple windows do not overwrite each other. The plugin makes no network requests, reads or writes no original files, ships no credentials, and leaves editing, saving and preview to DSH's native document and Office viewers. Disabling the plugin restores the default layout. Verified on DSH Desktop 0.2.2-rc.5; because it relies on the host's DOM structure and slot names, a future DSH upgrade may change them — in that case the plugin disables itself safely so the page keeps working.",
|
|
5
5
|
"detail": "docs/DETAIL.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "文档视图",
|
|
4
|
-
"description": "为 DeepSeek Harness 增加分栏文档视图:打开的文档居中显示,当前会话保留在右侧,可以边看文档边让 AI 对照回答,不用再来回切换。在右侧栏打开文件后,从会话头部操作区或文件标签操作区开启「文档视图」。开关旁的箭头打开设置:可启用「查看文档时自动进入」(默认关闭,仅响应你主动点击文件)、选择文档优先 / 均衡 / 对话优先三种布局预设,以及沿用宿主原生文件监听的「自动更新 / 已暂停」。拖动分隔线调整宽度,左右方向键微调、Home 或双击复位;窄窗口下可在「文档 / 对话」间切换且保留未发送的输入。开关与比例按会话保存。文档里选中文字可加「删除线」或「批注意见」,汇总面板支持定位、编辑、删除,并一键整理成结构化清单交给右侧 AI;提交后 AI 按条改原文件,被改动的文字会标绿(整段删除处为绿色竖线),一眼看到改了哪里。批注按文件路径保存在 localStorage 的 dsh.document-view.annotations.v2/ 下,每条一个键,多窗口互不覆盖。本插件只调整布局与批注:不发任何网络请求、不读写原文件、不含任何凭据;编辑、保存与预览继续沿用 DSH 原生文档 / Office 查看器。停用插件即恢复默认布局。已在 DSH Desktop 0.2.2-rc.
|
|
4
|
+
"description": "为 DeepSeek Harness 增加分栏文档视图:打开的文档居中显示,当前会话保留在右侧,可以边看文档边让 AI 对照回答,不用再来回切换。在右侧栏打开文件后,从会话头部操作区或文件标签操作区开启「文档视图」。开关旁的箭头打开设置:可启用「查看文档时自动进入」(默认关闭,仅响应你主动点击文件)、选择文档优先 / 均衡 / 对话优先三种布局预设,以及沿用宿主原生文件监听的「自动更新 / 已暂停」。拖动分隔线调整宽度,左右方向键微调、Home 或双击复位;窄窗口下可在「文档 / 对话」间切换且保留未发送的输入。开关与比例按会话保存。文档里选中文字可加「删除线」或「批注意见」,汇总面板支持定位、编辑、删除,并一键整理成结构化清单交给右侧 AI;提交后 AI 按条改原文件,被改动的文字会标绿(整段删除处为绿色竖线),一眼看到改了哪里。批注按文件路径保存在 localStorage 的 dsh.document-view.annotations.v2/ 下,每条一个键,多窗口互不覆盖。本插件只调整布局与批注:不发任何网络请求、不读写原文件、不含任何凭据;编辑、保存与预览继续沿用 DSH 原生文档 / Office 查看器。停用插件即恢复默认布局。已在 DSH Desktop 0.2.2-rc.5 上验证;因依赖宿主 DOM 结构与 slot 名称,DSH 升级后这些内部结构若变化,插件会安全自动停用、页面照常可用,届时按仓库 docs/COMPATIBILITY.md 的升级复核清单重验。",
|
|
5
5
|
"detail": "docs/DETAIL.zh.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-document-view",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Split document view for DeepSeek Harness: read a document in the center while the conversation stays on the right, mark up the page, and hand the review to the AI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"client.js",
|
|
19
19
|
"cordis.patch.yml",
|
|
20
20
|
"README.md",
|
|
21
|
-
"README.
|
|
21
|
+
"README.zh.md",
|
|
22
22
|
"LICENSE",
|
|
23
23
|
"SECURITY.md",
|
|
24
24
|
"CHANGELOG.md",
|
package/README.en.md
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<img src="icon.svg" alt="dsh-document-view" width="96" />
|
|
3
|
-
|
|
4
|
-
<h1>dsh-document-view</h1>
|
|
5
|
-
|
|
6
|
-
<p><strong>Read the document. Keep the conversation. Mark it up.</strong><br />A split document view for DeepSeek Harness: the file stays in the center, your AI chat stays on the right; strike out or comment on the page, send the review to the AI, and see each edit highlighted.</p>
|
|
7
|
-
|
|
8
|
-
<p>English · <a href="README.md">简体中文 →</a></p>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
[](https://github.com/Frank-Fan-1058/dsh-document-view/stargazers)
|
|
12
|
-
[](https://github.com/Frank-Fan-1058/dsh-document-view/network/members)
|
|
13
|
-
[](https://github.com/Frank-Fan-1058/dsh-document-view/issues)
|
|
14
|
-
[](https://www.npmjs.com/package/dsh-document-view)
|
|
15
|
-
[](LICENSE)
|
|
16
|
-
[](https://github.com/deepseek-ai/DeepSeek-Harness)
|
|
17
|
-
[](SECURITY.md)
|
|
18
|
-
|
|
19
|
-
> ⭐ If this saves you a few round trips, star the repo — it helps other DeepSeek Harness users discover the plugin in marketplaces.
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
> Screenshots are **real captures**: the session sidebar and conversation are masked, and the document is a sample agreement with fictional parties and prices.
|
|
24
|
-
|
|
25
|
-
<details>
|
|
26
|
-
<summary>Table of contents</summary>
|
|
27
|
-
|
|
28
|
-
- [Install in 30 seconds](#install-in-30-seconds)
|
|
29
|
-
- [The problem](#the-problem)
|
|
30
|
-
- [Who it is for](#who-it-is-for)
|
|
31
|
-
- [Features](#features)
|
|
32
|
-
- [Privacy & security](#privacy--security)
|
|
33
|
-
- [Requirements & compatibility](#requirements--compatibility)
|
|
34
|
-
- [Install](#install)
|
|
35
|
-
- [Usage](#usage)
|
|
36
|
-
- [FAQ](#faq)
|
|
37
|
-
- [Roadmap](#roadmap)
|
|
38
|
-
- [Contributing](#contributing)
|
|
39
|
-
- [License](#license)
|
|
40
|
-
|
|
41
|
-
</details>
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Install in 30 seconds
|
|
46
|
-
|
|
47
|
-
Published on npm — one command:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
# Official CLI
|
|
51
|
-
dsh plugin --profile web add dsh-document-view
|
|
52
|
-
|
|
53
|
-
# Or 1024 Store
|
|
54
|
-
dsh1024 plugin --profile web add dsh-document-view
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Package: [npm / dsh-document-view](https://www.npmjs.com/package/dsh-document-view) (currently `1.2.0`). Enable it in the DSH plugin list and refresh the page. Other install options are in [Install](#install).
|
|
58
|
-
|
|
59
|
-
## The problem
|
|
60
|
-
|
|
61
|
-
Open a file in DSH and it takes over the right sidebar, pushing your conversation away. Asking the AI to explain, summarize or rewrite against that document means constantly switching between "reading" and "chatting" — and losing context every time. Pasting the content into the chat means repeated copy-paste and truncated context.
|
|
62
|
-
|
|
63
|
-
`dsh-document-view` does exactly one thing: **keeps both on screen**. It does not take over the editor, change save behavior, or touch your files. It only rearranges the window so DSH native document / Office preview and the chat panel work side by side.
|
|
64
|
-
|
|
65
|
-
| | Default | Document view on |
|
|
66
|
-
| --- | --- | --- |
|
|
67
|
-
| Document | Takes the right sidebar | Center area |
|
|
68
|
-
| Conversation | Pushed away | Always visible on the right |
|
|
69
|
-
| Ask AI about the document | Switch back and forth / paste | Same screen |
|
|
70
|
-
| Editing / saving / preview | Native | **Still native** |
|
|
71
|
-
|
|
72
|
-
## Who it is for
|
|
73
|
-
|
|
74
|
-
- Reading papers, reports, contracts or specs while asking the AI about them
|
|
75
|
-
- Checking Excel / PowerPoint data and following up on a specific row or slide
|
|
76
|
-
- Editing code or Markdown while getting AI review, without switching tabs
|
|
77
|
-
- Using a large or multi-monitor setup and wanting document and chat side by side
|
|
78
|
-
|
|
79
|
-
## Features
|
|
80
|
-
|
|
81
|
-
### 1. Document and chat, side by side
|
|
82
|
-
|
|
83
|
-

|
|
84
|
-
|
|
85
|
-
Open any file, then click **Document view** in the conversation header actions or the file tab actions. Drag the divider to resize; `←` / `→` nudge it, `Home` resets the ratio, and double-clicking the divider restores the default. The toggle and ratio are **saved per session**.
|
|
86
|
-
|
|
87
|
-
### 2. Mark up the page, hand the review to the agent
|
|
88
|
-
|
|
89
|
-

|
|
90
|
-
|
|
91
|
-
Select text in the Word / PDF / PowerPoint page and a small toolbar appears:
|
|
92
|
-
|
|
93
|
-
- **Strikethrough** marks a passage for deletion and draws the line on the page.
|
|
94
|
-
- **Comment** records your change request; the page shows an amber highlight with a dashed underline and a numbered badge.
|
|
95
|
-
|
|
96
|
-
The **Annotate N** button in the document toolbar opens the review list: jump to a mark, edit the comment, delete it. **Send to AI** turns the whole list into one structured message (file path, page, exact target text, surrounding context, request, working conventions) in the right-hand conversation. The agent edits the original file, and the native preview follows the disk change. Annotations are kept per file path in browser storage, so a refresh or restart keeps them.
|
|
97
|
-
|
|
98
|
-
> Excel previews are an in-plugin canvas without a text layer, so they are outside this version.
|
|
99
|
-
> Manual Word editing is not part of this release: the preview toolbar already has an "open in app" control that hands the file to Word / WPS; saving there refreshes the preview.
|
|
100
|
-
|
|
101
|
-
### 3. See where the edit landed
|
|
102
|
-
|
|
103
|
-
Once a review is sent, the quoted text no longer exists in the edited file. The plugin then re-anchors the mark with the text that surrounded it:
|
|
104
|
-
|
|
105
|
-
- a replaced passage gets a green highlight, a green underline and a **✓** badge;
|
|
106
|
-
- a deleted passage gets a 2px green caret in the seam between its neighbours;
|
|
107
|
-
- a mark whose text did not change stays as it was (dimmed) and is never marked green.
|
|
108
|
-
|
|
109
|
-
Each mark is resolved on its own; a mark without surrounding context is reported, not guessed.
|
|
110
|
-
|
|
111
|
-
### 4. Settings and auto-enter
|
|
112
|
-
|
|
113
|
-

|
|
114
|
-
|
|
115
|
-
The arrow next to the toggle opens settings:
|
|
116
|
-
|
|
117
|
-
- **Auto-enter on document view** (off by default) — fires only when *you* click a file or file tab; background file operations never open it. After you exit manually, the same file will not re-open repeatedly.
|
|
118
|
-
- **Document-first / Balanced / Chat-first** presets, saved per session.
|
|
119
|
-
- **Auto update / Paused** — reuses the host native file watcher. Pause when you want to read carefully; resuming shows the latest content while preserving the native viewer page and zoom state.
|
|
120
|
-
|
|
121
|
-
### 5. Works in narrow windows
|
|
122
|
-
|
|
123
|
-
When the window is too narrow it switches to a single-column **Document / Chat** toggle. **Unsent input is preserved**, and focus moves to the visible switch if the current focus would be hidden.
|
|
124
|
-
|
|
125
|
-
### 6. Native all the way down
|
|
126
|
-
|
|
127
|
-
Rendering, editing, saving and preview of Markdown, PDF, Word, Excel, PowerPoint and local HTML files remain entirely with DSH own viewers and Office engine. The plugin **never reads, writes or uploads your files** and reimplements no editing feature. Disable it and the default layout returns.
|
|
128
|
-
|
|
129
|
-
## Privacy & security
|
|
130
|
-
|
|
131
|
-
The plugin touches your workspace UI, so every claim below is verifiable from the source:
|
|
132
|
-
|
|
133
|
-
- **No network calls** — no `http(s)://` address, `XMLHttpRequest` or `WebSocket`. The single `fetch` reads the HTML file you just opened, through the host's own local `dsh-resource://` protocol.
|
|
134
|
-
- **No file reads or writes** — no filesystem or editor read/write APIs. Annotations only read the selected text from the rendered page text layer; the original file is never opened.
|
|
135
|
-
- **No credentials** — no API keys, tokens, passwords, cookies, `.env` or config files ship in the package.
|
|
136
|
-
- **Two local stores only** — `dsh.document-view.v1` holds the auto-enter toggle and per-session ratios; `dsh.document-view.annotations.v2/` holds one key per annotation (file path, page, quoted text, request, status), so several windows can add marks without overwriting each other. Both stay in browser `localStorage`; nothing is uploaded or written back to a file.
|
|
137
|
-
- **Narrow CSS scope** — all styles are scoped to the plugin own `[data-fdc-*]` attributes. No host components are moved, cloned or remounted; only the window grid geometry changes.
|
|
138
|
-
|
|
139
|
-
See [SECURITY.md](SECURITY.md) and [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
140
|
-
|
|
141
|
-
## Requirements & compatibility
|
|
142
|
-
|
|
143
|
-
- [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) Desktop / Web, verified on **v0.2.2-rc.3**.
|
|
144
|
-
- Node.js >= 20 — **only for rebuilding from source**; not needed to install or use.
|
|
145
|
-
- **Host requirement declared**: `dsh.engines.dsh = ">=0.2.2-rc.3"`. On older DSH versions the host refuses the install with `incompatible-version` instead of loading a plugin that would blank the page. Granular boundaries are in the [compatibility notes](docs/COMPATIBILITY.md).
|
|
146
|
-
|
|
147
|
-
> The plugin relies on the host DOM structure and slot names. If a DSH upgrade changes them, the plugin **disables itself safely and the page keeps working** (no white screen). Re-verify with the [upgrade checklist](docs/COMPATIBILITY.md).
|
|
148
|
-
|
|
149
|
-
## Install
|
|
150
|
-
|
|
151
|
-
**Option 0 — from npm (recommended, unlocks one-line install)**
|
|
152
|
-
|
|
153
|
-
```sh
|
|
154
|
-
dsh1024 plugin --profile web add dsh-document-view
|
|
155
|
-
# or
|
|
156
|
-
dsh plugin --profile web add dsh-document-view
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Option 1 — local directory**
|
|
160
|
-
|
|
161
|
-
```sh
|
|
162
|
-
git clone https://github.com/Frank-Fan-1058/dsh-document-view.git
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Then in DSH: **Plugins → Add plugin**, pick the `dsh-document-view` directory, enable it, and refresh the page (or restart DSH).
|
|
166
|
-
|
|
167
|
-
**Option 2 — tarball**
|
|
168
|
-
|
|
169
|
-
```sh
|
|
170
|
-
npm pack
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Extract `dsh-document-view-*.tgz` anywhere, then point step 2 of Option 1 at that directory.
|
|
174
|
-
|
|
175
|
-
**Option 3 — build from source**
|
|
176
|
-
|
|
177
|
-
```sh
|
|
178
|
-
npm install # only needed to rebuild
|
|
179
|
-
node scripts/build.mjs
|
|
180
|
-
node scripts/verify.mjs
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
`src/` is the source; `client.js` is the self-contained build artifact (all CSS inlined, no runtime dependencies). **Rebuild `client.js` after any `src/` change** — do not hand-edit the artifact.
|
|
184
|
-
|
|
185
|
-
> `file:` dependencies are physical copies: after editing source, remove `node_modules/<package>` and reinstall so the running copy updates.
|
|
186
|
-
|
|
187
|
-
## Usage
|
|
188
|
-
|
|
189
|
-
1. Open a file in the right sidebar (Markdown / PDF / Office).
|
|
190
|
-
2. Click **Document view** in the conversation header or file tab actions.
|
|
191
|
-
3. Drag the divider; `←` / `→` to nudge, `Home` or double-click to reset.
|
|
192
|
-
4. Open settings via the arrow for auto-enter and layout presets.
|
|
193
|
-
5. Click the toggle again (or the exit entry in the session / file header) to return to the default layout.
|
|
194
|
-
|
|
195
|
-
## FAQ
|
|
196
|
-
|
|
197
|
-
**Will it affect my editors or Office plugins?** No. It changes layout only — Univer, Office converters and native editors are untouched.
|
|
198
|
-
|
|
199
|
-
**Are my files read or uploaded?** No. No network requests, no file I/O, only the toggle and ratios are stored.
|
|
200
|
-
|
|
201
|
-
**Does anything remain after disabling?** No. All injected styles, attributes, the divider and listeners are removed on teardown.
|
|
202
|
-
|
|
203
|
-
**What if a DSH upgrade breaks it?** It disables itself safely and the page stays usable. Open an [Issue](https://github.com/Frank-Fan-1058/dsh-document-view/issues) with your DSH version.
|
|
204
|
-
|
|
205
|
-
**Which file types are supported?** Whatever the host supports natively — Markdown, PDF, Word, Excel, PowerPoint, local HTML, etc. The plugin adds no format restrictions.
|
|
206
|
-
|
|
207
|
-
## Roadmap
|
|
208
|
-
|
|
209
|
-
Shipped: v1.0.0 first third-party installable release, v1.1.0 bilingual docs and safe-deactivation fallback, v1.1.1 npm trusted publishing, v1.2.0 page annotations and edit highlighting.
|
|
210
|
-
|
|
211
|
-
Already listed: npm package, 1024 Store / awesome catalog (PR #942 merged), and the GitHub `dsh-plugin` topic. Next (feedback-driven): follow up on the dsh-market catalog PR review; re-verify after new DSH releases; add more locales and layout presets. See [ROADMAP.md](ROADMAP.md) and [CHANGELOG.md](CHANGELOG.md).
|
|
212
|
-
|
|
213
|
-
## Contributing
|
|
214
|
-
|
|
215
|
-
Issues and PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Rebuild `client.js` when changing `src/`; update both `locale/en.json` and `locale/zh.json` when changing UI copy. Never put real sessions, file names, accounts or personal data into illustrations or examples.
|
|
216
|
-
|
|
217
|
-
Want more people to find it inside DSH? See **[docs/PUBLISHING.md](docs/PUBLISHING.md)** for the full playbook (1024 Store, dsh-market, the `dsh-plugin` GitHub topic, npm publishing) and the ready-to-use [catalog entry](docs/awesome-dsh-catalog-entry.json).
|
|
218
|
-
|
|
219
|
-
## License
|
|
220
|
-
|
|
221
|
-
[MIT](LICENSE) © 2026 dsh-document-view contributors
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
<p align="center">Found it useful? <a href="https://github.com/Frank-Fan-1058/dsh-document-view">Give it a ⭐ Star</a> · <a href="https://github.com/Frank-Fan-1058/dsh-document-view/issues">Report an issue</a> · <a href="README.md">中文 README</a></p>
|