@vscode/chat-lib 0.3.1-8 → 0.4.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 (78) hide show
  1. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/ghostText.d.ts.map +1 -1
  2. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/ghostText.js +23 -4
  3. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/ghostText.js.map +1 -1
  4. package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.d.ts.map +1 -1
  5. package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.js +1 -3
  6. package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.js.map +1 -1
  7. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts.map +1 -1
  8. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js +2 -2
  9. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js.map +1 -1
  10. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts.map +1 -1
  11. package/dist/src/_internal/extension/xtab/node/xtabProvider.js +3 -12
  12. package/dist/src/_internal/extension/xtab/node/xtabProvider.js.map +1 -1
  13. package/dist/src/_internal/extension/xtab/node/xtabUtils.d.ts +5 -2
  14. package/dist/src/_internal/extension/xtab/node/xtabUtils.d.ts.map +1 -1
  15. package/dist/src/_internal/extension/xtab/node/xtabUtils.js +3 -2
  16. package/dist/src/_internal/extension/xtab/node/xtabUtils.js.map +1 -1
  17. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +0 -1
  18. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
  19. package/dist/src/_internal/platform/configuration/common/configurationService.js +2 -3
  20. package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
  21. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts +1 -0
  22. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts.map +1 -1
  23. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js +13 -3
  24. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js.map +1 -1
  25. package/dist/src/_internal/platform/endpoint/common/endpointTypes.d.ts +1 -0
  26. package/dist/src/_internal/platform/endpoint/common/endpointTypes.d.ts.map +1 -1
  27. package/dist/src/_internal/platform/endpoint/common/endpointTypes.js +1 -0
  28. package/dist/src/_internal/platform/endpoint/common/endpointTypes.js.map +1 -1
  29. package/dist/src/_internal/platform/endpoint/common/phaseDataContainer.d.ts +16 -0
  30. package/dist/src/_internal/platform/endpoint/common/phaseDataContainer.d.ts.map +1 -0
  31. package/dist/src/_internal/platform/endpoint/common/phaseDataContainer.js +37 -0
  32. package/dist/src/_internal/platform/endpoint/common/phaseDataContainer.js.map +1 -0
  33. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts +2 -2
  34. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts.map +1 -1
  35. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js +8 -4
  36. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js.map +1 -1
  37. package/dist/src/_internal/platform/endpoint/node/messagesApi.d.ts.map +1 -1
  38. package/dist/src/_internal/platform/endpoint/node/messagesApi.js +32 -10
  39. package/dist/src/_internal/platform/endpoint/node/messagesApi.js.map +1 -1
  40. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts.map +1 -1
  41. package/dist/src/_internal/platform/endpoint/node/responsesApi.js +23 -2
  42. package/dist/src/_internal/platform/endpoint/node/responsesApi.js.map +1 -1
  43. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.d.ts +0 -3
  44. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.d.ts.map +1 -1
  45. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.js +0 -5
  46. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.js.map +1 -1
  47. package/dist/src/_internal/platform/networking/common/anthropic.d.ts +13 -1
  48. package/dist/src/_internal/platform/networking/common/anthropic.d.ts.map +1 -1
  49. package/dist/src/_internal/platform/networking/common/anthropic.js +24 -4
  50. package/dist/src/_internal/platform/networking/common/anthropic.js.map +1 -1
  51. package/dist/src/_internal/platform/networking/common/fetch.d.ts +1 -0
  52. package/dist/src/_internal/platform/networking/common/fetch.d.ts.map +1 -1
  53. package/dist/src/_internal/platform/networking/common/fetch.js.map +1 -1
  54. package/dist/src/_internal/platform/networking/common/networking.d.ts +3 -3
  55. package/dist/src/_internal/platform/networking/common/networking.d.ts.map +1 -1
  56. package/dist/src/_internal/platform/networking/common/networking.js +4 -4
  57. package/dist/src/_internal/platform/networking/common/networking.js.map +1 -1
  58. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts +12 -0
  59. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts.map +1 -1
  60. package/dist/src/_internal/util/common/test/shims/chatTypes.js +11 -2
  61. package/dist/src/_internal/util/common/test/shims/chatTypes.js.map +1 -1
  62. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.d.ts.map +1 -1
  63. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js +1 -0
  64. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js.map +1 -1
  65. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.d.ts +5 -0
  66. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.d.ts.map +1 -1
  67. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.js +32 -23
  68. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  69. package/dist/src/_internal/vscodeTypes.d.ts +2 -0
  70. package/dist/src/_internal/vscodeTypes.d.ts.map +1 -1
  71. package/dist/src/_internal/vscodeTypes.js +4 -2
  72. package/dist/src/_internal/vscodeTypes.js.map +1 -1
  73. package/dist/src/package.json +129 -28
  74. package/package.json +1 -1
  75. package/dist/src/_internal/extension/xtab/common/inlineSuggestion.d.ts +0 -15
  76. package/dist/src/_internal/extension/xtab/common/inlineSuggestion.d.ts.map +0 -1
  77. package/dist/src/_internal/extension/xtab/common/inlineSuggestion.js +0 -43
  78. package/dist/src/_internal/extension/xtab/common/inlineSuggestion.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  "name": "copilot-chat",
