dsh-remote-vs 0.23.0 → 0.25.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 +49 -15
- package/README.md +40 -14
- package/lib/client.js +45978 -43338
- package/lib/index.js +388 -90
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/client/CodeEditor.d.ts +17 -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/RemoteRoot.d.ts +5 -5
- package/lib/types/client/SettingsHosts.d.ts +3 -0
- 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 +4 -1
- package/lib/types/client/auto-open-remote.d.ts +41 -0
- package/lib/types/client/editor-capability.d.ts +27 -0
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/client/store.d.ts +59 -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/use-remote-chat-target.d.ts +2 -0
- package/lib/types/client/view-settings.d.ts +40 -0
- package/lib/types/client/vsc/breadcrumb.d.ts +30 -0
- package/lib/types/client/vsc/editor-caret.d.ts +32 -0
- 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 +2 -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 +22 -0
- package/lib/types/client/vsc/terminal-writer.d.ts +52 -0
- package/lib/types/paths.d.ts +9 -0
- package/lib/types/pool.d.ts +25 -0
- package/lib/types/protocol.d.ts +35 -0
- package/lib/types/routes.d.ts +7 -0
- package/lib/types/terminal.d.ts +25 -1
- package/lib/types/view-settings.d.ts +26 -0
- package/lib/{worlds-DXdP4SMn.js → worlds-B7gEDBzC.js} +13 -1
- package/package.json +36 -36
- package/src/client/CodeEditor.tsx +54 -2
- package/src/client/EditorPane.tsx +485 -107
- package/src/client/FloatingPlaceholder.tsx +34 -5
- package/src/client/RemoteEditorView.tsx +14 -11
- package/src/client/RemoteRoot.tsx +20 -125
- package/src/client/SettingsHosts.tsx +81 -3
- package/src/client/TerminalSnippets.tsx +357 -0
- package/src/client/TerminalView.tsx +50 -1
- package/src/client/XTerm.tsx +228 -58
- package/src/client/api.ts +7 -0
- package/src/client/auto-open-remote.ts +439 -0
- package/src/client/editor-capability.ts +42 -0
- package/src/client/i18n.ts +158 -6
- package/src/client/index.tsx +30 -6
- package/src/client/store.tsx +165 -13
- package/src/client/terminal-input.ts +44 -0
- package/src/client/terminal-snippets.ts +216 -0
- package/src/client/use-remote-chat-target.ts +1 -1
- package/src/client/view-settings.ts +99 -0
- package/src/client/vsc/breadcrumb.tsx +251 -0
- package/src/client/vsc/editor-caret.ts +30 -0
- 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/image-preview.tsx +110 -0
- package/src/client/vsc/kit.tsx +20 -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 +71 -0
- package/src/client/vsc/terminal-writer.ts +112 -0
- package/src/client/vsc/vsc.css +687 -48
- package/src/index.ts +6 -0
- package/src/paths.ts +13 -0
- package/src/pool.ts +99 -27
- package/src/protocol.ts +45 -0
- package/src/routes.ts +47 -0
- package/src/terminal.ts +160 -6
- package/src/view-settings.ts +133 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote-vs",
|
|
3
3
|
"description": "VSCode-style remote development for DSH: SSH host manager (key/password), helper deploy pipeline with version check, remote file explorer + editor + terminal in dsh-better-sidebar.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.25.0",
|
|
5
5
|
"icon": "icon.svg",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"dsh",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"./locale/*.json": "./locale/*.json"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
|
-
"dsh": ">=0.2.2-rc.
|
|
62
|
+
"dsh": ">=0.2.2-rc.5 <0.3.0"
|
|
63
63
|
},
|
|
64
64
|
"dsh": {
|
|
65
65
|
"bundle": {
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"@codemirror/search": "6.5.11",
|
|
121
121
|
"@codemirror/state": "^6.7.6",
|
|
122
122
|
"@codemirror/view": "^6.43.14",
|
|
123
|
-
"@deepseek-ai/dsh-fs-ssh": "0.2.2-rc.
|
|
124
|
-
"@deepseek-ai/dsh-ssh": "0.2.2-rc.
|
|
123
|
+
"@deepseek-ai/dsh-fs-ssh": "0.2.2-rc.5",
|
|
124
|
+
"@deepseek-ai/dsh-ssh": "0.2.2-rc.5",
|
|
125
125
|
"@deepseek-ai/schemastery": "3.19.0",
|
|
126
126
|
"@lezer/highlight": "1.2.3",
|
|
127
127
|
"@xterm/addon-fit": "^0.11.0",
|
|
@@ -131,43 +131,43 @@
|
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
134
|
-
"@deepseek-ai/dsh-agent-preset": "^0.2.2-rc.
|
|
135
|
-
"@deepseek-ai/dsh-bash-local": "^0.2.2-rc.
|
|
136
|
-
"@deepseek-ai/dsh-file-reference": "^0.2.2-rc.
|
|
137
|
-
"@deepseek-ai/dsh-fs": "^0.2.2-rc.
|
|
138
|
-
"@deepseek-ai/dsh-shell": "^0.2.2-rc.
|
|
139
|
-
"@deepseek-ai/dsh-spill": "^0.2.2-rc.
|
|
140
|
-
"@deepseek-ai/dsh-subprocess": "^0.2.2-rc.
|
|
141
|
-
"@deepseek-ai/dsh-tools": "^0.2.2-rc.
|
|
134
|
+
"@deepseek-ai/dsh-agent-preset": "^0.2.2-rc.5",
|
|
135
|
+
"@deepseek-ai/dsh-bash-local": "^0.2.2-rc.5",
|
|
136
|
+
"@deepseek-ai/dsh-file-reference": "^0.2.2-rc.5",
|
|
137
|
+
"@deepseek-ai/dsh-fs": "^0.2.2-rc.5",
|
|
138
|
+
"@deepseek-ai/dsh-shell": "^0.2.2-rc.5",
|
|
139
|
+
"@deepseek-ai/dsh-spill": "^0.2.2-rc.5",
|
|
140
|
+
"@deepseek-ai/dsh-subprocess": "^0.2.2-rc.5",
|
|
141
|
+
"@deepseek-ai/dsh-tools": "^0.2.2-rc.5",
|
|
142
142
|
"react": "^18.2.0",
|
|
143
143
|
"react-dom": "^18.2.0"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
146
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
147
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.
|
|
148
|
-
"@deepseek-ai/dsh-agent-preset-registry": "0.2.2-rc.
|
|
149
|
-
"@deepseek-ai/dsh-api-remotes": "0.2.2-rc.
|
|
150
|
-
"@deepseek-ai/dsh-bash-local": "0.2.2-rc.
|
|
151
|
-
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.
|
|
152
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.
|
|
153
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.
|
|
154
|
-
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.
|
|
155
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.
|
|
156
|
-
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.
|
|
157
|
-
"@deepseek-ai/dsh-file-reference": "0.2.2-rc.
|
|
158
|
-
"@deepseek-ai/dsh-fs": "0.2.2-rc.
|
|
159
|
-
"@deepseek-ai/dsh-host-directory-picker": "0.2.2-rc.
|
|
160
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.2-rc.
|
|
161
|
-
"@deepseek-ai/dsh-llm": "0.2.2-rc.
|
|
162
|
-
"@deepseek-ai/dsh-sandbox": "0.2.2-rc.
|
|
163
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.
|
|
164
|
-
"@deepseek-ai/dsh-shell": "0.2.2-rc.
|
|
165
|
-
"@deepseek-ai/dsh-spill": "0.2.2-rc.
|
|
166
|
-
"@deepseek-ai/dsh-subprocess": "0.2.2-rc.
|
|
167
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.
|
|
168
|
-
"@deepseek-ai/dsh-tools": "0.2.2-rc.
|
|
169
|
-
"@deepseek-ai/dsh-working-directory": "0.2.2-rc.
|
|
170
|
-
"@deepseek-ai/dsh-workspace": "0.2.2-rc.
|
|
147
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.5",
|
|
148
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.2-rc.5",
|
|
149
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.2-rc.5",
|
|
150
|
+
"@deepseek-ai/dsh-bash-local": "0.2.2-rc.5",
|
|
151
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.5",
|
|
152
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
|
|
153
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.5",
|
|
154
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.5",
|
|
155
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
|
|
156
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.5",
|
|
157
|
+
"@deepseek-ai/dsh-file-reference": "0.2.2-rc.5",
|
|
158
|
+
"@deepseek-ai/dsh-fs": "0.2.2-rc.5",
|
|
159
|
+
"@deepseek-ai/dsh-host-directory-picker": "0.2.2-rc.5",
|
|
160
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.2-rc.5",
|
|
161
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.5",
|
|
162
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-rc.5",
|
|
163
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.5",
|
|
164
|
+
"@deepseek-ai/dsh-shell": "0.2.2-rc.5",
|
|
165
|
+
"@deepseek-ai/dsh-spill": "0.2.2-rc.5",
|
|
166
|
+
"@deepseek-ai/dsh-subprocess": "0.2.2-rc.5",
|
|
167
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
|
|
168
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.5",
|
|
169
|
+
"@deepseek-ai/dsh-working-directory": "0.2.2-rc.5",
|
|
170
|
+
"@deepseek-ai/dsh-workspace": "0.2.2-rc.5",
|
|
171
171
|
"@types/node": "^22.20.0",
|
|
172
172
|
"@types/react": "~18.3.1",
|
|
173
173
|
"@types/react-dom": "^18.3.5",
|
|
@@ -58,6 +58,9 @@ export interface CodeEditorViewState {
|
|
|
58
58
|
ranges: { anchor: number; head: number }[]
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
export { caretOf, type CodeEditorCaret } from './vsc/editor-caret.ts'
|
|
62
|
+
import { caretOf as caretOfState, type CodeEditorCaret as CodeEditorCaretType } from './vsc/editor-caret.ts'
|
|
63
|
+
|
|
61
64
|
export interface CodeEditorHandle {
|
|
62
65
|
getContent: () => string
|
|
63
66
|
isDirty: () => boolean
|
|
@@ -103,6 +106,17 @@ const fallbackCompartment = new Compartment()
|
|
|
103
106
|
*/
|
|
104
107
|
const readOnlyCompartment = new Compartment()
|
|
105
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Compartment holding the word-wrap flag.
|
|
111
|
+
*
|
|
112
|
+
* Same reasoning as the read-only one: the preference is changed from the
|
|
113
|
+
* editor's own toolbar / status bar while the buffer is mounted, and remounting
|
|
114
|
+
* to flip it would throw away the undo history and the caret. `undefined` (a
|
|
115
|
+
* caller that never passed the prop, e.g. a diff pane) keeps the historical
|
|
116
|
+
* behaviour of wrapping.
|
|
117
|
+
*/
|
|
118
|
+
const wrapCompartment = new Compartment()
|
|
119
|
+
|
|
106
120
|
/**
|
|
107
121
|
* Compartment holding the session-change marks.
|
|
108
122
|
*
|
|
@@ -144,6 +158,21 @@ export const CodeEditor = forwardRef<CodeEditorHandle, {
|
|
|
144
158
|
readOnly?: boolean
|
|
145
159
|
/** Parent sub-tab visibility (views stay mounted; remeasure on show). */
|
|
146
160
|
visible?: boolean
|
|
161
|
+
/**
|
|
162
|
+
* Soft wrap long lines.
|
|
163
|
+
*
|
|
164
|
+
* `undefined` = the historical behaviour (wrap on) for callers that do not
|
|
165
|
+
* own the preference (diff panes); `false` turns it off.
|
|
166
|
+
*/
|
|
167
|
+
wrap?: boolean
|
|
168
|
+
/**
|
|
169
|
+
* Reports the 1-based caret line/column plus the selected character count.
|
|
170
|
+
*
|
|
171
|
+
* The status bar needs it and CodeMirror only exposes selection changes
|
|
172
|
+
* through an update listener, so the editor reports instead of the parent
|
|
173
|
+
* polling a ref. Called once with the initial position, then on every move.
|
|
174
|
+
*/
|
|
175
|
+
onCaretChange?: (caret: CodeEditorCaretType) => void
|
|
147
176
|
/** Chat-insert target: absent/disabled hides the selection popup. */
|
|
148
177
|
ctx?: Context
|
|
149
178
|
sessionId?: string | undefined
|
|
@@ -540,6 +569,20 @@ export const CodeEditor = forwardRef<CodeEditorHandle, {
|
|
|
540
569
|
view.dispatch({ effects: readOnlyCompartment.reconfigure(EditorState.readOnly.of(props.readOnly === true)) })
|
|
541
570
|
}, [props.readOnly])
|
|
542
571
|
|
|
572
|
+
/**
|
|
573
|
+
* Word wrap follows the shared editor preference, live.
|
|
574
|
+
*
|
|
575
|
+
* A reconfigure (not a remount) so flipping the toolbar / status-bar toggle
|
|
576
|
+
* keeps the undo history and the caret exactly where they were.
|
|
577
|
+
*/
|
|
578
|
+
useEffect(() => {
|
|
579
|
+
const view = viewRef.current
|
|
580
|
+
if (view === undefined) return
|
|
581
|
+
view.dispatch({
|
|
582
|
+
effects: wrapCompartment.reconfigure(props.wrap === false ? [] : EditorView.lineWrapping),
|
|
583
|
+
})
|
|
584
|
+
}, [props.wrap])
|
|
585
|
+
|
|
543
586
|
// Shown again after being hidden: remeasure layout.
|
|
544
587
|
useEffect(() => {
|
|
545
588
|
if (props.visible === false) return
|
|
@@ -614,7 +657,7 @@ export const CodeEditor = forwardRef<CodeEditorHandle, {
|
|
|
614
657
|
setFindOpen(false)
|
|
615
658
|
return true
|
|
616
659
|
},
|
|
617
|
-
})),
|
|
660
|
+
})),
|
|
618
661
|
lineNumbers(),
|
|
619
662
|
highlightActiveLine(),
|
|
620
663
|
indentOnInput(),
|
|
@@ -639,7 +682,7 @@ export const CodeEditor = forwardRef<CodeEditorHandle, {
|
|
|
639
682
|
// Session-change marks, off until a `changeSet` prop arrives (see
|
|
640
683
|
// `changeMarksCompartment`).
|
|
641
684
|
changeMarksCompartment.of([]),
|
|
642
|
-
EditorView.lineWrapping,
|
|
685
|
+
wrapCompartment.of(propsRef.current.wrap === false ? [] : EditorView.lineWrapping),
|
|
643
686
|
readOnlyCompartment.of(EditorState.readOnly.of(propsRef.current.readOnly === true)),
|
|
644
687
|
...langFor(propsRef.current.path),
|
|
645
688
|
EditorView.updateListener.of((update) => {
|
|
@@ -730,6 +773,10 @@ export const CodeEditor = forwardRef<CodeEditorHandle, {
|
|
|
730
773
|
// than a new extension, and gated on `findOpenRef` so the widget being
|
|
731
774
|
// closed never costs a render.
|
|
732
775
|
if (findOpenRef.current) setFindTick(tick => tick + 1)
|
|
776
|
+
// Status-bar readout: reported BEFORE the view-state handoff below,
|
|
777
|
+
// which returns early for callers that keep no tab state (diff panes).
|
|
778
|
+
const caretHandler = propsRef.current.onCaretChange
|
|
779
|
+
if (caretHandler !== undefined) caretHandler(caretOfState(update.state))
|
|
733
780
|
const handler = propsRef.current.onViewState
|
|
734
781
|
const tabId = propsRef.current.tabId
|
|
735
782
|
if (handler === undefined || tabId === undefined) return
|
|
@@ -777,6 +824,11 @@ export const CodeEditor = forwardRef<CodeEditorHandle, {
|
|
|
777
824
|
}
|
|
778
825
|
}
|
|
779
826
|
setView(view)
|
|
827
|
+
// The status bar starts at the caret's real position instead of line 1/col
|
|
828
|
+
// 1: a remount restores the selection further down (see the restore block
|
|
829
|
+
// below), and no selection event fires for a caret that never moved.
|
|
830
|
+
const initialCaret = propsRef.current.onCaretChange
|
|
831
|
+
if (initialCaret !== undefined) initialCaret(caretOfState(view.state))
|
|
780
832
|
/**
|
|
781
833
|
* Come back to where this file was left.
|
|
782
834
|
*
|