dsh-code-server-app 0.3.59 → 0.3.63
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/LICENSE-Apache-2.0.txt +201 -0
- package/README.en.md +93 -9
- package/README.md +69 -7
- package/THIRD_PARTY_NOTICES.md +60 -0
- package/assets/extensions/dshcs-editor-bridge/extension.js +149 -2
- package/assets/extensions/dshcs-editor-bridge/lib/bridge-client.js +38 -2
- package/assets/extensions/dshcs-editor-bridge/lib/fim-completion.js +264 -0
- package/assets/extensions/dshcs-editor-bridge/package.json +2 -2
- package/lib/bridge.mjs +6 -3
- package/lib/client.js +139 -3
- package/lib/fim-adapter.mjs +603 -0
- package/lib/index.js +294 -1
- package/package.json +17 -14
- package/vendor/VENDOR.json +5 -5
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.en.md
CHANGED
|
@@ -50,7 +50,7 @@ A static profile plugin (npm package with host + client bundle) that ships the *
|
|
|
50
50
|
the narrow-viewport handling). When the button is missing it keeps the current mode and logs one `console.warn` — panel
|
|
51
51
|
rendering is never affected.
|
|
52
52
|
- **Resident IDE (0.2.2, on by default)**: switching to another tab or collapsing the sidebar and coming back **no longer reloads** code-server — unsaved editor buffers, terminals and debug sessions all stay put (see "Why switching tabs no longer reloads" below).
|
|
53
|
-
- The settings card has exactly **
|
|
53
|
+
- The settings card has exactly **four settings**: "**Claim types**", "**Fullscreen on open**", "Resident in background" and "**FIM completion (experimental, off by default)**" — no other rows (0.2.7 removed the "Entry", "dependency install" and "environment check" rows).
|
|
54
54
|
Open the IDE from the **Code Server box** on the sidebar's guide page, or by clicking DSH's own produced-file chips / delivered-file previews / inline file names;
|
|
55
55
|
diagnostics stay out of the UI — the `[code-server]` lines in the DSH host log are the place to look (`/api/code-server/status` still returns `env` for scripts).
|
|
56
56
|
The old `windowedOpen` (open in a window) and `reserveComposer` were **removed in 0.2.6**: leftover keys in an old settings document neither fail nor apply (they are no longer part of the schema).
|
|
@@ -354,10 +354,15 @@ Regression: the "push → take → clear, twice" case in `scripts/test-bridge-ro
|
|
|
354
354
|
The token lives in `<extensionsDir>/.dshcs-bridge/bridge.json`, **readable by any process of the same local
|
|
355
355
|
user**, so:
|
|
356
356
|
|
|
357
|
-
1. **`/code-server-bridge/*` is read-only, with
|
|
357
|
+
1. **`/code-server-bridge/*` is read-only, with two bounded exceptions.** No route writes files,
|
|
358
358
|
edits documents, runs commands, or spawns processes. A leaked token is therefore bounded to "sees information
|
|
359
359
|
that is in the editor" and **can never** become arbitrary file writes or command execution. A whitelist
|
|
360
360
|
assertion in `scripts/test-bridge-routes.mjs` guards this.
|
|
361
|
+
`/complete` (0.3.61, **experimental FIM completion, off by default**) is the one route that makes a **model
|
|
362
|
+
call**: it takes two strings (the text before/after the cursor) and returns one string. It still writes
|
|
363
|
+
nothing and runs nothing, is disabled unless the setting is on (403 otherwise), and is bounded by
|
|
364
|
+
length/rate/concurrency/timeout caps — so the worst case for a leaked token grows only to "spends a little
|
|
365
|
+
completion budget and reads back one completion".
|
|
361
366
|
`/old` (added in 0.3.55) lives under the same invariant: it only reads the bounded cache of "pre-write copies of
|
|
362
367
|
the last few agent writes" (≤8 entries, ≤1 MB each, ≤4 MB total, 5-minute TTL) by **opaque key**, 404s when it
|
|
363
368
|
is gone, takes no path argument (so it cannot read arbitrary files) and does not consume (repeat polls get the
|
|
@@ -394,6 +399,64 @@ as stated for the loopback port.
|
|
|
394
399
|
Diagnostics: `GET /api/code-server/status` exposes
|
|
395
400
|
`bridge: { enabled, live, toolsRegistered, supported, url, file }` — **never the token** (that only exists in the file).
|
|
396
401
|
|
|
402
|
+
## FIM completion (experimental, since 0.3.61, **off by default**)
|
|
403
|
+
|
|
404
|
+
When you pause while typing, a grey continuation appears after the cursor (Tab accepts, Esc discards).
|
|
405
|
+
It is **off by default**; turn it on with that row in the settings card — it takes effect immediately
|
|
406
|
+
(no host restart, no reinstall).
|
|
407
|
+
|
|
408
|
+
| Item | Value |
|
|
409
|
+
|---|---|
|
|
410
|
+
| Endpoint | DeepSeek **FIM (Beta)**: `POST https://api.deepseek.com/beta/completions`, params `prompt` (prefix) + `suffix` (suffix) |
|
|
411
|
+
| Model | `deepseek-flash` (the model the official FIM doc uses — also this deployment's default) |
|
|
412
|
+
| Credential | Reuses the `DEEPSEEK_API_KEY` DSH already has: `ctx.get('credentials').resolve(...)`, the same path the official adapter takes (falling back to the launch environment) |
|
|
413
|
+
| Measured latency | **112–416 ms** (non-streaming; streaming was *slower*, hence non-streaming on purpose) |
|
|
414
|
+
| When it fires | After a ≥250 ms pause and only past the gates: non-empty selection / non-`file` document / empty context / document >20k lines — those **never send a request** |
|
|
415
|
+
|
|
416
|
+
**How it is wired in (option A)**: FIM speaks the Completions API, while `ctx.llm.stream(GenerateOptions)`
|
|
417
|
+
only knows `messages` (no `prompt`/`suffix`; `purpose` is a closed union of `'compaction' | 'session-title'`).
|
|
418
|
+
So the plugin **registers its own LLM adapter route** `dshcs-fim`: the prefix/suffix travel inside a
|
|
419
|
+
`messages` envelope with a fixed marker (`dshcs-fim/1 `), and the adapter decodes it before hitting that
|
|
420
|
+
endpoint. The call therefore still goes **through DSH's LLM service** — cancellation, timeouts, terminal
|
|
421
|
+
chunks and stable error codes all follow the service contract (instead of the plugin bypassing it with a
|
|
422
|
+
raw fetch). Evidence and measurements: B6/B7 of `docs/analysis-continuedev-reuse.md`.
|
|
423
|
+
|
|
424
|
+
**Three knobs (0.3.62, all in the settings card, effective immediately)**:
|
|
425
|
+
|
|
426
|
+
| Setting | Default | Effect |
|
|
427
|
+
|---|---|---|
|
|
428
|
+
| Pause in ms | `250` | How long typing must stop before a request. Range 100–3000 ms (clamped on save); the endpoint round trip measured **112–416 ms**, so the pause *is* the perceived latency |
|
|
429
|
+
| Allow multi-line | on | Off ⇒ the host returns the first line only; an empty first line means no completion. Turn it off to be less intrusive |
|
|
430
|
+
| Disable by glob | empty | In these files **no request is sent at all**. Semantics: `*` does not cross directories, `**` does, a pattern without `/` matches the basename, a pattern with `/` matches any path suffix (so `vendor/**` and `src/*.ts` work at any depth), a trailing `/` means `/**`. Example: `*.md;vendor/**;**/dist/**` |
|
|
431
|
+
|
|
432
|
+
> Both sides implement these semantics independently (the extension is a static file shipped with the package
|
|
433
|
+
> and cannot import host code); `scripts/test-fim.mjs` pins their equivalence with one shared (pattern, path)
|
|
434
|
+
> corpus.
|
|
435
|
+
|
|
436
|
+
**Safety and bounds** (this is the only capability of the plugin that sends content out):
|
|
437
|
+
|
|
438
|
+
- **Still read-only**: the extension never writes files and never runs commands — it only *proposes* text;
|
|
439
|
+
insertion happens when you press Tab;
|
|
440
|
+
- The bridge gains its fifth route `POST /complete` (**the only route that makes a model call**) only while
|
|
441
|
+
the setting is on; with it off the route answers 403 and no request is made;
|
|
442
|
+
- Bounded: prefix/suffix ≤6000/2000 chars (120/40 lines, whichever comes first), output ≤2000 chars,
|
|
443
|
+
4 s timeout, 120 ms minimum interval, concurrency 1, 60 calls/minute; over-limit requests are rejected
|
|
444
|
+
(409/429) and the extension simply shows no completion for that beat;
|
|
445
|
+
- One more layer in the extension: turning the setting off disposes the provider immediately (no requests at
|
|
446
|
+
all), and identical context hits a local 2-minute cache;
|
|
447
|
+
|
|
448
|
+
**Usage is visible in exactly two places**: these calls are **not session requests**, so they are not written
|
|
449
|
+
to the session log and DSH's own token accounting (per-turn usage, context pressure, telemetry) **excludes
|
|
450
|
+
them**. Usage therefore shows up in ① the IDE status bar's DSH item — a `$(zap) 1.2k` counter when on, with
|
|
451
|
+
input/output/cache-read/last-latency/last-error on hover, and ② the `fim` field of
|
|
452
|
+
`GET /api/code-server/status` (same snapshot).
|
|
453
|
+
|
|
454
|
+
**Known limits**: the model occasionally invents an insertion where nothing is needed (2/2 reproduced at a
|
|
455
|
+
cursor position that needed none); the filter pipeline strips code fences and control markers, but "should
|
|
456
|
+
this be completed at all" stays your call — Esc or typing on makes it disappear. A more reliable shape needs
|
|
457
|
+
a faster completion route, or DSH making completion a first-class request (at which point only the adapter's
|
|
458
|
+
data call changes; the caller stays as it is).
|
|
459
|
+
|
|
397
460
|
## Legacy DSH (unsupported since 0.2.3)
|
|
398
461
|
|
|
399
462
|
**Behaviour**: when `sidebarRightTabs` / `sidebarRight` cannot be found, the plugin registers a single settings card:
|
|
@@ -457,7 +520,7 @@ Diagnostics: `GET /api/code-server/status` exposes
|
|
|
457
520
|
committed hand-written source: there is no build step anywhere on that chain).
|
|
458
521
|
|
|
459
522
|
> Verified locally (BM: Windows 11 ARM64): the whole tree/dependency chain hangs directly off the plugin's
|
|
460
|
-
> dependency table — the tree package `@jinsiyu/dshcs-vscode-server` (currently 4.
|
|
523
|
+
> dependency table — the tree package `@jinsiyu/dshcs-vscode-server` (currently 4.138.0, a 50.9 MB tarball),
|
|
461
524
|
> the pure-JS inner dependencies plus the 8 platform-independent repacks in `dependencies`, and the 8
|
|
462
525
|
> platform-specific repacks (win32-arm64 / win32-x64) in `optionalDependencies` with their own os/cpu gates;
|
|
463
526
|
> the original names are restored by junctions created at runtime (`lib/native.js`)
|
|
@@ -505,7 +568,7 @@ pnpm run promote -- <version>
|
|
|
505
568
|
| Goal | Command |
|
|
506
569
|
|---|---|
|
|
507
570
|
| **Build from the latest upstream release** | `pnpm run vendor:latest` (= `--force`): pulls `code-server@latest`'s tree into `vendor/vscode`; afterwards you **must** re-run `repack:build` and republish every sub-package |
|
|
508
|
-
| **Pin a version** | `pnpm run vendor:vscode -- --version 4.
|
|
571
|
+
| **Pin a version** | `pnpm run vendor:vscode -- --version 4.138.0` |
|
|
509
572
|
| **Snapshot from an existing tree** | `pnpm run vendor:vscode -- --from <code-server dir>` (seconds) |
|
|
510
573
|
| **Rebuild every sub-package** | `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack` (without `--from` it npm-installs and compiles the source tree itself — slow) |
|
|
511
574
|
| **Rebuild only the tree + dependency table** | `node scripts/vendor-repacks.mjs --reuse --target win32-arm64,win32-x64 --pack` (reuses the natives already in `repack/build`; also rewrites `lib/vendored.json` and the plugin dependency table) |
|
|
@@ -956,7 +1019,7 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
|
|
|
956
1019
|
### Upgrading the VS Code tree (upstream = a code-server release)
|
|
957
1020
|
|
|
958
1021
|
- **The version is decided at pack time**: `pnpm run vendor:latest` (= `--force`) pulls the tree of the npm **latest**
|
|
959
|
-
release; or use `pnpm run vendor:vscode -- --version 4.
|
|
1022
|
+
release; or use `pnpm run vendor:vscode -- --version 4.138.0` / `DSHCS_CODE_SERVER_VERSION`.
|
|
960
1023
|
With an existing `vendor/vscode`, a plain `pnpm pack` never upgrades (it is a no-op).
|
|
961
1024
|
**Source-tree precedence (fixed in 0.2.13)**: an explicit `--from` uses that tree, while an explicit
|
|
962
1025
|
`--force`/`--version` now **always goes to the registry** — before the fix a local source tree won
|
|
@@ -971,13 +1034,14 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
|
|
|
971
1034
|
- **A version bump means rebuilding and republishing the sub-packages** (all with the same script):
|
|
972
1035
|
1. `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack` → the new tree package
|
|
973
1036
|
(`@jinsiyu/dshcs-vscode-server@<new version>`) and the natives rebuilt against the new inner dependencies (the
|
|
974
|
-
script also rewrites the plugin's pure-JS `dependencies
|
|
975
|
-
|
|
1037
|
+
script also rewrites the plugin's pure-JS `dependencies`, writes the 16 repacks under their real names into
|
|
1038
|
+
`dependencies` / `optionalDependencies`, and rewrites `lib/vendored.json`);
|
|
1039
|
+
2. `pnpm run publish:repacks` → publish; then bump the plugin version → `pnpm pack`
|
|
976
1040
|
→ publish the plugin.
|
|
977
1041
|
- `productPath` (`<quality>-<commit>`, part of the client WebSocket path) is **computed from `lib/vscode/product.json`**,
|
|
978
1042
|
so upgrading the tree needs no code change — but the routes are registered at activation, so restart `dsh web` afterwards.
|
|
979
1043
|
- **No runtime auto-upgrade anymore**: nothing fetches latest at startup; the version is fully determined by the bundled artifact.
|
|
980
|
-
- Bundled locally right now: the tree of `code-server@4.
|
|
1044
|
+
- Bundled locally right now: the tree of `code-server@4.138.0` (VS Code 1.138.0, `productPath=stable-59c988c7…`).
|
|
981
1045
|
|
|
982
1046
|
### Compatibility with the old install locations
|
|
983
1047
|
|
|
@@ -996,8 +1060,12 @@ persisted via the official settings domain (`settingsScope`, namespace `code-ser
|
|
|
996
1060
|
| `claimExtensions` | `*` + three exclusion groups (preview-friendly / executables / Office; full lists in the "Claim types" section) | **Claim types** (0.2.11, replaces 0.2.5's `fileOpenScope`): decides by extension which files go to VS Code, semicolon-separated; `*` claims every other type, `!ext` excludes (exclusion wins). The default leaves the four categories DSH's preview renders well (markdown/html/images/PDF) to DSH and sends everything else to the IDE; an empty value claims nothing. **Scope (session vs absolute) is no longer distinguished** |
|
|
997
1061
|
| `fullscreenOnOpen` | `true` | **Fullscreen on open** (0.2.9): opening the Code Server tab (including clicking a file) switches the right sidebar to fullscreen (fills the window); off keeps DSH's default push mode (side by side with the conversation). Only the moment of opening is affected — a manual "Exit fullscreen" is never fought back |
|
|
998
1062
|
| `keepResident` | `true` | **Resident in background**: on, the host preloads the IDE into a parked surface right after start — switching tabs or collapsing the sidebar never reloads it and the first open needs no cold start; off loads it only when the panel is opened (saves memory) |
|
|
1063
|
+
| `fim` | `false` | **FIM completion (experimental, 0.3.61)**: when on, pausing while typing shows a grey inline continuation (Tab accepts, Esc discards). **Off by default** — it is the only capability of this plugin that sends content out (a bounded slice of code around the cursor, per completion), and those calls **do not enter DSH's token accounting**, so usage is visible only in the IDE status bar. See the "FIM completion" section |
|
|
1064
|
+
| `fimDebounceMs` | `250` | **FIM · pause in milliseconds** (0.3.62): how long typing must stop before one completion request is sent. Effective range **100–3000 ms**, clamped on save (same rule as the host); empty/invalid falls back to 250 |
|
|
1065
|
+
| `fimMultiline` | `true` | **FIM · allow multi-line completions** (0.3.62): off means the host returns the first line only (an empty first line = no completion this time). The model does invent insertions where none are needed, and multi-line amplifies that noise |
|
|
1066
|
+
| `fimDisableGlobs` | empty | **FIM · disable by glob** (0.3.62): semicolon/newline separated. `*` does not cross directories, `**` does, a pattern without `/` matches the basename, a pattern with `/` matches any path suffix, and a trailing `/` means `/**`. Examples: `*.md`, `vendor/**`, `**/dist/**`. **Checked on both sides**: the extension first (no request at all), the host again |
|
|
999
1067
|
|
|
1000
|
-
(Since 0.2.9 the card keeps only those three
|
|
1068
|
+
(Since 0.2.9 the card keeps only those settings (0.3.61 added FIM completion, 0.3.62 its three sub-rows); `windowedOpen` and `reserveComposer` are gone — leftover keys in an old
|
|
1001
1069
|
settings document neither fail nor apply. `serve` remains a key in the settings namespace (usable from a settings document) but
|
|
1002
1070
|
has **no card row** — see "Serving mode".)
|
|
1003
1071
|
|
|
@@ -1130,6 +1198,22 @@ What remains on the plugin side:
|
|
|
1130
1198
|
**built-in** extension (in `lib/vscode/extensions`), so users cannot remove it from the extensions panel, and the
|
|
1131
1199
|
installer re-syncs it whenever its content changes.
|
|
1132
1200
|
|
|
1201
|
+
## Third-party and license
|
|
1202
|
+
|
|
1203
|
+
This project is **MIT**-licensed (see [`LICENSE`](LICENSE)). Its experimental **FIM completion** feature was
|
|
1204
|
+
**designed with reference to** [continuedev/continue](https://github.com/continuedev/continue)
|
|
1205
|
+
(Apache License 2.0, Copyright 2023 Continue) — specifically the settings taxonomy of upstream
|
|
1206
|
+
`tabAutocompleteOptions` (`debounceDelay`, `useAutocompleteMultilineCompletions`, `disableInFiles`) and its
|
|
1207
|
+
debounce / cursor-window / filtering / bounded-cache approach.
|
|
1208
|
+
|
|
1209
|
+
**No source code, template strings or files from continuedev/continue are included here** (completion
|
|
1210
|
+
requests target DeepSeek's official FIM (Beta) endpoint; the prompt shape comes from DeepSeek's docs and
|
|
1211
|
+
local measurement). The standard Apache License 2.0 text ships as
|
|
1212
|
+
[`LICENSE-Apache-2.0.txt`](LICENSE-Apache-2.0.txt), and the per-location reference log is
|
|
1213
|
+
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) — so Apache-2.0's obligations (notices, marking modified
|
|
1214
|
+
files, keeping an upstream NOTICE if one appears) are already satisfied should a code fragment ever be ported
|
|
1215
|
+
in. Apache-2.0 grants no trademark rights; this project does not use "Continue" as a name or in promotion.
|
|
1216
|
+
|
|
1133
1217
|
## Known limitations
|
|
1134
1218
|
|
|
1135
1219
|
- **~~The editor bridge needs DSH to provide `webServer`~~ no longer true (fixed in 0.3.13)**: the bridge now runs
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
含窄视口下的连带处理)。按钮找不到时保持原模式并 `console.warn` 一条,绝不影响面板渲染。
|
|
63
63
|
- **IDE 常驻(0.2.2 起,默认开)**:切到别的标签/收起侧栏再回来**不再重载** code-server——
|
|
64
64
|
未保存的编辑缓冲区、终端、调试会话都留在原处(见下方「为什么切标签不再重载」)。
|
|
65
|
-
-
|
|
65
|
+
- 设置卡片只有**四组设置**:「**认领类型**」「**打开即全屏**」「**FIM 补全(实验性,默认关;含停顿毫秒数 / 允许多行 / 按 glob 禁用三个子项)**」与「**后台常驻(切标签不重载)**」——没有其它行(0.2.7 起移除「入口」「依赖安装」「环境检测」)。
|
|
66
66
|
打开 IDE 用右侧栏「开始」页的 **Code Server 入口框**,或直接点官方的产物 chip / 交付卡片 / 正文文件名;
|
|
67
67
|
诊断看 DSH host 日志里的 `[code-server]` 输出(`/api/code-server/status` 仍返回 `env` 供脚本排查)。
|
|
68
68
|
旧版的 `windowedOpen`(窗口化打开)、`reserveComposer` 已在 0.2.6 移除:旧设置文档里残留的这两个键不会报错,只是被忽略(不再出现在 schema 里)。
|
|
@@ -200,7 +200,7 @@ DSH 用**资源地址**命名文件,`openFile` 只负责把地址交给右侧栏
|
|
|
200
200
|
边界(说清楚,不夸大):这一层挡的是"本机其它应用/端口扫描器/浏览器页面"顺手访问你的 IDE;
|
|
201
201
|
**同用户的本地恶意程序**本来就能直接读你的文件、也能读那个令牌文件 —— 那不在本插件的威胁模型内。
|
|
202
202
|
|
|
203
|
-
- 在 `cordis.patch.yml` 的 `config.serve`(或设置文档里的 `code-server.serve`)切换,下次启动生效 —— **设置卡片不提供这一行**(
|
|
203
|
+
- 在 `cordis.patch.yml` 的 `config.serve`(或设置文档里的 `code-server.serve`)切换,下次启动生效 —— **设置卡片不提供这一行**(卡片只有认领类型/打开即全屏/后台常驻/FIM 补全四个设置)。
|
|
204
204
|
- `dsh` 模式的实际收益:单一 URL/单一端口(远程访问 DSH 即可用 IDE)、不再暴露额外回环端口、认证与 DSH 同级。
|
|
205
205
|
- `dsh` 模式的两点**已知取舍**:
|
|
206
206
|
1. iframe 与 DSH **同源** → 该模式下不再挂 `sandbox`(同源 + `allow-same-origin` 可被 frame 自行摘除,属"看起来有防护");
|
|
@@ -365,6 +365,51 @@ seq,并且 `/sync` 回应里带 `lastSeq`(高水位),扩展据此自查游标是
|
|
|
365
365
|
诊断:`GET /api/code-server/status` 的 `bridge` 字段返回
|
|
366
366
|
`{ enabled, live, toolsRegistered, supported, url, file }` —— **不含令牌**(令牌只在那个文件里)。
|
|
367
367
|
|
|
368
|
+
## FIM 补全(实验性,0.3.61 起,**默认关**)
|
|
369
|
+
|
|
370
|
+
在编辑器里打字停顿时,光标后出现灰色续写(Tab 接受、Esc 丢弃)。**默认关闭**,在设置卡片里那一行开启,开启后即时生效(不用重启宿主、也不用重装插件)。
|
|
371
|
+
|
|
372
|
+
| 项 | 值 |
|
|
373
|
+
|---|---|
|
|
374
|
+
| 端点 | DeepSeek **FIM(Beta)**:`POST https://api.deepseek.com/beta/completions`,参数 `prompt`(前缀)+ `suffix`(后缀) |
|
|
375
|
+
| 模型 | `deepseek-flash`(官方 FIM 文档的示例模型,也就是本部署的默认模型) |
|
|
376
|
+
| 凭据 | 复用 DSH 里已有的 `DEEPSEEK_API_KEY`:`ctx.get('credentials').resolve(...)`,与官方适配器同一条路(取不到再退回启动环境变量) |
|
|
377
|
+
| 实测延迟 | **112–416 ms**(非流式;流式反而更慢 ⇒ 故意用非流式) |
|
|
378
|
+
| 触发条件 | 停顿 ≥250ms 且通过门控:有选区 / 非 `file` 文档 / 空上下文 / 文档 >2 万行 —— 这几种**根本不发请求** |
|
|
379
|
+
|
|
380
|
+
**它怎么接进来的(方案 A)**:FIM 走的是 Completions API,而 `ctx.llm.stream(GenerateOptions)` 的词汇表里
|
|
381
|
+
只有 `messages`(没有 `prompt`/`suffix`,`purpose` 还是封闭联合 `'compaction' | 'session-title'`)⇒ 插件
|
|
382
|
+
**自己注册一个 LLM 适配器路由** `dshcs-fim`:把前缀/后缀装进一条带固定前缀(`dshcs-fim/1 `)的 messages 信封,
|
|
383
|
+
适配器解出信封再打那个端点。这样这条调用**仍然走 DSH 的 LLM 服务** —— 取消、超时、终态 chunk、稳定错误码
|
|
384
|
+
都按服务契约走(而不是插件自己直连绕过服务层)。依据与实测数据见 `docs/analysis-continuedev-reuse.md` 的 B6/B7。
|
|
385
|
+
|
|
386
|
+
**三个可调项(0.3.62,都在设置卡里,即时生效)**:
|
|
387
|
+
|
|
388
|
+
| 设置 | 默认 | 作用 |
|
|
389
|
+
|---|---|---|
|
|
390
|
+
| 停顿毫秒数 | `250` | 打字停下多久才请求一次。范围 100–3000ms(保存时夹取);**实测端点往返 112–416ms**,所以停顿基本就是"感知到的延迟" |
|
|
391
|
+
| 允许多行补全 | 开 | 关掉后宿主只回第一行;首行是空白 ⇒ 这次不补。想更克制(少被打扰)就关掉它 |
|
|
392
|
+
| 按 glob 禁用 | 空 | 这些文件里**根本不发请求**。语义:`*` 不跨目录、`**` 跨目录、不含 `/` 的模式只匹配文件名、含 `/` 的模式按**路径尾段**匹配(所以 `vendor/**`、`src/*.ts` 在任何层级都生效)、`/` 结尾视作 `/**`。例:`*.md;vendor/**;**/dist/**` |
|
|
393
|
+
|
|
394
|
+
> 这三项的语义在**宿主与扩展各有一份实现**(扩展是随包分发的静态文件,不能 import 宿主代码),
|
|
395
|
+
> 一致性由 `scripts/test-fim.mjs` 用同一组(模式,路径)语料对两侧做等价断言钉住。
|
|
396
|
+
|
|
397
|
+
**安全与边界**(这是本插件唯一会把内容发出去的能力):
|
|
398
|
+
|
|
399
|
+
- **只读不变**:扩展仍然不写文件、不执行命令 —— 它只"提议"一段文本,插入由你按 Tab 完成;
|
|
400
|
+
- 只有开启后桥才有第五条路由 `POST /complete`(**唯一一条会发起模型调用**的);没开一律 403,不发任何请求;
|
|
401
|
+
- 有界:前后缀各 ≤6000/2000 字符(120/40 行,字符与行数取先到者)、输出 ≤2000 字符、单次 4s 超时、
|
|
402
|
+
最小间隔 120ms、并发 1、每分钟 60 次;超限的请求被拒(409/429),扩展这一轮就当"这次没有补全";
|
|
403
|
+
- 扩展侧还有一层:关掉开关后立刻注销 provider(连请求都不发),相同前后文 2 分钟内直接命中本地缓存;
|
|
404
|
+
|
|
405
|
+
**用量只在两处可见**:这条调用**不是会话请求**,不写会话日志 ⇒ DSH 自己的 token 计量(逐轮用量、
|
|
406
|
+
上下文压力、遥测)**都不含它**。所以用量显示在:① IDE 状态栏的 DSH 项 —— 开启后多一格 `$(zap) 1.2k`,
|
|
407
|
+
悬停看输入 / 输出 / 缓存命中 / 最近耗时 / 最近错误;② `GET /api/code-server/status` 的 `fim` 字段(同一份快照)。
|
|
408
|
+
|
|
409
|
+
**已知限制**:模型偶尔会在"并不需要补"的位置硬凑一段(实测在不该补的位置 2/2 复现);过滤管线会剥掉代码围栏与
|
|
410
|
+
控制标记,但"该不该补"最终由你判断 —— Esc 或继续打字都会让它消失。更稳的形态要等更快的完成路由,
|
|
411
|
+
或者 DSH 把 completion 做成一等请求(那时把适配器里的取数换成新 API 即可,调用方一行不用改)。
|
|
412
|
+
|
|
368
413
|
## 旧版 DSH(0.2.3 起不再支持)
|
|
369
414
|
|
|
370
415
|
**行为**:探测不到 `sidebarRightTabs` / `sidebarRight` 时,插件只注册一张设置卡片,内容是:
|
|
@@ -422,7 +467,7 @@ seq,并且 `/sync` 回应里带 `lastSeq`(高水位),扩展据此自查游标是
|
|
|
422
467
|
(客户端半部与提问面板都是入库的手写源码 —— 整条链上**没有任何构建步骤**)。
|
|
423
468
|
|
|
424
469
|
> 本机(BM: Windows 11 ARM64)实测:树/依赖全链路是"平台子包直挂插件依赖"供给 ——
|
|
425
|
-
> 树包 `@jinsiyu/dshcs-vscode-server`(当前 4.
|
|
470
|
+
> 树包 `@jinsiyu/dshcs-vscode-server`(当前 4.138.0,50.9 MB tgz)、纯 JS 内部依赖与 8 个平台无关
|
|
426
471
|
> 重打包包直接进插件 `dependencies`、8 个平台专属重打包包按 win32-arm64/x64 进
|
|
427
472
|
> `optionalDependencies`(包自带 os/cpu 自动选),原始名字由 `lib/native.js` 补 junction 还原
|
|
428
473
|
> → healthz 200 → 停止 → 回收全链路验证。
|
|
@@ -478,7 +523,7 @@ pnpm run promote -- <version>
|
|
|
478
523
|
| 目标 | 命令 |
|
|
479
524
|
|---|---|
|
|
480
525
|
| **打最新版(上游 code-server 发行版)** | `pnpm run vendor:latest`(= `--force`):从 registry 取 `code-server@latest` 的树到 `vendor/vscode`;之后**必须**重跑 `repack:build` 并重发全部子包 |
|
|
481
|
-
| **指定版本** | `pnpm run vendor:vscode -- --version 4.
|
|
526
|
+
| **指定版本** | `pnpm run vendor:vscode -- --version 4.138.0` |
|
|
482
527
|
| **从已装好的树快照** | `pnpm run vendor:vscode -- --from <code-server 目录>`(秒级) |
|
|
483
528
|
| **开发期让树可直接跑** | `pnpm run vendor:vscode -- --dev-links`(额外把 `lib/vscode/node_modules` 用 junction 补上) |
|
|
484
529
|
| **完整重打子包** | `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack`(不给 `--from` 会自动 npm install 解包 + 编译,耗时)。`--target` 只决定**本次在这台机器上构建哪些目标**(原生包要现编,所以 Linux 目标在 Linux 机器或 `repacks.yml` 的 Linux 腿上构建);产品覆盖哪些目标、每模块在哪些目标上有子包,由 `scripts/repack-platforms.json` 决定 |
|
|
@@ -940,7 +985,7 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
|
|
|
940
985
|
### 升级 VS Code 树(上游 = code-server 发行版)
|
|
941
986
|
|
|
942
987
|
- **打包期决定版本**:`pnpm run vendor:latest`(= `--force`)取 npm **最新版 code-server** 的树并重建 `vendor/vscode`;
|
|
943
|
-
也可 `pnpm run vendor:vscode -- --version 4.
|
|
988
|
+
也可 `pnpm run vendor:vscode -- --version 4.138.0` 或设 `DSHCS_CODE_SERVER_VERSION`。
|
|
944
989
|
已有 `vendor/vscode` 时,不带 `--force`/`--version` 不会升级(日常 `pnpm pack` 是 no-op)。
|
|
945
990
|
**源树优先级(0.2.13 修正)**:显式 `--from` 用给定树;显式 `--force`/`--version` **一定走 registry**
|
|
946
991
|
—— 修正前它们会被"本机已有源树"抢走(`defaultSourceTree()` 先命中 `vendor/code-server` 或 profile 里的旧树),
|
|
@@ -959,7 +1004,7 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
|
|
|
959
1004
|
- `productPath`(`<quality>-<commit>`,客户端 WS 路径的组成)**从 `lib/vscode/product.json` 现算**,
|
|
960
1005
|
升级树后无需改代码 —— 但也意味着切版本后必须重启 dsh web(路由在激活期注册)。
|
|
961
1006
|
- **不再有运行期自动升级**:不会在启动时联网取 latest;版本完全由内置产物决定。
|
|
962
|
-
- 本机当前内置:`code-server@4.
|
|
1007
|
+
- 本机当前内置:`code-server@4.138.0` 的树(VS Code 1.138.0,`productPath=stable-59c988c7…`)。
|
|
963
1008
|
|
|
964
1009
|
### 兼容旧安装位
|
|
965
1010
|
|
|
@@ -988,8 +1033,12 @@ host 探测顺序:`@jinsiyu/dshcs-vscode-server/vscode`(**0.2.0+ 正式布局**)
|
|
|
988
1033
|
| `claimExtensions` | `*` + 三组排除(预览友好 / 可执行文件 / Office 文档;完整清单见「认领类型」一节) | **认领类型**(0.2.11,取代 0.2.5 的 `fileOpenScope`):按扩展名决定哪些文件交给 VS Code,分号分隔;`*` = 其余类型也认领,`!ext` = 不认领(排除优先)。默认把 DSH 预览渲染得好的四类(markdown/html/图片/PDF)**以及可执行文件(0.3.51)与 Office 文档(0.3.51)**留给 DSH,其余全进 IDE;清空 = 不认领任何文件。**不再区分 session/absolute 作用域** |
|
|
989
1034
|
| `fullscreenOnOpen` | `true` | **打开即全屏**(0.2.9):打开 Code Server 标签(含点开文件)时自动把右侧栏切到全屏(铺满窗口);关闭则保持 DSH 默认的 push(与对话并排)。只影响打开那一刻,用户点「退出全屏」不会被抢回去 |
|
|
990
1035
|
| `keepResident` | `true` | **后台常驻**:开启后宿主启动即把 IDE 预加载到"停放区",切标签/收起侧栏不重载、首次打开免等待;关闭则只在打开面板时加载(省内存) |
|
|
1036
|
+
| `fim` | `false` | **FIM 补全(实验性,0.3.61)**:开启后编辑器里打字停顿会出现灰字续写(Tab 接受 / Esc 丢弃)。**默认关闭** —— 它是本插件唯一会把内容发出去的能力(每次补全把光标附近有上限的一小段代码交给模型),而且这条调用**不进 DSH 的 token 计量**,用量只在 IDE 状态栏可见。详见「FIM 补全」一节 |
|
|
1037
|
+
| `fimDebounceMs` | `250` | **FIM · 停顿毫秒数**(0.3.62):打字停下多久才发一次补全请求。有效范围 **100–3000ms**,保存时按它夹取(与宿主同一套规则);空/非法值回落 250 |
|
|
1038
|
+
| `fimMultiline` | `true` | **FIM · 允许多行补全**(0.3.62):关掉后宿主只回第一行(首行为空 = 这次不补)。实测模型在不该补的位置会硬凑,多行会放大这种噪声 |
|
|
1039
|
+
| `fimDisableGlobs` | 空 | **FIM · 按 glob 禁用**(0.3.62):分号/换行分隔。`*` 不跨目录、`**` 跨目录、不含 `/` 的模式只匹配文件名、含 `/` 的模式按路径尾段匹配、`/` 结尾视作 `/**`。例:`*.md`、`vendor/**`、`**/dist/**`。**两边都判**:扩展侧先判(根本不发请求),宿主侧再判一遍 |
|
|
991
1040
|
|
|
992
|
-
(0.2.9
|
|
1041
|
+
(0.2.9 起卡片只留上面这些设置(0.3.61 加 FIM 补全,0.3.62 加它的三个子项);`windowedOpen` 与 `reserveComposer` 已移除 —— 旧设置文档里残留的键既不报错也不生效。
|
|
993
1042
|
`serve` 仍是设置命名空间里的键(便于用设置文档切换),但**没有卡片行**,见「服务方式」。)
|
|
994
1043
|
|
|
995
1044
|
0.2.7 起卡片**没有**「入口」「依赖安装」「环境检测」三行:入口在右侧栏「开始」页的 Code Server 入口框(或官方的文件点击),
|
|
@@ -1113,6 +1162,19 @@ desktop profile 由 `apps/desktop-host` 把 `/api/*` 交给同一个 `createShar
|
|
|
1113
1162
|
```
|
|
1114
1163
|
- 影响面:不只本插件——**任何**客户端插件升级后都可能继续跑旧代码;发布后请按上面的标记法确认渲染器真的换了 bundle。
|
|
1115
1164
|
|
|
1165
|
+
## 第三方与许可
|
|
1166
|
+
|
|
1167
|
+
本项目自身以 **MIT** 发布(见 [`LICENSE`](LICENSE))。实验性 **FIM 补全**的设计**参考**了
|
|
1168
|
+
[continuedev/continue](https://github.com/continuedev/continue)(Apache License 2.0,Copyright 2023 Continue)——
|
|
1169
|
+
具体是它 `tabAutocompleteOptions` 的设置项划分(`debounceDelay` / `useAutocompleteMultilineCompletions` /
|
|
1170
|
+
`disableInFiles`)与停顿去抖、光标附近窗口、过滤、有界缓存的思路。
|
|
1171
|
+
|
|
1172
|
+
**本项目不含 continuedev/continue 的任何源码片段、模板字符串或整份文件**(补全请求走 DeepSeek 官方
|
|
1173
|
+
FIM(Beta)端点,提示词形态由其官方文档与本机实测确定)。标准 Apache-2.0 全文随包分发
|
|
1174
|
+
([`LICENSE-Apache-2.0.txt`](LICENSE-Apache-2.0.txt)),逐处参考登记见
|
|
1175
|
+
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) —— 将来若真移植代码片段,Apache-2.0 的义务
|
|
1176
|
+
(声明、标注被改动文件、保留上游 NOTICE)已经就位。Apache-2.0 不含商标授权,本项目不使用 "Continue" 作名称或宣传。
|
|
1177
|
+
|
|
1116
1178
|
## 已知限制
|
|
1117
1179
|
|
|
1118
1180
|
- **~~编辑器桥需要 DSH 提供 `webServer`~~ 已不成立(0.3.13 修正)**:桥改走**本机 IPC**
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# 第三方声明(Third-Party Notices)
|
|
2
|
+
|
|
3
|
+
本项目 `dsh-code-server-app` 自身以 **MIT** 许可发布(见 [`LICENSE`](LICENSE))。
|
|
4
|
+
在开发过程中**参考**过下列第三方开源项目,本文件登记参考范围、许可与本项目的处理方式。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## continuedev/continue —— Apache License 2.0
|
|
9
|
+
|
|
10
|
+
| 项 | 值 |
|
|
11
|
+
|---|---|
|
|
12
|
+
| 上游 | https://github.com/continuedev/continue |
|
|
13
|
+
| 参考时修订 | `5522c6f44ca0ac3528b37244818fbfa39b5af470`(`refs/heads/main`,2026-09-21 取) |
|
|
14
|
+
| 许可 | **Apache License 2.0**,Copyright 2023 Continue |
|
|
15
|
+
| 上游 `NOTICE` | **没有**(已核对根目录清单;将来若出现,按 Apache-2.0 一并保留) |
|
|
16
|
+
| 许可全文 | [`LICENSE-Apache-2.0.txt`](LICENSE-Apache-2.0.txt)(标准 Apache-2.0 文本,11,357 字节,含 §9 与 APPENDIX) |
|
|
17
|
+
|
|
18
|
+
### 参考了什么(逐处登记)
|
|
19
|
+
|
|
20
|
+
| 本项目位置 | 参考内容 | 是否含上游代码 |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `lib/fim-adapter.mjs`、`assets/extensions/dshcs-editor-bridge/lib/fim-completion.js` | 实验性 **FIM(幽灵)补全**的**设计**:停顿去抖、只送光标附近的窗口、结果过滤与单行化、有界缓存、按文件禁用;以及**设置项划分**(对应上游 `tabAutocompleteOptions` 的 `debounceDelay` / `useAutocompleteMultilineCompletions` / `disableInFiles`) | **否**,独立实现 |
|
|
23
|
+
| `lib/index.js`、`lib/client.js`、`assets/extensions/dshcs-editor-bridge/extension.js` | 上述设计在本插件内的接线(桥的第五条路由、设置卡三行、内联补全 provider) | 否 |
|
|
24
|
+
| `docs/analysis-continuedev-reuse.md` | 对上游模块的**事实性描述与判定**(路径、字节数、blob sha、用途) | 否(事实与评述) |
|
|
25
|
+
|
|
26
|
+
**本项目的全部源码均为独立编写,不含 continuedev/continue 的任何源码片段、模板字符串或整份文件。**
|
|
27
|
+
补全请求走的是 DeepSeek 官方的 FIM(Beta)端点(`POST https://api.deepseek.com/beta/completions`,
|
|
28
|
+
参数 `prompt` + `suffix`),提示词形态由该官方文档与本机实测确定,与上游的 FIM 模板表无关
|
|
29
|
+
(那张表在本机路由上实测不可用,见 `docs/analysis-continuedev-reuse.md` 的 B6)。
|
|
30
|
+
|
|
31
|
+
### 将来若要移植上游代码片段,按 Apache-2.0 必须做到
|
|
32
|
+
|
|
33
|
+
1. **标注被改动的文件**:在每个移植文件头部写明 `来源: continuedev/continue@<sha> <path> · Apache-2.0 · 已改动`;
|
|
34
|
+
2. **保留版权与许可声明**:本文件 + `LICENSE-Apache-2.0.txt` 已经随包分发,移植时无需新增文件;
|
|
35
|
+
3. **上游 `NOTICE` 若出现则一并保留**;
|
|
36
|
+
4. **不含商标授权**:Apache-2.0 不授予商标权 —— 不得用 "Continue" 作为本项目的名称、包名或宣传语。
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 随包分发的第三方依赖
|
|
41
|
+
|
|
42
|
+
本包依赖的第三方包(`@jinsiyu/dshcs-*`、`@vscode/*`、`@xterm/*`、`zod` 等)各自带有许可与声明文件,
|
|
43
|
+
随 `node_modules` 一并分发,不在此重复登记;内嵌的 VS Code 树自带 `ThirdPartyNotices.txt`。
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## English summary
|
|
48
|
+
|
|
49
|
+
`dsh-code-server-app` is MIT-licensed (see `LICENSE`). Its experimental **FIM completion** feature was
|
|
50
|
+
**designed with reference to** [continuedev/continue](https://github.com/continuedev/continue)
|
|
51
|
+
(Apache License 2.0, Copyright 2023 Continue) — specifically the settings taxonomy of upstream
|
|
52
|
+
`tabAutocompleteOptions` (`debounceDelay`, `useAutocompleteMultilineCompletions`, `disableInFiles`) and its
|
|
53
|
+
debounce / cursor-window / filter / bounded-cache approach.
|
|
54
|
+
|
|
55
|
+
**No source code, template strings, or files from continuedev/continue are included in this project**;
|
|
56
|
+
every implementation here is independently written, and the completion requests target DeepSeek's official
|
|
57
|
+
FIM (Beta) endpoint as documented by DeepSeek. The standard Apache License 2.0 text ships as
|
|
58
|
+
`LICENSE-Apache-2.0.txt` so that Apache-2.0's obligations (notices, marking modified files, preserving an
|
|
59
|
+
upstream `NOTICE` if one appears) are already satisfied should a code fragment ever be ported in.
|
|
60
|
+
Apache-2.0 grants no trademark rights: "Continue" must not be used as this project's name or in its promotion.
|