3
3
  "displayName": "GitHub Copilot Chat",
4
4
  "description": "AI chat features powered by Copilot",
5
- "version": "0.38.0",
5
+ "version": "0.37.6",
6
6
  "build": "1",
7
7
  "internalAIKey": "1058ec22-3c95-4951-8443-f26c1f325911",
8
8
  "completionsCoreVersion": "1.378.1799",
@@ -89,6 +89,7 @@
89
89
  "main": "./dist/extension",
90
90
  "l10n": "./l10n",
91
91
  "enabledApiProposals": [
92
+ "chatHooks@6",
92
93
  "extensionsAny",
93
94
  "newSymbolNamesProvider",
94
95
  "interactive",
@@ -118,7 +119,7 @@
118
119
  "authLearnMore",
119
120
  "testObserver",
120
121
  "aiTextSearchProvider@2",
121
- "chatParticipantPrivate@12",
122
+ "chatParticipantPrivate@13",
122
123
  "chatProvider@4",
123
124
  "contribDebugCreateConfiguration",
124
125
  "chatReferenceDiagnostic",
@@ -1164,7 +1165,7 @@
1164
1165
  "toolReferenceName": "askQuestions",
1165
1166
  "displayName": "%copilot.tools.askQuestions.name%",
1166
1167
  "userDescription": "%copilot.tools.askQuestions.description%",
1167
- "modelDescription": "Ask the user questions to clarify intent, validate assumptions, or choose between implementation approaches. Prefer proposing a sensible default so users can confirm quickly.\n\nOnly use this tool when the user's answer provides information you cannot determine or reasonably assume yourself. This tool is for gathering information, not for reporting status or problems. If a question has an obvious best answer, take that action instead of asking.\n\nWhen to use:\n- Clarify ambiguous requirements before proceeding\n- Get user preferences on implementation choices\n- Confirm decisions that meaningfully affect outcome\n\nWhen NOT to use:\n- The answer is determinable from code or context\n- Asking for permission to continue or abort\n- Confirming something you can reasonably decide yourself\n- Reporting a problem (instead, attempt to resolve it)\n\nQuestion guidelines:\n- NEVER use `recommended` for quizzes or polls. Recommended options are PRE-SELECTED and visible to users, which would reveal answers\n- Batch related questions into a single call (max 4 questions, 2-6 options each; omit options for free text input)\n- Provide brief context explaining what is being decided and why\n- Only mark an option as `recommended` with a short justification to suggest YOUR preferred implementation choice\n- Keep options mutually exclusive for single-select; use `multiSelect: true` only when choices are additive and phrase the question accordingly\n\nAfter receiving answers:\n- Incorporate decisions and continue without re-asking unless requirements change\n\nAn \"Other\" option is automatically shown to users—do not add your own.",
1168
+ "modelDescription": "Ask the user questions to clarify intent, validate assumptions, or choose between implementation approaches. Prefer proposing a sensible default so users can confirm quickly.\n\nOnly use this tool when the user's answer provides information you cannot determine or reasonably assume yourself. This tool is for gathering information, not for reporting status or problems. If a question has an obvious best answer, take that action instead of asking.\n\nWhen to use:\n- Clarify ambiguous requirements before proceeding\n- Get user preferences on implementation choices\n- Confirm decisions that meaningfully affect outcome\n\nWhen NOT to use:\n- The answer is determinable from code or context\n- Asking for permission to continue or abort\n- Confirming something you can reasonably decide yourself\n- Reporting a problem (instead, attempt to resolve it)\n\nQuestion guidelines:\n- NEVER use `recommended` for quizzes or polls. Recommended options are PRE-SELECTED and visible to users, which would reveal answers\n- Batch related questions into a single call (max 4 questions, 2-6 options each; omit options for free text input)\n- Provide brief context explaining what is being decided and why\n- Only mark an option as `recommended` to suggest YOUR preferred implementation choice\n- Keep options mutually exclusive for single-select; use `multiSelect: true` only when choices are additive and phrase the question accordingly\n\nAfter receiving answers:\n- Incorporate decisions and continue without re-asking unless requirements change\n\nAn \"Other\" option is automatically shown to users—do not add your own.",
1168
1169
  "icon": "$(question)",
1169
1170
  "when": "config.github.copilot.chat.askQuestions.enabled",
1170
1171
  "inputSchema": {
@@ -2201,6 +2202,18 @@
2201
2202
  "icon": "$(terminal)",
2202
2203
  "category": "Copilot CLI"
2203
2204
  },
2205
+ {
2206
+ "command": "github.copilot.cli.newSession",
2207
+ "title": "%github.copilot.command.cli.newSession%",
2208
+ "icon": "$(terminal)",
2209
+ "category": "Chat"
2210
+ },
2211
+ {
2212
+ "command": "github.copilot.cli.newSessionToSide",
2213
+ "title": "%github.copilot.command.cli.newSessionToSide%",
2214
+ "icon": "$(terminal)",
2215
+ "category": "Chat"
2216
+ },
2204
2217
  {
2205
2218
  "command": "github.copilot.chat.replay",
2206
2219
  "title": "Start Chat Replay",
@@ -2727,6 +2740,32 @@
2727
2740
  "icon": "$(git-stash-pop)",
2728
2741
  "category": "GitHub Copilot"
2729
2742
  },
2743
+ {
2744
+ "command": "github.copilot.chat.copilotCLI.addFileReference",
2745
+ "title": "%github.copilot.command.chat.copilotCLI.addFileReference%",
2746
+ "enablement": "github.copilot.chat.copilotCLI.hasSession",
2747
+ "category": "Copilot CLI"
2748
+ },
2749
+ {
2750
+ "command": "github.copilot.chat.copilotCLI.addSelection",
2751
+ "title": "%github.copilot.command.chat.copilotCLI.addSelection%",
2752
+ "enablement": "github.copilot.chat.copilotCLI.hasSession",
2753
+ "category": "Copilot CLI"
2754
+ },
2755
+ {
2756
+ "command": "github.copilot.chat.copilotCLI.acceptDiff",
2757
+ "title": "%github.copilot.command.chat.copilotCLI.acceptDiff%",
2758
+ "enablement": "github.copilot.chat.copilotCLI.hasActiveDiff",
2759
+ "icon": "$(check)",
2760
+ "category": "Copilot CLI"
2761
+ },
2762
+ {
2763
+ "command": "github.copilot.chat.copilotCLI.rejectDiff",
2764
+ "title": "%github.copilot.command.chat.copilotCLI.rejectDiff%",
2765
+ "enablement": "github.copilot.chat.copilotCLI.hasActiveDiff",
2766
+ "icon": "$(close)",
2767
+ "category": "Copilot CLI"
2768
+ },
2730
2769
  {
2731
2770
  "command": "github.copilot.chat.checkoutPullRequestReroute",
2732
2771
  "title": "%github.copilot.command.checkoutPullRequestReroute.title%",
@@ -2738,6 +2777,11 @@
2738
2777
  "title": "%github.copilot.command.cloudSessions.openRepository.title%",
2739
2778
  "icon": "$(repo)",
2740
2779
  "category": "GitHub Copilot"
2780
+ },
2781
+ {
2782
+ "command": "github.copilot.chat.cloudSessions.clearCaches",
2783
+ "title": "%github.copilot.command.cloudSessions.clearCaches.title%",
2784
+ "category": "GitHub Copilot"
2741
2785
  }
2742
2786
  ],
