dsh-artifact-linker 0.2.5 → 0.2.7
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 +63 -0
- package/README.md +14 -0
- package/README.zh.md +14 -0
- package/lib/client.js +1 -1
- package/lib/index.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.7 — 2026-10-28
|
|
4
|
+
|
|
5
|
+
### 文档:加上实机截图
|
|
6
|
+
|
|
7
|
+
README 中英双版各嵌入三张真实运行截图 —— 悬停高亮、右键菜单、复制路径 —— 放在仓库 `docs/` 下。
|
|
8
|
+
|
|
9
|
+
截图用 `raw.githubusercontent.com` 绝对地址引用,GitHub 与 npm 页面都能正常渲染;`files` 白名单不含 `docs`,所以**图片不进 npm 包体**,包大小不变。
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 0.2.6 — 2026-10-28
|
|
14
|
+
|
|
15
|
+
### 修掉两处「看不见的破窗」
|
|
16
|
+
|
|
17
|
+
1. **日志里的中文变乱码**
|
|
18
|
+
`reveal` 失败分支会往 stdout 打一句含中文的说明,日志消费端按 ANSI 解码就成了 `閫€鍑虹爜 1`。现在这条日志全 ASCII,并把真实含义写清楚:explorer 收到 `/select` 后把请求转交给已运行实例、随即退出,**退出码 1 是正常现象**。
|
|
19
|
+
|
|
20
|
+
2. **正则探针静默失效**
|
|
21
|
+
`probe-regex.mjs` 还在按 v0.1 的变量名(`EXT_ALT` / `RE_ABS` / `RE_NAME`)切源码。v0.2 把三条正则合并成单个 `RE` 之后锚点全断,探针直接退出 —— 等于这一层守卫早已不存在,只是没人发现。已按 v0.2 结构重写,39 项断言。
|
|
22
|
+
|
|
23
|
+
### 顺带
|
|
24
|
+
|
|
25
|
+
- `client.js` 里的 `VERSION` 之前停在 `0.2.0` 没跟版,现与 `package.json` 对齐,并加了一条探针断言 —— 以后再脱节会直接失败。
|
|
26
|
+
- 全部探针回归:**122 项全绿**(正则 39 / 宿主 apply 21 / 端到端 17 / 客户端物化 13 / 裸文件名 10 / 首批靶子 22)。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 0.2.5 — 2026-10-28 · 首个 npm 发布
|
|
31
|
+
|
|
32
|
+
### 修掉的三个真 bug
|
|
33
|
+
|
|
34
|
+
| 现象 | 根因 | 修法 |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| 「季度报告 最终版.pdf」这类带空格的名字点了没反应 | 正则中间段把空白当分隔符,只匹配到末尾的「最终版.pdf」,拿去解析必然失败 | 中间段只排除换行与中文标点,允许空格;后端再加「从左收缩重试」兜底 |
|
|
37
|
+
| 深目录里的产物扫不到 | workspace 索引扫描有深度与条目预算上限,浅层先占满 | 索引改为按需深扫,预算按层分摊 |
|
|
38
|
+
| 多处同名文件点了跳错 | 遇到重名直接放弃 | 加歧义消解:同目录优先,其次最近修改 |
|
|
39
|
+
|
|
40
|
+
### 交互定稿
|
|
41
|
+
|
|
42
|
+
- 命中高亮:Codex 风蓝 `rgba(88,166,255,.13)` + `1px dashed` 虚线
|
|
43
|
+
- 左键 = 资源管理器揭示并选中;右键 = 自建三动作菜单;Ctrl / Shift + 左键 = 系统默认程序打开
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 0.2.4 — 2026-10-28
|
|
48
|
+
|
|
49
|
+
- 修 `reveal` 的日志误报:explorer 收到 `/select` 后转交已运行实例并立即退出、**退出码恒为 1**。旧代码把非零码当失败,日志里全是 `Command failed`,把人骗去查一个不存在的 bug。
|
|
50
|
+
|
|
51
|
+
## 0.2.3 — 2026-10-27
|
|
52
|
+
|
|
53
|
+
- 命中高亮从黄色实线改为 **Codex 风蓝 + 虚线**(用户反馈「黄色太丑」,追加「最好是虚线」)。
|
|
54
|
+
|
|
55
|
+
## 0.2.2 — 2026-10-27
|
|
56
|
+
|
|
57
|
+
- 内部迭代(未单独发布):菜单文案与图标风格统一。
|
|
58
|
+
|
|
59
|
+
## 0.2.1 — 2026-10-27
|
|
60
|
+
|
|
61
|
+
- 修 `reveal` / `open` 静默失败:`execFile` 传单参数 + `windowsHide: true` 让 explorer 不弹窗;改为 `['/select,"<path>"']` + `windowsVerbatimArguments: true`。
|
|
62
|
+
- 修左键抢事件:`preventDefault` / `stopPropagation` 让宿主的侧边栏预览失效;改为延迟派发并检查 `defaultPrevented`。
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
3
66
|
## 0.2.0 — 2026-10-27
|
|
4
67
|
|
|
5
68
|
### 用户实测反馈驱动的重写
|
package/README.md
CHANGED
|
@@ -31,6 +31,20 @@ Two halves, one contract.
|
|
|
31
31
|
|
|
32
32
|
The host half closes the loop: even when the model only says `result.h5`, the route layer resolves it against the session workspace, then falls back to a shallow recursive basename search, and returns the real absolute path.
|
|
33
33
|
|
|
34
|
+
## What it looks like
|
|
35
|
+
|
|
36
|
+
Hover an artifact name and it picks up a Codex-style blue dashed outline — that is the only visual hint, nothing is rewritten in your transcript:
|
|
37
|
+
|
|
38
|
+

