@jidekaixin2dian/dsh-file-actions 0.1.11 → 0.1.12
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 +66 -60
- package/README.en.md +124 -124
- package/README.md +127 -124
- package/SECURITY.md +30 -28
- package/lib/client.js +2300 -2237
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/package.json +73 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,60 +1,66 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.1.
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
## 0.1.
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
## 0.1.
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.12 — 2026-10-24
|
|
4
|
+
|
|
5
|
+
- 「复制文件内容」作用于会话工作区之外的文件时先弹确认框,说明该文件不属于本对话;拒绝则不读取任何字节。工作区内的复制行为不变。缓解聊天文本被注入绝对路径后的诱导复制。
|
|
6
|
+
- 移除菜单调试用的 `window.__dfaDebug` 全局对象;错误路径保留 `console.warn`。
|
|
7
|
+
- 新增 `npm-publish.yml`:手动触发的 npm 发布 workflow,先跑测试再 `npm publish --provenance`(OIDC 来源证明),action 按 SHA 固定。
|
|
8
|
+
|
|
9
|
+
## 0.1.11 — 2026-10-24
|
|
10
|
+
|
|
11
|
+
- 新增 npm 分发渠道,包名保留 `@jidekaixin2dian/dsh-file-actions`,GitHub Release 安装方式继续可用。
|
|
12
|
+
- 明确公开发布到官方 npm registry;中英文文档补充 DSH 安装、固定版本与仅下载命令。
|
|
13
|
+
- 插件功能与 0.1.10 相同,无新增运行时依赖或构建步骤。
|
|
14
|
+
|
|
15
|
+
## 0.1.10 — 2026-10-23
|
|
16
|
+
|
|
17
|
+
- 移除其他产品对标表述;中文显示名改为「文件与链接操作」,保留包名与英文名 File Actions。
|
|
18
|
+
- 明确文件引用显示探测状态与可重试错误;猜测路径先验证再接管右键,Shift+右键保留原生菜单。
|
|
19
|
+
- 按文件类型保存首选应用;关联列表优先排列首选、系统默认和编辑器,保留全部应用。
|
|
20
|
+
- 区分应用查询中、空结果和失败重试,预留菜单行,异步缩略图不再重绘操作区域。
|
|
21
|
+
- 字号跟随页面根字号,窄视口约束菜单宽度;修复搜索无结果时键盘仍可能执行隐藏应用的问题。
|
|
22
|
+
|
|
23
|
+
## 0.1.9
|
|
24
|
+
|
|
25
|
+
- 插件面板显示中文名与中文简介(`locale/zh.json`、`locale/en.json` 的 `meta.title` / `meta.description`),卡片和详情不再回落到英文 package.json 描述。
|
|
26
|
+
|
|
27
|
+
## 0.1.8
|
|
28
|
+
|
|
29
|
+
- 菜单与提示条加一层按主题计算的可读性底:液态玻璃/壁纸主题下文字不再被背景冲淡,玻璃感保留。
|
|
30
|
+
|
|
31
|
+
## 0.1.7
|
|
32
|
+
|
|
33
|
+
- 蓝色引用统一:GitHub 等网页链接也走同一个菜单,给「打开链接 / 复制链接 / 复制链接文字」。
|
|
34
|
+
- 修掉与 Toolgate 同时安装时的启动报错:两个浏览器 bundle 都在顶层声明 `const factory`,DSH 合并加载时冲突;现在各自隔离作用域,并补了重复加载的回归测试。
|
|
35
|
+
- 一并包含 0.1.6 的未发布修复:HTML/SVG 预览改用独立来源的 sandbox 帧、资源地址优先于子元素提示、切换点击时取消过期菜单、缩略图缓存按会话/路径/版本、可复现的真实宿主与浏览器检查。
|
|
36
|
+
|
|
37
|
+
## 0.1.6
|
|
38
|
+
|
|
39
|
+
- HTML/SVG 预览与 DSH 页面隔离(sandbox 帧,保留脚本执行),清空 popup opener。
|
|
40
|
+
- 保留 POSIX 根与资源地址的 Session 身份;资源地址优先于子元素 title;POSIX 路径区分大小写。
|
|
41
|
+
- 取消过期菜单、卸载时回收缩略图 URL、缩略图按会话/路径/版本缓存并拒绝不完整数据。
|
|
42
|
+
- 增加可复现的真实宿主/浏览器 CI 与归档安装检查;可选全 Web 工具改用官方 CLI 与自有进程校验。
|
|
43
|
+
|
|
44
|
+
## 0.1.5
|
|
45
|
+
|
|
46
|
+
资源链接、带装饰的文件名、字幕与媒体分类。
|
|
47
|
+
|
|
48
|
+
## 0.1.4
|
|
49
|
+
|
|
50
|
+
`dsh-resource://` 链接、字幕、视频与音频类型。
|
|
51
|
+
|
|
52
|
+
## 0.1.3
|
|
53
|
+
|
|
54
|
+
「打开方式」搜索、滚动渐隐、图片缩略图、市场预览图。
|
|
55
|
+
|
|
56
|
+
## 0.1.2
|
|
57
|
+
|
|
58
|
+
菜单视觉重做:文件身份头部、键盘提示、子菜单表头。
|
|
59
|
+
|
|
60
|
+
## 0.1.1
|
|
61
|
+
|
|
62
|
+
自审修复:复制上限、焦点与滚动、无扩展名文件。
|
|
63
|
+
|
|
64
|
+
## 0.1.0
|
|
65
|
+
|
|
66
|
+
首个版本。
|
package/README.en.md
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
# dsh-file-actions
|
|
2
|
-
|
|
3
|
-
[中文](README.md)
|
|
4
|
-
|
|
5
|
-
**0.1.11** adds npm distribution, retaining the file verification feedback, preferred applications, menu stability and font scaling from 0.1.10. See [npm](https://www.npmjs.com/package/@jidekaixin2dian/dsh-file-actions), [Releases](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest) and the [Changelog](CHANGELOG.md).
|
|
6
|
-
|
|
7
|
-
Right-click files and links to open, reveal, copy or save them.
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
Quit the DSH desktop app completely, then run:
|
|
14
|
-
|
|
15
|
-
```powershell
|
|
16
|
-
dsh plugin --profile desktop add @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Reopen DSH to activate it. The explicit npm registry avoids mirror synchronization delays. Append `@0.1.11` to the package name to install that exact version.
|
|
20
|
-
|
|
21
|
-
GitHub Release installation remains available:
|
|
22
|
-
|
|
23
|
-
```powershell
|
|
24
|
-
dsh plugin --profile desktop add https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest/download/dsh-file-actions.tgz
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
To download the npm archive without installing the plugin:
|
|
28
|
-
|
|
29
|
-
```powershell
|
|
30
|
-
npm pack @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
A plain `npm install` does not register the plugin with DSH; use `dsh plugin` above. To follow source instead, use `dsh plugin --profile desktop add github:jidekaixin2dian/dsh-file-actions`.
|
|
34
|
-
|
|
35
|
-
To remove it: dsh plugin --profile desktop remove @jidekaixin2dian/dsh-file-actions, then reopen DSH.
|
|
36
|
-
|
|
37
|
-
## Using it
|
|
38
|
-
|
|
39
|
-
Right-click a file name in any of these places:
|
|
40
|
-
|
|
41
|
-
- inline code in the transcript (blue, dotted underline)
|
|
42
|
-
- delivery cards and the changed-files list
|
|
43
|
-
- file links in tool-call rows (read, write, edit)
|
|
44
|
-
- the right Sidebar file tree
|
|
45
|
-
- the document preview title
|
|
46
|
-
- web links with the same blue style (GitHub releases, discussions, …)
|
|
47
|
-
|
|
48
|
-

|
|
49
|
-
|
|
50
|
-
The rows follow the file type:
|
|
51
|
-
|
|
52
|
-
| File | What you get |
|
|
53
|
-
|---|---|
|
|
54
|
-
| Code, text, config, subtitles | open, open in editor, open with, reveal, copy path, copy relative path, copy contents, save as |
|
|
55
|
-
| Markdown, HTML, SVG, PDF, images | the same plus *Open in browser*; images and SVG also show a thumbnail |
|
|
56
|
-
| Video, audio | open, open with, play in browser (mp4 / mov / webm, mp3 / wav / flac …), save as |
|
|
57
|
-
| Office, archives, design files, 3D, disk images, binaries | open, open with, reveal, copy path, save as |
|
|
58
|
-
| Folders | open folder, reveal, copy path, copy relative path |
|
|
59
|
-
| Web links | open link, copy link, copy link text |
|
|
60
|
-
|
|
61
|
-
*Open with* keeps every registered application, ordered by preferred application, system default, editors, then other applications. A search box appears above seven entries.
|
|
62
|
-
|
|
63
|
-
Click ☆ beside an application to prefer it for that file type; click ★ to clear it. Keyboard users can select an application and press `Shift+Enter`. Preferences stay in this browser and do not change OS associations. An unavailable preferred application falls back to an available editor.
|
|
64
|
-
|
|
65
|
-
Explicit file references show progress and a retryable error when verification fails. Guessed text paths are verified on hover or focus; until verified, they retain the native menu. Hold `Shift` while right-clicking to keep the native menu anywhere.
|
|
66
|
-
|
|
67
|
-

|
|
68
|
-
|
|
69
|
-
Image files get a thumbnail:
|
|
70
|
-
|
|
71
|
-

|
|
72
|
-
|
|
73
|
-
Keyboard works too: `Shift+F10` or the menu key opens the same menu, `↑ ↓` move, `→` enters the submenu, `Enter` runs, `Esc` closes.
|
|
74
|
-
|
|
75
|
-
Readable on a wallpaper with a liquid-glass theme — the menu paints a near-opaque base under the themed layer:
|
|
76
|
-
|
|
77
|
-

|
|
78
|
-
|
|
79
|
-

|
|
80
|
-
|
|
81
|
-
## Limitations
|
|
82
|
-
|
|
83
|
-
- Not a native menu. Text follows the page root font size and page zoom, not the operating system text-size setting directly.
|
|
84
|
-
- *Open with* only lists registered applications. Preferences do not change OS defaults.
|
|
85
|
-
- Opening an editor currently opens the file only; the pinned Host API does not accept line or column positions.
|
|
86
|
-
- Save as uses the browser's download dialog with the original file name.
|
|
87
|
-
- Copy contents is capped at 2 MiB. Save as and browser previews use the host complete-file cap (32 MiB by default on DSH 0.2.1-rc.2); larger files must be opened externally.
|
|
88
|
-
- HTML/SVG previews retain scripts in an opaque-origin sandbox. They cannot access the DSH page or cookies. Relative sibling assets and actions that require top navigation or same-origin storage may not work.
|
|
89
|
-
- Web UI only — the terminal build has nothing to right-click.
|
|
90
|
-
|
|
91
|
-
## FAQ
|
|
92
|
-
|
|
93
|
-
**Why does the native menu appear?** Plain prose and editable fields keep it. Guessed file paths are verified on hover or focus; cold or failed guesses retain the native menu. Explicit file references show a reason and a retry action on failure.
|
|
94
|
-
|
|
95
|
-
**Is *Open with* unavailable?** Loading, empty results and failed queries are shown separately. Click a failed query to retry.
|
|
96
|
-
|
|
97
|
-
**Nothing opens in the browser?** The popup may have been blocked; allow popups and retry.
|
|
98
|
-
|
|
99
|
-
**How do I choose an application?** Click ☆ in *Open with*. Without a preference, the shortcut uses a recognised editor. *Open file* continues to use the system default.
|
|
100
|
-
|
|
101
|
-
## Development and verification
|
|
102
|
-
|
|
103
|
-
Node >=24, Git and pnpm:
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
npm ci --ignore-scripts
|
|
107
|
-
npm test
|
|
108
|
-
npm run setup:host
|
|
109
|
-
npm run test:host
|
|
110
|
-
npm run pack:check
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
The pinned host is DSH **0.2.1-rc.2** (`687f282e8625c6b8d11ff58211a90524be2e4317`). `DFA_HOST` can reuse a clean checkout at that exact commit. Windows uses headless Edge; Linux needs `npx --no-install playwright install --with-deps chromium`. CI runs both systems. No runtime dependencies or build step are added to the plugin.
|
|
114
|
-
|
|
115
|
-
The browser suite uses the actual client bundle and real WorkspaceFiles over synthetic references. It checks Session identity, sandboxed script isolation, a real 3 MiB download and unload behavior. A separate browser suite uses deterministic Remote responses for native-menu fallback, preferences, asynchronous stability, search and large text. This is not a complete Desktop or OS application-launch test. Optional full-Web drivers and historical assertion counts are documented in [test-e2e](test-e2e/README.md).
|
|
116
|
-
|
|
117
|
-
## Releases
|
|
118
|
-
|
|
119
|
-
- [Latest release](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest)
|
|
120
|
-
- [Announcement](https://github.com/deepseek-ai/deepseek-harness/discussions/10576)
|
|
121
|
-
|
|
122
|
-
## License
|
|
123
|
-
|
|
124
|
-
MIT
|
|
1
|
+
# dsh-file-actions
|
|
2
|
+
|
|
3
|
+
[中文](README.md)
|
|
4
|
+
|
|
5
|
+
**0.1.11** adds npm distribution, retaining the file verification feedback, preferred applications, menu stability and font scaling from 0.1.10. See [npm](https://www.npmjs.com/package/@jidekaixin2dian/dsh-file-actions), [Releases](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest) and the [Changelog](CHANGELOG.md).
|
|
6
|
+
|
|
7
|
+
Right-click files and links to open, reveal, copy or save them.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Quit the DSH desktop app completely, then run:
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
dsh plugin --profile desktop add @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Reopen DSH to activate it. The explicit npm registry avoids mirror synchronization delays. Append `@0.1.11` to the package name to install that exact version.
|
|
20
|
+
|
|
21
|
+
GitHub Release installation remains available:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
dsh plugin --profile desktop add https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest/download/dsh-file-actions.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
To download the npm archive without installing the plugin:
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
npm pack @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
A plain `npm install` does not register the plugin with DSH; use `dsh plugin` above. To follow source instead, use `dsh plugin --profile desktop add github:jidekaixin2dian/dsh-file-actions`.
|
|
34
|
+
|
|
35
|
+
To remove it: dsh plugin --profile desktop remove @jidekaixin2dian/dsh-file-actions, then reopen DSH.
|
|
36
|
+
|
|
37
|
+
## Using it
|
|
38
|
+
|
|
39
|
+
Right-click a file name in any of these places:
|
|
40
|
+
|
|
41
|
+
- inline code in the transcript (blue, dotted underline)
|
|
42
|
+
- delivery cards and the changed-files list
|
|
43
|
+
- file links in tool-call rows (read, write, edit)
|
|
44
|
+
- the right Sidebar file tree
|
|
45
|
+
- the document preview title
|
|
46
|
+
- web links with the same blue style (GitHub releases, discussions, …)
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
The rows follow the file type:
|
|
51
|
+
|
|
52
|
+
| File | What you get |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Code, text, config, subtitles | open, open in editor, open with, reveal, copy path, copy relative path, copy file name, copy contents, save as |
|
|
55
|
+
| Markdown, HTML, SVG, PDF, images | the same plus *Open in browser*; images and SVG also show a thumbnail |
|
|
56
|
+
| Video, audio | open, open with, play in browser (mp4 / mov / webm, mp3 / wav / flac …), save as |
|
|
57
|
+
| Office, archives, design files, 3D, disk images, binaries | open, open with, reveal, copy path, save as |
|
|
58
|
+
| Folders | open folder, reveal, copy path, copy relative path |
|
|
59
|
+
| Web links | open link, copy link, copy link text, copy as Markdown |
|
|
60
|
+
|
|
61
|
+
*Open with* keeps every registered application, ordered by preferred application, system default, editors, then other applications. A search box appears above seven entries.
|
|
62
|
+
|
|
63
|
+
Click ☆ beside an application to prefer it for that file type; click ★ to clear it. Keyboard users can select an application and press `Shift+Enter`. Preferences stay in this browser and do not change OS associations. An unavailable preferred application falls back to an available editor.
|
|
64
|
+
|
|
65
|
+
Explicit file references show progress and a retryable error when verification fails. Guessed text paths are verified on hover or focus; until verified, they retain the native menu. Hold `Shift` while right-clicking to keep the native menu anywhere.
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
Image files get a thumbnail:
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
Keyboard works too: `Shift+F10` or the menu key opens the same menu, `↑ ↓` move, `→` enters the submenu, `Enter` runs, `Esc` closes.
|
|
74
|
+
|
|
75
|
+
Readable on a wallpaper with a liquid-glass theme — the menu paints a near-opaque base under the themed layer:
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
## Limitations
|
|
82
|
+
|
|
83
|
+
- Not a native menu. Text follows the page root font size and page zoom, not the operating system text-size setting directly.
|
|
84
|
+
- *Open with* only lists registered applications. Preferences do not change OS defaults.
|
|
85
|
+
- Opening an editor currently opens the file only; the pinned Host API does not accept line or column positions.
|
|
86
|
+
- Save as uses the browser's download dialog with the original file name.
|
|
87
|
+
- Copy contents is capped at 2 MiB. Save as and browser previews use the host complete-file cap (32 MiB by default on DSH 0.2.1-rc.2); larger files must be opened externally.
|
|
88
|
+
- HTML/SVG previews retain scripts in an opaque-origin sandbox. They cannot access the DSH page or cookies. Relative sibling assets and actions that require top navigation or same-origin storage may not work.
|
|
89
|
+
- Web UI only — the terminal build has nothing to right-click.
|
|
90
|
+
|
|
91
|
+
## FAQ
|
|
92
|
+
|
|
93
|
+
**Why does the native menu appear?** Plain prose and editable fields keep it. Guessed file paths are verified on hover or focus; cold or failed guesses retain the native menu. Explicit file references show a reason and a retry action on failure.
|
|
94
|
+
|
|
95
|
+
**Is *Open with* unavailable?** Loading, empty results and failed queries are shown separately. Click a failed query to retry.
|
|
96
|
+
|
|
97
|
+
**Nothing opens in the browser?** The popup may have been blocked; allow popups and retry.
|
|
98
|
+
|
|
99
|
+
**How do I choose an application?** Click ☆ in *Open with*. Without a preference, the shortcut uses a recognised editor. *Open file* continues to use the system default.
|
|
100
|
+
|
|
101
|
+
## Development and verification
|
|
102
|
+
|
|
103
|
+
Node >=24, Git and pnpm:
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
npm ci --ignore-scripts
|
|
107
|
+
npm test
|
|
108
|
+
npm run setup:host
|
|
109
|
+
npm run test:host
|
|
110
|
+
npm run pack:check
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The pinned host is DSH **0.2.1-rc.2** (`687f282e8625c6b8d11ff58211a90524be2e4317`). `DFA_HOST` can reuse a clean checkout at that exact commit. Windows uses headless Edge; Linux needs `npx --no-install playwright install --with-deps chromium`. CI runs both systems. No runtime dependencies or build step are added to the plugin.
|
|
114
|
+
|
|
115
|
+
The browser suite uses the actual client bundle and real WorkspaceFiles over synthetic references. It checks Session identity, sandboxed script isolation, a real 3 MiB download and unload behavior. A separate browser suite uses deterministic Remote responses for native-menu fallback, preferences, asynchronous stability, search and large text. This is not a complete Desktop or OS application-launch test. Optional full-Web drivers and historical assertion counts are documented in [test-e2e](test-e2e/README.md).
|
|
116
|
+
|
|
117
|
+
## Releases
|
|
118
|
+
|
|
119
|
+
- [Latest release](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest)
|
|
120
|
+
- [Announcement](https://github.com/deepseek-ai/deepseek-harness/discussions/10576)
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,124 +1,127 @@
|
|
|
1
|
-
# File Actions · 文件与链接操作
|
|
2
|
-
|
|
3
|
-
[English](README.en.md)
|
|
4
|
-
|
|
5
|
-
**0.1.11** 新增 npm 分发,保留 0.1.10 的文件探测反馈、首选应用、菜单稳定性和字号适配。安装包见 [npm](https://www.npmjs.com/package/@jidekaixin2dian/dsh-file-actions) 和 [Release](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest),修复记录见[变更记录](CHANGELOG.md)。
|
|
6
|
-
|
|
7
|
-
右键文件和链接,直接打开、定位、复制或另存。
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
## 安装
|
|
12
|
-
|
|
13
|
-
先完全退出 DSH 桌面端,再执行:
|
|
14
|
-
|
|
15
|
-
```powershell
|
|
16
|
-
dsh plugin --profile desktop add @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
装完重开 DSH 生效。指定官方 npm 源可以避开镜像同步延迟;安装固定版本时,在包名后加 `@0.1.
|
|
20
|
-
|
|
21
|
-
也可继续通过 GitHub Release 安装:
|
|
22
|
-
|
|
23
|
-
```powershell
|
|
24
|
-
dsh plugin --profile desktop add https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest/download/dsh-file-actions.tgz
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
只下载 npm 安装包、不安装插件:
|
|
28
|
-
|
|
29
|
-
```powershell
|
|
30
|
-
npm pack @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
普通 `npm install` 不会把插件注册到 DSH;请使用上面的 `dsh plugin` 命令。想跟 main 源码走可以用 `dsh plugin --profile desktop add github:jidekaixin2dian/dsh-file-actions`。
|
|
34
|
-
|
|
35
|
-
卸载:dsh plugin --profile desktop remove @jidekaixin2dian/dsh-file-actions,然后重开 DSH。
|
|
36
|
-
|
|
37
|
-
## 怎么用
|
|
38
|
-
|
|
39
|
-
在聊天里右键这些位置的文件名:
|
|
40
|
-
|
|
41
|
-
- 正文里的行内代码(蓝色、点线下划线)
|
|
42
|
-
- 交付卡片和「已编辑」文件列表
|
|
43
|
-
- 工具调用行(读取、写入、编辑)里的文件链接
|
|
44
|
-
- 右侧文件树
|
|
45
|
-
- 文档预览标题
|
|
46
|
-
- GitHub 等网页链接(同一个蓝色样式)
|
|
47
|
-
|
|
48
|
-

|
|
49
|
-
|
|
50
|
-
菜单按文件类型给不同的项:
|
|
51
|
-
|
|
52
|
-
| 文件 | 能做什么 |
|
|
53
|
-
|---|---|
|
|
54
|
-
| 代码、文本、配置、字幕 |
|
|
55
|
-
| Markdown、HTML、SVG、PDF、图片 | 同上,多一项「在浏览器中打开」;图片和 SVG 会在菜单里显示缩略图 |
|
|
56
|
-
| 视频、音频 | 打开、打开方式、在浏览器中播放(mp4 / mov / webm、mp3 / wav / flac 等)、另存为 |
|
|
57
|
-
| Office、压缩包、设计稿、3D、磁盘镜像、二进制 | 打开、打开方式、在资源管理器中显示、复制路径、另存为 |
|
|
58
|
-
| 文件夹 | 打开文件夹、在资源管理器中打开、复制路径、复制相对路径 |
|
|
59
|
-
| 网页链接 |
|
|
60
|
-
|
|
61
|
-
「打开方式」完整保留系统关联应用,按首选、系统默认、编辑器、其他应用排序;超过 7 个会出现搜索框。
|
|
62
|
-
|
|
63
|
-
点击应用旁的 ☆,将它设为该文件类型的首选;再次点击 ★ 取消。键盘选中应用后也可用 `Shift+Enter` 设置或取消。首选仅保存在当前浏览器中,不修改系统文件关联;若应用不再可用,自动回落到可用编辑器。
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
npm
|
|
110
|
-
npm
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
# File Actions · 文件与链接操作
|
|
2
|
+
|
|
3
|
+
[English](README.en.md)
|
|
4
|
+
|
|
5
|
+
**0.1.11** 新增 npm 分发,保留 0.1.10 的文件探测反馈、首选应用、菜单稳定性和字号适配。安装包见 [npm](https://www.npmjs.com/package/@jidekaixin2dian/dsh-file-actions) 和 [Release](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest),修复记录见[变更记录](CHANGELOG.md)。
|
|
6
|
+
|
|
7
|
+
右键文件和链接,直接打开、定位、复制或另存。
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## 安装
|
|
12
|
+
|
|
13
|
+
先完全退出 DSH 桌面端,再执行:
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
dsh plugin --profile desktop add @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
装完重开 DSH 生效。指定官方 npm 源可以避开镜像同步延迟;安装固定版本时,在包名后加 `@0.1.12`。
|
|
20
|
+
|
|
21
|
+
也可继续通过 GitHub Release 安装:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
dsh plugin --profile desktop add https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest/download/dsh-file-actions.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
只下载 npm 安装包、不安装插件:
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
npm pack @jidekaixin2dian/dsh-file-actions --registry=https://registry.npmjs.org
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
普通 `npm install` 不会把插件注册到 DSH;请使用上面的 `dsh plugin` 命令。想跟 main 源码走可以用 `dsh plugin --profile desktop add github:jidekaixin2dian/dsh-file-actions`。
|
|
34
|
+
|
|
35
|
+
卸载:dsh plugin --profile desktop remove @jidekaixin2dian/dsh-file-actions,然后重开 DSH。
|
|
36
|
+
|
|
37
|
+
## 怎么用
|
|
38
|
+
|
|
39
|
+
在聊天里右键这些位置的文件名:
|
|
40
|
+
|
|
41
|
+
- 正文里的行内代码(蓝色、点线下划线)
|
|
42
|
+
- 交付卡片和「已编辑」文件列表
|
|
43
|
+
- 工具调用行(读取、写入、编辑)里的文件链接
|
|
44
|
+
- 右侧文件树
|
|
45
|
+
- 文档预览标题
|
|
46
|
+
- GitHub 等网页链接(同一个蓝色样式)
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
菜单按文件类型给不同的项:
|
|
51
|
+
|
|
52
|
+
| 文件 | 能做什么 |
|
|
53
|
+
|---|---|
|
|
54
|
+
| 代码、文本、配置、字幕 | 打开、在编辑器中打开、打开方式、在资源管理器中显示、复制路径、复制相对路径、复制文件名、复制文件内容、另存为 |
|
|
55
|
+
| Markdown、HTML、SVG、PDF、图片 | 同上,多一项「在浏览器中打开」;图片和 SVG 会在菜单里显示缩略图 |
|
|
56
|
+
| 视频、音频 | 打开、打开方式、在浏览器中播放(mp4 / mov / webm、mp3 / wav / flac 等)、另存为 |
|
|
57
|
+
| Office、压缩包、设计稿、3D、磁盘镜像、二进制 | 打开、打开方式、在资源管理器中显示、复制路径、另存为 |
|
|
58
|
+
| 文件夹 | 打开文件夹、在资源管理器中打开、复制路径、复制相对路径 |
|
|
59
|
+
| 网页链接 | 打开链接、复制链接、复制链接文字、复制为 Markdown |
|
|
60
|
+
|
|
61
|
+
「打开方式」完整保留系统关联应用,按首选、系统默认、编辑器、其他应用排序;超过 7 个会出现搜索框。
|
|
62
|
+
|
|
63
|
+
点击应用旁的 ☆,将它设为该文件类型的首选;再次点击 ★ 取消。键盘选中应用后也可用 `Shift+Enter` 设置或取消。首选仅保存在当前浏览器中,不修改系统文件关联;若应用不再可用,自动回落到可用编辑器。
|
|
64
|
+
|
|
65
|
+
引用里带行号(src/app.ts:42:7、
|
|
66
|
+
otes.md#L42-L48)时,菜单头部会显示「第 42 行」,并多出「复制引用」——原样复制这段引用,粘回聊天就能对上位置。宿主暂时不能把编辑器定位到该行。
|
|
67
|
+
|
|
68
|
+
明确的文件引用会先显示读取状态,失败时可重试。普通文本中猜测的路径先在悬停或聚焦时验证,验证前保留原生菜单。任何位置按住 `Shift` 再右键,都保留原生菜单。
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
图片文件的缩略图:
|
|
73
|
+
|
|
74
|
+

|
|
75
|
+
|
|
76
|
+
键盘也能用:`Shift+F10` 或菜单键打开,`↑ ↓` 移动,`→` 进子菜单,`Enter` 执行,`Esc` 关闭。
|
|
77
|
+
|
|
78
|
+
壁纸 + 液态玻璃主题下也能看清(菜单底下垫了一层接近不透明的底):
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
## 限制
|
|
85
|
+
|
|
86
|
+
- 不是系统原生菜单;字号跟随页面根字号和页面缩放,不直接读取操作系统的文字大小设置。
|
|
87
|
+
- 「打开方式」只列系统已注册的关联应用;首选设置不修改系统默认关联。
|
|
88
|
+
- 打开编辑器目前只定位到文件;固定版本宿主的打开接口不支持传入行号和列号。
|
|
89
|
+
- 另存为走浏览器的下载对话框,文件名固定为原文件名。
|
|
90
|
+
- 复制文件内容上限 2 MiB。另存为和浏览器预览受宿主整文件读取上限约束,DSH 0.2.1-rc.2 默认 32 MiB;更大的文件请使用外部应用。
|
|
91
|
+
- HTML/SVG 预览在独立来源的 sandbox iframe 内运行脚本,不能读取 DSH 页面或 Cookie;相邻文件的相对资源、顶层跳转和同源存储可能不可用。
|
|
92
|
+
- 只支持网页版界面,终端里的 DSH 没有可右键的元素。
|
|
93
|
+
|
|
94
|
+
## 常见问题
|
|
95
|
+
|
|
96
|
+
**右键出现原生菜单?** 普通文字与输入框保留原生菜单。猜测的文件路径需要先在悬停或聚焦时验证;未验证或验证失败时也保留原生菜单。明确文件引用失败时,菜单内会显示原因与重试入口。
|
|
97
|
+
|
|
98
|
+
**「打开方式」不可用?** 菜单会分别显示正在查询、没有关联应用和查询失败;查询失败可以点击重试。
|
|
99
|
+
|
|
100
|
+
**「在浏览器中打开」没反应?** 浏览器可能拦了新窗口,允许弹窗后重试。
|
|
101
|
+
|
|
102
|
+
**怎么指定首选应用?** 在「打开方式」中点击应用旁的 ☆。未指定首选时,快捷打开行采用系统关联里能识别的编辑器;「打开文件」仍按系统默认方式打开。
|
|
103
|
+
|
|
104
|
+
## 开发与验证
|
|
105
|
+
|
|
106
|
+
需要 Node >=24、Git、pnpm:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
npm ci --ignore-scripts
|
|
110
|
+
npm test
|
|
111
|
+
npm run setup:host
|
|
112
|
+
npm run test:host
|
|
113
|
+
npm run pack:check
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
固定宿主为 DSH **0.2.1-rc.2**(`687f282e8625c6b8d11ff58211a90524be2e4317`)。`DFA_HOST` 可复用相同 commit 的干净 checkout。Windows 使用 headless Edge;Linux 先运行 `npx --no-install playwright install --with-deps chromium`。CI 同时覆盖两种系统。插件仍无运行时依赖、无构建步骤。
|
|
117
|
+
|
|
118
|
+
浏览器套件把实际 client bundle 与真实 WorkspaceFiles 接到合成文件引用上,检查会话身份、预览脚本隔离、真实 3 MiB 下载及卸载行为;另用确定性 Remote 响应检查右键回退、首选应用、异步菜单稳定性、搜索和大字号。这不是完整 Desktop 或外部应用启动验收。可选完整 Web 驱动和历史断言计数见 [test-e2e](test-e2e/README.md)。
|
|
119
|
+
|
|
120
|
+
## 版本
|
|
121
|
+
|
|
122
|
+
- [最新版本](https://github.com/jidekaixin2dian/dsh-file-actions/releases/latest)
|
|
123
|
+
- [讨论帖](https://github.com/deepseek-ai/deepseek-harness/discussions/10576)
|
|
124
|
+
|
|
125
|
+
## 许可
|
|
126
|
+
|
|
127
|
+
MIT
|