@github/copilot-language-server 1.552.0 → 1.554.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.
Files changed (75) hide show
  1. package/README.md +94 -1
  2. package/dist/contextWorker.js +14 -14
  3. package/dist/main.js +1030 -1020
  4. package/dist/node_modules/@github/copilot-sdk/dist/cjs/cliVersion.js +1 -1
  5. package/dist/node_modules/@github/copilot-sdk/dist/cjs/client.js +507 -37
  6. package/dist/node_modules/@github/copilot-sdk/dist/cjs/copilotRequestHandler.js +156 -20
  7. package/dist/node_modules/@github/copilot-sdk/dist/cjs/extension.js +13 -9
  8. package/dist/node_modules/@github/copilot-sdk/dist/cjs/ffiRuntimeHost.js +14 -3
  9. package/dist/node_modules/@github/copilot-sdk/dist/cjs/generated/rpc.js +1366 -304
  10. package/dist/node_modules/@github/copilot-sdk/dist/cjs/host.js +67 -0
  11. package/dist/node_modules/@github/copilot-sdk/dist/cjs/index.js +12 -7
  12. package/dist/node_modules/@github/copilot-sdk/dist/cjs/installationConfirmation.js +98 -0
  13. package/dist/node_modules/@github/copilot-sdk/dist/cjs/runtimeArtifacts.js +1 -0
  14. package/dist/node_modules/@github/copilot-sdk/dist/cjs/schema.js +40 -0
  15. package/dist/node_modules/@github/copilot-sdk/dist/cjs/session.js +474 -151
  16. package/dist/node_modules/@github/copilot-sdk/dist/cjs/sessionFsProvider.js +57 -0
  17. package/dist/node_modules/@github/copilot-sdk/dist/cjs/types.js +5 -2
  18. package/dist/node_modules/@github/copilot-sdk/dist/cjs/{factory.js → workflow.js} +33 -33
  19. package/dist/node_modules/@github/copilot-sdk/package.json +27 -16
  20. package/dist/node_modules/zod/locales/package.json +1 -2
  21. package/dist/node_modules/zod/mini/package.json +1 -2
  22. package/dist/node_modules/zod/package.json +1 -1
  23. package/dist/node_modules/zod/v3/package.json +1 -2
  24. package/dist/node_modules/zod/v4/classic/errors.js +2 -2
  25. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +16 -31
  26. package/dist/node_modules/zod/v4/classic/from-json-schema.js +16 -31
  27. package/dist/node_modules/zod/v4/classic/package.json +1 -2
  28. package/dist/node_modules/zod/v4/classic/schemas.cjs +119 -358
  29. package/dist/node_modules/zod/v4/classic/schemas.js +118 -356
  30. package/dist/node_modules/zod/v4/core/api.cjs +2 -7
  31. package/dist/node_modules/zod/v4/core/api.js +2 -7
  32. package/dist/node_modules/zod/v4/core/core.cjs +1 -3
  33. package/dist/node_modules/zod/v4/core/core.js +2 -4
  34. package/dist/node_modules/zod/v4/core/errors.cjs +23 -26
  35. package/dist/node_modules/zod/v4/core/errors.js +23 -26
  36. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +20 -16
  37. package/dist/node_modules/zod/v4/core/json-schema-processors.js +20 -16
  38. package/dist/node_modules/zod/v4/core/package.json +1 -2
  39. package/dist/node_modules/zod/v4/core/parse.cjs +7 -7
  40. package/dist/node_modules/zod/v4/core/parse.js +7 -7
  41. package/dist/node_modules/zod/v4/core/regexes.cjs +3 -9
  42. package/dist/node_modules/zod/v4/core/regexes.js +1 -7
  43. package/dist/node_modules/zod/v4/core/schemas.cjs +65 -211
  44. package/dist/node_modules/zod/v4/core/schemas.js +64 -210
  45. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +1 -12
  46. package/dist/node_modules/zod/v4/core/to-json-schema.js +1 -12
  47. package/dist/node_modules/zod/v4/core/util.cjs +30 -54
  48. package/dist/node_modules/zod/v4/core/util.js +32 -55
  49. package/dist/node_modules/zod/v4/core/versions.cjs +2 -2
  50. package/dist/node_modules/zod/v4/core/versions.js +2 -2
  51. package/dist/node_modules/zod/v4/locales/en.cjs +0 -4
  52. package/dist/node_modules/zod/v4/locales/en.js +0 -4
  53. package/dist/node_modules/zod/v4/locales/fr.cjs +7 -24
  54. package/dist/node_modules/zod/v4/locales/fr.js +7 -24
  55. package/dist/node_modules/zod/v4/locales/index.cjs +1 -8
  56. package/dist/node_modules/zod/v4/locales/index.js +0 -3
  57. package/dist/node_modules/zod/v4/locales/it.cjs +1 -1
  58. package/dist/node_modules/zod/v4/locales/it.js +1 -1
  59. package/dist/node_modules/zod/v4/locales/ka.cjs +8 -8
  60. package/dist/node_modules/zod/v4/locales/ka.js +8 -8
  61. package/dist/node_modules/zod/v4/locales/package.json +1 -2
  62. package/dist/node_modules/zod/v4/locales/uz.cjs +0 -1
  63. package/dist/node_modules/zod/v4/locales/uz.js +0 -1
  64. package/dist/node_modules/zod/v4/mini/package.json +1 -2
  65. package/dist/node_modules/zod/v4/mini/schemas.cjs +4 -41
  66. package/dist/node_modules/zod/v4/mini/schemas.js +4 -40
  67. package/dist/node_modules/zod/v4/package.json +1 -2
  68. package/dist/node_modules/zod/v4-mini/package.json +1 -2
  69. package/package.json +20 -20
  70. package/dist/node_modules/zod/v4/locales/el.cjs +0 -136
  71. package/dist/node_modules/zod/v4/locales/el.js +0 -109
  72. package/dist/node_modules/zod/v4/locales/hr.cjs +0 -149
  73. package/dist/node_modules/zod/v4/locales/hr.js +0 -122
  74. package/dist/node_modules/zod/v4/locales/ro.cjs +0 -146
  75. package/dist/node_modules/zod/v4/locales/ro.js +0 -119
