dsh-linked-workspace 0.6.0 → 0.6.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 +5 -0
- package/README.en.md +4 -2
- package/docs/VERIFY.md +12 -0
- package/lib/client.js +37 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.1 — 2026-11-05
|
|
4
|
+
|
|
5
|
+
- Fixed the linked-workspace directory tab disappearing for a new or blank linked-workspace session: the client session store is now consulted for cwd/workspaceId before falling back to session.info, so the tab and the start-page option are registered immediately when the workspace session opens.
|
|
6
|
+
- Availability also matches the linked record workspaceId, not only the local path.
|
|
7
|
+
|
|
3
8
|
## 0.6.0 — 2026-11-05
|
|
4
9
|
|
|
5
10
|
- **Document editing in the content panel** for Markdown, PDF, DOCX, XLSX and PPTX, on both local and remote files.
|
package/README.en.md
CHANGED
|
@@ -90,8 +90,6 @@ The remote side is not modified by mirroring. The `linked_workspace` tool suppor
|
|
|
90
90
|
|
|
91
91
|
[](https://github.com/jiahui-huang1/dsh-linked-workspace/blob/main/docs/screenshots/file-editor.png)
|
|
92
92
|
|
|
93
|
-
[](https://github.com/jiahui-huang1/dsh-linked-workspace/blob/main/docs/screenshots/remote-readonly-view.png)
|
|
94
|
-
|
|
95
93
|
## Installation
|
|
96
94
|
|
|
97
95
|
```bash
|
|
@@ -117,6 +115,10 @@ Old “Remote directories” tabs are restored after refresh through hidden lega
|
|
|
117
115
|
|
|
118
116
|
See [CHANGELOG.md](CHANGELOG.md) for the full version history.
|
|
119
117
|
|
|
118
|
+
### 0.6.1
|
|
119
|
+
|
|
120
|
+
Fix the linked-workspace directory tab and start-page entry disappearing in a new blank linked-workspace session by consulting the client session store for cwd and workspaceId first.
|
|
121
|
+
|
|
120
122
|
### 0.5.13
|
|
121
123
|
|
|
122
124
|
The directory panel divider is draggable (double-click resets to 300 px; width persists). The local tree refreshes silently every 4 seconds and on window focus, so new local subdirectories appear without a manual refresh.
|
package/docs/VERIFY.md
CHANGED
|
@@ -97,3 +97,15 @@ Host code (lib/) reloads live with `plugin_manager set_plugin include:linked-wor
|
|
|
97
97
|
- SSH Tunnel 面板、其他 better-sidebar 标签、旧 `@goodandready` 的 remote_* 工具仍可用。
|
|
98
98
|
- 安装过程中若再次出现 pnpm 清理旧包,确认 `@goodandready/dsh-remote-workspace` 仍在 profile 依赖中。
|
|
99
99
|
- 普通(非联动)工作区的行图标仍是文件夹,右侧栏旧文件标签/编辑器不受影响。
|
|
100
|
+
|
|
101
|
+
## 文档编辑
|
|
102
|
+
|
|
103
|
+
1. 在目录右键「新建文件」输入 `demo.md` / `demo.docx` / `demo.xlsx` / `demo.pptx` / `demo.pdf`,应创建对应空白文档并在内容面板打开。
|
|
104
|
+
2. Markdown:编辑文本 → 保存 → 预览 → 导出 PDF;导出的 PDF 与 Markdown 同目录,中文正常。
|
|
105
|
+
3. DOCX:修改段落/表格文字 → 保存 → 重新打开内容仍在。
|
|
106
|
+
4. XLSX:切换工作表、修改单元格 → 保存 → 重新打开值仍在。
|
|
107
|
+
5. PPTX:切换幻灯片、修改文本框 → 保存 → 重新打开文字仍在。
|
|
108
|
+
6. PDF:翻页、旋转/删除页面、修改标题/作者 → 保存 → 重新打开生效。
|
|
109
|
+
7. 以上操作在本地目录与远端(联动工作区)文件上都应可用;Office/PDF 需要 Python 3 + python-docx/openpyxl/python-pptx/PyMuPDF。
|
|
110
|
+
|
|
111
|
+
- 新建一个空白联动工作区会话:右侧栏开始页应出现「联动工作区目录」,打开后目录面板正常显示。
|
package/lib/client.js
CHANGED
|
@@ -1838,6 +1838,7 @@ function fileIconSpec(name, isDir) {
|
|
|
1838
1838
|
var TREE_TAB_TYPE = 'dsh-linked-workspace';
|
|
1839
1839
|
var REMOTE_TAB_TYPE = 'dsh-linked-workspace:remote';
|
|
1840
1840
|
var linkedLocalKeys = new Set();
|
|
1841
|
+
var linkedWorkspaceKeys = new Set();
|
|
1841
1842
|
var hasRemoteDirectories = false;
|
|
1842
1843
|
var linkedTabDisposer = null;
|
|
1843
1844
|
var remoteTabDisposer = null;
|
|
@@ -1847,6 +1848,10 @@ function fileIconSpec(name, isDir) {
|
|
|
1847
1848
|
return String(cwd || '').replace(/\\/g, '/').replace(/\/+$/, '').toLowerCase();
|
|
1848
1849
|
}
|
|
1849
1850
|
|
|
1851
|
+
function isLinkedWorkspaceId(workspaceId) {
|
|
1852
|
+
return Boolean(workspaceId) && linkedWorkspaceKeys.has(String(workspaceId));
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1850
1855
|
function isLinkedScope(scope) {
|
|
1851
1856
|
var key = linkedScopeKey(scope && scope.cwd);
|
|
1852
1857
|
if (!key) return false;
|
|
@@ -1866,8 +1871,14 @@ function fileIconSpec(name, isDir) {
|
|
|
1866
1871
|
|
|
1867
1872
|
function rememberDirectoryAvailability(links, workspaces) {
|
|
1868
1873
|
var next = new Set();
|
|
1869
|
-
|
|
1874
|
+
var workspaceKeys = new Set();
|
|
1875
|
+
(links || []).forEach(function (link) {
|
|
1876
|
+
var key = linkedScopeKey(link.localPath);
|
|
1877
|
+
if (key) next.add(key);
|
|
1878
|
+
if (link.workspaceId) workspaceKeys.add(String(link.workspaceId));
|
|
1879
|
+
});
|
|
1870
1880
|
linkedLocalKeys = next;
|
|
1881
|
+
linkedWorkspaceKeys = workspaceKeys;
|
|
1871
1882
|
hasRemoteDirectories = Array.isArray(workspaces) && workspaces.length > 0;
|
|
1872
1883
|
}
|
|
1873
1884
|
|
|
@@ -6606,6 +6617,25 @@ function fileIconSpec(name, isDir) {
|
|
|
6606
6617
|
remoteTabDisposer = null;
|
|
6607
6618
|
}
|
|
6608
6619
|
|
|
6620
|
+
function activeSessionClientInfo(sessionId) {
|
|
6621
|
+
if (!sessionId) return null;
|
|
6622
|
+
try {
|
|
6623
|
+
var sessions = ctx.sessions || (ctx.get && ctx.get('sessions'));
|
|
6624
|
+
var list = sessions && sessions.list;
|
|
6625
|
+
var snapshot = list && typeof list.getSnapshot === 'function' ? list.getSnapshot() : null;
|
|
6626
|
+
var record = snapshot && snapshot.byId ? snapshot.byId[sessionId] : null;
|
|
6627
|
+
if (!record) return null;
|
|
6628
|
+
var header = record.header || record;
|
|
6629
|
+
return { cwd: header.cwd || record.cwd || '', workspaceId: header.workspaceId || record.workspaceId || '' };
|
|
6630
|
+
} catch (error) {
|
|
6631
|
+
return null;
|
|
6632
|
+
}
|
|
6633
|
+
}
|
|
6634
|
+
|
|
6635
|
+
function isLinkedSessionInfo(info) {
|
|
6636
|
+
return Boolean(info && ((info.cwd && isLinkedScope({ cwd: info.cwd })) || isLinkedWorkspaceId(info.workspaceId)));
|
|
6637
|
+
}
|
|
6638
|
+
|
|
6609
6639
|
function syncDirectoryTabs() {
|
|
6610
6640
|
if (syncDirectoryTabsInFlight) return;
|
|
6611
6641
|
syncDirectoryTabsInFlight = true;
|
|
@@ -6618,8 +6648,13 @@ function fileIconSpec(name, isDir) {
|
|
|
6618
6648
|
disposeLinkedTab();
|
|
6619
6649
|
return undefined;
|
|
6620
6650
|
}
|
|
6651
|
+
var clientInfo = activeSessionClientInfo(sessionId);
|
|
6652
|
+
if (isLinkedSessionInfo(clientInfo)) {
|
|
6653
|
+
installLinkedTab();
|
|
6654
|
+
return undefined;
|
|
6655
|
+
}
|
|
6621
6656
|
return apiCall('session.info', { sessionId: sessionId }).then(function (info) {
|
|
6622
|
-
if (
|
|
6657
|
+
if (isLinkedSessionInfo(info)) installLinkedTab();
|
|
6623
6658
|
else disposeLinkedTab();
|
|
6624
6659
|
}).catch(function () { disposeLinkedTab(); });
|
|
6625
6660
|
}).catch(function () { /* ignore */ }).then(function () { syncDirectoryTabsInFlight = false; });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-linked-workspace",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Linked local ⇄ remote workspaces and SSH-backed remote directories for DeepSeek Harness: theme-aware split editor, file-type icons, and an agent tool that edits remote files directly.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|