dsh-remote-vs 0.25.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 +11 -7
- package/README.md +10 -7
- package/THIRD-PARTY-NOTICES.md +188 -0
- package/lib/client.js +6512 -79961
- package/lib/index.js +1283 -992
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/client/CodeEditor.d.ts +8 -0
- package/lib/types/client/RemoteExplorer.d.ts +53 -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/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 +53 -0
- package/lib/types/client/vsc/FindWidget.d.ts +6 -0
- package/lib/types/client/vsc/change-marks.d.ts +16 -6
- package/lib/types/client/vsc/editor-keymap.d.ts +35 -1
- package/lib/types/client/vsc/kit.d.ts +11 -0
- package/lib/types/client/vsc/save-shortcut.d.ts +21 -0
- package/lib/types/client/vsc/terminal-theme.d.ts +28 -2
- 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/routes.d.ts +2 -0
- package/lib/types/store.d.ts +7 -0
- package/lib/types/terminal.d.ts +8 -0
- 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 +151 -8
- package/src/client/DirectoryFlow.tsx +16 -0
- package/src/client/DoctorPanel.tsx +70 -7
- package/src/client/EditorPane.tsx +63 -14
- package/src/client/HostsView.tsx +12 -3
- package/src/client/RemoteDirectoryPicker.tsx +12 -0
- package/src/client/RemoteExplorer.tsx +929 -40
- package/src/client/RemoteRoot.tsx +147 -22
- package/src/client/SearchView.tsx +8 -0
- package/src/client/TerminalSnippets.tsx +83 -8
- package/src/client/api.ts +106 -13
- 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/i18n.ts +82 -8
- 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 +372 -9
- package/src/client/ui.tsx +4 -0
- package/src/client/vsc/FindWidget.tsx +24 -9
- package/src/client/vsc/breadcrumb.tsx +91 -3
- package/src/client/vsc/change-marks.ts +93 -44
- package/src/client/vsc/editor-keymap.ts +59 -1
- package/src/client/vsc/file-icons.tsx +17 -3
- package/src/client/vsc/kit.tsx +26 -9
- package/src/client/vsc/save-shortcut.ts +47 -1
- package/src/client/vsc/terminal-theme.ts +44 -18
- package/src/client/vsc/vsc.css +411 -153
- 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/routes.ts +212 -43
- package/src/sftp.ts +51 -14
- package/src/store.ts +10 -0
- package/src/terminal.ts +73 -26
- package/src/view-settings.ts +50 -10
- package/lib/types/client/Dialog.d.ts +0 -14
- package/src/client/Dialog.tsx +0 -76
|
@@ -40,8 +40,12 @@ export interface SaveShortcutEvent {
|
|
|
40
40
|
* A terminal (xterm) forwards keys to the remote shell and a themed dialog's
|
|
41
41
|
* input is mid-edit; hijacking the key there would be a surprise, and for the
|
|
42
42
|
* shell it would also steal a control character (`^S`).
|
|
43
|
+
*
|
|
44
|
+
* Exported so the plugin's OTHER window-level shortcut (Ctrl+P in `RemoteRoot`)
|
|
45
|
+
* draws the same line instead of re-inventing a narrower one — it used to
|
|
46
|
+
* exclude only `.xterm` and hijacked the host's chat composer.
|
|
43
47
|
*/
|
|
44
|
-
const FOREIGN_TARGET = '.xterm, textarea, input, [contenteditable="true"]'
|
|
48
|
+
export const FOREIGN_TARGET = '.xterm, textarea, input, [contenteditable="true"]'
|
|
45
49
|
|
|
46
50
|
/**
|
|
47
51
|
* Is this the save shortcut this module should act on?
|
|
@@ -86,8 +90,50 @@ const resolvers = new Set<SaveShortcutResolver>()
|
|
|
86
90
|
/** True while the single window listener is installed. */
|
|
87
91
|
let listening = false
|
|
88
92
|
|
|
93
|
+
/**
|
|
94
|
+
* The layers that own the keyboard while they are open.
|
|
95
|
+
*
|
|
96
|
+
* Mirrors the modal selector the host's own shortcut dispatcher trims commands
|
|
97
|
+
* with (`[role="dialog"][aria-modal="true"], [role="menu"]` in
|
|
98
|
+
* `@deepseek-ai/dsh-client-shortcuts`). These window listeners register nothing
|
|
99
|
+
* with `ctx.shortcuts`, so no host mechanism keeps them from firing THROUGH a
|
|
100
|
+
* dialog. Blanket on purpose: our own `.rvs-modal-mask`, QuickOpen and the
|
|
101
|
+
* context menus are modal too, and a global shortcut must not pierce those
|
|
102
|
+
* either. A caller that owns a layer and wants a toggle inside it (Ctrl+P
|
|
103
|
+
* closes QuickOpen) skips this check while its own layer is up.
|
|
104
|
+
*
|
|
105
|
+
* `role="menu"` is the one exception to the blanket: it is what the host's
|
|
106
|
+
* dispatcher treats as modal, but a NON-modal picker floats over the editor
|
|
107
|
+
* while the editor is still the surface in use, so swallowing Ctrl+S there was
|
|
108
|
+
* a real regression (audit NIT-5). Such a menu opts out with
|
|
109
|
+
* `[data-rvs-nonmodal]` — the breadcrumb dropdown (`vsc/breadcrumb.tsx`) carries
|
|
110
|
+
* it now, so no class-name bridge is needed.
|
|
111
|
+
* RESIDUAL, deliberately conservative: any future non-modal menu that carries
|
|
112
|
+
* neither marker still swallows Ctrl+S, and a modal layer that lacks
|
|
113
|
+
* `aria-modal="true"` is not caught by the dialog branch. Failing safe matters
|
|
114
|
+
* more here than a missed save: the alternative is writing a remote file
|
|
115
|
+
* underneath a layer the user is answering.
|
|
116
|
+
*/
|
|
117
|
+
const MODAL_LAYER = '[role="dialog"][aria-modal="true"], '
|
|
118
|
+
+ '[role="menu"]:not([data-rvs-nonmodal])'
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Is a modal layer (host approval / settings, our own dialog, an open menu) on
|
|
122
|
+
* screen right now?
|
|
123
|
+
*
|
|
124
|
+
* Called from the DOM listener entry points only: `isSaveShortcut` stays a pure
|
|
125
|
+
* predicate on the event. Without it Ctrl+S silently saved the remote file
|
|
126
|
+
* underneath a pending host approval dialog — a write the user never confirmed.
|
|
127
|
+
*/
|
|
128
|
+
export function isModalLayerOpen(): boolean {
|
|
129
|
+
if (typeof document === 'undefined') return false
|
|
130
|
+
return document.querySelector(MODAL_LAYER) !== null
|
|
131
|
+
}
|
|
132
|
+
|
|
89
133
|
function onKeyDown(event: KeyboardEvent): void {
|
|
90
134
|
if (!isSaveShortcut(event)) return
|
|
135
|
+
// A dialog or menu on screen owns the keyboard (see `isModalLayerOpen`).
|
|
136
|
+
if (isModalLayerOpen()) return
|
|
91
137
|
for (const resolve of [...resolvers].reverse()) {
|
|
92
138
|
const save = resolve()
|
|
93
139
|
if (save === undefined) continue
|
|
@@ -15,7 +15,16 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { ITheme } from '@xterm/xterm'
|
|
17
17
|
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The dark scheme palette.
|
|
20
|
+
*
|
|
21
|
+
* Contrast is measured against `background` (#0e0e13): the VS Code Dark+ ANSI
|
|
22
|
+
* set, with red / blue / magenta / brightBlack lifted just past 4.5:1 (`black`
|
|
23
|
+
* is left at #000000 on purpose — ANSI black is a background-fill colour by
|
|
24
|
+
* convention and is not read as text; 1.09:1). `brightCyan` is lifted off the
|
|
25
|
+
* plain cyan (#29b8db sat only ΔE76 6.0 from #11a8cd — the pair read as one
|
|
26
|
+
* colour) to #4dd0e1: ΔE76 18.5, 10.5:1 on the terminal surface.
|
|
27
|
+
*/
|
|
19
28
|
export const DARK_TERMINAL_THEME: ITheme = {
|
|
20
29
|
background: '#0e0e13',
|
|
21
30
|
foreground: '#e8e8e8',
|
|
@@ -23,24 +32,41 @@ export const DARK_TERMINAL_THEME: ITheme = {
|
|
|
23
32
|
selectionBackground: '#264f78',
|
|
24
33
|
selectionInactiveBackground: '#333c48',
|
|
25
34
|
black: '#000000',
|
|
26
|
-
red: '#
|
|
35
|
+
red: '#d54f4f',
|
|
27
36
|
green: '#0dbc79',
|
|
28
37
|
yellow: '#e5e910',
|
|
29
|
-
blue: '#
|
|
30
|
-
magenta: '#
|
|
38
|
+
blue: '#2f7fd6',
|
|
39
|
+
magenta: '#cc55cc',
|
|
31
40
|
cyan: '#11a8cd',
|
|
32
41
|
white: '#e5e5e5',
|
|
33
|
-
brightBlack: '#
|
|
42
|
+
brightBlack: '#858585',
|
|
34
43
|
brightRed: '#f14c4c',
|
|
35
44
|
brightGreen: '#23d18b',
|
|
36
45
|
brightYellow: '#f5f543',
|
|
37
46
|
brightBlue: '#3b8eea',
|
|
38
47
|
brightMagenta: '#d670d6',
|
|
39
|
-
brightCyan: '#
|
|
48
|
+
brightCyan: '#4dd0e1',
|
|
40
49
|
brightWhite: '#ffffff',
|
|
41
50
|
}
|
|
42
51
|
|
|
43
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The light scheme palette.
|
|
54
|
+
*
|
|
55
|
+
* Re-taken for a WHITE background (2026-11-23): the Dark+ ANSI set this used to
|
|
56
|
+
* copy measured 1.0–3.6:1 on #ffffff (brightWhite was white-on-white = 1.00,
|
|
57
|
+
* brightYellow 1.17). Text here is targeted at ≥4.5:1, and every colour is.
|
|
58
|
+
*
|
|
59
|
+
* "Bright" cannot mean "lighter" on white, so the bright group is the more
|
|
60
|
+
* saturated sibling of its hue rather than a lighter one; where a hue had to be
|
|
61
|
+
* re-picked the normal/bright pair keeps a visible difference. `brightWhite` is
|
|
62
|
+
* the one colour that has no readable white-ish form: it is #767676, the
|
|
63
|
+
* lightest neutral of the ramp, which keeps "bright white" distinguishable from
|
|
64
|
+
* `white`/`brightBlack` while reaching 4.54:1 (VS Code Light+ ships #e5e5e5,
|
|
65
|
+
* 1.05:1 — unreadable). `black` stays #000000 (ANSI background-fill convention).
|
|
66
|
+
* `brightCyan` moves to the teal step #0f766e: the previous #0e7490 sat ΔE76
|
|
67
|
+
* 4.0 from `cyan` (#0b6d84) and read as the same colour; the new value is ΔE76
|
|
68
|
+
* 20.5 away at 5.47:1.
|
|
69
|
+
*/
|
|
44
70
|
export const LIGHT_TERMINAL_THEME: ITheme = {
|
|
45
71
|
background: '#ffffff',
|
|
46
72
|
foreground: '#1a1a1a',
|
|
@@ -48,21 +74,21 @@ export const LIGHT_TERMINAL_THEME: ITheme = {
|
|
|
48
74
|
selectionBackground: '#add6ff',
|
|
49
75
|
selectionInactiveBackground: '#d7e7f5',
|
|
50
76
|
black: '#000000',
|
|
51
|
-
red: '#
|
|
52
|
-
green: '#
|
|
53
|
-
yellow: '#
|
|
77
|
+
red: '#b02a2a',
|
|
78
|
+
green: '#0b6b0b',
|
|
79
|
+
yellow: '#6f5f00',
|
|
54
80
|
blue: '#0451a5',
|
|
55
81
|
magenta: '#bc05bc',
|
|
56
|
-
cyan: '#
|
|
82
|
+
cyan: '#0b6d84',
|
|
57
83
|
white: '#555555',
|
|
58
84
|
brightBlack: '#666666',
|
|
59
|
-
brightRed: '#
|
|
60
|
-
brightGreen: '#
|
|
61
|
-
brightYellow: '#
|
|
62
|
-
brightBlue: '#
|
|
63
|
-
brightMagenta: '#
|
|
64
|
-
brightCyan: '#
|
|
65
|
-
brightWhite: '#
|
|
85
|
+
brightRed: '#cd3131',
|
|
86
|
+
brightGreen: '#107c10',
|
|
87
|
+
brightYellow: '#8a6d00',
|
|
88
|
+
brightBlue: '#1a6fc4',
|
|
89
|
+
brightMagenta: '#bd31bd',
|
|
90
|
+
brightCyan: '#0f766e',
|
|
91
|
+
brightWhite: '#767676',
|
|
66
92
|
}
|
|
67
93
|
|
|
68
94
|
/** The palette for one scheme. */
|