package/README.md CHANGED
@@ -421,6 +421,97 @@ legacy client behavior. The corrected reporting ships with the implementing
421
421
  CLS/plugin versions, without a separate rollout flag; original model experiment
422
422
  assignments are still preserved.
423
423
 
424
+ ## Unified Suggestions
425
+
426
+ `textDocument/copilotSuggest` is a custom method that asks for inline completions and next edit suggestions in one
427
+ request. The server calls the providers the trigger reason allows, picks the winner, and returns at most one
428
+ suggestion, so the client does not have to choose between the two. `textDocument/inlineCompletion` and
429
+ `textDocument/copilotInlineEdit` are unchanged and remain available.
430
+
431
+ The parameters combine those of the two methods and add the `reason` for the request:
432
+
433
+ ```json
434
+ {
435
+ "textDocument": {
436
+ "uri": "file:///path/to/file",
437
+ "version": 0
438
+ },
439
+ "position": {"line": 1, "character": 2},
440
+ "reason": "typing",
441
+ "include": {"completions": true, "edits": true},
442
+ "formattingOptions": {
443
+ "tabSize": 4,
444
+ "insertSpaces": true
445
+ }
446
+ }
447
+ ```
448
+
449
+ `reason` decides which providers are asked:
450
+
451
+ | `reason` | Asks for |
452
+ | --- | --- |
453
+ | `typing` | Completions and next edits |
454
+ | `manual` | Completions |
455
+ | `cycling` | Completions, with alternatives to cycle through |
456
+ | `caretMove` | Next edits |
457
+ | `postAccept` | Next edits |
458
+
459
+ An unknown `reason` is treated as `typing`. The optional `include` switches off a provider that the reason allows, for
460
+ example to honor a user setting; it never switches one on. `context.selectedCompletionInfo` and `formattingOptions`
461
+ mean the same as for `textDocument/inlineCompletion`, and `diagnostics`, if given, is passed to the next edit provider
462
+ as with `textDocument/copilotInlineEdit`.
463
+
464
+ A completion wins when it inserts new text; one that only repeats text already after the cursor is dropped. Otherwise
465
+ the first next edit wins. The result is an object with an optional `suggestion`, absent when there is nothing to show:
466
+
467
+ ```json
468
+ {
469
+ "suggestion": {
470
+ "id": "some-id",
471
+ "kind": "completion",
472
+ "presentation": "ghostText",
473
+ "target": {
474
+ "uri": "file:///path/to/file",
475
+ "version": 0
476
+ },
477
+ "items": [
478
+ {
479
+ "text": "a helpful suggestion",
480
+ "range": {
481
+ "start": {"line": 1, "character": 0},
482
+ "end": {"line": 1, "character": 2}
483
+ },
484
+ "command": {
485
+ "title": "Completion Accepted",
486
+ "command": "github.copilot.didAcceptCompletionItem",
487
+ "arguments": ["some-id"]
488
+ }
489
+ }
490
+ ],
491
+ "provenance": {"viaProxy": true, "model": "some-model", "fromCache": false}
492
+ }
493
+ }
494
+ ```
495
+
496
+ - `kind` is what the suggestion is: `completion`, `edit`, or `jump`, an edit in another document named by `target`.
497
+ It decides how outcomes are reported.
498
+ - `presentation` is how to draw it: `ghostText`, `diff`, or `jump`. Draw by `presentation` and report by `kind`; the
499
+ two can differ in future versions.
500
+ - `items` holds more than one entry only for a completion, where the extras are alternatives to cycle through. Each
501
+ item carries its own `command`.
502
+ - A `jump` may carry `targetLine`: the line in the target document to preview, as a word-level diff.
503
+ - `provenance.model` and `provenance.fromCache` describe the first item, and are absent when its provider does not
504
+ report them. `fromCache` means the item was served without a model call.
505
+
506
+ Skip a suggestion whose `kind` or `presentation` you do not recognize, since new values may be added.
507
+
508
+ Report outcomes the way the method behind the `kind` does, passing the item that was shown or accepted. For a
509
+ `completion`, send `textDocument/didShowCompletion` and `textDocument/didPartiallyAcceptCompletion` as described in
510
+ [Inline Completions](#inline-completions). For an `edit` or a `jump`, send `textDocument/didShowInlineEdit` as described
511
+ in [Next Edit Suggestions](#next-edit-suggestions). In every case, call the item's `command` via
512
+ `workspace/executeCommand` after the user accepts it. Next edits returned this way carry no `cacheTelemetryContext`:
513
+ the server caches them itself.
514
+
424
515
  ## Panel Completions
425
516
 
426
517
  Panel completions are used for "Open Copilot" style completions. They are similar to inline completions, but are shown
@@ -447,7 +538,9 @@ after accepting to trigger acceptance telemetry. Partial acceptance and shown ev
447
538
  ## Cancellation
448
539
 
449
540
  `textDocument/inlineCompletion` supports cancel-previous strategy for cancellation: If you send new completions
450
- request, the previous request is cancelled.
541
+ request, the previous request is cancelled. `textDocument/copilotSuggest` requests that ask for completions share this
542
+ strategy with `textDocument/inlineCompletion`, and a superseded one fails with the same `ServerCancelled` error.
543
+ This also applies while the proxy waits for NES after its completion call has finished.
451
544
 
452
545
  Additionally the LSP `$/cancelRequest` method is supported to cancel any request. It is strongly encouraged to eagerly
453
546
  cancel completion requests as soon as possible.