dsh-linked-workspace 0.26.0 → 0.26.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/CHANGELOG.md +11 -0
- package/README.en.md +2 -2
- package/README.md +3 -2
- package/docs/VERIFY.md +3 -1
- package/lib/client.js +33 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
English · [简体中文](CHANGELOG.zh.md)
|
|
4
4
|
|
|
5
|
+
## 0.26.1 — 2026-11-24
|
|
6
|
+
|
|
7
|
+
- The remote candidates in the `@` menu now look and behave like DSH's own "Files & folders"
|
|
8
|
+
group: **an icon plus the bare name** (the extra detail line is gone), a folder carries the
|
|
9
|
+
"enter directory · Tab" hint, and pressing Tab (or clicking it) keeps the menu open, turns the
|
|
10
|
+
token into `@folder/` and lists that folder — you walk the tree level by level instead of
|
|
11
|
+
seeing one flattened list.
|
|
12
|
+
- Being able to descend also means the menu no longer needs to guess: every keystroke filters the
|
|
13
|
+
current directory, so the group answers in a few hundred milliseconds even when the remote
|
|
14
|
+
folder holds thousands of entries.
|
|
15
|
+
|
|
5
16
|
## 0.26.0 — 2026-11-24
|
|
6
17
|
|
|
7
18
|
- The `@` picker now knows which workspace a session belongs to: DSH hands the trigger
|
package/README.en.md
CHANGED
|
@@ -145,10 +145,10 @@ Every attempt — including refused ones — appends a line to `$DSH_HOME/linked
|
|
|
145
145
|
- The `references` action (backed by `fs.references`) matches **path names** case-insensitively with the best match first (exact name → prefix → substring) and directories flagged `dir`, so the model can turn a file name you mention into a real remote path.
|
|
146
146
|
- `@` in the composer still opens DSH's own menu (local files, folders, conversations). The plugin adds its own candidate groups to that menu:
|
|
147
147
|
- inside a linked or remote workspace a single **`@`** adds a “**Remote files & folders**” group (listed first) on top of DSH's own local suggestions — it lists the workspace's remote tree; picking one inserts a real reference chip, and the model receives that remote path;
|
|
148
|
-
-
|
|
148
|
+
- Rows look exactly like DSH's own "Files & folders" group: **an icon plus the bare name** (no detail line), and a folder carries an "**enter directory · Tab**" hint. Press `Tab` (or click the folder) → the menu stays open, the token becomes `@folder/` and that folder's contents are listed, so you can keep walking down level by level;
|
|
149
|
+
- You can still just type: `@co` filters by name and `@code/` jumps straight into the remote `code/` folder. Candidates are listed **one directory at a time** (through `fs.list`), so a remote with thousands of files still answers in a few hundred milliseconds;
|
|
149
150
|
- The context menu still copies addresses: **Copy relative address** / **Copy absolute address** give the path itself, without an `@` prefix.
|
|
150
151
|
- Content search gained two switches — “search usually ignored folders” (`node_modules`/`.venv`/`dist` included, `.git` always out) and “file names only” — plus a “Stop” button that cancels a running sweep; the scan stats (“Scanned N files · X”) appear above the results.
|
|
151
|
-
- At most 30 candidates per listing and hidden files are skipped; keep typing to narrow and descend, and use the sidebar tree when you want to browse.
|
|
152
152
|
- Group order: the plugin registers its trigger source with `order: -1` (DSH sorts sources by `order`, its own one uses the default 0), so “Remote files & folders” always comes first, then DSH's own “Files and folders” and “Conversations”. That second label belongs to the shell's `reference` locale namespace, so the plugin cannot rename it.
|
|
153
153
|
|
|
154
154
|
### Running icon / local skills
|
package/README.md
CHANGED
|
@@ -145,10 +145,11 @@
|
|
|
145
145
|
- `references` 动作(对应 `fs.references`)按**路径名**做大小写不敏感匹配,最佳匹配排在最前(完全同名 → 前缀 → 包含),目录带 `dir` 标记;模型可以用它把你口头提到的文件名解析成远端真实路径。
|
|
146
146
|
- 输入框里的 **`@`** 仍然是 DSH 原有的菜单(本地文件、文件夹、对话);插件往这个菜单里又加了一组自己的候选:
|
|
147
147
|
- 只要会话属于联动/远程工作区,单打一个 **`@`** 就会在 DSH 原生的本地候选之上,多出一组「**远程文件与文件夹**」(排在最前)——列出当前工作区远端树的文件与文件夹;选中后插入一个真正的引用 chip,模型收到的是该远端路径;
|
|
148
|
-
-
|
|
148
|
+
- 行样式与 DSH 自带的「文件与文件夹」一致:**只有图标和名字**(不再跟一条释义),目录行右侧带「**进入目录 · Tab**」提示。按 `Tab` 或直接点该目录 → 菜单不关闭、光标处的 token 变成 `@目录/`,并列出这个目录里的内容,可以一层层往下走;
|
|
149
|
+
- 也可以纯键盘打字:`@co` 按名字过滤,`@code/` 直接进到远端 `code/` 这一层。候选**每次只列一个目录**(走 `fs.list`),远端有几千个文件也是几百毫秒出结果,不会卡住菜单;
|
|
150
|
+
- 只列当前目录、最多 30 条、跳过隐藏文件;想整体浏览仍用右侧栏的目录树。
|
|
149
151
|
- 右键仍然是取地址:**复制相对地址** / **复制绝对地址** 给出的是路径本身,不带 `@` 前缀。
|
|
150
152
|
- 内容搜索多了两枚开关:「包含通常忽略的目录」(`node_modules`/`.venv`/`dist` 也会搜,`.git` 始终排除)、「只列文件名」;搜索中可以点「停止」中途取消,结果上方会显示「扫描 N 个文件 · X」。
|
|
151
|
-
- 每个候选最多 30 条、跳过隐藏文件;按 `Ctrl/⌘` 逐层打字即可下钻,想整体浏览仍用右侧栏目录树。
|
|
152
153
|
- 分组顺序:插件注册触发器时用 `order: -1`(DSH 按 `order` 升序排,它自己的 source 用默认 0),所以「远程文件与文件夹」总排在最前,其次是 DSH 原生的「文件与文件夹」「对话」。DSH 那组的标题归外壳的 `reference` 文案命名空间所有,插件无法改名。
|
|
153
154
|
|
|
154
155
|
### 运行中图标 / 本地技能
|
package/docs/VERIFY.md
CHANGED
|
@@ -36,12 +36,14 @@ Host code (lib/) reloads live with `plugin_manager set_plugin include:linked-wor
|
|
|
36
36
|
9. 会话属于联动/远程工作区时,输入框单打一个 **`@`** → 菜单里除了 DSH 原生的「文件与文件夹」「对话」,还有一组「**远程文件与文件夹**」,并且排在 DSH 自己那两组之前(插件用 `order: -1`,DSH 自己的 source 用默认 0)。DSH 那组仍叫「文件与文件夹」——它属于外壳 `reference` 文案命名空间,重复注册会抛错,插件改不了。
|
|
37
37
|
10. 继续打字过滤:`@co` → 只剩匹配项(如 `.conda/`、`code/`);写到目录名再加 `/`(如 `@code/`)→ 列出该目录里的内容(每次只列一个目录,几百毫秒返回,远端几千个文件也不卡菜单)。
|
|
38
38
|
11. 选中任一远端候选 → 输入框出现真正的引用 chip(`data-composer-chip="linked-workspace"`,悬停显示相对路径),发送后模型收到该远端路径。
|
|
39
|
+
|
|
39
40
|
12. 接口自检:`linked.sessionScope { sessionId }` → `{ scope: { linkedId | remoteId, root, cwd } }`;会话 id 带不带 `session-` 前缀都能解析;不属于任何联动/远程工作区时返回 `{ scope: null }`,此时 `@` 只剩 DSH 原生分组。
|
|
40
|
-
14. 文件标签跨刷新与重启:打开「联动工作区目录」,点开两个文件(出现两个文件标签,记住当前标签)→ 刷新页面 → 两个标签与当前标签都恢复;再把 DSH(或 Web 实例的 Host 进程)整个重启,重新打开目录标签 → 标签依旧在。`localStorage` 里键为 `dsh-linked-workspace:pane-tabs`,每面板最多 24 个标签、最多记 12 个面板;关掉全部标签后该面板的记录会被删除。
|
|
41
41
|
|
|
42
42
|
13. 面板不被轮询冲掉:在会话里打开右侧「联动工作区目录」,展开两层目录并点开一个文件(出现文件标签),然后闲置 50 秒以上 → 文件标签仍在、展开状态不变;期间会话快照短暂缺少 cwd 时两个目录标签也不会被注销(旧实现会 dispose 后重建,正在看的文件随之关闭)。
|
|
43
43
|
|
|
44
|
+
14. 文件标签跨刷新与重启:打开「联动工作区目录」,点开两个文件(出现两个文件标签,记住当前标签)→ 刷新页面 → 两个标签与当前标签都恢复;再把 DSH(或 Web 实例的 Host 进程)整个重启,重新打开目录标签 → 标签依旧在。`localStorage` 里键为 `dsh-linked-workspace:pane-tabs`,每面板最多 24 个标签、最多记 12 个面板;关掉全部标签后该面板的记录会被删除。
|
|
44
45
|
|
|
46
|
+
15. 远程组的行样式与下钻:单打 `@` →「远程文件与文件夹」每行只有图标 + 名字(没有整条相对路径的释义),目录行右侧出现「进入目录 · Tab」提示;对目录按 **Tab**(或点该行)→ 菜单不关闭、token 变成 `@目录/` 并列出该目录内容(可再按 Tab 继续下钻);点文件 → 插入引用 chip、菜单关闭。实测:`@` → Tab → `@r4/`(列出 `sub/`、`content-needle.txt`、`demo.html`…)→ 再 Tab → `@r4/sub/`(列出 `inner.txt`)→ 点 `inner.txt` → chip `inner.txt`。
|
|
45
47
|
## 远端命令执行(0.17.0)
|
|
46
48
|
|
|
47
49
|
> 注意:本机这套 DSH **Web** 构建里没有可见的设置入口(账号菜单只有「意见反馈 / 退出登录」,`Ctrl+K` 是会话搜索,插件详情页只有「卸载」),所以设置区块的渲染要在**桌面端**确认;Host 侧行为可以直接用下面的 API 命令验证。
|
package/lib/client.js
CHANGED
|
@@ -12616,34 +12616,53 @@ function rememberShowHidden(value) {
|
|
|
12616
12616
|
if (needle !== '' && name.toLowerCase().indexOf(needle) < 0) continue;
|
|
12617
12617
|
var isDir = entry.type === 'dir';
|
|
12618
12618
|
var relative = String(entry.relative || (dirPart === '' ? name : dirPart.replace(/\/+$/, '') + '/' + name));
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12619
|
+
var mention = mentionRefFor(relative, isDir);
|
|
12620
|
+
if (!mention) continue;
|
|
12621
|
+
// Same shape as DSH's own file source: name carries the trailing
|
|
12622
|
+
// slash for folders, "drill" makes the row open the folder instead
|
|
12623
|
+
// of inserting it, and no description is rendered (the menu shows
|
|
12624
|
+
// the icon plus the bare name, exactly like "文件与文件夹").
|
|
12625
|
+
out.push(Object.assign({
|
|
12626
|
+
name: isDir ? name + '/' : name,
|
|
12623
12627
|
icon: isDir ? 'folder' : 'file',
|
|
12624
12628
|
section: t('remoteRefSection'),
|
|
12625
|
-
|
|
12629
|
+
value: JSON.stringify({ kind: 'file', fileKind: isDir ? 'directory' : 'file', label: name, mention: mention }),
|
|
12630
|
+
}, isDir ? { drill: true } : {}));
|
|
12626
12631
|
}
|
|
12627
12632
|
return out;
|
|
12628
12633
|
});
|
|
12629
12634
|
});
|
|
12630
12635
|
}
|
|
12631
12636
|
|
|
12637
|
+
function candidateValue(candidate) {
|
|
12638
|
+
try {
|
|
12639
|
+
var parsed = JSON.parse(String((candidate && candidate.value) || ''));
|
|
12640
|
+
if (parsed && parsed.kind === 'file' && typeof parsed.mention === 'string' && parsed.mention !== '') return parsed;
|
|
12641
|
+
} catch (error) { /* fall through to the name-based path */ }
|
|
12642
|
+
return null;
|
|
12643
|
+
}
|
|
12644
|
+
|
|
12632
12645
|
function onPick(pick) {
|
|
12633
12646
|
var candidate = (pick && pick.candidate) || {};
|
|
12634
|
-
var
|
|
12635
|
-
|
|
12636
|
-
var
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
var
|
|
12647
|
+
var value = candidateValue(candidate);
|
|
12648
|
+
var isDir = value ? value.fileKind === 'directory' : candidate.icon === 'folder';
|
|
12649
|
+
var label = value && typeof value.label === 'string' && value.label !== ''
|
|
12650
|
+
? value.label
|
|
12651
|
+
: String(candidate.name || '').replace(/\/+$/, '').split('/').pop();
|
|
12652
|
+
var mention = value ? value.mention : mentionRefFor(String(candidate.name || ''), isDir);
|
|
12653
|
+
if (!mention) return undefined;
|
|
12654
|
+
// Tab (and clicking) on a folder walks INTO it, mirroring DSH's own file
|
|
12655
|
+
// group: the token becomes "@dir/" and the menu stays open.
|
|
12656
|
+
if (isDir && pick && pick.action === 'drill') {
|
|
12657
|
+
return { text: mention, continue: true };
|
|
12658
|
+
}
|
|
12640
12659
|
return {
|
|
12641
12660
|
insert: {
|
|
12642
12661
|
source: 'linked-workspace',
|
|
12643
|
-
ref:
|
|
12644
|
-
label: label ||
|
|
12662
|
+
ref: mention,
|
|
12663
|
+
label: isDir ? (label || mention) + '/' : (label || mention),
|
|
12645
12664
|
appearance: isDir ? 'folder' : 'file',
|
|
12646
|
-
clipboardText:
|
|
12665
|
+
clipboardText: mention,
|
|
12647
12666
|
},
|
|
12648
12667
|
};
|
|
12649
12668
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-linked-workspace",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Linked local ⇄ remote workspaces and remote workspaces for DeepSeek Harness: theme-aware split editor, file-type icons, and agent tools that edit remote files directly.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|