2743
2787
  "configuration": [
@@ -3051,6 +3095,26 @@
3051
3095
  "tags": [
3052
3096
  "preview"
3053
3097
  ]
3098
+ },
3099
+ "github.copilot.chat.anthropic.useMessagesApi": {
3100
+ "type": "boolean",
3101
+ "default": true,
3102
+ "markdownDescription": "%github.copilot.config.useMessagesApi%",
3103
+ "tags": [
3104
+ "preview",
3105
+ "onExp"
3106
+ ]
3107
+ },
3108
+ "github.copilot.chat.anthropic.thinking.budgetTokens": {
3109
+ "type": "number",
3110
+ "markdownDescription": "%github.copilot.config.anthropic.thinking.budgetTokens%",
3111
+ "minimum": 0,
3112
+ "maximum": 32000,
3113
+ "default": 16000,
3114
+ "tags": [
3115
+ "preview",
3116
+ "onExp"
3117
+ ]
3054
3118
  }
3055
3119
  }
3056
3120
  },
@@ -3535,15 +3599,6 @@
3535
3599
  ],
3536
3600
  "description": "%github.copilot.config.alternateGeminiModelFPrompt.enabled%"
3537
3601
  },
3538
- "github.copilot.chat.anthropic.useMessagesApi": {
3539
- "type": "boolean",
3540
- "default": true,
3541
- "markdownDescription": "%github.copilot.config.useMessagesApi%",
3542
- "tags": [
3543
- "experimental",
3544
- "onExp"
3545
- ]
3546
- },
3547
3602
  "github.copilot.chat.anthropic.contextEditing.enabled": {
3548
3603
  "type": "boolean",
3549
3604
  "default": false,
@@ -3590,17 +3645,6 @@
3590
3645
  "detailed"
3591
3646
  ]
