@github/copilot-language-server 1.567.1 → 1.568.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.md +9 -2
- package/dist/main.js +1091 -1109
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/cliVersion.js +1 -1
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/client.js +1 -5
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/session.js +1 -10
- package/dist/node_modules/@github/copilot-sdk/package.json +12 -12
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -374,10 +374,14 @@ The result is an object containing an `edits` array:
|
|
|
374
374
|
The `command` field, per the LSP spec, is called via
|
|
375
375
|
[`workspace/executeCommand`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_executeCommand)
|
|
376
376
|
*after* the user accepts the edit. Copilot uses this for acceptance telemetry.
|
|
377
|
+
Each edit may also carry optional `requestedLanguageId` and `targetLanguageId`
|
|
378
|
+
with the CLS-detected languages of the document that originated the request and
|
|
379
|
+
the `textDocument` receiving the edit.
|
|
377
380
|
|
|
378
381
|
The LSP spec does not provide an event for showing the edit, so a custom
|
|
379
382
|
`textDocument/didShowInlineEdit` is used. Call it with an `item` parameter
|
|
380
|
-
containing the item shown from the `edits` array (note only the first argument is required)
|
|
383
|
+
containing the item shown from the `edits` array (note only the first argument is required),
|
|
384
|
+
and an optional `viewKind` describing the first presentation shown to the user:
|
|
381
385
|
|
|
382
386
|
```json
|
|
383
387
|
{
|
|
@@ -385,7 +389,8 @@ containing the item shown from the `edits` array (note only the first argument i
|
|
|
385
389
|
"command": {
|
|
386
390
|
"arguments": ["some-id"]
|
|
387
391
|
}
|
|
388
|
-
}
|
|
392
|
+
},
|
|
393
|
+
"viewKind": "inlineDiff"
|
|
389
394
|
}
|
|
390
395
|
```
|
|
391
396
|
|
|
@@ -506,6 +511,8 @@ the first next edit wins. The result is an object with an optional `suggestion`,
|
|
|
506
511
|
- `items` holds more than one entry only for a completion, where the extras are alternatives to cycle through. Each
|
|
507
512
|
item carries its own `command`.
|
|
508
513
|
- A `jump` may carry `targetLine`: the line in the target document to preview, as a word-level diff.
|
|
514
|
+
- An `edit` or `jump` may carry `requestedLanguageId` and `targetLanguageId`: the CLS-detected languages of the
|
|
515
|
+
document that originated the request and the `target` document receiving the edit.
|
|
509
516
|
- `provenance.model` and `provenance.fromCache` describe the first item, and are absent when its provider does not
|
|
510
517
|
report them. `fromCache` means the item was served without a model call.
|
|
511
518
|
|