dsh-remote-vs 0.24.0 → 0.26.0
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/README.en.md +50 -16
- package/README.md +40 -15
- package/THIRD-PARTY-NOTICES.md +188 -0
- package/lib/client.js +6512 -77887
- package/lib/index.js +1461 -1024
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/client/CodeEditor.d.ts +25 -0
- package/lib/types/client/EditorPane.d.ts +16 -5
- package/lib/types/client/FloatingPlaceholder.d.ts +16 -5
- package/lib/types/client/RemoteEditorView.d.ts +13 -10
- package/lib/types/client/RemoteExplorer.d.ts +53 -0
- package/lib/types/client/RemoteRoot.d.ts +5 -5
- package/lib/types/client/TerminalSnippets.d.ts +36 -0
- package/lib/types/client/TerminalView.d.ts +1 -1
- package/lib/types/client/XTerm.d.ts +33 -0
- package/lib/types/client/api.d.ts +37 -2
- package/lib/types/client/changes/review-state.d.ts +19 -0
- package/lib/types/client/connection.d.ts +16 -0
- package/lib/types/client/editor-capability.d.ts +27 -0
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/client/request-gate.d.ts +110 -0
- package/lib/types/client/scm/DiffView.d.ts +45 -7
- package/lib/types/client/scm/actions.d.ts +31 -3
- package/lib/types/client/store.d.ts +112 -4
- package/lib/types/client/terminal-input.d.ts +23 -0
- package/lib/types/client/terminal-snippets.d.ts +86 -0
- package/lib/types/client/vsc/FindWidget.d.ts +6 -0
- package/lib/types/client/vsc/breadcrumb.d.ts +30 -0
- package/lib/types/client/vsc/change-marks.d.ts +16 -6
- package/lib/types/client/vsc/editor-caret.d.ts +32 -0
- package/lib/types/client/vsc/editor-keymap.d.ts +35 -1
- package/lib/types/client/vsc/editor-langs.d.ts +9 -0
- package/lib/types/client/vsc/editor-settings.d.ts +55 -0
- package/lib/types/client/vsc/image-preview.d.ts +36 -0
- package/lib/types/client/vsc/kit.d.ts +13 -0
- package/lib/types/client/vsc/save-shortcut.d.ts +21 -0
- package/lib/types/client/vsc/terminal-clipboard.d.ts +15 -0
- package/lib/types/client/vsc/terminal-line.d.ts +25 -0
- package/lib/types/client/vsc/terminal-links.d.ts +62 -0
- package/lib/types/client/vsc/terminal-theme.d.ts +48 -0
- package/lib/types/client/vsc/terminal-writer.d.ts +52 -0
- package/lib/types/forward.d.ts +12 -0
- package/lib/types/fs-ops.d.ts +42 -0
- package/lib/types/http.d.ts +2 -0
- package/lib/types/keygen.d.ts +9 -0
- package/lib/types/monitor.d.ts +8 -0
- package/lib/types/notices.d.ts +16 -1
- package/lib/types/p2/helper-rpc.d.ts +45 -0
- package/lib/types/pool.d.ts +25 -0
- package/lib/types/routes.d.ts +2 -0
- package/lib/types/store.d.ts +7 -0
- package/lib/types/terminal.d.ts +33 -1
- package/lib/types/view-settings.d.ts +5 -0
- package/lib/{worlds-B7gEDBzC.js → worlds-RG8K5eom.js} +113 -15
- package/package.json +2 -1
- package/src/client/CodeEditor.tsx +205 -10
- package/src/client/DirectoryFlow.tsx +16 -0
- package/src/client/DoctorPanel.tsx +70 -7
- package/src/client/EditorPane.tsx +545 -118
- package/src/client/FloatingPlaceholder.tsx +34 -5
- package/src/client/HostsView.tsx +12 -3
- package/src/client/RemoteDirectoryPicker.tsx +12 -0
- package/src/client/RemoteEditorView.tsx +14 -11
- package/src/client/RemoteExplorer.tsx +929 -40
- package/src/client/RemoteRoot.tsx +167 -147
- package/src/client/SearchView.tsx +8 -0
- package/src/client/TerminalSnippets.tsx +432 -0
- package/src/client/TerminalView.tsx +50 -1
- package/src/client/XTerm.tsx +228 -58
- package/src/client/api.ts +106 -13
- package/src/client/auto-open-remote.ts +11 -9
- package/src/client/changes/ChangesDock.tsx +188 -6
- package/src/client/changes/changes.css +10 -3
- package/src/client/changes/review-state.ts +34 -0
- package/src/client/connection.ts +29 -0
- package/src/client/downloads.ts +49 -4
- package/src/client/editor-capability.ts +42 -0
- package/src/client/i18n.ts +228 -12
- package/src/client/index.tsx +22 -6
- package/src/client/request-gate.ts +221 -0
- package/src/client/scm/CommitPane.tsx +20 -2
- package/src/client/scm/DiffView.tsx +343 -117
- package/src/client/scm/HistoryPanel.tsx +23 -2
- package/src/client/scm/RepoPicker.tsx +1 -1
- package/src/client/scm/ScmPanel.tsx +391 -87
- package/src/client/scm/actions.ts +95 -12
- package/src/client/store.tsx +537 -22
- package/src/client/terminal-input.ts +44 -0
- package/src/client/terminal-snippets.ts +216 -0
- package/src/client/ui.tsx +4 -0
- package/src/client/vsc/FindWidget.tsx +24 -9
- package/src/client/vsc/breadcrumb.tsx +339 -0
- package/src/client/vsc/change-marks.ts +93 -44
- package/src/client/vsc/editor-caret.ts +30 -0
- package/src/client/vsc/editor-keymap.ts +59 -1
- package/src/client/vsc/editor-langs.ts +20 -0
- package/src/client/vsc/editor-settings.ts +146 -0
- package/src/client/vsc/editor-theme.ts +4 -5
- package/src/client/vsc/file-icons.tsx +17 -3
- package/src/client/vsc/image-preview.tsx +110 -0
- package/src/client/vsc/kit.tsx +46 -10
- package/src/client/vsc/save-shortcut.ts +47 -1
- package/src/client/vsc/terminal-clipboard.ts +19 -0
- package/src/client/vsc/terminal-line.ts +101 -0
- package/src/client/vsc/terminal-links.ts +166 -0
- package/src/client/vsc/terminal-theme.ts +97 -0
- package/src/client/vsc/terminal-writer.ts +112 -0
- package/src/client/vsc/vsc.css +1078 -181
- package/src/forward.ts +47 -9
- package/src/fs-ops.ts +124 -4
- package/src/git-ops.ts +20 -3
- package/src/http.ts +35 -4
- package/src/keygen.ts +55 -4
- package/src/monitor.ts +13 -0
- package/src/notices.ts +23 -1
- package/src/p2/helper-rpc.ts +113 -7
- package/src/p2/worlds.ts +14 -1
- package/src/pool.ts +99 -27
- package/src/routes.ts +212 -43
- package/src/sftp.ts +51 -14
- package/src/store.ts +10 -0
- package/src/terminal.ts +225 -24
- package/src/view-settings.ts +50 -10
- package/lib/types/client/Dialog.d.ts +0 -14
- package/src/client/Dialog.tsx +0 -76
package/src/client/i18n.ts
CHANGED
|
@@ -70,6 +70,20 @@ export const DYNAMIC_KEYS = [
|
|
|
70
70
|
'doctor.item.memory',
|
|
71
71
|
'doctor.item.helpers',
|
|
72
72
|
'doctor.item.sshd',
|
|
73
|
+
// Reached through the `fallback` wrappers in the ported editor chrome
|
|
74
|
+
// (`vsc/breadcrumb.tsx` / `vsc/image-preview.tsx`): the call site reads the
|
|
75
|
+
// dictionary value, or the inline English when the dictionary lacks it, so no
|
|
76
|
+
// literal translator call exists for the scanner to see. One block per
|
|
77
|
+
// component.
|
|
78
|
+
'editor.crumbRoot',
|
|
79
|
+
'editor.crumbLabel',
|
|
80
|
+
'editor.crumbUp',
|
|
81
|
+
'editor.crumbEmpty',
|
|
82
|
+
'editor.imageHint',
|
|
83
|
+
'editor.imageFitHint',
|
|
84
|
+
'editor.imageFailedHint',
|
|
85
|
+
'editor.imageTooLargeTitle',
|
|
86
|
+
'editor.imageTooLargeHint',
|
|
73
87
|
] as const
|
|
74
88
|
|
|
75
89
|
const zh: Record<string, string> = {
|
|
@@ -196,6 +210,9 @@ const zh: Record<string, string> = {
|
|
|
196
210
|
'files.referenceFile': '@文件',
|
|
197
211
|
'files.addToConversation': '添加到对话',
|
|
198
212
|
'editor.save': '保存',
|
|
213
|
+
'editor.gotoLine': '转到行',
|
|
214
|
+
'editor.gotoLineText': '跳转到行(共 {total} 行):',
|
|
215
|
+
'editor.gotoLineInvalid': '行号无效',
|
|
199
216
|
'editor.saving': '保存中…',
|
|
200
217
|
'editor.saved': '已保存',
|
|
201
218
|
'editor.unsaved': '● 未保存',
|
|
@@ -212,6 +229,25 @@ const zh: Record<string, string> = {
|
|
|
212
229
|
'term.copy': '复制',
|
|
213
230
|
'term.paste': '粘贴',
|
|
214
231
|
'term.selectAll': '全选',
|
|
232
|
+
'term.pathMissing': '终端里的这个路径在远端不存在,无法在目录中定位。',
|
|
233
|
+
'term.pathOutside': '这个路径不在任何远端工作区内,目录树里没有它的位置。',
|
|
234
|
+
'term.pathBlocked': '有未保存的编辑器标签:切换工作区会关闭它们,先处理再跳转。',
|
|
235
|
+
'term.snippets': '常用指令',
|
|
236
|
+
'term.snippetAdd': '新增常用指令',
|
|
237
|
+
'term.snippetEdit': '修改常用指令',
|
|
238
|
+
'term.snippetDelete': '删除',
|
|
239
|
+
'term.snippetDeleteTitle': '删除这条常用指令?',
|
|
240
|
+
'term.snippetName': '指令名',
|
|
241
|
+
'term.snippetNamePlaceholder': '例如:推送 master',
|
|
242
|
+
'term.snippetCommand': '指令内容',
|
|
243
|
+
'term.snippetCommandPlaceholder': '例如:git push origin master',
|
|
244
|
+
'term.snippetEmpty': '还没有常用指令:点「+」或按 Ctrl+B 新增。',
|
|
245
|
+
'term.snippetInsertHint': '点一下粘贴到终端命令行(不发送)',
|
|
246
|
+
'term.snippetFootHint': '点条目粘贴(不发送)· 拖拽排序 · Ctrl+B 新增',
|
|
247
|
+
'term.snippetDragHint': '拖拽调整顺序(Alt+↑/↓ 也可)',
|
|
248
|
+
'term.snippetNameRequired': '指令名不能为空。',
|
|
249
|
+
'term.snippetCommandRequired': '指令内容不能为空。',
|
|
250
|
+
'term.snippetNoTerminal': '当前没有已连接的终端,先新建一个终端。',
|
|
215
251
|
'term.noHosts': '还没有主机,请先去「设置 → 远程主机」配置。',
|
|
216
252
|
'tab.git': 'Git',
|
|
217
253
|
'git.hint': '请选择远端路径为 git 仓库的工作区。',
|
|
@@ -225,6 +261,7 @@ const zh: Record<string, string> = {
|
|
|
225
261
|
'common.loading': '加载中…',
|
|
226
262
|
'common.ok': '确定',
|
|
227
263
|
'common.cancel': '取消',
|
|
264
|
+
'common.save': '保存',
|
|
228
265
|
'flow.title': '添加工作区',
|
|
229
266
|
'flow.local': '本地',
|
|
230
267
|
'flow.remote': '远程',
|
|
@@ -235,7 +272,7 @@ const zh: Record<string, string> = {
|
|
|
235
272
|
'flow.mkdir': '新建文件夹',
|
|
236
273
|
'flow.mkdirName': '文件夹名',
|
|
237
274
|
'flow.create': '创建',
|
|
238
|
-
'flow.noHosts': '还没有主机。先去「设置 →
|
|
275
|
+
'flow.noHosts': '还没有主机。先去「设置 → 远程主机」配置,再回来添加远程工作区。',
|
|
239
276
|
'flow.retry': '重试',
|
|
240
277
|
'flow.truncated': '条目过多,仅显示前一部分。',
|
|
241
278
|
'route.mode': '路由模式',
|
|
@@ -265,10 +302,14 @@ const zh: Record<string, string> = {
|
|
|
265
302
|
'files.created': '已创建',
|
|
266
303
|
'files.renamed': '已重命名',
|
|
267
304
|
'files.deleted': '已删除',
|
|
305
|
+
'files.openInTerminal': '在终端中打开',
|
|
268
306
|
'files.items': '个项目',
|
|
269
307
|
'files.deleteTitle': '删除',
|
|
270
308
|
'files.delete': '删除',
|
|
271
309
|
'files.deleteConfirm': '确定删除 {target} 吗?此操作在远端不可撤销。',
|
|
310
|
+
'files.deleting': '删除中 {done}/{total} · {name}',
|
|
311
|
+
'files.deleteCancel': '取消删除',
|
|
312
|
+
'files.deleteCancelled': '已取消删除:已删除 {removed} 项,{left} 项未处理。',
|
|
272
313
|
'files.open': '打开',
|
|
273
314
|
'files.openAsText': '以文本打开',
|
|
274
315
|
'files.openInFloat': '在悬浮编辑器中打开',
|
|
@@ -286,6 +327,11 @@ const zh: Record<string, string> = {
|
|
|
286
327
|
'float.placeholderHint': '编辑器只有一份实例,已浮出到窗口中央;关闭悬浮窗或点「停靠」后回到这里。',
|
|
287
328
|
'float.dockBack': '停靠回主界面',
|
|
288
329
|
'float.unavailable': '当前宿主没有全帧悬浮层(shell.overlay),悬浮编辑器不可用。',
|
|
330
|
+
'float.dockedElsewhere': '远程编辑器已停靠在侧边栏',
|
|
331
|
+
'float.dockedElsewhereHint': '编辑器只有一份实例,当前在侧边栏里;点下面的按钮把它移到这里全宽显示。',
|
|
332
|
+
'float.openHere': '在这里全宽打开',
|
|
333
|
+
'float.centerElsewhere': '远程编辑器在会话区全宽显示',
|
|
334
|
+
'float.centerElsewhereHint': '编辑器只有一份实例,当前在会话区的「远程编辑器」标签里;点下面的按钮把它收回侧边栏。',
|
|
289
335
|
'files.rename': '重命名',
|
|
290
336
|
'files.copy': '复制',
|
|
291
337
|
'files.cut': '剪切',
|
|
@@ -353,7 +399,7 @@ const zh: Record<string, string> = {
|
|
|
353
399
|
'scm.commit': '提交',
|
|
354
400
|
'scm.committing': '提交中',
|
|
355
401
|
'scm.commitPlaceholder': '提交变更内容(Ctrl+Enter 提交)',
|
|
356
|
-
'scm.commitHint': '
|
|
402
|
+
'scm.commitHint': '先暂存更改,再提交(提交框内按 Ctrl+Enter 可直接提交)',
|
|
357
403
|
'scm.commitNeedsStage': '还没有暂存的更改 — 先点击 + 暂存文件。',
|
|
358
404
|
'scm.amend': '修改上次提交信息',
|
|
359
405
|
'scm.amendTitle': '修改上次提交',
|
|
@@ -436,6 +482,17 @@ const zh: Record<string, string> = {
|
|
|
436
482
|
'scm.syncText': '将执行 git pull 然后 git push。',
|
|
437
483
|
'scm.syncDone': '同步完成',
|
|
438
484
|
'scm.branches': '分支',
|
|
485
|
+
'scm.initRepo': '初始化仓库',
|
|
486
|
+
'scm.initRepoText': '将在 {path} 初始化一个 Git 仓库。',
|
|
487
|
+
'scm.initRepoDone': '仓库已初始化',
|
|
488
|
+
'scm.renameBranch': '重命名分支',
|
|
489
|
+
'scm.renameBranchText': '将分支 {branch} 重命名为:',
|
|
490
|
+
'scm.renameBranchInvalid': '分支名不能为空或与原分支相同',
|
|
491
|
+
'scm.renameBranchDone': '分支已重命名',
|
|
492
|
+
'scm.setRemoteUrl': '修改远程 URL',
|
|
493
|
+
'scm.setRemoteUrlText': '修改远程 {name} 的 URL:',
|
|
494
|
+
'scm.remoteUrlEmpty': '远程 URL 不能为空',
|
|
495
|
+
'scm.setRemoteUrlDone': '远程 URL 已更新',
|
|
439
496
|
'scm.remotes': '远程',
|
|
440
497
|
'scm.newBranch': '新分支名',
|
|
441
498
|
'scm.create': '创建',
|
|
@@ -533,14 +590,11 @@ const zh: Record<string, string> = {
|
|
|
533
590
|
'history.expand': '展开详情面板',
|
|
534
591
|
'history.restore': '还原列表布局',
|
|
535
592
|
'history.diffToolbar': '补丁工具',
|
|
536
|
-
'editor.empty': '没有打开的文件。在资源管理器里双击文件,或在源代码管理里点击更改。',
|
|
537
|
-
'editor.saveHint': '保存',
|
|
538
593
|
'editor.preview': '预览',
|
|
539
594
|
'editor.source': '源码',
|
|
540
595
|
'editor.imageFailed': '图片读取失败。',
|
|
541
596
|
'editor.closeDirty': '有未保存的修改',
|
|
542
597
|
'editor.discardClose': '放弃并关闭',
|
|
543
|
-
'editor.resizeHint': '拖拽调整面板 / 编辑器占比',
|
|
544
598
|
'editor.openedIn': '已在顶部标签打开:',
|
|
545
599
|
'editor.readTimeout': '读取超时(远端无响应)',
|
|
546
600
|
'editor.conflictTitle': '远端文件已变更,已阻止覆盖',
|
|
@@ -565,9 +619,63 @@ const zh: Record<string, string> = {
|
|
|
565
619
|
'editor.discardSwitch': '放弃修改并切换',
|
|
566
620
|
'editor.switchTimeout': '等待切换确认超时,已取消本次切换(未保存的修改仍在);请重新选择工作区。',
|
|
567
621
|
'editor.truncatedReadOnly': '文件超过可编辑上限(8MiB),只读呈现,不能保存。',
|
|
622
|
+
'editor.tabsLabel': '打开的编辑器',
|
|
623
|
+
'editor.diffSuffix': '(差异)',
|
|
624
|
+
'editor.wrap': '自动换行',
|
|
625
|
+
'editor.fontSmaller': '减小字号(Ctrl+滚轮)',
|
|
626
|
+
'editor.fontLarger': '增大字号(Ctrl+滚轮)',
|
|
627
|
+
'editor.openInCenter': '在会话区全宽打开',
|
|
628
|
+
'editor.dockToSidebar': '收回侧边栏',
|
|
629
|
+
'editor.binaryTitle': '二进制文件',
|
|
630
|
+
'editor.dockEmptyTitle': '编辑器',
|
|
631
|
+
'editor.dockEmptyHint': '从资源管理器或搜索结果中打开一个文件',
|
|
632
|
+
'editor.centerEmptyTitle': '远程编辑器',
|
|
633
|
+
'editor.centerEmptyHint': '从侧边栏的「资源管理器」或「搜索」打开一个文件,它会在这里全宽显示。',
|
|
634
|
+
'editor.emptyShortcuts': 'Ctrl+S 保存 · Ctrl+F 查找 · Ctrl+P 快速打开 · Ctrl+滚轮缩放字号',
|
|
635
|
+
'editor.statusSaving': '保存中…',
|
|
636
|
+
'editor.statusClean': '已保存',
|
|
637
|
+
'editor.statusLanguage': '语言',
|
|
638
|
+
'editor.statusPosition': '行:列(1-based)',
|
|
639
|
+
'editor.statusPositionValue': '行 {line},列 {column}',
|
|
640
|
+
'editor.statusSelected': '已选字符数',
|
|
641
|
+
'editor.statusSelectedValue': '已选 {count}',
|
|
642
|
+
'editor.statusIndent': '缩进(按文件内容推测)',
|
|
643
|
+
'editor.statusReadOnly': '只读',
|
|
644
|
+
'editor.statusReadOnlyTitle': '只读(二进制、文件过大或连接断开)',
|
|
645
|
+
'editor.statusWrapOn': '自动换行:开',
|
|
646
|
+
'editor.statusWrapOff': '自动换行:关',
|
|
647
|
+
'editor.statusWrapToggle': '切换自动换行',
|
|
648
|
+
'editor.statusFont': '字号(Ctrl+滚轮可缩放)',
|
|
649
|
+
'editor.statusSaved': '保存状态',
|
|
650
|
+
'editor.statusEncoding': '文件编码(远端按 UTF-8 读写)',
|
|
651
|
+
'editor.statusError': '错误',
|
|
652
|
+
'editor.diffTitle': '差异',
|
|
653
|
+
'editor.diffReadOnlyTitle': '统一 diff 以只读方式渲染',
|
|
654
|
+
'editor.crumbRoot': '工作区',
|
|
655
|
+
'editor.crumbLabel': '文件路径',
|
|
656
|
+
'editor.crumbUp': '上一级',
|
|
657
|
+
'editor.crumbEmpty': '空目录',
|
|
658
|
+
'editor.imageHint': '点击切换适应窗口 / 原始大小',
|
|
659
|
+
'editor.imageFitHint': '点击适应窗口',
|
|
660
|
+
'editor.imageFailedHint': '文件可能已损坏,或不是受支持的图片格式。',
|
|
661
|
+
'editor.imageTooLargeTitle': '图片过大',
|
|
662
|
+
'editor.imageTooLargeHint': '大小 {size} KiB,超出读取上限,不提供预览。',
|
|
663
|
+
'editor.switchToEdit': '切换为内容编辑(在编辑器里打开这个文件)',
|
|
664
|
+
// -- 编辑器内查找(vsc/FindWidget.tsx:输入框与三个开关/前后跳转/关闭)
|
|
665
|
+
'find.placeholder': '查找',
|
|
666
|
+
'find.caseSensitive': '区分大小写(Aa)',
|
|
667
|
+
'find.wholeWord': '全字匹配(ab_)',
|
|
668
|
+
'find.regexp': '正则表达式(.*)',
|
|
669
|
+
'find.noResults': '无结果',
|
|
670
|
+
'find.prev': '上一个(Shift+Enter)',
|
|
671
|
+
'find.next': '下一个(Enter)',
|
|
672
|
+
'find.close': '关闭(Esc)',
|
|
568
673
|
'git.notARepo': '当前远端工作区不是 git 仓库。',
|
|
569
674
|
// -- session change panel (above the composer)
|
|
570
675
|
'changes.title': '本次改动',
|
|
676
|
+
'changes.onlyUnreviewed': '只看未审阅',
|
|
677
|
+
'changes.nextUnreviewed': '下一个未审阅',
|
|
678
|
+
'changes.allReviewed': '全部已审阅',
|
|
571
679
|
'changes.toggle': '展开或收起本次会话的改动文件',
|
|
572
680
|
'changes.empty': '本会话还没有改动文件。',
|
|
573
681
|
'changes.pending': '正在统计…',
|
|
@@ -607,6 +715,13 @@ const zh: Record<string, string> = {
|
|
|
607
715
|
'changes.stale': '位置已过期',
|
|
608
716
|
'changes.staleHint': '编辑器内容已改动,改动位置可能不准。点击列表里的文件重新计算。',
|
|
609
717
|
'changes.noWorkspace': '找不到该主机对应的工作区,无法打开文件。',
|
|
718
|
+
// -- 编辑器 gutter 标记与删除 chip(vsc/change-marks.ts 的 title / aria-label)
|
|
719
|
+
'changes.markAdd': '新增行',
|
|
720
|
+
'changes.markMod': '修改行',
|
|
721
|
+
'changes.markDel': '删除行',
|
|
722
|
+
'changes.deletedChip': '已删除的内容',
|
|
723
|
+
'changes.deletedBlock': '已删除的整块内容({count} 行)',
|
|
724
|
+
'changes.deletedLines': '−{count} 行已删除',
|
|
610
725
|
// -- 悬浮在改动行上撤销这一处改动
|
|
611
726
|
'changes.undoAction': '撤销这处改动',
|
|
612
727
|
'changes.undoActionDelete': '撤销这处删除',
|
|
@@ -744,7 +859,7 @@ const en: Record<string, string> = {
|
|
|
744
859
|
'hosts.deleted': '{alias}: deleted',
|
|
745
860
|
'hosts.saved': '{alias}: saved',
|
|
746
861
|
'hosts.helperPushed': '{alias}: pushed remote helper {version} automatically',
|
|
747
|
-
'hosts.imported': 'Imported {count}
|
|
862
|
+
'hosts.imported': 'Imported hosts ({count})',
|
|
748
863
|
'hosts.importedSkipped': '; skipped: {list}',
|
|
749
864
|
'form.alias': 'Alias',
|
|
750
865
|
'form.unchanged': 'leave empty to keep',
|
|
@@ -839,6 +954,9 @@ const en: Record<string, string> = {
|
|
|
839
954
|
'files.referenceFile': '@File',
|
|
840
955
|
'files.addToConversation': 'Add to conversation',
|
|
841
956
|
'editor.save': 'Save',
|
|
957
|
+
'editor.gotoLine': 'Go to line',
|
|
958
|
+
'editor.gotoLineText': 'Go to line (1–{total}):',
|
|
959
|
+
'editor.gotoLineInvalid': 'Invalid line number',
|
|
842
960
|
'editor.saving': 'Saving…',
|
|
843
961
|
'editor.saved': 'Saved',
|
|
844
962
|
'editor.unsaved': '● Unsaved',
|
|
@@ -855,6 +973,25 @@ const en: Record<string, string> = {
|
|
|
855
973
|
'term.copy': 'Copy',
|
|
856
974
|
'term.paste': 'Paste',
|
|
857
975
|
'term.selectAll': 'Select all',
|
|
976
|
+
'term.pathMissing': 'That path does not exist on the remote host, so there is nothing to reveal.',
|
|
977
|
+
'term.pathOutside': 'That path is outside every remote workspace, so the directory tree cannot show it.',
|
|
978
|
+
'term.pathBlocked': 'Some editor tabs have unsaved changes; switching workspace would close them. Save or discard those first.',
|
|
979
|
+
'term.snippets': 'Snippets',
|
|
980
|
+
'term.snippetAdd': 'Add snippet',
|
|
981
|
+
'term.snippetEdit': 'Edit snippet',
|
|
982
|
+
'term.snippetDelete': 'Delete',
|
|
983
|
+
'term.snippetDeleteTitle': 'Delete this snippet?',
|
|
984
|
+
'term.snippetName': 'Name',
|
|
985
|
+
'term.snippetNamePlaceholder': 'e.g. push master',
|
|
986
|
+
'term.snippetCommand': 'Command',
|
|
987
|
+
'term.snippetCommandPlaceholder': 'e.g. git push origin master',
|
|
988
|
+
'term.snippetEmpty': 'No snippets yet: press "+" or Ctrl+B to add one.',
|
|
989
|
+
'term.snippetInsertHint': 'Click to paste into the terminal (not sent)',
|
|
990
|
+
'term.snippetFootHint': 'Click a row to paste (no Enter) · drag to reorder · Ctrl+B to add',
|
|
991
|
+
'term.snippetDragHint': 'Drag to reorder (Alt+Up/Down works too)',
|
|
992
|
+
'term.snippetNameRequired': 'The name cannot be empty.',
|
|
993
|
+
'term.snippetCommandRequired': 'The command cannot be empty.',
|
|
994
|
+
'term.snippetNoTerminal': 'No connected terminal: open one first.',
|
|
858
995
|
'term.noHosts': 'No hosts yet. Configure one in Settings → Remote Hosts first.',
|
|
859
996
|
'tab.git': 'Git',
|
|
860
997
|
'git.hint': 'Pick a workspace whose remote path is a git repository.',
|
|
@@ -868,6 +1005,7 @@ const en: Record<string, string> = {
|
|
|
868
1005
|
'common.loading': 'Loading…',
|
|
869
1006
|
'common.ok': 'OK',
|
|
870
1007
|
'common.cancel': 'Cancel',
|
|
1008
|
+
'common.save': 'Save',
|
|
871
1009
|
'flow.title': 'Add workspace',
|
|
872
1010
|
'flow.local': 'Local',
|
|
873
1011
|
'flow.remote': 'Remote',
|
|
@@ -908,10 +1046,14 @@ const en: Record<string, string> = {
|
|
|
908
1046
|
'files.created': 'Created',
|
|
909
1047
|
'files.renamed': 'Renamed',
|
|
910
1048
|
'files.deleted': 'Deleted',
|
|
1049
|
+
'files.openInTerminal': 'Open in Terminal',
|
|
911
1050
|
'files.items': 'items',
|
|
912
1051
|
'files.deleteTitle': 'Delete',
|
|
913
1052
|
'files.delete': 'Delete',
|
|
914
1053
|
'files.deleteConfirm': 'Delete {target}? This cannot be undone on the remote host.',
|
|
1054
|
+
'files.deleting': 'Deleting {done}/{total} · {name}',
|
|
1055
|
+
'files.deleteCancel': 'Cancel delete',
|
|
1056
|
+
'files.deleteCancelled': 'Delete cancelled: {removed} removed, {left} untouched.',
|
|
915
1057
|
'files.open': 'Open',
|
|
916
1058
|
'files.openAsText': 'Open as text',
|
|
917
1059
|
'files.openInFloat': 'Open in floating editor',
|
|
@@ -929,6 +1071,11 @@ const en: Record<string, string> = {
|
|
|
929
1071
|
'float.placeholderHint': 'There is only one editor instance and it is out in the floating window; close that window or press Dock to bring it back here.',
|
|
930
1072
|
'float.dockBack': 'Dock back',
|
|
931
1073
|
'float.unavailable': 'This host has no frame-wide overlay slot (shell.overlay); the floating editor is unavailable.',
|
|
1074
|
+
'float.dockedElsewhere': 'The remote editor is docked in the sidebar',
|
|
1075
|
+
'float.dockedElsewhereHint': 'There is only one editor instance and it lives in the sidebar; press the button below to show it here at full width.',
|
|
1076
|
+
'float.openHere': 'Open here at full width',
|
|
1077
|
+
'float.centerElsewhere': 'The remote editor is shown full width in the conversation view',
|
|
1078
|
+
'float.centerElsewhereHint': 'There is only one editor instance and it lives in the conversation view\'s "remote editor" tab; press the button below to dock it back into the sidebar.',
|
|
932
1079
|
'files.rename': 'Rename',
|
|
933
1080
|
'files.copy': 'Copy',
|
|
934
1081
|
'files.cut': 'Cut',
|
|
@@ -996,7 +1143,7 @@ const en: Record<string, string> = {
|
|
|
996
1143
|
'scm.commit': 'Commit',
|
|
997
1144
|
'scm.committing': 'Committing',
|
|
998
1145
|
'scm.commitPlaceholder': 'Commit message (Ctrl+Enter to commit)',
|
|
999
|
-
'scm.commitHint': 'Stage changes, then commit',
|
|
1146
|
+
'scm.commitHint': 'Stage changes, then commit (Ctrl+Enter in the message box commits)',
|
|
1000
1147
|
'scm.commitNeedsStage': 'Nothing staged yet — press + on a file first.',
|
|
1001
1148
|
'scm.amend': 'Edit last commit message',
|
|
1002
1149
|
'scm.amendTitle': 'Amend last commit',
|
|
@@ -1079,6 +1226,17 @@ const en: Record<string, string> = {
|
|
|
1079
1226
|
'scm.syncText': 'Runs git pull, then git push.',
|
|
1080
1227
|
'scm.syncDone': 'Sync finished',
|
|
1081
1228
|
'scm.branches': 'Branches',
|
|
1229
|
+
'scm.initRepo': 'Initialize repository',
|
|
1230
|
+
'scm.initRepoText': 'Initialize a Git repository in {path}.',
|
|
1231
|
+
'scm.initRepoDone': 'Repository initialized',
|
|
1232
|
+
'scm.renameBranch': 'Rename branch',
|
|
1233
|
+
'scm.renameBranchText': 'Rename branch {branch} to:',
|
|
1234
|
+
'scm.renameBranchInvalid': 'The branch name must be non-empty and different',
|
|
1235
|
+
'scm.renameBranchDone': 'Branch renamed',
|
|
1236
|
+
'scm.setRemoteUrl': 'Edit remote URL',
|
|
1237
|
+
'scm.setRemoteUrlText': 'URL for remote {name}:',
|
|
1238
|
+
'scm.remoteUrlEmpty': 'The remote URL must not be empty',
|
|
1239
|
+
'scm.setRemoteUrlDone': 'Remote URL updated',
|
|
1082
1240
|
'scm.remotes': 'Remotes',
|
|
1083
1241
|
'scm.newBranch': 'New branch name',
|
|
1084
1242
|
'scm.create': 'Create',
|
|
@@ -1176,14 +1334,11 @@ const en: Record<string, string> = {
|
|
|
1176
1334
|
'history.expand': 'Expand the details pane',
|
|
1177
1335
|
'history.restore': 'Restore the list layout',
|
|
1178
1336
|
'history.diffToolbar': 'Patch tools',
|
|
1179
|
-
'editor.empty': 'No open file. Double-click a file in the explorer, or click a change in source control.',
|
|
1180
|
-
'editor.saveHint': 'save',
|
|
1181
1337
|
'editor.preview': 'Preview',
|
|
1182
1338
|
'editor.source': 'Source',
|
|
1183
1339
|
'editor.imageFailed': 'Could not read the image.',
|
|
1184
1340
|
'editor.closeDirty': 'Unsaved changes',
|
|
1185
1341
|
'editor.discardClose': 'Discard and close',
|
|
1186
|
-
'editor.resizeHint': 'Drag to resize panel / editor',
|
|
1187
1342
|
'editor.openedIn': 'Opened in the top tab:',
|
|
1188
1343
|
'editor.readTimeout': 'Read timed out (host not responding)',
|
|
1189
1344
|
'editor.conflictTitle': 'Remote file changed — save blocked',
|
|
@@ -1208,9 +1363,63 @@ const en: Record<string, string> = {
|
|
|
1208
1363
|
'editor.discardSwitch': 'Discard changes and switch',
|
|
1209
1364
|
'editor.switchTimeout': 'Timed out waiting for the switch confirmation, so the switch was cancelled (unsaved edits are kept). Pick the workspace again.',
|
|
1210
1365
|
'editor.truncatedReadOnly': 'File is larger than the editable limit (8MiB): read-only, saving is blocked.',
|
|
1366
|
+
'editor.tabsLabel': 'Open editors',
|
|
1367
|
+
'editor.diffSuffix': ' (diff)',
|
|
1368
|
+
'editor.wrap': 'Word wrap',
|
|
1369
|
+
'editor.fontSmaller': 'Smaller font (Ctrl+wheel)',
|
|
1370
|
+
'editor.fontLarger': 'Larger font (Ctrl+wheel)',
|
|
1371
|
+
'editor.openInCenter': 'Open full width in the conversation view',
|
|
1372
|
+
'editor.dockToSidebar': 'Dock back to the sidebar',
|
|
1373
|
+
'editor.binaryTitle': 'Binary file',
|
|
1374
|
+
'editor.dockEmptyTitle': 'Editor',
|
|
1375
|
+
'editor.dockEmptyHint': 'Open a file from the explorer or the search results',
|
|
1376
|
+
'editor.centerEmptyTitle': 'Remote editor',
|
|
1377
|
+
'editor.centerEmptyHint': 'Open a file from the sidebar Explorer or Search and it appears here at full width.',
|
|
1378
|
+
'editor.emptyShortcuts': 'Ctrl+S save · Ctrl+F find · Ctrl+P quick open · Ctrl+wheel zoom',
|
|
1379
|
+
'editor.statusSaving': 'Saving…',
|
|
1380
|
+
'editor.statusClean': 'Saved',
|
|
1381
|
+
'editor.statusLanguage': 'Language',
|
|
1382
|
+
'editor.statusPosition': 'Line:column (1-based)',
|
|
1383
|
+
'editor.statusPositionValue': 'Line {line}, column {column}',
|
|
1384
|
+
'editor.statusSelected': 'Selected characters',
|
|
1385
|
+
'editor.statusSelectedValue': '{count} selected',
|
|
1386
|
+
'editor.statusIndent': 'Indentation (guessed from the content)',
|
|
1387
|
+
'editor.statusReadOnly': 'Read-only',
|
|
1388
|
+
'editor.statusReadOnlyTitle': 'Read-only (binary, over the read cap, or the link is down)',
|
|
1389
|
+
'editor.statusWrapOn': 'Word wrap: on',
|
|
1390
|
+
'editor.statusWrapOff': 'Word wrap: off',
|
|
1391
|
+
'editor.statusWrapToggle': 'Toggle word wrap',
|
|
1392
|
+
'editor.statusFont': 'Font size (Ctrl+wheel to zoom)',
|
|
1393
|
+
'editor.statusSaved': 'Save state',
|
|
1394
|
+
'editor.statusEncoding': 'File encoding (the remote side is read and written as UTF-8)',
|
|
1395
|
+
'editor.statusError': 'Error',
|
|
1396
|
+
'editor.diffTitle': 'Diff',
|
|
1397
|
+
'editor.diffReadOnlyTitle': 'A unified diff is rendered read-only',
|
|
1398
|
+
'editor.crumbRoot': 'Workspace',
|
|
1399
|
+
'editor.crumbLabel': 'File path',
|
|
1400
|
+
'editor.crumbUp': 'Parent folder',
|
|
1401
|
+
'editor.crumbEmpty': 'Empty directory',
|
|
1402
|
+
'editor.imageHint': 'Click to toggle fit / actual size',
|
|
1403
|
+
'editor.imageFitHint': 'Click to fit the window',
|
|
1404
|
+
'editor.imageFailedHint': 'The file may be damaged or not a supported image format.',
|
|
1405
|
+
'editor.imageTooLargeTitle': 'Image too large',
|
|
1406
|
+
'editor.imageTooLargeHint': 'Size {size} KiB, above the read cap; no preview is provided.',
|
|
1407
|
+
'editor.switchToEdit': 'Switch to content editing (open this file in the editor)',
|
|
1408
|
+
// -- in-editor find (vsc/FindWidget.tsx: the query box, toggles, stepping, close)
|
|
1409
|
+
'find.placeholder': 'Find',
|
|
1410
|
+
'find.caseSensitive': 'Match case (Aa)',
|
|
1411
|
+
'find.wholeWord': 'Match whole word (ab_)',
|
|
1412
|
+
'find.regexp': 'Use regular expression (.*)',
|
|
1413
|
+
'find.noResults': 'No results',
|
|
1414
|
+
'find.prev': 'Previous match (Shift+Enter)',
|
|
1415
|
+
'find.next': 'Next match (Enter)',
|
|
1416
|
+
'find.close': 'Close (Esc)',
|
|
1211
1417
|
'git.notARepo': 'This remote workspace is not a git repository.',
|
|
1212
1418
|
// -- session change panel (above the composer)
|
|
1213
1419
|
'changes.title': 'Changed files',
|
|
1420
|
+
'changes.onlyUnreviewed': 'Only unreviewed',
|
|
1421
|
+
'changes.nextUnreviewed': 'Next unreviewed',
|
|
1422
|
+
'changes.allReviewed': 'All reviewed',
|
|
1214
1423
|
'changes.toggle': 'Show or hide the files this session changed',
|
|
1215
1424
|
'changes.empty': 'This session has not changed any file yet.',
|
|
1216
1425
|
'changes.pending': 'Computing…',
|
|
@@ -1250,6 +1459,13 @@ const en: Record<string, string> = {
|
|
|
1250
1459
|
'changes.stale': 'positions stale',
|
|
1251
1460
|
'changes.staleHint': 'The editor content changed, so the marked positions may be off. Click the file in the list to recompute.',
|
|
1252
1461
|
'changes.noWorkspace': 'No workspace is bound to that host, so the file cannot be opened.',
|
|
1462
|
+
// -- editor gutter marks and deleted chips (title / aria-label in vsc/change-marks.ts)
|
|
1463
|
+
'changes.markAdd': 'Added line',
|
|
1464
|
+
'changes.markMod': 'Modified line',
|
|
1465
|
+
'changes.markDel': 'Deleted line',
|
|
1466
|
+
'changes.deletedChip': 'Deleted content',
|
|
1467
|
+
'changes.deletedBlock': 'Deleted block ({count} lines)',
|
|
1468
|
+
'changes.deletedLines': '−{count} lines deleted',
|
|
1253
1469
|
// -- reverting one change by hovering over its line
|
|
1254
1470
|
'changes.undoAction': 'Revert this change',
|
|
1255
1471
|
'changes.undoActionDelete': 'Revert this deletion',
|
|
@@ -1307,12 +1523,12 @@ const en: Record<string, string> = {
|
|
|
1307
1523
|
'ports.forward': 'Forward to local',
|
|
1308
1524
|
'ports.stateListening': 'Listening',
|
|
1309
1525
|
'ports.stateError': 'Connection failed',
|
|
1310
|
-
'ports.connections': '{count}
|
|
1526
|
+
'ports.connections': 'Connections: {count}',
|
|
1311
1527
|
'ports.emptyListen': 'The remote host listed no listening ports.',
|
|
1312
1528
|
'ports.listenUnavailable': 'Cannot enumerate remote ports: neither ss nor netstat is available on the host.',
|
|
1313
1529
|
'ports.listenUnknown': 'Cannot enumerate remote ports: the probe did not answer.',
|
|
1314
1530
|
'ports.badPort': 'Port must be an integer between 1 and 65535; leave the local port empty to auto-assign.',
|
|
1315
|
-
'ports.restoreFailed': '
|
|
1531
|
+
'ports.restoreFailed': 'Could not restore saved forwards: {count} — the local port may be taken, or the per-host rule limit reached.',
|
|
1316
1532
|
'ports.forgetFailed': 'Forget these rules',
|
|
1317
1533
|
'ports.remoteHostHint': 'The target is dialed from the remote host, so it can reach that host’s private network; the local listener binds 127.0.0.1 only.',
|
|
1318
1534
|
// -- host monitor (sidebar "Monitor" view): full metrics on Linux; 5 s while visible
|
package/src/client/index.tsx
CHANGED
|
@@ -20,6 +20,7 @@ import type {} from '@deepseek-ai/dsh-client-ui-workspace/client'
|
|
|
20
20
|
import './vsc/vsc.css'
|
|
21
21
|
import { installAutoOpenRemote } from './auto-open-remote.ts'
|
|
22
22
|
import { RemoteDirectoryFlow } from './DirectoryFlow.tsx'
|
|
23
|
+
import { noteEditorSeatAvailable, noteEditorSeatGone } from './editor-capability.ts'
|
|
23
24
|
import { FloatingEditorWindow } from './FloatingEditorWindow.tsx'
|
|
24
25
|
import { installFloatTabTrigger } from './float-tab-trigger.ts'
|
|
25
26
|
import { registerNativeExplorer } from './NativeExplorer.tsx'
|
|
@@ -114,6 +115,9 @@ export function apply(ctx: Context): void {
|
|
|
114
115
|
} catch {
|
|
115
116
|
return false
|
|
116
117
|
}
|
|
118
|
+
// A tab exists: this page now has a seat that can render our editor, so
|
|
119
|
+
// file clicks may be intercepted (see `editor-capability.ts`).
|
|
120
|
+
noteEditorSeatAvailable()
|
|
117
121
|
done = true
|
|
118
122
|
stopTimer()
|
|
119
123
|
return true
|
|
@@ -125,6 +129,8 @@ export function apply(ctx: Context): void {
|
|
|
125
129
|
// Undefined when the registry is unavailable (older host): stay quiet,
|
|
126
130
|
// directoryFlow + settings work standalone.
|
|
127
131
|
disposeNative = registerNativeExplorer(ctx, nativeT) ?? undefined
|
|
132
|
+
// A registered native page is a seat too; `undefined` (no registry) is not.
|
|
133
|
+
if (disposeNative !== undefined) noteEditorSeatAvailable()
|
|
128
134
|
}
|
|
129
135
|
if (!goBetter()) {
|
|
130
136
|
// Early-settle signal: once every profile entry has mounted, a still
|
|
@@ -162,6 +168,7 @@ export function apply(ctx: Context): void {
|
|
|
162
168
|
} catch {
|
|
163
169
|
// Ignore.
|
|
164
170
|
}
|
|
171
|
+
if (disposeBetter !== undefined || disposeNative !== undefined) noteEditorSeatGone()
|
|
165
172
|
}
|
|
166
173
|
}, 'dsh-remote-vs: explorer surface (better tab preferred, native fallback)')
|
|
167
174
|
// Phase 4: shadow the stock directory picker in both directory-flow holes
|
|
@@ -256,11 +263,14 @@ export function apply(ctx: Context): void {
|
|
|
256
263
|
// `sidebarRight` degrades to a no-op); see `auto-open-remote.ts` for how
|
|
257
264
|
// "remote" is proven and why the width goes through the drag handle.
|
|
258
265
|
ctx.effect(() => installAutoOpenRemote(ctx), 'dsh-remote-vs: auto-open remote workspace')
|
|
259
|
-
// The editor tab in the conversation view (right next to 对话 / 轨迹)
|
|
260
|
-
// full
|
|
261
|
-
//
|
|
262
|
-
//
|
|
263
|
-
//
|
|
266
|
+
// The editor tab in the conversation view (right next to 对话 / 轨迹) is the
|
|
267
|
+
// OPTIONAL full-width seat: the DOCKED sidebar pane is the default one (the
|
|
268
|
+
// surface stays 'sidebar' here), and the editor's own "open in the
|
|
269
|
+
// conversation view" button moves the same buffer over when the user wants the
|
|
270
|
+
// extra width. Registering this slot must NOT flip the default — doing that is
|
|
271
|
+
// what made every file click jump away from the sidebar. A host without the
|
|
272
|
+
// slot simply keeps the single docked seat (nothing disappears, and the
|
|
273
|
+
// corresponding button is simply never the way to go anywhere).
|
|
264
274
|
//
|
|
265
275
|
// `conversation.view` is a runtime slot whose TYPE comes from
|
|
266
276
|
// dsh-better-sidebar's declarations — and depending on that package for types
|
|
@@ -285,12 +295,18 @@ export function apply(ctx: Context): void {
|
|
|
285
295
|
order: 30,
|
|
286
296
|
label: () => viewT('view.editor'),
|
|
287
297
|
}, () => <RemoteEditorView ctx={ctx} />))
|
|
298
|
+
// The full-width seat exists (even while another conversation tab is
|
|
299
|
+
// selected): together with the docked pane it makes this page able to show
|
|
300
|
+
// a remote file, which is what the click interceptor asks.
|
|
301
|
+
noteEditorSeatAvailable()
|
|
288
302
|
} catch (error) {
|
|
289
303
|
console.warn('[dsh-remote-vs] conversation.view registration failed:', error)
|
|
290
304
|
return () => {}
|
|
291
305
|
}
|
|
292
|
-
setEditorSurface('center')
|
|
293
306
|
return () => {
|
|
307
|
+
// The slot went away: if the editor was living in it, dock it back rather
|
|
308
|
+
// than leaving the store pointing at a surface that no longer exists.
|
|
309
|
+
noteEditorSeatGone()
|
|
294
310
|
setEditorSurface('sidebar')
|
|
295
311
|
try {
|
|
296
312
|
dispose?.()
|