3592
3647
  },
3593
- "github.copilot.chat.anthropic.thinking.budgetTokens": {
3594
- "type": "number",
3595
- "markdownDescription": "%github.copilot.config.anthropic.thinking.budgetTokens%",
3596
- "minimum": 0,
3597
- "maximum": 32000,
3598
- "default": 4000,
3599
- "tags": [
3600
- "experimental",
3601
- "onExp"
3602
- ]
3603
- },
3604
3648
  "github.copilot.chat.anthropic.tools.websearch.enabled": {
3605
3649
  "type": "boolean",
3606
3650
  "default": false,
@@ -4265,6 +4309,7 @@
4265
4309
  "markdownDescription": "%github.copilot.config.agentCustomizationSkill.enabled%",
4266
4310
  "tags": [
4267
4311
  "advanced",
4312
+ "experimental",
4268
4313
  "onExp"
4269
4314
  ]
4270
4315
  },
@@ -4350,6 +4395,23 @@
4350
4395
  "command": "github.copilot.chat.showAsChatSession",
4351
4396
  "group": "navigation@9",
4352
4397
  "when": "resourceFilename === 'benchRun.chatReplay.json' || resourceFilename === 'chat-export-logs.json'"
4398
+ },
4399
+ {
4400
+ "command": "github.copilot.chat.copilotCLI.acceptDiff",
4401
+ "group": "navigation@1",
4402
+ "when": "github.copilot.chat.copilotCLI.hasActiveDiff"
4403
+ },
4404
+ {
4405
+ "command": "github.copilot.chat.copilotCLI.rejectDiff",
4406
+ "group": "navigation@2",
4407
+ "when": "github.copilot.chat.copilotCLI.hasActiveDiff"
4408
+ }
4409
+ ],
4410
+ "editor/title/context": [
4411
+ {
4412
+ "command": "github.copilot.chat.copilotCLI.addFileReference",
4413
+ "group": "copilot",
4414
+ "when": "github.copilot.chat.copilotCLI.hasSession && !inOutput && resourceScheme != 'vscode-webview' && resourceScheme != 'webview-panel'"
4353
4415
  }
4354
4416
  ],