|
|
39
|
+
|
|
40
|
+
Right click for the three actions:
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
"Copy file path" puts the real absolute path on your clipboard:
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
34
48
|
## Interaction
|
|
35
49
|
|
|
36
50
|
Click behaviour is decided by the modifier key — no menu, no first-time setup:
|
package/README.zh.md
CHANGED
|
@@ -25,6 +25,20 @@ DSH 里预览器已经能开图片、代码、pdf、office。但**插件、脚
|
|
|
25
25
|
|
|
26
26
|
第 1 条管「模型把路径写对」,第 2 条管「用户点得动」。缺前者,路径经常是猜的、点开是死链;缺后者,路径再对也要人去复制。
|
|
27
27
|
|
|
28
|
+
## 长什么样
|
|
29
|
+
|
|
30
|
+
悬停到产物名上,会出现 Codex 风格的蓝色虚线框——这是唯一的视觉提示,正文一个字都不会被改写:
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
右键是三个动作:
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
「复制文件路径」把真实绝对路径放进剪贴板:
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
28
42
|
---
|
|
29
43
|
|
|
30
44
|
## 交互
|
package/lib/client.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -396,7 +396,9 @@ function launchPath(abs, action, res) {
|
|
|
396
396
|
if (err.code === "ENOENT" || err.code === "EACCES") {
|
|
397
397
|
console.log("[dsh-artifact-linker] " + action + " FAILED (cannot spawn " + cmd + "): " + String(err.message || err).split("\n")[0]);
|
|
398
398
|
} else {
|
|
399
|
-
|
|
399
|
+
// explorer.EXE hands the request to the already-running instance and exits with 1.
|
|
400
|
+
// Keep this line ASCII-only: log consumers may decode as ANSI and turn CJK into mojibake.
|
|
401
|
+
console.log("[dsh-artifact-linker] " + action + " note: " + cmd + " exited with code " + (err.code == null ? "non-zero" : err.code) + " (explorer hands off to the running instance; the window opened normally)");
|
|
400
402
|
}
|
|
401
403
|
} catch (e) { }
|
|
402
404
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-artifact-linker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "DSH 产物路径联动器:常驻注入「产物路径铁律」让模型输出完整绝对路径,同时把聊天正文里的文件名/路径渲染成一键可点的产物芯片——左键预览、右键在资源管理器揭示、Ctrl 点击强制系统打开。宿主端提供 /resolve /stat /info 只读回环路由(相对路径与裸文件名三源兜底、批量 stat + TTL 缓存),客户端零侵入、不改 React 节点、不接管 markdown 图片语法。解决「产物要打开得先复制路径再粘到文件管理器」的反复割裂。Zero telemetry; loopback-only routes. / Turn declared artifact paths into one-click chips: resident system-prompt rules force absolute paths, the client half renders file names as clickable chips (preview / reveal in Explorer / open with system app), and the host exposes loopback-only /resolve,/stat,/info routes with bare-filename fallback and cached batch stat.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|