dsh-remote-vs 0.13.0 → 0.15.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/README.en.md +455 -443
- package/README.md +408 -396
- package/lib/client.js +8062 -2651
- package/lib/index.js +1058 -288
- package/lib/p2-router-fs.js +1 -1
- package/lib/p2-router-refs.js +89 -10
- package/lib/p2-router-spill.js +73 -1
- package/lib/p2-router-subprocess.js +18 -6
- package/lib/spill-retention-BwKEWrl5.js +115 -0
- package/lib/{ssh-proc-arI5lm4W.js → ssh-proc-VKWn_LZC.js} +17 -0
- package/lib/types/archive.d.ts +1 -1
- package/lib/types/changes/recorder.d.ts +34 -2
- package/lib/types/client/CodeEditor.d.ts +12 -0
- package/lib/types/client/ConnectionStatus.d.ts +17 -0
- package/lib/types/client/DirectoryFlow.d.ts +2 -0
- package/lib/types/client/DoctorPanel.d.ts +25 -0
- package/lib/types/client/QuickOpen.d.ts +17 -0
- package/lib/types/client/RemoteExplorer.d.ts +192 -1
- package/lib/types/client/RemoteRoot.d.ts +17 -0
- package/lib/types/client/SearchView.d.ts +55 -0
- package/lib/types/client/TerminalView.d.ts +38 -0
- package/lib/types/client/WorkspaceWizard.d.ts +17 -0
- package/lib/types/client/api.d.ts +54 -4
- package/lib/types/client/changes/undo-affordance.d.ts +16 -0
- package/lib/types/client/changes/undo-context.d.ts +14 -18
- package/lib/types/client/changes/undo-target.d.ts +78 -0
- package/lib/types/client/connection.d.ts +111 -0
- package/lib/types/client/doctor.d.ts +122 -0
- package/lib/types/client/download.d.ts +35 -5
- package/lib/types/client/downloads.d.ts +18 -1
- package/lib/types/client/file-open-probe.d.ts +64 -0
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/client/quickopen-model.d.ts +332 -0
- package/lib/types/client/scm/DiffView.d.ts +34 -0
- package/lib/types/client/scm/actions.d.ts +18 -0
- package/lib/types/client/scm/diff-model.d.ts +17 -1
- package/lib/types/client/scm/git-cache.d.ts +10 -2
- package/lib/types/client/scm/read-queue.d.ts +2 -1
- package/lib/types/client/scm/stage-queue.d.ts +13 -0
- package/lib/types/client/scm/status-map.d.ts +3 -1
- package/lib/types/client/store.d.ts +114 -5
- package/lib/types/client/vsc/FindWidget.d.ts +7 -0
- package/lib/types/client/vsc/save-shortcut.d.ts +57 -0
- package/lib/types/deploy.d.ts +44 -2
- package/lib/types/git-format.d.ts +15 -0
- package/lib/types/http.d.ts +44 -0
- package/lib/types/p2/file-refs.d.ts +39 -2
- package/lib/types/p2/helper-rpc.d.ts +26 -0
- package/lib/types/p2/router-spill.d.ts +19 -0
- package/lib/types/p2/router-subprocess.d.ts +2 -0
- package/lib/types/p2/spill-retention.d.ts +74 -0
- package/lib/types/p2/worlds.d.ts +11 -0
- package/lib/types/pool.d.ts +73 -11
- package/lib/types/protocol.d.ts +63 -0
- package/lib/types/routes.d.ts +18 -0
- package/lib/types/sftp.d.ts +114 -8
- package/lib/types/store.d.ts +34 -0
- package/lib/types/timeouts.d.ts +14 -0
- package/lib/{worlds-C6Xha1mQ.js → worlds-Be1YE2Ot.js} +727 -78
- package/package.json +1 -1
- package/src/archive.ts +41 -9
- package/src/changes/recorder.ts +227 -31
- package/src/changes/status.ts +37 -1
- package/src/client/CodeEditor.tsx +84 -2
- package/src/client/ConnectionStatus.tsx +130 -0
- package/src/client/DirectoryFlow.tsx +40 -5
- package/src/client/DoctorPanel.tsx +202 -0
- package/src/client/DownloadDock.tsx +13 -25
- package/src/client/EditorPane.tsx +291 -7
- package/src/client/HostsView.tsx +17 -8
- package/src/client/QuickOpen.tsx +371 -0
- package/src/client/RemoteDirectoryPicker.tsx +54 -3
- package/src/client/RemoteExplorer.tsx +879 -160
- package/src/client/RemoteRoot.tsx +178 -1
- package/src/client/SearchView.tsx +180 -6
- package/src/client/SettingsHosts.tsx +1 -1
- package/src/client/TerminalView.tsx +174 -9
- package/src/client/WorkspaceWizard.tsx +110 -16
- package/src/client/WorkspacesView.tsx +22 -6
- package/src/client/api.ts +197 -11
- package/src/client/changes/ChangesDock.tsx +35 -8
- package/src/client/changes/undo-affordance.ts +33 -0
- package/src/client/changes/undo-context.ts +14 -18
- package/src/client/changes/undo-target.ts +139 -0
- package/src/client/connection.ts +264 -0
- package/src/client/doctor.ts +441 -0
- package/src/client/download.ts +148 -12
- package/src/client/downloads.ts +43 -2
- package/src/client/file-open-probe.ts +83 -0
- package/src/client/i18n.ts +244 -0
- package/src/client/index.tsx +5 -2
- package/src/client/quickopen-model.ts +778 -0
- package/src/client/remote-file-open.ts +21 -33
- package/src/client/scm/DiffView.tsx +116 -6
- package/src/client/scm/ScmPanel.tsx +19 -0
- package/src/client/scm/actions.ts +34 -2
- package/src/client/scm/diff-model.ts +33 -37
- package/src/client/scm/git-cache.ts +61 -4
- package/src/client/scm/read-queue.ts +33 -2
- package/src/client/scm/stage-queue.ts +72 -1
- package/src/client/scm/status-map.ts +22 -1
- package/src/client/store.tsx +704 -21
- package/src/client/vsc/FindWidget.tsx +20 -0
- package/src/client/vsc/kit.tsx +115 -6
- package/src/client/vsc/reveal-line.ts +33 -14
- package/src/client/vsc/save-shortcut.ts +131 -0
- package/src/client/vsc/vsc.css +419 -0
- package/src/deploy.ts +185 -33
- package/src/git-format.ts +136 -22
- package/src/git-ops.ts +14 -6
- package/src/http.ts +80 -12
- package/src/importers.ts +80 -21
- package/src/index.ts +21 -1
- package/src/p2/file-refs.ts +112 -10
- package/src/p2/helper-rpc.ts +73 -36
- package/src/p2/router-spill.ts +96 -1
- package/src/p2/router-subprocess.ts +18 -5
- package/src/p2/spill-retention.ts +134 -0
- package/src/p2/ssh-proc.ts +22 -0
- package/src/p2/worlds.ts +24 -0
- package/src/pool.ts +329 -47
- package/src/protocol.ts +66 -0
- package/src/routes.ts +251 -43
- package/src/sftp.ts +486 -26
- package/src/store.ts +207 -85
- package/src/terminal.ts +38 -2
- package/src/timeouts.ts +14 -0
- package/src/tools.ts +14 -5
package/src/client/downloads.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { api } from './api.ts'
|
|
|
12
12
|
import { saveRemoteDir, saveRemoteFile, saveRemoteMany, type DownloadOutcome } from './download.ts'
|
|
13
13
|
|
|
14
14
|
/** One download's lifecycle state. */
|
|
15
|
-
export type DownloadStatus = 'running' | 'done' | 'failed' | 'cancelled'
|
|
15
|
+
export type DownloadStatus = 'running' | 'done' | 'failed' | 'cancelled' | 'handedOff'
|
|
16
16
|
|
|
17
17
|
/** One task as the dock renders it. */
|
|
18
18
|
export interface DownloadTask {
|
|
@@ -49,6 +49,40 @@ export function formatByteCount(bytes: number): string {
|
|
|
49
49
|
return `${value >= 100 ? Math.round(value) : value.toFixed(1)} ${units[unit]}`
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* One line of detail under a task's bar (pure: the dock only renders it).
|
|
54
|
+
*
|
|
55
|
+
* KNOWN size includes 0 — a zero-byte file has a size and it is 0. Treating
|
|
56
|
+
* `total === 0` as "unknown" printed `0 B · size unknown` for every empty file.
|
|
57
|
+
* An `undefined` total keeps both honest cases: a directory/selection archive
|
|
58
|
+
* is chunked by design (indeterminate), while a plain file with no total means
|
|
59
|
+
* a shell or proxy stripped `content-length` (DSH Desktop does that).
|
|
60
|
+
*/
|
|
61
|
+
export function downloadDetailText(task: DownloadTask, t: (key: string) => string): string {
|
|
62
|
+
if (task.status === 'failed') return task.error ?? t('downloads.failed')
|
|
63
|
+
if (task.status === 'cancelled') return t('downloads.cancelled')
|
|
64
|
+
if (task.status === 'handedOff') return t('downloads.handedOffDetail')
|
|
65
|
+
if (task.status === 'done') {
|
|
66
|
+
return task.via === 'browserDefault' ? t('downloads.browserDefault') : t('downloads.done')
|
|
67
|
+
}
|
|
68
|
+
const loaded = formatByteCount(task.loaded)
|
|
69
|
+
const archive = task.directory || task.selection !== undefined
|
|
70
|
+
if (task.total !== undefined) return `${loaded} / ${formatByteCount(task.total)}`
|
|
71
|
+
return `${loaded} · ${t(archive ? 'downloads.indeterminate' : 'downloads.sizeUnknown')}`
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Percent for the bar, or `undefined` while the size is unknown (archives).
|
|
76
|
+
*
|
|
77
|
+
* `total === 0` is COMPLETE, not unknown: every one of an empty file's zero
|
|
78
|
+
* bytes has arrived, so the bar is full instead of a permanent flowing stripe.
|
|
79
|
+
*/
|
|
80
|
+
export function downloadPercent(task: DownloadTask): number | undefined {
|
|
81
|
+
if (task.total === undefined) return undefined
|
|
82
|
+
if (task.total === 0) return 100
|
|
83
|
+
return Math.min(100, Math.round((task.loaded / task.total) * 100))
|
|
84
|
+
}
|
|
85
|
+
|
|
52
86
|
let tasks: readonly DownloadTask[] = []
|
|
53
87
|
const listeners = new Set<() => void>()
|
|
54
88
|
const controllers = new Map<string, AbortController>()
|
|
@@ -101,10 +135,17 @@ const launch = (id: string, controller: AbortController, run: (options: RunnerOp
|
|
|
101
135
|
})
|
|
102
136
|
},
|
|
103
137
|
})
|
|
138
|
+
if (outcome === 'handedOff') {
|
|
139
|
+
// The browser owns this transfer now: no bytes have landed through the
|
|
140
|
+
// runner and no failure can be observed here. Reporting it as "done"
|
|
141
|
+
// was the defect — the row says the browser saves it, not that it saved.
|
|
142
|
+
patch(id, { status: 'handedOff', finishedAt: Date.now(), via: 'browserDefault' })
|
|
143
|
+
return
|
|
144
|
+
}
|
|
104
145
|
patch(id, {
|
|
105
146
|
status: 'done',
|
|
106
147
|
finishedAt: Date.now(),
|
|
107
|
-
via: outcome === '
|
|
148
|
+
via: outcome === 'saved-browser' ? 'browserDefault' : 'picker',
|
|
108
149
|
})
|
|
109
150
|
} catch (error) {
|
|
110
151
|
const aborted = controller.signal.aborted || (error instanceof Error && error.name === 'AbortError')
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which remote spelling a clicked file reference actually exists at.
|
|
3
|
+
*
|
|
4
|
+
* Why this module exists
|
|
5
|
+
* ----------------------
|
|
6
|
+
* A click on a file reference resolves to an ordered candidate list (workspace
|
|
7
|
+
* root first, then the session's current directory — see
|
|
8
|
+
* `remote-file-open-target.ts`), and the caller used to accept only two
|
|
9
|
+
* answers from the existence probe: "it exists" or "it does not". A TIMEOUT or
|
|
10
|
+
* a TRANSPORT failure therefore read as "this spelling is wrong, try the next
|
|
11
|
+
* one": one dead click became N remote stat calls, each paying its own 4s
|
|
12
|
+
* deadline, followed by a 7s `find` fallback — with no UI feedback at all. On a
|
|
13
|
+
* known-broken link every candidate fails the same way, so the extra probes
|
|
14
|
+
* could never find anything either.
|
|
15
|
+
*
|
|
16
|
+
* The project already learned this lesson once, in `scm/actions.ts`:
|
|
17
|
+
* `resolveRepoRoot` folded "not a repository" and "the probe did not answer"
|
|
18
|
+
* into `undefined`, and the cache treated the empty answer as fact (MAINTENANCE
|
|
19
|
+
* §2.25: "仓库探测必须三态"). This is the same rule for the click path:
|
|
20
|
+
* `exists` / `missing` / `unknown`, and `unknown` STOPS the chain.
|
|
21
|
+
*
|
|
22
|
+
* Everything effectful is injected, so the decision table is drivable in node
|
|
23
|
+
* without a store, a React tree or a fake SSH host
|
|
24
|
+
* (`scripts/check-file-open-click.mjs`).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/** What one candidate answer means for the chain. */
|
|
28
|
+
export type CandidateVerdict =
|
|
29
|
+
| { kind: 'exists'; path: string }
|
|
30
|
+
/** Every candidate answered "no such file": the caller may try a suffix search. */
|
|
31
|
+
| { kind: 'missing' }
|
|
32
|
+
/** Cannot tell (timed out, link down): stop probing, open the primary spelling. */
|
|
33
|
+
| { kind: 'unknown' }
|
|
34
|
+
|
|
35
|
+
/** Everything the probe needs from the outside world. */
|
|
36
|
+
export interface CandidateProbeDeps {
|
|
37
|
+
/** One remote stat; rejects with the host's error. */
|
|
38
|
+
stat: (alias: string, path: string) => Promise<unknown>
|
|
39
|
+
/**
|
|
40
|
+
* Bound one probe. Resolves `undefined` when the budget ran out — the shape
|
|
41
|
+
* `withDeadline` already has (a timeout is not an error there).
|
|
42
|
+
*/
|
|
43
|
+
deadline: <T>(promise: Promise<T>, ms: number) => Promise<T | undefined>
|
|
44
|
+
/** The link's last known state; only `'error'` is evidence of a dead link. */
|
|
45
|
+
connection: (alias: string) => 'ok' | 'error' | 'idle' | undefined
|
|
46
|
+
/** Whether an error means "the link", as opposed to "this path is missing". */
|
|
47
|
+
isLinkFailure: (error: unknown) => boolean
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Probe the candidates in order, stopping at the first EXISTS **or the first
|
|
52
|
+
* UNKNOWN**.
|
|
53
|
+
*
|
|
54
|
+
* @param alias - host alias the paths live on.
|
|
55
|
+
* @param candidates - candidate spellings, most likely first.
|
|
56
|
+
* @param deps - injected effects (stat / deadline / connection / classifier).
|
|
57
|
+
* @param timeoutMs - budget for ONE probe.
|
|
58
|
+
* @returns the verdict; `unknown` is not a failure — it tells the caller to
|
|
59
|
+
* stop guessing and show the real remote error instead.
|
|
60
|
+
*/
|
|
61
|
+
export async function probeCandidates(
|
|
62
|
+
alias: string,
|
|
63
|
+
candidates: readonly string[],
|
|
64
|
+
deps: CandidateProbeDeps,
|
|
65
|
+
timeoutMs: number,
|
|
66
|
+
): Promise<CandidateVerdict> {
|
|
67
|
+
// Offline is the same answer without spending a single round trip.
|
|
68
|
+
if (deps.connection(alias) === 'error') return { kind: 'unknown' }
|
|
69
|
+
for (const candidate of candidates) {
|
|
70
|
+
let settled: unknown
|
|
71
|
+
try {
|
|
72
|
+
settled = await deps.deadline(deps.stat(alias, candidate), timeoutMs)
|
|
73
|
+
} catch (error) {
|
|
74
|
+
// A business answer (ENOENT) says this spelling is wrong: try the next.
|
|
75
|
+
// A link failure says nothing about the spelling: stop.
|
|
76
|
+
if (deps.isLinkFailure(error)) return { kind: 'unknown' }
|
|
77
|
+
continue
|
|
78
|
+
}
|
|
79
|
+
if (settled === undefined) return { kind: 'unknown' } // the deadline ran out
|
|
80
|
+
return { kind: 'exists', path: candidate }
|
|
81
|
+
}
|
|
82
|
+
return { kind: 'missing' }
|
|
83
|
+
}
|
package/src/client/i18n.ts
CHANGED
|
@@ -33,12 +33,46 @@ export const DYNAMIC_KEYS = [
|
|
|
33
33
|
'downloads.running',
|
|
34
34
|
'downloads.indeterminate',
|
|
35
35
|
'downloads.sizeUnknown',
|
|
36
|
+
// Reached through the same STATUS_KEY lookup: a handed-off transfer is a
|
|
37
|
+
// status value too, not a literal `t()` call.
|
|
38
|
+
'downloads.handedOff',
|
|
39
|
+
// Reached through the noteKey table in TerminalView (socket lost vs shell
|
|
40
|
+
// exit), which stores the key and renders it later.
|
|
41
|
+
'term.disconnected',
|
|
42
|
+
'term.closed',
|
|
43
|
+
// Labels chosen through connectionLabelKey in connection.ts (a state → key
|
|
44
|
+
// mapping, so the call site is (connectionLabelKey(state))).
|
|
45
|
+
'connection.ok',
|
|
46
|
+
'connection.error',
|
|
47
|
+
'connection.idle',
|
|
48
|
+
// Thrown after a repeat transport failure; translated at throw time.
|
|
49
|
+
'connection.actionFailed',
|
|
50
|
+
// The doctor rows carry their label and state word as KEYS resolved from
|
|
51
|
+
// tables in `doctor.ts` (`DOCTOR_PROBES` / `DOCTOR_STATE_KEY`) and rendered
|
|
52
|
+
// through `t(item.label)` in the panel, so a literal-call scan cannot see
|
|
53
|
+
// them. One entry per probe row and per state.
|
|
54
|
+
'doctor.state.ok',
|
|
55
|
+
'doctor.state.missing',
|
|
56
|
+
'doctor.state.unknown',
|
|
57
|
+
'doctor.item.os',
|
|
58
|
+
'doctor.item.libc',
|
|
59
|
+
'doctor.item.git',
|
|
60
|
+
'doctor.item.rg',
|
|
61
|
+
'doctor.item.tar',
|
|
62
|
+
'doctor.item.setsid',
|
|
63
|
+
'doctor.item.disk',
|
|
64
|
+
'doctor.item.nproc',
|
|
65
|
+
'doctor.item.memory',
|
|
66
|
+
'doctor.item.helpers',
|
|
67
|
+
'doctor.item.sshd',
|
|
36
68
|
] as const
|
|
37
69
|
|
|
38
70
|
const zh: Record<string, string> = {
|
|
39
71
|
'tab.workspaces': '工作区',
|
|
40
72
|
'tab.files': '文件',
|
|
41
73
|
'tab.terminal': '终端',
|
|
74
|
+
'tab.remote': '远程',
|
|
75
|
+
'tab.remoteDesc': '远端文件、终端与 Git',
|
|
42
76
|
'hosts.title': '远程主机',
|
|
43
77
|
'hosts.empty': '尚未配置主机。点击「新增主机」,或从现有配置导入。',
|
|
44
78
|
'hosts.add': '新增主机',
|
|
@@ -55,7 +89,15 @@ const zh: Record<string, string> = {
|
|
|
55
89
|
'hosts.save': '保存',
|
|
56
90
|
'hosts.cancel': '取消',
|
|
57
91
|
'hosts.confirmDelete': '确定删除主机(连带其远端工作区绑定)吗?',
|
|
92
|
+
'hosts.testOk': '{alias}:连通({ms} ms)',
|
|
93
|
+
'hosts.unknownError': '未知错误',
|
|
94
|
+
'hosts.deleted': '{alias}:已删除',
|
|
95
|
+
'hosts.saved': '{alias}:已保存',
|
|
96
|
+
'hosts.imported': '已导入 {count} 个主机',
|
|
97
|
+
'hosts.importedSkipped': ';跳过:{list}',
|
|
58
98
|
'form.alias': '别名',
|
|
99
|
+
'form.unchanged': '留空表示不修改',
|
|
100
|
+
'form.unchangedWhenEmpty': '留空保持不变',
|
|
59
101
|
'form.host': '主机',
|
|
60
102
|
'form.port': '端口',
|
|
61
103
|
'form.user': '用户',
|
|
@@ -70,6 +112,34 @@ const zh: Record<string, string> = {
|
|
|
70
112
|
'deploy.ok': '已推送',
|
|
71
113
|
'deploy.skipped': '已是最新(跳过)',
|
|
72
114
|
'deploy.failed': '推送失败',
|
|
115
|
+
// -- 远端环境自检(Doctor)
|
|
116
|
+
'doctor.open': '环境自检',
|
|
117
|
+
'doctor.title': '环境自检 · {alias}',
|
|
118
|
+
'doctor.loading': '正在执行远端体检…',
|
|
119
|
+
'doctor.copy': '复制全部报告',
|
|
120
|
+
'doctor.copied': '已复制',
|
|
121
|
+
'doctor.copyFailed': '复制失败:请手动选中表格内容复制',
|
|
122
|
+
'doctor.close': '关闭',
|
|
123
|
+
'doctor.colItem': '项目',
|
|
124
|
+
'doctor.colState': '状态',
|
|
125
|
+
'doctor.colDetail': '明细',
|
|
126
|
+
'doctor.unknownHint': '「未知」表示这次没查出结果(没输出、没有权限或被截断),并不等于「没有」;排查时请把整份报告一起提供。',
|
|
127
|
+
'doctor.reportTitle': 'dsh-remote-vs 环境自检 · {alias}',
|
|
128
|
+
'doctor.reportAt': '时间:{at}',
|
|
129
|
+
'doctor.state.ok': '正常',
|
|
130
|
+
'doctor.state.missing': '缺失',
|
|
131
|
+
'doctor.state.unknown': '未知',
|
|
132
|
+
'doctor.item.os': '操作系统 / 内核',
|
|
133
|
+
'doctor.item.libc': 'glibc / ldd 版本',
|
|
134
|
+
'doctor.item.git': 'git',
|
|
135
|
+
'doctor.item.rg': 'ripgrep (rg)',
|
|
136
|
+
'doctor.item.tar': 'tar',
|
|
137
|
+
'doctor.item.setsid': 'setsid --wait(超时可终止)',
|
|
138
|
+
'doctor.item.disk': '磁盘($HOME 所在分区)',
|
|
139
|
+
'doctor.item.nproc': 'CPU 核数',
|
|
140
|
+
'doctor.item.memory': '内存',
|
|
141
|
+
'doctor.item.helpers': '已安装 helper',
|
|
142
|
+
'doctor.item.sshd': 'sshd MaxSessions',
|
|
73
143
|
'ws.title': '远端工作区',
|
|
74
144
|
'ws.empty': '还没有绑定。先去「设置 → 远程主机」配好主机,再用下面的向导新建。',
|
|
75
145
|
'ws.new': '新建远程工作区',
|
|
@@ -91,6 +161,12 @@ const zh: Record<string, string> = {
|
|
|
91
161
|
'ws.step3': '3. 绑定远端目录',
|
|
92
162
|
'ws.testFirst': '先测试连通',
|
|
93
163
|
'ws.pushFirst': '先执行推送',
|
|
164
|
+
'ws.unbindTitle': '解绑工作区',
|
|
165
|
+
'ws.unbindConfirm': '确定解绑 {name} 吗?会话与历史仍可读,但新的远端调用会被拒绝;之后可重新绑定(会得到新的 id)。',
|
|
166
|
+
'ws.removed': '已解绑',
|
|
167
|
+
'ws.saved': '已保存绑定',
|
|
168
|
+
'ws.notDirectory': '{path}:不是目录',
|
|
169
|
+
'ws.directoryOk': '{path}:目录可用',
|
|
94
170
|
'files.selectWorkspace': '选择一个远端工作区:',
|
|
95
171
|
'files.uploadFile': '上传文件…',
|
|
96
172
|
'files.uploadFolder': '上传文件夹…',
|
|
@@ -120,6 +196,7 @@ const zh: Record<string, string> = {
|
|
|
120
196
|
'term.selectHost': '选择主机后连接:',
|
|
121
197
|
'term.reconnect': '重连',
|
|
122
198
|
'term.closed': '连接已关闭。',
|
|
199
|
+
'term.disconnected': '连接已断开,可重新接回。',
|
|
123
200
|
'term.new': '新建终端',
|
|
124
201
|
'term.empty': '还没有终端 —— 选好主机后点右上角 + 新建一个。',
|
|
125
202
|
'term.close': '关闭终端',
|
|
@@ -128,12 +205,15 @@ const zh: Record<string, string> = {
|
|
|
128
205
|
'tab.git': 'Git',
|
|
129
206
|
'git.hint': '请选择远端路径为 git 仓库的工作区。',
|
|
130
207
|
'scm.loadingSlow': '正在读取仓库状态…大仓库首次读取可能需要数分钟',
|
|
208
|
+
'scm.offlineRead': '连接已断开,暂时无法读取 Git 状态',
|
|
131
209
|
'scm.cached': '缓存',
|
|
132
210
|
'scm.cachedRefreshing': '缓存 · 后台刷新中',
|
|
133
211
|
'scm.cachedHint': '显示的是该工作区上次读取的结果,正在后台刷新;更改列表与暂存/提交等操作仍作用于这个工作区。',
|
|
134
212
|
'scm.refreshFailed': '刷新失败:',
|
|
135
213
|
'common.close': '关闭',
|
|
136
214
|
'common.loading': '加载中…',
|
|
215
|
+
'common.ok': '确定',
|
|
216
|
+
'common.cancel': '取消',
|
|
137
217
|
'flow.title': '添加工作区',
|
|
138
218
|
'flow.local': '本地',
|
|
139
219
|
'flow.remote': '远程',
|
|
@@ -176,6 +256,7 @@ const zh: Record<string, string> = {
|
|
|
176
256
|
'files.open': '打开',
|
|
177
257
|
'files.openAsText': '以文本打开',
|
|
178
258
|
'files.openInFloat': '在悬浮编辑器中打开',
|
|
259
|
+
'files.openBlockedByDirty': '有未保存的改动,已阻止切换到该文件所在的工作区,文件未打开;请先保存或放弃这些改动。',
|
|
179
260
|
// -- floating editor window
|
|
180
261
|
'float.title': '悬浮编辑器',
|
|
181
262
|
'float.dragHint': '拖动标题栏移动窗口;拖动边缘缩放;双击标题栏最大化或还原',
|
|
@@ -198,6 +279,7 @@ const zh: Record<string, string> = {
|
|
|
198
279
|
'files.copyRel': '复制相对路径',
|
|
199
280
|
'files.copyAbs': '复制绝对路径',
|
|
200
281
|
'files.download': '下载到本地',
|
|
282
|
+
'files.transferBusy': '另一个传输正在进行,请先完成或取消。',
|
|
201
283
|
'downloads.running': '下载中',
|
|
202
284
|
'downloads.done': '下载完成',
|
|
203
285
|
'downloads.failed': '下载失败',
|
|
@@ -207,6 +289,8 @@ const zh: Record<string, string> = {
|
|
|
207
289
|
'downloads.browserDefault': '已保存到浏览器默认下载目录',
|
|
208
290
|
'downloads.indeterminate': '正在打包…',
|
|
209
291
|
'downloads.sizeUnknown': '大小未知',
|
|
292
|
+
'downloads.handedOff': '已交给浏览器',
|
|
293
|
+
'downloads.handedOffDetail': '剩余下载由浏览器完成;此面板无法观测或取消。',
|
|
210
294
|
'downloads.tooMany': '选择项过多(最多 100 项),请改为下载所在目录',
|
|
211
295
|
'files.copied': '已复制',
|
|
212
296
|
'files.moved': '已移动',
|
|
@@ -220,6 +304,7 @@ const zh: Record<string, string> = {
|
|
|
220
304
|
'files.refDisabled': '当前会话不在此远端工作区,无法引用',
|
|
221
305
|
'search.placeholder': '按文件名搜索远端工作区…',
|
|
222
306
|
'search.hint': '输入一段文件名片段(受深度与数量限制)。',
|
|
307
|
+
'search.stderrWarn': '搜索完成,但有警告:{detail}',
|
|
223
308
|
'search.modeName': '文件名',
|
|
224
309
|
'search.modeNameHint': '按文件名搜索远端工作区',
|
|
225
310
|
'search.modeContent': '内容',
|
|
@@ -371,6 +456,7 @@ const zh: Record<string, string> = {
|
|
|
371
456
|
'scm.hunkStaged': '已暂存该块',
|
|
372
457
|
'scm.hunkUnstaged': '已取消暂存该块',
|
|
373
458
|
'scm.hunkReverted': '已还原该块',
|
|
459
|
+
'scm.hunkTruncated': '文件过大:这次差异的补丁可能已被截断,块级操作已禁用。',
|
|
374
460
|
'scm.emptySide': '(空文件)',
|
|
375
461
|
'scm.logEmpty': '没有提交记录。',
|
|
376
462
|
'scm.logCapped': '仅显示最近 {n} 条提交。',
|
|
@@ -429,7 +515,28 @@ const zh: Record<string, string> = {
|
|
|
429
515
|
'editor.resizeHint': '拖拽调整面板 / 编辑器占比',
|
|
430
516
|
'editor.openedIn': '已在顶部标签打开:',
|
|
431
517
|
'editor.readTimeout': '读取超时(远端无响应)',
|
|
518
|
+
'editor.conflictTitle': '远端文件已变更,已阻止覆盖',
|
|
519
|
+
'editor.conflictBody': '远端在你打开后于 {time} 被修改;本次保存未写入。',
|
|
520
|
+
'editor.conflictDeleted': '远端文件已被删除;本次保存未写入。',
|
|
521
|
+
'editor.conflictBlocked': '远端文件已变更,已阻止覆盖',
|
|
522
|
+
'editor.conflictDiff': '查看差异',
|
|
523
|
+
'editor.conflictDiffHead': '远端当前内容 → 你的缓冲区',
|
|
524
|
+
'editor.conflictSame': '内容与你的缓冲区一致(只有修改时间变了)',
|
|
525
|
+
'editor.conflictMoreHunks': '还有 {count} 处差异未显示',
|
|
526
|
+
'editor.conflictReload': '载入远端版本',
|
|
527
|
+
'editor.conflictOverwrite': '仍然覆盖',
|
|
528
|
+
'editor.conflictOverwriteTitle': '覆盖远端在这之后写入的内容?',
|
|
529
|
+
'editor.tabsRestored': '已恢复 {count} 个标签',
|
|
530
|
+
'editor.tabsRestoreMissing': '{count} 个标签未能恢复(文件已不存在或无权限),已跳过',
|
|
531
|
+
'editor.tabsRestoreUnknown': '{count} 个标签读取较慢,仍在加载;刷新页面会再试',
|
|
432
532
|
'editor.needSource': '切回「源码」才能保存:预览态没有编辑器缓冲区,直接保存会把旧内容写回远端。',
|
|
533
|
+
'editor.reloadFile': '重新载入此文件',
|
|
534
|
+
'editor.reloadDirty': '有未保存的修改,重新载入会丢弃它们',
|
|
535
|
+
'editor.discardReload': '放弃并重新载入',
|
|
536
|
+
'editor.switchDirty': '切换工作区会关闭所有编辑器标签,其中有未保存的修改',
|
|
537
|
+
'editor.discardSwitch': '放弃修改并切换',
|
|
538
|
+
'editor.switchTimeout': '等待切换确认超时,已取消本次切换(未保存的修改仍在);请重新选择工作区。',
|
|
539
|
+
'editor.truncatedReadOnly': '文件超过可编辑上限(8MiB),只读呈现,不能保存。',
|
|
433
540
|
'git.notARepo': '当前远端工作区不是 git 仓库。',
|
|
434
541
|
// -- session change panel (above the composer)
|
|
435
542
|
'changes.title': '本次改动',
|
|
@@ -461,12 +568,45 @@ const zh: Record<string, string> = {
|
|
|
461
568
|
'changes.undoNoContext': '找不到这处改动所属的主机与仓库,无法撤销。',
|
|
462
569
|
'changes.undoConflict': '这处改动的上下文已经变了,远端拒绝了撤销(文件未被修改)。',
|
|
463
570
|
'changes.undoMissing': '这处改动没有可用的补丁内容,无法撤销。',
|
|
571
|
+
// -- 连接状态与断线降级
|
|
572
|
+
'connection.ok': '连接正常',
|
|
573
|
+
'connection.error': '连接异常',
|
|
574
|
+
'connection.idle': '就绪(按需连接)',
|
|
575
|
+
'connection.retrying': '重连中…',
|
|
576
|
+
'connection.retryHint': '点击重试连接',
|
|
577
|
+
'connection.lastOk': '最近成功',
|
|
578
|
+
'connection.editorReadOnly': '连接已断开:正在显示缓存内容(只读),恢复后自动刷新。',
|
|
579
|
+
'connection.editorDirty': '有未保存改动,恢复连接后才能保存。',
|
|
580
|
+
'connection.saveBlocked': '连接已断开,暂时无法保存;恢复后请重试。',
|
|
581
|
+
'connection.readFailed': '连接已断开,无法读取该文件;恢复后会自动刷新。',
|
|
582
|
+
'connection.recovered': '连接已恢复:目录、Git、未修改的文件标签和只读 diff 标签已刷新。',
|
|
583
|
+
'connection.recoveredDirty': '连接已恢复:目录、Git 与只读标签已刷新;有未保存改动的标签未自动重载。',
|
|
584
|
+
'connection.errorAt': '上次失败',
|
|
585
|
+
'connection.detail': '诊断',
|
|
586
|
+
'connection.actionFailed': '连接已断开,操作未发送;恢复后请重试。',
|
|
587
|
+
'files.offline': '连接已断开,且此目录没有缓存',
|
|
588
|
+
// -- Ctrl+P quick open(远端文件索引 + 模糊匹配)
|
|
589
|
+
'quickopen.title': '快速打开',
|
|
590
|
+
'quickopen.placeholder': '输入文件名,回车打开',
|
|
591
|
+
'quickopen.hint': '↑↓ 选择 · Enter 打开 · Esc 关闭',
|
|
592
|
+
'quickopen.recent': '最近打开',
|
|
593
|
+
'quickopen.emptyRecent': '还没有最近打开的文件;输入文件名开始搜索',
|
|
594
|
+
'quickopen.indexing': '正在建立远端文件索引…',
|
|
595
|
+
'quickopen.indexError': '索引失败:{reason}',
|
|
596
|
+
'quickopen.truncated': '索引已截断,仅可搜索前 {count} 个文件',
|
|
597
|
+
'quickopen.depthCapped': '未安装 ripgrep:只扫描了前 {depth} 层目录,更深处的文件可能缺失(已收录 {count} 个)',
|
|
598
|
+
'quickopen.warning': '索引不完整:{detail}',
|
|
599
|
+
'quickopen.noResults': '没有匹配的文件',
|
|
600
|
+
'quickopen.more': '匹配过多,请继续输入',
|
|
601
|
+
'quickopen.noWorkspace': '没有选定的远端工作区',
|
|
464
602
|
}
|
|
465
603
|
|
|
466
604
|
const en: Record<string, string> = {
|
|
467
605
|
'tab.workspaces': 'Workspaces',
|
|
468
606
|
'tab.files': 'Files',
|
|
469
607
|
'tab.terminal': 'Terminal',
|
|
608
|
+
'tab.remote': 'Remote',
|
|
609
|
+
'tab.remoteDesc': 'Remote files, terminal and Git',
|
|
470
610
|
'hosts.title': 'Remote hosts',
|
|
471
611
|
'hosts.empty': 'No hosts yet. Add one, or import from existing configs.',
|
|
472
612
|
'hosts.add': 'Add host',
|
|
@@ -483,7 +623,15 @@ const en: Record<string, string> = {
|
|
|
483
623
|
'hosts.save': 'Save',
|
|
484
624
|
'hosts.cancel': 'Cancel',
|
|
485
625
|
'hosts.confirmDelete': 'Delete this host (and its workspace bindings)?',
|
|
626
|
+
'hosts.testOk': '{alias}: OK ({ms} ms)',
|
|
627
|
+
'hosts.unknownError': 'unknown error',
|
|
628
|
+
'hosts.deleted': '{alias}: deleted',
|
|
629
|
+
'hosts.saved': '{alias}: saved',
|
|
630
|
+
'hosts.imported': 'Imported {count} host(s)',
|
|
631
|
+
'hosts.importedSkipped': '; skipped: {list}',
|
|
486
632
|
'form.alias': 'Alias',
|
|
633
|
+
'form.unchanged': 'leave empty to keep',
|
|
634
|
+
'form.unchangedWhenEmpty': 'empty keeps the stored value',
|
|
487
635
|
'form.host': 'Host',
|
|
488
636
|
'form.port': 'Port',
|
|
489
637
|
'form.user': 'User',
|
|
@@ -498,6 +646,34 @@ const en: Record<string, string> = {
|
|
|
498
646
|
'deploy.ok': 'pushed',
|
|
499
647
|
'deploy.skipped': 'up to date (skipped)',
|
|
500
648
|
'deploy.failed': 'push failed',
|
|
649
|
+
// -- remote environment self-check (Doctor)
|
|
650
|
+
'doctor.open': 'Environment check',
|
|
651
|
+
'doctor.title': 'Environment check · {alias}',
|
|
652
|
+
'doctor.loading': 'Running the remote check…',
|
|
653
|
+
'doctor.copy': 'Copy full report',
|
|
654
|
+
'doctor.copied': 'Copied',
|
|
655
|
+
'doctor.copyFailed': 'Copy failed — select the table and copy it manually',
|
|
656
|
+
'doctor.close': 'Close',
|
|
657
|
+
'doctor.colItem': 'Item',
|
|
658
|
+
'doctor.colState': 'State',
|
|
659
|
+
'doctor.colDetail': 'Detail',
|
|
660
|
+
'doctor.unknownHint': '"Unknown" means the check could not answer this time (no output, no permission, or a truncated capture). It does NOT mean "not installed" — please send the whole report when asking for help.',
|
|
661
|
+
'doctor.reportTitle': 'dsh-remote-vs environment check · {alias}',
|
|
662
|
+
'doctor.reportAt': 'At: {at}',
|
|
663
|
+
'doctor.state.ok': 'OK',
|
|
664
|
+
'doctor.state.missing': 'MISSING',
|
|
665
|
+
'doctor.state.unknown': 'UNKNOWN',
|
|
666
|
+
'doctor.item.os': 'OS / kernel',
|
|
667
|
+
'doctor.item.libc': 'glibc / ldd version',
|
|
668
|
+
'doctor.item.git': 'git',
|
|
669
|
+
'doctor.item.rg': 'ripgrep (rg)',
|
|
670
|
+
'doctor.item.tar': 'tar',
|
|
671
|
+
'doctor.item.setsid': 'setsid --wait (cancelable timeouts)',
|
|
672
|
+
'doctor.item.disk': 'Disk ($HOME filesystem)',
|
|
673
|
+
'doctor.item.nproc': 'CPU cores',
|
|
674
|
+
'doctor.item.memory': 'Memory',
|
|
675
|
+
'doctor.item.helpers': 'Installed helpers',
|
|
676
|
+
'doctor.item.sshd': 'sshd MaxSessions',
|
|
501
677
|
'ws.title': 'Remote workspaces',
|
|
502
678
|
'ws.empty': 'No bindings yet. Configure a host in Settings → Remote Hosts first, then use the wizard below.',
|
|
503
679
|
'ws.new': 'New remote workspace',
|
|
@@ -519,6 +695,12 @@ const en: Record<string, string> = {
|
|
|
519
695
|
'ws.step3': '3. Bind a remote directory',
|
|
520
696
|
'ws.testFirst': 'Test the connection first',
|
|
521
697
|
'ws.pushFirst': 'Run push first',
|
|
698
|
+
'ws.unbindTitle': 'Unbind workspace',
|
|
699
|
+
'ws.unbindConfirm': 'Unbind {name}? Sessions and history stay readable, but new remote calls are refused; you can bind it again later (with a new id).',
|
|
700
|
+
'ws.removed': 'Binding removed',
|
|
701
|
+
'ws.saved': 'Binding saved',
|
|
702
|
+
'ws.notDirectory': '{path}: not a directory',
|
|
703
|
+
'ws.directoryOk': '{path}: directory OK',
|
|
522
704
|
'files.selectWorkspace': 'Pick a remote workspace:',
|
|
523
705
|
'files.uploadFile': 'Upload File…',
|
|
524
706
|
'files.uploadFolder': 'Upload Folder…',
|
|
@@ -548,6 +730,7 @@ const en: Record<string, string> = {
|
|
|
548
730
|
'term.selectHost': 'Pick a host, then connect:',
|
|
549
731
|
'term.reconnect': 'Reconnect',
|
|
550
732
|
'term.closed': 'Connection closed.',
|
|
733
|
+
'term.disconnected': 'Connection lost — reattach available.',
|
|
551
734
|
'term.new': 'New terminal',
|
|
552
735
|
'term.empty': 'No terminal yet — pick a host, then press + to open one.',
|
|
553
736
|
'term.close': 'Close terminal',
|
|
@@ -556,12 +739,15 @@ const en: Record<string, string> = {
|
|
|
556
739
|
'tab.git': 'Git',
|
|
557
740
|
'git.hint': 'Pick a workspace whose remote path is a git repository.',
|
|
558
741
|
'scm.loadingSlow': 'Reading repository state… a large repo can take minutes on first read',
|
|
742
|
+
'scm.offlineRead': 'Connection is down: Git status cannot be read right now',
|
|
559
743
|
'scm.cached': 'cached',
|
|
560
744
|
'scm.cachedRefreshing': 'cached · refreshing',
|
|
561
745
|
'scm.cachedHint': 'Showing this workspace’s last read while it refreshes in the background; the change list and stage/commit actions still target this workspace.',
|
|
562
746
|
'scm.refreshFailed': 'Refresh failed:',
|
|
563
747
|
'common.close': 'Close',
|
|
564
748
|
'common.loading': 'Loading…',
|
|
749
|
+
'common.ok': 'OK',
|
|
750
|
+
'common.cancel': 'Cancel',
|
|
565
751
|
'flow.title': 'Add workspace',
|
|
566
752
|
'flow.local': 'Local',
|
|
567
753
|
'flow.remote': 'Remote',
|
|
@@ -604,6 +790,7 @@ const en: Record<string, string> = {
|
|
|
604
790
|
'files.open': 'Open',
|
|
605
791
|
'files.openAsText': 'Open as text',
|
|
606
792
|
'files.openInFloat': 'Open in floating editor',
|
|
793
|
+
'files.openBlockedByDirty': 'Unsaved edits block switching to that file’s workspace, so the file was not opened; save or discard them first.',
|
|
607
794
|
// -- floating editor window
|
|
608
795
|
'float.title': 'Floating editor',
|
|
609
796
|
'float.dragHint': 'Drag the title bar to move; drag an edge to resize; double-click the title bar to maximize or restore',
|
|
@@ -626,6 +813,7 @@ const en: Record<string, string> = {
|
|
|
626
813
|
'files.copyRel': 'Copy relative path',
|
|
627
814
|
'files.copyAbs': 'Copy absolute path',
|
|
628
815
|
'files.download': 'Download to Local',
|
|
816
|
+
'files.transferBusy': 'Another transfer is running; finish or cancel it first.',
|
|
629
817
|
'downloads.running': 'Downloading',
|
|
630
818
|
'downloads.done': 'Downloaded',
|
|
631
819
|
'downloads.failed': 'Download failed',
|
|
@@ -635,6 +823,8 @@ const en: Record<string, string> = {
|
|
|
635
823
|
'downloads.browserDefault': 'Saved to the browser download folder',
|
|
636
824
|
'downloads.indeterminate': 'Packaging…',
|
|
637
825
|
'downloads.sizeUnknown': 'size unknown',
|
|
826
|
+
'downloads.handedOff': 'Handed to browser',
|
|
827
|
+
'downloads.handedOffDetail': 'Your browser completes the download; this panel cannot observe or cancel it.',
|
|
638
828
|
'downloads.tooMany': 'Too many entries (max 100); download the containing folder instead',
|
|
639
829
|
'files.copied': 'Copied',
|
|
640
830
|
'files.moved': 'Moved',
|
|
@@ -648,6 +838,7 @@ const en: Record<string, string> = {
|
|
|
648
838
|
'files.refDisabled': 'The on-screen session is not in this remote workspace',
|
|
649
839
|
'search.placeholder': 'Search remote workspace by file name…',
|
|
650
840
|
'search.hint': 'Type part of a file name (depth and count are capped).',
|
|
841
|
+
'search.stderrWarn': 'Search finished with warnings: {detail}',
|
|
651
842
|
'search.modeName': 'File name',
|
|
652
843
|
'search.modeNameHint': 'Search the remote workspace by file name',
|
|
653
844
|
'search.modeContent': 'Content',
|
|
@@ -799,6 +990,7 @@ const en: Record<string, string> = {
|
|
|
799
990
|
'scm.hunkStaged': 'Hunk staged',
|
|
800
991
|
'scm.hunkUnstaged': 'Hunk unstaged',
|
|
801
992
|
'scm.hunkReverted': 'Hunk reverted',
|
|
993
|
+
'scm.hunkTruncated': 'File too large: this diff’s patch may be truncated, so hunk actions are disabled.',
|
|
802
994
|
'scm.emptySide': '(empty file)',
|
|
803
995
|
'scm.logEmpty': 'No commits.',
|
|
804
996
|
'scm.logCapped': 'Showing the latest {n} commits.',
|
|
@@ -857,7 +1049,28 @@ const en: Record<string, string> = {
|
|
|
857
1049
|
'editor.resizeHint': 'Drag to resize panel / editor',
|
|
858
1050
|
'editor.openedIn': 'Opened in the top tab:',
|
|
859
1051
|
'editor.readTimeout': 'Read timed out (host not responding)',
|
|
1052
|
+
'editor.conflictTitle': 'Remote file changed — save blocked',
|
|
1053
|
+
'editor.conflictBody': 'The remote file was modified at {time}, after you opened it. Nothing was written.',
|
|
1054
|
+
'editor.conflictDeleted': 'The remote file was deleted. Nothing was written.',
|
|
1055
|
+
'editor.conflictBlocked': 'Remote file changed — save blocked',
|
|
1056
|
+
'editor.conflictDiff': 'Show difference',
|
|
1057
|
+
'editor.conflictDiffHead': 'Remote now → your buffer',
|
|
1058
|
+
'editor.conflictSame': 'Identical to your buffer (only the timestamp moved)',
|
|
1059
|
+
'editor.conflictMoreHunks': '{count} more differences not shown',
|
|
1060
|
+
'editor.conflictReload': 'Load remote version',
|
|
1061
|
+
'editor.conflictOverwrite': 'Overwrite anyway',
|
|
1062
|
+
'editor.conflictOverwriteTitle': 'Overwrite what the other writer put there?',
|
|
1063
|
+
'editor.tabsRestored': 'Restored {count} tabs',
|
|
1064
|
+
'editor.tabsRestoreMissing': '{count} tabs could not be restored (missing or unreadable) and were skipped',
|
|
1065
|
+
'editor.tabsRestoreUnknown': '{count} tabs are still loading slowly and were left open; reload to try again',
|
|
860
1066
|
'editor.needSource': 'Switch back to Source to save: preview mode has no editor buffer, so saving would write the pre-edit text to the remote file.',
|
|
1067
|
+
'editor.reloadFile': 'Reload this file',
|
|
1068
|
+
'editor.reloadDirty': 'Unsaved changes will be discarded by reloading',
|
|
1069
|
+
'editor.discardReload': 'Discard and reload',
|
|
1070
|
+
'editor.switchDirty': 'Switching workspace closes every editor tab, and some have unsaved changes',
|
|
1071
|
+
'editor.discardSwitch': 'Discard changes and switch',
|
|
1072
|
+
'editor.switchTimeout': 'Timed out waiting for the switch confirmation, so the switch was cancelled (unsaved edits are kept). Pick the workspace again.',
|
|
1073
|
+
'editor.truncatedReadOnly': 'File is larger than the editable limit (8MiB): read-only, saving is blocked.',
|
|
861
1074
|
'git.notARepo': 'This remote workspace is not a git repository.',
|
|
862
1075
|
// -- session change panel (above the composer)
|
|
863
1076
|
'changes.title': 'Changed files',
|
|
@@ -889,6 +1102,37 @@ const en: Record<string, string> = {
|
|
|
889
1102
|
'changes.undoNoContext': 'The host and repository behind this change are unknown, so nothing was reverted.',
|
|
890
1103
|
'changes.undoConflict': 'The surroundings of this change moved, so the host refused the revert (the file was not modified).',
|
|
891
1104
|
'changes.undoMissing': 'No patch is available for this change, so nothing was reverted.',
|
|
1105
|
+
// -- connection status + degraded (offline read-only) mode
|
|
1106
|
+
'connection.ok': 'Connection OK',
|
|
1107
|
+
'connection.error': 'Connection issue',
|
|
1108
|
+
'connection.idle': 'Ready (on demand)',
|
|
1109
|
+
'connection.retrying': 'Reconnecting…',
|
|
1110
|
+
'connection.retryHint': 'Click to retry the connection',
|
|
1111
|
+
'connection.lastOk': 'Last success',
|
|
1112
|
+
'connection.editorReadOnly': 'Connection lost: showing cached content (read-only); it refreshes automatically when the link is back.',
|
|
1113
|
+
'connection.editorDirty': 'There are unsaved edits; they can be saved once the connection recovers.',
|
|
1114
|
+
'connection.saveBlocked': 'The connection is down, so the file cannot be saved; try again after it recovers.',
|
|
1115
|
+
'connection.readFailed': 'The connection is down, so this file cannot be read; it refreshes automatically when the link is back.',
|
|
1116
|
+
'connection.recovered': 'Connection recovered: directories, git, unmodified file tabs and read-only diff tabs were refreshed.',
|
|
1117
|
+
'connection.recoveredDirty': 'Connection recovered: directories, git and read-only tabs were refreshed; tabs with unsaved edits were left alone.',
|
|
1118
|
+
'connection.errorAt': 'Last failure',
|
|
1119
|
+
'connection.detail': 'Diagnostics',
|
|
1120
|
+
'connection.actionFailed': 'The connection is down, so the action was not sent; try again after it recovers.',
|
|
1121
|
+
'files.offline': 'Connection lost, and this folder has no cached listing',
|
|
1122
|
+
// -- Ctrl+P quick open (remote file index + fuzzy matching)
|
|
1123
|
+
'quickopen.title': 'Quick open',
|
|
1124
|
+
'quickopen.placeholder': 'Type a file name, Enter to open',
|
|
1125
|
+
'quickopen.hint': '↑↓ select · Enter open · Esc close',
|
|
1126
|
+
'quickopen.recent': 'Recently opened',
|
|
1127
|
+
'quickopen.emptyRecent': 'No recently opened files yet — type to search',
|
|
1128
|
+
'quickopen.indexing': 'Building the remote file index…',
|
|
1129
|
+
'quickopen.indexError': 'Index failed: {reason}',
|
|
1130
|
+
'quickopen.truncated': 'Index truncated: only the first {count} files are searchable',
|
|
1131
|
+
'quickopen.depthCapped': 'No ripgrep on the host: only the first {depth} directory levels were scanned, so deeper files may be missing ({count} indexed)',
|
|
1132
|
+
'quickopen.warning': 'Index incomplete: {detail}',
|
|
1133
|
+
'quickopen.noResults': 'No matching file',
|
|
1134
|
+
'quickopen.more': 'Too many matches — keep typing',
|
|
1135
|
+
'quickopen.noWorkspace': 'No remote workspace is selected',
|
|
892
1136
|
}
|
|
893
1137
|
|
|
894
1138
|
export type Lang = 'zh' | 'en'
|
package/src/client/index.tsx
CHANGED
|
@@ -97,8 +97,11 @@ export function apply(ctx: Context): void {
|
|
|
97
97
|
try {
|
|
98
98
|
disposeBetter = sidebar.registerTab({
|
|
99
99
|
id: 'remote-vs:explorer',
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
// Through the dictionary: this tab is user-visible chrome, and the
|
|
101
|
+
// literal made it Chinese-only for an English UI (the native fallback
|
|
102
|
+
// page and every other label already go through `nativeT`).
|
|
103
|
+
title: () => nativeT('tab.remote'),
|
|
104
|
+
description: () => nativeT('tab.remoteDesc'),
|
|
102
105
|
icon: (size: number) => <RemoteIcon size={size} />,
|
|
103
106
|
order: 30,
|
|
104
107
|
single: true,
|