4355
4417
  "explorer/context": [
@@ -4357,6 +4419,11 @@
4357
4419
  "command": "github.copilot.chat.showAsChatSession",
4358
4420
  "when": "resourceFilename === 'benchRun.chatReplay.json' || resourceFilename === 'chat-export-logs.json'",
4359
4421
  "group": "2_copilot@1"
4422
+ },
4423
+ {
4424
+ "command": "github.copilot.chat.copilotCLI.addFileReference",
4425
+ "group": "copilot",
4426
+ "when": "github.copilot.chat.copilotCLI.hasSession && !explorerResourceIsFolder"
4360
4427
  }
4361
4428
  ],
4362
4429
  "editor/context": [
@@ -4364,6 +4431,16 @@
4364
4431
  "command": "github.copilot.chat.explain",
4365
4432
  "when": "!github.copilot.interactiveSession.disabled",
4366
4433
  "group": "1_chat@4"
4434
+ },
4435
+ {
4436
+ "command": "github.copilot.chat.copilotCLI.addFileReference",
4437
+ "group": "copilot",
4438
+ "when": "github.copilot.chat.copilotCLI.hasSession && !inOutput && resourceScheme != 'vscode-webview' && resourceScheme != 'webview-panel'"
4439
+ },
4440
+ {
4441
+ "command": "github.copilot.chat.copilotCLI.addSelection",
4442
+ "group": "copilot",
4443
+ "when": "github.copilot.chat.copilotCLI.hasSession && editorHasSelection && !inOutput && resourceScheme != 'vscode-webview' && resourceScheme != 'webview-panel'"
4367
4444
  }
4368
4445
  ],
