dsh-image-viewer 0.1.0-beta.9 → 0.1.1
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/AGENTS.md +1 -1
- package/README.en.md +19 -5
- package/README.md +20 -6
- package/compatibility.json +11 -2
- package/lib/client.js +598 -251
- package/lib/client.js.map +1 -1
- package/package.json +9 -7
package/AGENTS.md
CHANGED
|
@@ -13,7 +13,7 @@ Use this guide only when the user asks to install, update, verify, or remove `ds
|
|
|
13
13
|
## Install or update
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
dsh plugin --profile web add dsh-image-viewer
|
|
16
|
+
dsh plugin --profile web add ./dsh-image-viewer-0.1.0.tgz
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
DSH-Portable exposes the same standard `dsh plugin` command. Do not use a private executable path in public instructions.
|
package/README.en.md
CHANGED
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
# DSH Image Viewer
|
|
7
7
|
|
|
8
|
+
Package: `dsh-image-viewer`. [Awesome DSH listing](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/blob/main/data/plugins/WSL043__dsh-image-viewer.yml) · [Chat Manager](https://github.com/WSL043/dsh-chat-manager)
|
|
9
|
+
|
|
8
10
|
A compact, provider-neutral image viewer for DeepSeek Harness. It upgrades images already shown by DSH without replacing the conversation, attachment, or model workflows.
|
|
9
11
|
|
|
10
12
|
[](https://github.com/WSL043/dsh-image-viewer/actions/workflows/ci.yml)
|
|
11
13
|
[](https://www.npmjs.com/package/dsh-image-viewer)
|
|
12
14
|
[](https://www.npmjs.com/package/dsh-image-viewer)
|
|
13
|
-
[](#install)
|
|
14
16
|
[](LICENSE)
|
|
15
17
|
[](https://github.com/WSL043/dsh-image-viewer/stargazers)
|
|
16
18
|
|
|
@@ -18,7 +20,9 @@ A compact, provider-neutral image viewer for DeepSeek Harness. It upgrades image
|
|
|
18
20
|
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
|
-
>
|
|
23
|
+
> Release 0.1.0 is published to npm. Unsupported image markup is left untouched instead of being guessed.
|
|
24
|
+
|
|
25
|
+
Release checks exercise real attachments on stable and current Alpha DSH: gallery navigation, zoom, pan, download, region notes, and focus restoration. A six-hour upstream check retains browser and startup evidence on failure; it does not automatically claim compatibility or publish a release.
|
|
22
26
|
|
|
23
27
|
<p align="center">
|
|
24
28
|
<img src="https://raw.githubusercontent.com/WSL043/dsh-image-viewer/main/docs/assets/image-viewer-en.png" width="900" alt="DSH Image Viewer displaying an illustration with fit, original-size, download, and an inline numbered region note">
|
|
@@ -28,6 +32,10 @@ A compact, provider-neutral image viewer for DeepSeek Harness. It upgrades image
|
|
|
28
32
|
|
|
29
33
|
- Wheel zoom centered on the pointer, drag-to-pan, touch pinch, and double-click 100% view.
|
|
30
34
|
- Fit and original-size controls, original-file download, keyboard navigation, and multi-image galleries.
|
|
35
|
+
- 0.1.1: download progress when the file size is available, cancellation and retry; switching images or closing the viewer cancels the active download.
|
|
36
|
+
- Visible filename, dimensions and pixel-scale percentage; very wide images can reach 100%, and window resizing keeps the image within reach.
|
|
37
|
+
- Loading and retryable error states, gesture reset on image changes, and independent notes for unnamed images.
|
|
38
|
+
- 0.1.1: closing an annotated native DSH image adds a numbered PNG and notes to the originating conversation draft, preserving existing text without sending. Unchanged notes are not added twice. Failed intake preserves notes with retry and close-only choices.
|
|
31
39
|
- One-shot region marking with each note edited beside its numbered image marker. Enter saves and collapses the note;
|
|
32
40
|
Shift+Enter adds a new line.
|
|
33
41
|
- Light and dark themes through DSH design tokens, responsive layout, focus containment, and reduced-motion support.
|
|
@@ -37,10 +45,10 @@ DSH keeps working when the plugin is absent or cannot recognize a newer image su
|
|
|
37
45
|
|
|
38
46
|
## Install
|
|
39
47
|
|
|
40
|
-
Install the
|
|
48
|
+
Install the stable release from npm:
|
|
41
49
|
|
|
42
50
|
```sh
|
|
43
|
-
dsh plugin --profile web add dsh-image-viewer@0.1.0
|
|
51
|
+
dsh plugin --profile web add dsh-image-viewer@0.1.0
|
|
44
52
|
```
|
|
45
53
|
|
|
46
54
|
Restart DSH manually after saving active work. The plugin never needs access to provider credentials or image-generation accounts.
|
|
@@ -57,9 +65,15 @@ dsh plugin --profile web remove dsh-image-viewer
|
|
|
57
65
|
|
|
58
66
|
Uninstalling restores DSH's built-in image lightbox. It does not remove conversations, attachments, generated images, provider plugins, or credentials.
|
|
59
67
|
|
|
68
|
+
## Custom download integration
|
|
69
|
+
|
|
70
|
+
When calling `nativeImageViewer.open()`, an item's `download.onInvoke` receives `{ item, src, signal, onProgress }`. Pass `signal` to the download request and report bytes through `onProgress({ loaded, total })`. Omit `total` when the size is unknown; the viewer shows a preparing state and a cancel button.
|
|
71
|
+
|
|
72
|
+
Existing callbacks remain compatible. Custom transfers must honor `signal` to stop their underlying work. The viewer ignores late progress and results from cancelled operations. Download authorization and original-file integrity checks remain the image provider's responsibility.
|
|
73
|
+
|
|
60
74
|
## Privacy
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
The plugin reads only URLs already rendered by DSH, does not call a model, and does not read provider credentials. The annotation workflow adds images and notes through DSH's attachment and draft APIs; the user decides whether to send. Notes remain available when reopening an image within the current page, which does not imply a sent message or permanent conversation storage.
|
|
63
77
|
|
|
64
78
|
## Support
|
|
65
79
|
|
package/README.md
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
<div align="center">
|
|
5
5
|
|
|
6
|
-
# DSH 图片查看器
|
|
6
|
+
# DSH Image Viewer · 图片查看器
|
|
7
7
|
|
|
8
8
|
面向 DeepSeek Harness 的简洁、与模型和供应商无关的图片查看器。它只增强 DSH 已经显示的图片,不替换会话、附件或模型流程。
|
|
9
9
|
|
|
10
|
+
插件包名:`dsh-image-viewer`。支持图片缩放、原图下载、图库浏览与区域标注。[Awesome DSH 收录](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/blob/main/data/plugins/WSL043__dsh-image-viewer.yml) · [会话管理插件](https://github.com/WSL043/dsh-chat-manager)
|
|
11
|
+
|
|
10
12
|
[](https://github.com/WSL043/dsh-image-viewer/actions/workflows/ci.yml)
|
|
11
13
|
[](https://www.npmjs.com/package/dsh-image-viewer)
|
|
12
14
|
[](https://www.npmjs.com/package/dsh-image-viewer)
|
|
13
|
-
[](#安装)
|
|
14
16
|
[](LICENSE)
|
|
15
17
|
[](https://github.com/WSL043/dsh-image-viewer/stargazers)
|
|
16
18
|
|
|
@@ -18,7 +20,9 @@
|
|
|
18
20
|
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
|
-
>
|
|
23
|
+
> 正式版 0.1.0 已发布到 npm。遇到无法识别的新图片结构时会保留 DSH 原生行为,不会猜测接管。
|
|
24
|
+
|
|
25
|
+
稳定版与当前 Alpha 都在隔离环境验收真实附件的多图切换、缩放、拖动、下载、区域备注及关闭后焦点恢复。发布前必须通过;定时工作流每六小时检查官方新版本,失败保留浏览器和启动记录,不自动宣称兼容或发布。
|
|
22
26
|
|
|
23
27
|
<p align="center">
|
|
24
28
|
<img src="https://raw.githubusercontent.com/WSL043/dsh-image-viewer/main/docs/assets/image-viewer-zh.png" width="900" alt="DSH 图片查看器展示插画、适应窗口、原始大小、下载和图片编号附近的区域备注">
|
|
@@ -28,7 +32,11 @@
|
|
|
28
32
|
|
|
29
33
|
- 以鼠标位置为中心的滚轮缩放、拖动查看、触控双指缩放和双击原始大小。
|
|
30
34
|
- 适应窗口、原始大小、原图下载、键盘切换和多图浏览。
|
|
35
|
+
- 0.1.1:下载时显示可用的进度,支持取消和重试;切换图片或关闭查看器会取消正在进行的下载。
|
|
36
|
+
- 显示图片名称、尺寸与真实像素缩放比例;超宽大图也能切换到 100%,调整窗口后保持图片可见。
|
|
37
|
+
- 图片加载中和加载失败都有明确提示,失败可重试;切换图片会重置拖拽状态,区域备注不会串到另一张未命名图片。
|
|
31
38
|
- 一次点击标记一个区域,备注直接显示在图片编号附近并自动获得输入焦点;Enter 保存并收起,Shift+Enter 换行。
|
|
39
|
+
- 0.1.1:在 DSH 原生图片入口添加备注后,关闭查看器会把带编号的 PNG 和备注加入打开图片时的会话草稿,保留已有文字,不自动发送。没有修改备注时不会重复添加;失败时保留标注并可重试或仅关闭。
|
|
32
40
|
- 使用 DSH 设计令牌适配亮色、暗色、响应式布局、焦点约束和减少动态效果设置。
|
|
33
41
|
- 提供可选的 `nativeImageViewer` 客户端服务,图片生成插件可以按需增加自己的后续操作。
|
|
34
42
|
|
|
@@ -36,10 +44,10 @@
|
|
|
36
44
|
|
|
37
45
|
## 安装
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
从 npm 安装正式版:
|
|
40
48
|
|
|
41
49
|
```sh
|
|
42
|
-
dsh plugin --profile web add dsh-image-viewer@0.1.0
|
|
50
|
+
dsh plugin --profile web add dsh-image-viewer@0.1.0
|
|
43
51
|
```
|
|
44
52
|
|
|
45
53
|
保存正在进行的工作后手动重启 DSH。本插件不需要供应商凭据或图片生成账户权限。
|
|
@@ -56,9 +64,15 @@ dsh plugin --profile web remove dsh-image-viewer
|
|
|
56
64
|
|
|
57
65
|
卸载后恢复 DSH 内置图片灯箱,不会删除会话、附件、生成图片、供应商插件或凭据。
|
|
58
66
|
|
|
67
|
+
## 自定义下载接入
|
|
68
|
+
|
|
69
|
+
调用 `nativeImageViewer.open()` 时,图片条目的 `download.onInvoke` 会收到 `{ item, src, signal, onProgress }`。将 `signal` 传给下载请求,并通过 `onProgress({ loaded, total })` 上报字节数。文件总大小未知时省略 `total`,查看器显示准备状态和取消按钮。
|
|
70
|
+
|
|
71
|
+
旧的下载回调仍可使用;要实际停止自定义传输,回调需要响应 `signal`。查看器会忽略已取消操作的迟到进度和结果。下载权限及原图完整性校验仍由提供图片的插件负责。
|
|
72
|
+
|
|
59
73
|
## 隐私
|
|
60
74
|
|
|
61
|
-
|
|
75
|
+
插件只读取 DSH 已经渲染的图片 URL,不调用模型或读取供应商凭据。下一版的标注操作会通过 DSH 的附件与输入框接口加入当前草稿,由用户决定是否发送。当前页面内重新打开同一张图片时,区域备注仍会保留;这不等于已发送或永久保存会话。
|
|
62
76
|
|
|
63
77
|
## 反馈
|
|
64
78
|
|
package/compatibility.json
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"latestTested": "0.1.2-rc.1",
|
|
3
|
-
"supported": [
|
|
4
|
-
|
|
3
|
+
"supported": [
|
|
4
|
+
"0.1.1-rc.2",
|
|
5
|
+
"0.1.2-rc.1"
|
|
6
|
+
],
|
|
7
|
+
"previews": [
|
|
8
|
+
"0.1.2-alpha.2",
|
|
9
|
+
"0.1.2-alpha.3",
|
|
10
|
+
"0.1.3-alpha.2",
|
|
11
|
+
"0.1.5-alpha.1",
|
|
12
|
+
"0.1.6-alpha.1"
|
|
13
|
+
]
|
|
5
14
|
}
|