4369
4446
  "editor/context/chat": [
@@ -4403,7 +4480,7 @@
4403
4480
  "chat/input/editing/sessionToolbar": [
4404
4481
  {
4405
4482
  "command": "github.copilot.chat.applyCopilotCLIAgentSessionChanges.apply",
4406
- "when": "chatSessionType == copilotcli",
4483
+ "when": "chatSessionType == copilotcli && workbenchState != empty",
4407
4484
  "group": "navigation@0"
4408
4485
  },
4409
4486
  {
@@ -4412,6 +4489,12 @@
4412
4489
  "group": "navigation@0"
4413
4490
  }
4414
4491
  ],
4492
+ "chat/newSession": [
4493
+ {
4494
+ "command": "github.copilot.cli.newSession",
4495
+ "group": "4_recommendations@0"
4496
+ }
4497
+ ],
4415
4498
  "testing/item/result": [
4416
4499
  {
4417
4500
  "command": "github.copilot.tests.fixTestFailure.fromInline",
@@ -4973,7 +5056,7 @@
4973
5056
  "multiDiffEditor/content": [
4974
5057
  {
4975
5058
  "command": "github.copilot.chat.applyCopilotCLIAgentSessionChanges",
4976
- "when": "resourceScheme == copilotcli-worktree-changes"
5059
+ "when": "resourceScheme == copilotcli-worktree-changes && workbenchState != empty"
4977
5060
  }
4978
5061
  ],
4979
5062
  "chat/chatSessions": [
@@ -4999,7 +5082,7 @@
4999
5082
  },
5000
5083
  {
5001
5084
  "command": "github.copilot.chat.applyCopilotCLIAgentSessionChanges",
5002
- "when": "chatSessionType == copilotcli",
5085
+ "when": "chatSessionType == copilotcli && workbenchState != empty",
5003
5086
  "group": "3_apply@0"
5004
5087
  },
5005
5088
  {
@@ -5169,6 +5252,12 @@
5169
5252
  }
5170
5253
  },
5171
5254
  "keybindings": [
5255
+ {
5256
+ "command": "github.copilot.chat.copilotCLI.addFileReference",
5257
+ "key": "ctrl+shift+.",
5258
+ "mac": "cmd+shift+.",
5259
+ "when": "github.copilot.chat.copilotCLI.hasSession && editorTextFocus"
5260
+ },
5172
5261
  {
5173
5262
  "command": "github.copilot.chat.rerunWithCopilotDebug",
5174
5263
  "key": "ctrl+alt+.",
@@ -5502,7 +5591,16 @@
5502
5591
  {
5503
5592
  "path": "./assets/prompts/init.prompt.md"
5504
5593
  }
5505
- ]
5594
+ ],
5595
+ "terminal": {
5596
+ "profiles": [
5597
+ {
5598
+ "icon": "copilot",
5599
+ "id": "copilot-cli",
5600
+ "title": "GitHub Copilot CLI"
5601
+ }
5602
+ ]
5603
+ }
5506
5604
  },
5507
5605
  "prettier": {
5508
5606
  "useTabs": true,
@@ -5564,6 +5662,7 @@
5564
5662
  "@parcel/watcher": "^2.5.1",
5565
5663
  "@stylistic/eslint-plugin": "^3.0.1",
5566
5664
  "@types/eslint": "^9.0.0",
5665
+ "@types/express": "^5.0.6",
5567
5666
  "@types/google-protobuf": "^3.15.12",
5568
5667
  "@types/js-yaml": "^4.0.9",
5569
5668
  "@types/markdown-it": "^14.0.0",
@@ -5651,10 +5750,11 @@
5651
5750
  "@anthropic-ai/claude-agent-sdk": "0.2.5",
5652
5751
  "@anthropic-ai/sdk": "^0.71.2",
5653
5752
  "@github/blackbird-external-ingest-utils": "^0.1.0",
5654
- "@github/copilot": "^0.0.388",
5753
+ "@github/copilot": "^0.0.406",
5655
5754
  "@google/genai": "^1.22.0",
5656
5755
  "@humanwhocodes/gitignore-to-minimatch": "1.0.2",
5657
5756
  "@microsoft/tiktokenizer": "^1.0.10",
5757
+ "@modelcontextprotocol/sdk": "^1.25.2",
5658
5758
  "@sinclair/typebox": "^0.34.41",
5659
5759
  "@vscode/copilot-api": "^0.2.12",
5660
5760
  "@vscode/extension-telemetry": "^1.2.0",
@@ -5668,6 +5768,7 @@
5668
5768
  "best-effort-json-parser": "^1.2.1",
5669
5769
  "diff": "^8.0.3",
5670
5770
  "dompurify": "^3.3.0",
5771
+ "express": "^5.2.1",
5671
5772
  "ignore": "^7.0.5",
5672
5773
  "isbinaryfile": "^5.0.4",
5673
5774
  "jsonc-parser": "^3.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/chat-lib",
3
- "version": "0.3.1-8",
3
+ "version": "0.4.0",
4
4
  "description": "Chat and inline editing SDK extracted from VS Code Copilot Chat",
5
5
  "main": "dist/src/main.js",
6
6
  "types": "dist/src/main.d.ts",
@@ -1,15 +0,0 @@
1
- import { Position } from '../../../util/vs/editor/common/core/position';
2
- import { CurrentDocument } from './xtabCurrentDocument';
3
- /**
4
- * Checks if the position is valid inline suggestion position (middle of the line).
5
- * Returns `undefined` if it's position where ghost text shouldn't be displayed.
6
- *
7
- * @param textAfterCursor - The text from the cursor position to the end of line
8
- */
9
- export declare function isInlineSuggestionFromTextAfterCursor(textAfterCursor: string): boolean | undefined;
10
- /**
11
- * Checks if the position is valid inline suggestion position (middle of the line).
12
- * Returns `undefined` if it's position where ghost text shouldn't be displayed.
13
- */
14
- export declare function isInlineSuggestion(document: CurrentDocument, position: Position): boolean | undefined;
15
- //# sourceMappingURL=inlineSuggestion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inlineSuggestion.d.ts","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/inlineSuggestion.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,qCAAqC,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAUlG;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAKrG"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Licensed under the MIT License. See License.txt in the project root for license information.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.isInlineSuggestionFromTextAfterCursor = isInlineSuggestionFromTextAfterCursor;
8
- exports.isInlineSuggestion = isInlineSuggestion;
9
- /**
10
- * Checks if the position is valid inline suggestion position (middle of the line).
11
- * Returns `undefined` if it's position where ghost text shouldn't be displayed.
12
- *
13
- * @param textAfterCursor - The text from the cursor position to the end of line
14
- */
15
- function isInlineSuggestionFromTextAfterCursor(textAfterCursor) {
16
- // Checks if we're in the position for the middle of the line suggestion
17
- const isMiddleOfLine = isMiddleOfTheLineFromTextAfterCursor(textAfterCursor);
18
- const isValidMiddleOfLine = isValidMiddleOfTheLineFromTextAfterCursor(textAfterCursor);
19
- if (isMiddleOfLine && !isValidMiddleOfLine) {
20
- return undefined;
21
- }
22
- return isMiddleOfLine && isValidMiddleOfLine;
23
- }
24
- /**
25
- * Checks if the position is valid inline suggestion position (middle of the line).
26
- * Returns `undefined` if it's position where ghost text shouldn't be displayed.
27
- */
28
- function isInlineSuggestion(document, position) {
29
- const lineIndex = position.lineNumber - 1; // Convert to 0-based
30
- const line = document.lines[lineIndex] ?? '';
31
- const textAfterCursor = line.substring(position.column - 1);
32
- return isInlineSuggestionFromTextAfterCursor(textAfterCursor);
33
- }
34
- /** Checks if there's non-whitespace text after cursor (i.e., NOT at end of line) */
35
- function isMiddleOfTheLineFromTextAfterCursor(textAfterCursor) {
36
- return textAfterCursor.trim().length !== 0;
37
- }
38
- /** Checks if text after cursor matches valid pattern for middle-of-line suggestions */
39
- function isValidMiddleOfTheLineFromTextAfterCursor(textAfterCursor) {
40
- const endOfLine = textAfterCursor.trim();
41
- return /^\s*[)>}\]"'`]*\s*[:{;,]?\s*$/.test(endOfLine);
42
- }
43
- //# sourceMappingURL=inlineSuggestion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inlineSuggestion.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/inlineSuggestion.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAWhG,sFAUC;AAMD,gDAKC;AA3BD;;;;;GAKG;AACH,SAAgB,qCAAqC,CAAC,eAAuB;IAC5E,wEAAwE;IACxE,MAAM,cAAc,GAAG,oCAAoC,CAAC,eAAe,CAAC,CAAC;IAC7E,MAAM,mBAAmB,GAAG,yCAAyC,CAAC,eAAe,CAAC,CAAC;IAEvF,IAAI,cAAc,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,cAAc,IAAI,mBAAmB,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,QAAyB,EAAE,QAAkB;IAC/E,MAAM,SAAS,GAAG,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,qBAAqB;IAChE,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC7C,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC5D,OAAO,qCAAqC,CAAC,eAAe,CAAC,CAAC;AAC/D,CAAC;AAED,oFAAoF;AACpF,SAAS,oCAAoC,CAAC,eAAuB;IACpE,OAAO,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED,uFAAuF;AACvF,SAAS,yCAAyC,CAAC,eAAuB;IACzE,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;IACzC,OAAO,+BAA+B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACxD,CAAC"}