@vscode/chat-lib 0.0.1 → 0.0.2

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 (391) hide show
  1. package/dist/src/_internal/extension/xtab/common/promptCrafting.d.ts.map +1 -1
  2. package/dist/src/_internal/extension/xtab/common/promptCrafting.js +6 -5
  3. package/dist/src/_internal/extension/xtab/common/promptCrafting.js.map +1 -1
  4. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +1 -0
  5. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
  6. package/dist/src/_internal/platform/configuration/common/configurationService.js +1 -0
  7. package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
  8. package/dist/src/_internal/platform/env/common/envService.d.ts +5 -0
  9. package/dist/src/_internal/platform/env/common/envService.d.ts.map +1 -1
  10. package/dist/src/_internal/platform/env/common/envService.js +2 -1
  11. package/dist/src/_internal/platform/env/common/envService.js.map +1 -1
  12. package/dist/src/_internal/platform/env/common/nullEnvService.d.ts +3 -0
  13. package/dist/src/_internal/platform/env/common/nullEnvService.d.ts.map +1 -1
  14. package/dist/src/_internal/platform/env/common/nullEnvService.js +8 -1
  15. package/dist/src/_internal/platform/env/common/nullEnvService.js.map +1 -1
  16. package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.d.ts +7 -0
  17. package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.d.ts.map +1 -1
  18. package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.js +1 -0
  19. package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.js.map +1 -1
  20. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts +8 -0
  21. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts.map +1 -1
  22. package/dist/src/_internal/util/common/test/shims/chatTypes.js +19 -1
  23. package/dist/src/_internal/util/common/test/shims/chatTypes.js.map +1 -1
  24. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.d.ts.map +1 -1
  25. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js +8 -1
  26. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js.map +1 -1
  27. package/dist/src/_internal/vscodeTypes.d.ts +4 -0
  28. package/dist/src/_internal/vscodeTypes.d.ts.map +1 -1
  29. package/dist/src/_internal/vscodeTypes.js +5 -1
  30. package/dist/src/_internal/vscodeTypes.js.map +1 -1
  31. package/dist/src/main.d.ts +5 -0
  32. package/dist/src/main.d.ts.map +1 -1
  33. package/dist/src/main.js +12 -0
  34. package/dist/src/main.js.map +1 -1
  35. package/dist/src/package.json +46 -19
  36. package/package.json +3 -6
  37. package/src/_internal/extension/byok/node/openAIEndpoint.ts +0 -171
  38. package/src/_internal/extension/common/constants.ts +0 -90
  39. package/src/_internal/extension/inlineEdits/common/delayer.ts +0 -108
  40. package/src/_internal/extension/inlineEdits/common/editRebase.ts +0 -268
  41. package/src/_internal/extension/inlineEdits/common/ghNearbyNesProvider.tsx +0 -163
  42. package/src/_internal/extension/inlineEdits/common/nearbyCursorInlineEditProvider.ts +0 -225
  43. package/src/_internal/extension/inlineEdits/common/rejectionCollector.ts +0 -164
  44. package/src/_internal/extension/inlineEdits/node/debugRecorder.ts +0 -205
  45. package/src/_internal/extension/inlineEdits/node/importFiltering.ts +0 -25
  46. package/src/_internal/extension/inlineEdits/node/nesConfigs.ts +0 -12
  47. package/src/_internal/extension/inlineEdits/node/nextEditCache.ts +0 -278
  48. package/src/_internal/extension/inlineEdits/node/nextEditProvider.ts +0 -778
  49. package/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.ts +0 -983
  50. package/src/_internal/extension/inlineEdits/node/nextEditResult.ts +0 -40
  51. package/src/_internal/extension/prompt/common/importStatement.ts +0 -25
  52. package/src/_internal/extension/prompt/node/chatMLFetcher.ts +0 -706
  53. package/src/_internal/extension/prompts/node/inline/summarizedDocument/fragments.ts +0 -146
  54. package/src/_internal/extension/prompts/node/inline/summarizedDocument/implementation.ts +0 -527
  55. package/src/_internal/extension/prompts/node/inline/summarizedDocument/projectedText.ts +0 -76
  56. package/src/_internal/extension/prompts/node/inline/visualization.ts +0 -65
  57. package/src/_internal/extension/vscode.proposed.activeComment.d.ts +0 -23
  58. package/src/_internal/extension/vscode.proposed.aiRelatedInformation.d.ts +0 -49
  59. package/src/_internal/extension/vscode.proposed.aiSettingsSearch.d.ts +0 -31
  60. package/src/_internal/extension/vscode.proposed.aiTextSearchProvider.d.ts +0 -41
  61. package/src/_internal/extension/vscode.proposed.authLearnMore.d.ts +0 -16
  62. package/src/_internal/extension/vscode.proposed.chatBinaryReferenceData.d.ts +0 -41
  63. package/src/_internal/extension/vscode.proposed.chatEditing.d.ts +0 -29
  64. package/src/_internal/extension/vscode.proposed.chatParticipantAdditions.d.ts +0 -636
  65. package/src/_internal/extension/vscode.proposed.chatParticipantPrivate.d.ts +0 -276
  66. package/src/_internal/extension/vscode.proposed.chatProvider.d.ts +0 -62
  67. package/src/_internal/extension/vscode.proposed.chatReadonlyPromptReference.d.ts +0 -17
  68. package/src/_internal/extension/vscode.proposed.chatReferenceDiagnostic.d.ts +0 -23
  69. package/src/_internal/extension/vscode.proposed.chatSessionsProvider.d.ts +0 -218
  70. package/src/_internal/extension/vscode.proposed.chatStatusItem.d.ts +0 -61
  71. package/src/_internal/extension/vscode.proposed.codeActionAI.d.ts +0 -16
  72. package/src/_internal/extension/vscode.proposed.commentReveal.d.ts +0 -32
  73. package/src/_internal/extension/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +0 -8
  74. package/src/_internal/extension/vscode.proposed.contribCommentsViewThreadMenus.d.ts +0 -6
  75. package/src/_internal/extension/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +0 -7
  76. package/src/_internal/extension/vscode.proposed.dataChannels.d.ts +0 -19
  77. package/src/_internal/extension/vscode.proposed.defaultChatParticipant.d.ts +0 -52
  78. package/src/_internal/extension/vscode.proposed.documentFiltersExclusive.d.ts +0 -13
  79. package/src/_internal/extension/vscode.proposed.embeddings.d.ts +0 -33
  80. package/src/_internal/extension/vscode.proposed.extensionsAny.d.ts +0 -40
  81. package/src/_internal/extension/vscode.proposed.findFiles2.d.ts +0 -125
  82. package/src/_internal/extension/vscode.proposed.findTextInFiles.d.ts +0 -104
  83. package/src/_internal/extension/vscode.proposed.findTextInFiles2.d.ts +0 -144
  84. package/src/_internal/extension/vscode.proposed.inlineCompletionsAdditions.d.ts +0 -202
  85. package/src/_internal/extension/vscode.proposed.interactive.d.ts +0 -11
  86. package/src/_internal/extension/vscode.proposed.languageModelCapabilities.d.ts +0 -25
  87. package/src/_internal/extension/vscode.proposed.languageModelDataPart.d.ts +0 -163
  88. package/src/_internal/extension/vscode.proposed.languageModelSystem.d.ts +0 -17
  89. package/src/_internal/extension/vscode.proposed.languageModelThinkingPart.d.ts +0 -49
  90. package/src/_internal/extension/vscode.proposed.languageModelToolResultAudience.d.ts +0 -36
  91. package/src/_internal/extension/vscode.proposed.mappedEditsProvider.d.ts +0 -110
  92. package/src/_internal/extension/vscode.proposed.newSymbolNamesProvider.d.ts +0 -47
  93. package/src/_internal/extension/vscode.proposed.readonlyMessage.d.ts +0 -14
  94. package/src/_internal/extension/vscode.proposed.resolvers.d.ts +0 -475
  95. package/src/_internal/extension/vscode.proposed.scmInputBoxValueProvider.d.ts +0 -25
  96. package/src/_internal/extension/vscode.proposed.taskProblemMatcherStatus.d.ts +0 -42
  97. package/src/_internal/extension/vscode.proposed.terminalDataWriteEvent.d.ts +0 -32
  98. package/src/_internal/extension/vscode.proposed.terminalExecuteCommandEvent.d.ts +0 -48
  99. package/src/_internal/extension/vscode.proposed.terminalQuickFixProvider.d.ts +0 -87
  100. package/src/_internal/extension/vscode.proposed.terminalSelection.d.ts +0 -16
  101. package/src/_internal/extension/vscode.proposed.testObserver.d.ts +0 -199
  102. package/src/_internal/extension/vscode.proposed.textDocumentChangeReason.d.ts +0 -30
  103. package/src/_internal/extension/vscode.proposed.textSearchProvider.d.ts +0 -281
  104. package/src/_internal/extension/vscode.proposed.textSearchProvider2.d.ts +0 -297
  105. package/src/_internal/extension/xtab/common/promptCrafting.ts +0 -670
  106. package/src/_internal/extension/xtab/node/xtabEndpoint.ts +0 -102
  107. package/src/_internal/extension/xtab/node/xtabProvider.ts +0 -976
  108. package/src/_internal/extension/xtab/node/xtabUtils.ts +0 -62
  109. package/src/_internal/platform/authentication/common/authentication.ts +0 -309
  110. package/src/_internal/platform/authentication/common/copilotToken.ts +0 -300
  111. package/src/_internal/platform/authentication/common/copilotTokenManager.ts +0 -59
  112. package/src/_internal/platform/authentication/common/copilotTokenStore.ts +0 -40
  113. package/src/_internal/platform/authentication/common/staticGitHubAuthenticationService.ts +0 -96
  114. package/src/_internal/platform/authentication/node/copilotTokenManager.ts +0 -303
  115. package/src/_internal/platform/chat/common/chatMLFetcher.ts +0 -124
  116. package/src/_internal/platform/chat/common/chatQuotaService.ts +0 -63
  117. package/src/_internal/platform/chat/common/chatQuotaServiceImpl.ts +0 -96
  118. package/src/_internal/platform/chat/common/commonTypes.ts +0 -353
  119. package/src/_internal/platform/chat/common/conversationOptions.ts +0 -16
  120. package/src/_internal/platform/chat/common/globalStringUtils.ts +0 -54
  121. package/src/_internal/platform/chat/common/interactionService.ts +0 -35
  122. package/src/_internal/platform/configuration/common/configurationService.ts +0 -803
  123. package/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.ts +0 -39
  124. package/src/_internal/platform/configuration/common/jsonSchema.ts +0 -139
  125. package/src/_internal/platform/configuration/common/validator.ts +0 -242
  126. package/src/_internal/platform/diff/common/diffService.ts +0 -41
  127. package/src/_internal/platform/diff/common/diffWorker.ts +0 -83
  128. package/src/_internal/platform/diff/node/diffServiceImpl.ts +0 -85
  129. package/src/_internal/platform/editing/common/abstractText.ts +0 -177
  130. package/src/_internal/platform/editing/common/notebookDocumentSnapshot.ts +0 -122
  131. package/src/_internal/platform/editing/common/positionOffsetTransformer.ts +0 -202
  132. package/src/_internal/platform/editing/common/textDocumentSnapshot.ts +0 -274
  133. package/src/_internal/platform/endpoint/common/capiClient.ts +0 -37
  134. package/src/_internal/platform/endpoint/common/chatModelCapabilities.ts +0 -115
  135. package/src/_internal/platform/endpoint/common/domainService.ts +0 -27
  136. package/src/_internal/platform/endpoint/common/endpointProvider.ts +0 -104
  137. package/src/_internal/platform/endpoint/common/endpointTypes.ts +0 -12
  138. package/src/_internal/platform/endpoint/common/licenseAgreement.ts +0 -11
  139. package/src/_internal/platform/endpoint/common/statefulMarkerContainer.tsx +0 -85
  140. package/src/_internal/platform/endpoint/common/thinkingDataContainer.tsx +0 -44
  141. package/src/_internal/platform/endpoint/node/capiClientImpl.ts +0 -18
  142. package/src/_internal/platform/endpoint/node/chatEndpoint.ts +0 -435
  143. package/src/_internal/platform/endpoint/node/domainServiceImpl.ts +0 -80
  144. package/src/_internal/platform/endpoint/node/proxyXtabEndpoint.ts +0 -43
  145. package/src/_internal/platform/endpoint/node/responsesApi.ts +0 -326
  146. package/src/_internal/platform/env/common/envService.ts +0 -134
  147. package/src/_internal/platform/env/common/nullEnvService.ts +0 -68
  148. package/src/_internal/platform/env/common/packagejson.ts +0 -49
  149. package/src/_internal/platform/git/common/gitExtensionService.ts +0 -21
  150. package/src/_internal/platform/git/common/nullGitExtensionService.ts +0 -20
  151. package/src/_internal/platform/git/vscode/git.d.ts +0 -414
  152. package/src/_internal/platform/github/common/githubAPI.ts +0 -44
  153. package/src/_internal/platform/github/common/githubService.ts +0 -87
  154. package/src/_internal/platform/github/common/nullOctokitServiceImpl.ts +0 -21
  155. package/src/_internal/platform/ignore/common/ignoreService.ts +0 -72
  156. package/src/_internal/platform/inlineCompletions/common/api.ts +0 -198
  157. package/src/_internal/platform/inlineEdits/common/dataTypes/diagnosticData.ts +0 -32
  158. package/src/_internal/platform/inlineEdits/common/dataTypes/documentId.ts +0 -52
  159. package/src/_internal/platform/inlineEdits/common/dataTypes/edit.ts +0 -165
  160. package/src/_internal/platform/inlineEdits/common/dataTypes/editUtils.ts +0 -74
  161. package/src/_internal/platform/inlineEdits/common/dataTypes/fetchCancellationError.ts +0 -14
  162. package/src/_internal/platform/inlineEdits/common/dataTypes/languageContext.ts +0 -107
  163. package/src/_internal/platform/inlineEdits/common/dataTypes/languageId.ts +0 -14
  164. package/src/_internal/platform/inlineEdits/common/dataTypes/permutation.ts +0 -69
  165. package/src/_internal/platform/inlineEdits/common/dataTypes/rootedLineEdit.ts +0 -49
  166. package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLength.ts +0 -74
  167. package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLengthHelper/combineTextEditInfos.ts +0 -132
  168. package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLengthHelper/length.ts +0 -184
  169. package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLengthHelper/textEditInfo.ts +0 -32
  170. package/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.ts +0 -89
  171. package/src/_internal/platform/inlineEdits/common/debugRecorderBookmark.ts +0 -10
  172. package/src/_internal/platform/inlineEdits/common/editReason.ts +0 -134
  173. package/src/_internal/platform/inlineEdits/common/inlineEditLogContext.ts +0 -490
  174. package/src/_internal/platform/inlineEdits/common/observableGit.ts +0 -49
  175. package/src/_internal/platform/inlineEdits/common/observableWorkspace.ts +0 -239
  176. package/src/_internal/platform/inlineEdits/common/responseProcessor.ts +0 -249
  177. package/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.ts +0 -468
  178. package/src/_internal/platform/inlineEdits/common/statelessNextEditProviders.ts +0 -59
  179. package/src/_internal/platform/inlineEdits/common/utils/observable.ts +0 -54
  180. package/src/_internal/platform/inlineEdits/common/utils/stringifyChatMessages.ts +0 -29
  181. package/src/_internal/platform/inlineEdits/common/utils/utils.ts +0 -56
  182. package/src/_internal/platform/inlineEdits/common/workspaceEditTracker/historyContextProvider.ts +0 -60
  183. package/src/_internal/platform/inlineEdits/common/workspaceEditTracker/nesHistoryContextProvider.ts +0 -353
  184. package/src/_internal/platform/inlineEdits/common/workspaceEditTracker/nesXtabHistoryTracker.ts +0 -176
  185. package/src/_internal/platform/languageContextProvider/common/languageContextProviderService.ts +0 -25
  186. package/src/_internal/platform/languageContextProvider/common/nullLanguageContextProviderService.ts +0 -38
  187. package/src/_internal/platform/languageServer/common/languageContextService.ts +0 -186
  188. package/src/_internal/platform/languages/common/languageDiagnosticsService.ts +0 -67
  189. package/src/_internal/platform/languages/common/testLanguageDiagnosticsService.ts +0 -28
  190. package/src/_internal/platform/log/common/logService.ts +0 -232
  191. package/src/_internal/platform/nesFetch/common/completionsAPI.ts +0 -78
  192. package/src/_internal/platform/nesFetch/common/completionsFetchService.ts +0 -118
  193. package/src/_internal/platform/nesFetch/common/responseStream.ts +0 -151
  194. package/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.ts +0 -236
  195. package/src/_internal/platform/nesFetch/node/streamTransformer.ts +0 -95
  196. package/src/_internal/platform/networking/common/fetch.ts +0 -349
  197. package/src/_internal/platform/networking/common/fetcherService.ts +0 -84
  198. package/src/_internal/platform/networking/common/networking.ts +0 -442
  199. package/src/_internal/platform/networking/common/openai.ts +0 -273
  200. package/src/_internal/platform/networking/node/chatStream.ts +0 -137
  201. package/src/_internal/platform/networking/node/stream.ts +0 -749
  202. package/src/_internal/platform/notebook/common/alternativeContent.ts +0 -89
  203. package/src/_internal/platform/notebook/common/alternativeContentFormat.ts +0 -10
  204. package/src/_internal/platform/notebook/common/alternativeContentProvider.json.ts +0 -262
  205. package/src/_internal/platform/notebook/common/alternativeContentProvider.text.ts +0 -243
  206. package/src/_internal/platform/notebook/common/alternativeContentProvider.ts +0 -41
  207. package/src/_internal/platform/notebook/common/alternativeContentProvider.xml.ts +0 -205
  208. package/src/_internal/platform/notebook/common/alternativeNotebookDocument.ts +0 -155
  209. package/src/_internal/platform/notebook/common/helpers.ts +0 -212
  210. package/src/_internal/platform/notebook/common/notebookService.ts +0 -43
  211. package/src/_internal/platform/openai/node/fetch.ts +0 -596
  212. package/src/_internal/platform/parser/node/nodes.ts +0 -190
  213. package/src/_internal/platform/requestLogger/node/nullRequestLogger.ts +0 -26
  214. package/src/_internal/platform/requestLogger/node/requestLogger.ts +0 -383
  215. package/src/_internal/platform/simulationTestContext/common/simulationTestContext.ts +0 -29
  216. package/src/_internal/platform/snippy/common/snippyService.ts +0 -25
  217. package/src/_internal/platform/telemetry/common/nullExperimentationService.ts +0 -64
  218. package/src/_internal/platform/telemetry/common/nullTelemetryService.ts +0 -53
  219. package/src/_internal/platform/telemetry/common/telemetry.ts +0 -215
  220. package/src/_internal/platform/telemetry/common/telemetryData.ts +0 -205
  221. package/src/_internal/platform/thinking/common/thinking.ts +0 -61
  222. package/src/_internal/platform/thinking/common/thinkingUtils.ts +0 -57
  223. package/src/_internal/platform/tokenizer/node/parseTikTokens.ts +0 -23
  224. package/src/_internal/platform/tokenizer/node/tikTokenizerImpl.ts +0 -74
  225. package/src/_internal/platform/tokenizer/node/tikTokenizerWorker.ts +0 -24
  226. package/src/_internal/platform/tokenizer/node/tokenizer.ts +0 -357
  227. package/src/_internal/platform/workspace/common/workspaceService.ts +0 -226
  228. package/src/_internal/platform/workspaceRecorder/common/workspaceLog.ts +0 -118
  229. package/src/_internal/util/common/anomalyDetection.ts +0 -112
  230. package/src/_internal/util/common/arrays.ts +0 -81
  231. package/src/_internal/util/common/async.ts +0 -155
  232. package/src/_internal/util/common/cache.ts +0 -183
  233. package/src/_internal/util/common/crypto.ts +0 -41
  234. package/src/_internal/util/common/errors.ts +0 -22
  235. package/src/_internal/util/common/globals.d.ts +0 -12
  236. package/src/_internal/util/common/imageUtils.ts +0 -154
  237. package/src/_internal/util/common/languages.ts +0 -940
  238. package/src/_internal/util/common/notebooks.ts +0 -286
  239. package/src/_internal/util/common/result.ts +0 -71
  240. package/src/_internal/util/common/services.ts +0 -43
  241. package/src/_internal/util/common/test/shims/chatTypes.ts +0 -448
  242. package/src/_internal/util/common/test/shims/editing.ts +0 -233
  243. package/src/_internal/util/common/test/shims/enums.ts +0 -61
  244. package/src/_internal/util/common/test/shims/l10n.ts +0 -37
  245. package/src/_internal/util/common/test/shims/newSymbolName.ts +0 -23
  246. package/src/_internal/util/common/test/shims/terminal.ts +0 -33
  247. package/src/_internal/util/common/test/shims/vscodeTypesShim.ts +0 -115
  248. package/src/_internal/util/common/time.ts +0 -31
  249. package/src/_internal/util/common/tokenizer.ts +0 -30
  250. package/src/_internal/util/common/tracing.ts +0 -52
  251. package/src/_internal/util/common/types.ts +0 -33
  252. package/src/_internal/util/common/variableLengthQuantity.ts +0 -40
  253. package/src/_internal/util/node/worker.ts +0 -130
  254. package/src/_internal/util/vs/base/common/arrays.ts +0 -926
  255. package/src/_internal/util/vs/base/common/arraysFind.ts +0 -206
  256. package/src/_internal/util/vs/base/common/assert.ts +0 -89
  257. package/src/_internal/util/vs/base/common/async.ts +0 -2582
  258. package/src/_internal/util/vs/base/common/buffer.ts +0 -501
  259. package/src/_internal/util/vs/base/common/cache.ts +0 -122
  260. package/src/_internal/util/vs/base/common/cancellation.ts +0 -150
  261. package/src/_internal/util/vs/base/common/charCode.ts +0 -452
  262. package/src/_internal/util/vs/base/common/codicons.ts +0 -66
  263. package/src/_internal/util/vs/base/common/codiconsLibrary.ts +0 -618
  264. package/src/_internal/util/vs/base/common/codiconsUtil.ts +0 -30
  265. package/src/_internal/util/vs/base/common/collections.ts +0 -156
  266. package/src/_internal/util/vs/base/common/diff/diff.ts +0 -1317
  267. package/src/_internal/util/vs/base/common/diff/diffChange.ts +0 -62
  268. package/src/_internal/util/vs/base/common/equals.ts +0 -148
  269. package/src/_internal/util/vs/base/common/errors.ts +0 -342
  270. package/src/_internal/util/vs/base/common/event.ts +0 -1782
  271. package/src/_internal/util/vs/base/common/extpath.ts +0 -425
  272. package/src/_internal/util/vs/base/common/filters.ts +0 -928
  273. package/src/_internal/util/vs/base/common/functional.ts +0 -34
  274. package/src/_internal/util/vs/base/common/glob.ts +0 -839
  275. package/src/_internal/util/vs/base/common/hash.ts +0 -326
  276. package/src/_internal/util/vs/base/common/htmlContent.ts +0 -212
  277. package/src/_internal/util/vs/base/common/iconLabels.ts +0 -118
  278. package/src/_internal/util/vs/base/common/iterator.ts +0 -196
  279. package/src/_internal/util/vs/base/common/lazy.ts +0 -59
  280. package/src/_internal/util/vs/base/common/lifecycle.ts +0 -845
  281. package/src/_internal/util/vs/base/common/linkedList.ts +0 -144
  282. package/src/_internal/util/vs/base/common/map.ts +0 -954
  283. package/src/_internal/util/vs/base/common/marshallingIds.ts +0 -35
  284. package/src/_internal/util/vs/base/common/mime.ts +0 -136
  285. package/src/_internal/util/vs/base/common/naturalLanguage/korean.ts +0 -425
  286. package/src/_internal/util/vs/base/common/network.ts +0 -429
  287. package/src/_internal/util/vs/base/common/numbers.ts +0 -166
  288. package/src/_internal/util/vs/base/common/objects.ts +0 -242
  289. package/src/_internal/util/vs/base/common/observable.ts +0 -10
  290. package/src/_internal/util/vs/base/common/observableInternal/base.ts +0 -208
  291. package/src/_internal/util/vs/base/common/observableInternal/changeTracker.ts +0 -96
  292. package/src/_internal/util/vs/base/common/observableInternal/commonFacade/cancellation.ts +0 -9
  293. package/src/_internal/util/vs/base/common/observableInternal/commonFacade/deps.ts +0 -12
  294. package/src/_internal/util/vs/base/common/observableInternal/debugLocation.ts +0 -88
  295. package/src/_internal/util/vs/base/common/observableInternal/debugName.ts +0 -150
  296. package/src/_internal/util/vs/base/common/observableInternal/experimental/utils.ts +0 -62
  297. package/src/_internal/util/vs/base/common/observableInternal/index.ts +0 -61
  298. package/src/_internal/util/vs/base/common/observableInternal/logging/consoleObservableLogger.ts +0 -388
  299. package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerApi.d.ts +0 -154
  300. package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerRpc.ts +0 -80
  301. package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/devToolsLogger.ts +0 -485
  302. package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/rpc.ts +0 -103
  303. package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/utils.ts +0 -69
  304. package/src/_internal/util/vs/base/common/observableInternal/logging/logging.ts +0 -133
  305. package/src/_internal/util/vs/base/common/observableInternal/map.ts +0 -81
  306. package/src/_internal/util/vs/base/common/observableInternal/observables/baseObservable.ts +0 -172
  307. package/src/_internal/util/vs/base/common/observableInternal/observables/constObservable.ts +0 -44
  308. package/src/_internal/util/vs/base/common/observableInternal/observables/derived.ts +0 -190
  309. package/src/_internal/util/vs/base/common/observableInternal/observables/derivedImpl.ts +0 -445
  310. package/src/_internal/util/vs/base/common/observableInternal/observables/lazyObservableValue.ts +0 -154
  311. package/src/_internal/util/vs/base/common/observableInternal/observables/observableFromEvent.ts +0 -174
  312. package/src/_internal/util/vs/base/common/observableInternal/observables/observableSignal.ts +0 -67
  313. package/src/_internal/util/vs/base/common/observableInternal/observables/observableSignalFromEvent.ts +0 -62
  314. package/src/_internal/util/vs/base/common/observableInternal/observables/observableValue.ts +0 -131
  315. package/src/_internal/util/vs/base/common/observableInternal/observables/observableValueOpts.ts +0 -37
  316. package/src/_internal/util/vs/base/common/observableInternal/reactions/autorun.ts +0 -188
  317. package/src/_internal/util/vs/base/common/observableInternal/reactions/autorunImpl.ts +0 -256
  318. package/src/_internal/util/vs/base/common/observableInternal/set.ts +0 -78
  319. package/src/_internal/util/vs/base/common/observableInternal/transaction.ts +0 -115
  320. package/src/_internal/util/vs/base/common/observableInternal/utils/promise.ts +0 -129
  321. package/src/_internal/util/vs/base/common/observableInternal/utils/runOnChange.ts +0 -65
  322. package/src/_internal/util/vs/base/common/observableInternal/utils/utils.ts +0 -281
  323. package/src/_internal/util/vs/base/common/observableInternal/utils/utilsCancellation.ts +0 -101
  324. package/src/_internal/util/vs/base/common/observableInternal/utils/valueWithChangeEvent.ts +0 -31
  325. package/src/_internal/util/vs/base/common/path.ts +0 -1591
  326. package/src/_internal/util/vs/base/common/platform.ts +0 -282
  327. package/src/_internal/util/vs/base/common/process.ts +0 -78
  328. package/src/_internal/util/vs/base/common/resources.ts +0 -446
  329. package/src/_internal/util/vs/base/common/sequence.ts +0 -36
  330. package/src/_internal/util/vs/base/common/sseParser.ts +0 -247
  331. package/src/_internal/util/vs/base/common/stopwatch.ts +0 -43
  332. package/src/_internal/util/vs/base/common/stream.ts +0 -792
  333. package/src/_internal/util/vs/base/common/strings.ts +0 -1364
  334. package/src/_internal/util/vs/base/common/symbols.ts +0 -11
  335. package/src/_internal/util/vs/base/common/themables.ts +0 -106
  336. package/src/_internal/util/vs/base/common/types.ts +0 -345
  337. package/src/_internal/util/vs/base/common/uint.ts +0 -61
  338. package/src/_internal/util/vs/base/common/uri.ts +0 -752
  339. package/src/_internal/util/vs/base/common/uuid.ts +0 -72
  340. package/src/_internal/util/vs/base-common.d.ts +0 -42
  341. package/src/_internal/util/vs/editor/common/core/editOperation.ts +0 -62
  342. package/src/_internal/util/vs/editor/common/core/edits/edit.ts +0 -399
  343. package/src/_internal/util/vs/editor/common/core/edits/lineEdit.ts +0 -414
  344. package/src/_internal/util/vs/editor/common/core/edits/stringEdit.ts +0 -568
  345. package/src/_internal/util/vs/editor/common/core/edits/textEdit.ts +0 -411
  346. package/src/_internal/util/vs/editor/common/core/position.ts +0 -186
  347. package/src/_internal/util/vs/editor/common/core/range.ts +0 -519
  348. package/src/_internal/util/vs/editor/common/core/ranges/lineRange.ts +0 -416
  349. package/src/_internal/util/vs/editor/common/core/ranges/offsetRange.ts +0 -275
  350. package/src/_internal/util/vs/editor/common/core/text/abstractText.ts +0 -127
  351. package/src/_internal/util/vs/editor/common/core/text/positionToOffset.ts +0 -26
  352. package/src/_internal/util/vs/editor/common/core/text/positionToOffsetImpl.ts +0 -144
  353. package/src/_internal/util/vs/editor/common/core/text/textLength.ts +0 -150
  354. package/src/_internal/util/vs/editor/common/core/wordHelper.ts +0 -177
  355. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.ts +0 -210
  356. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing.ts +0 -109
  357. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm.ts +0 -178
  358. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines.ts +0 -331
  359. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.ts +0 -273
  360. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.ts +0 -475
  361. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/lineSequence.ts +0 -47
  362. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.ts +0 -248
  363. package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/utils.ts +0 -76
  364. package/src/_internal/util/vs/editor/common/diff/legacyLinesDiffComputer.ts +0 -693
  365. package/src/_internal/util/vs/editor/common/diff/linesDiffComputer.ts +0 -61
  366. package/src/_internal/util/vs/editor/common/diff/rangeMapping.ts +0 -418
  367. package/src/_internal/util/vs/editor/common/model/prefixSumComputer.ts +0 -304
  368. package/src/_internal/util/vs/nls.messages.ts +0 -21
  369. package/src/_internal/util/vs/nls.ts +0 -243
  370. package/src/_internal/util/vs/platform/instantiation/common/descriptors.ts +0 -23
  371. package/src/_internal/util/vs/platform/instantiation/common/graph.ts +0 -113
  372. package/src/_internal/util/vs/platform/instantiation/common/instantiation.ts +0 -127
  373. package/src/_internal/util/vs/platform/instantiation/common/instantiationService.ts +0 -483
  374. package/src/_internal/util/vs/platform/instantiation/common/serviceCollection.ts +0 -34
  375. package/src/_internal/util/vs/vscode-globals-nls.d.ts +0 -42
  376. package/src/_internal/util/vs/vscode-globals-product.d.ts +0 -35
  377. package/src/_internal/util/vs/workbench/api/common/extHostTypes/diagnostic.ts +0 -109
  378. package/src/_internal/util/vs/workbench/api/common/extHostTypes/es5ClassCompat.ts +0 -34
  379. package/src/_internal/util/vs/workbench/api/common/extHostTypes/location.ts +0 -51
  380. package/src/_internal/util/vs/workbench/api/common/extHostTypes/markdownString.ts +0 -83
  381. package/src/_internal/util/vs/workbench/api/common/extHostTypes/notebooks.ts +0 -296
  382. package/src/_internal/util/vs/workbench/api/common/extHostTypes/position.ts +0 -195
  383. package/src/_internal/util/vs/workbench/api/common/extHostTypes/range.ts +0 -167
  384. package/src/_internal/util/vs/workbench/api/common/extHostTypes/selection.ts +0 -94
  385. package/src/_internal/util/vs/workbench/api/common/extHostTypes/snippetString.ts +0 -103
  386. package/src/_internal/util/vs/workbench/api/common/extHostTypes/snippetTextEdit.ts +0 -44
  387. package/src/_internal/util/vs/workbench/api/common/extHostTypes/symbolInformation.ts +0 -89
  388. package/src/_internal/util/vs/workbench/api/common/extHostTypes/textEdit.ts +0 -99
  389. package/src/_internal/vscodeTypes.ts +0 -100
  390. package/src/main.ts +0 -207
  391. package/src/package.json +0 -4063
@@ -1,99 +0,0 @@
1
- //!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'
2
-
3
- /*---------------------------------------------------------------------------------------------
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License. See License.txt in the project root for license information.
6
- *--------------------------------------------------------------------------------------------*/
7
-
8
- import { illegalArgument } from '../../../../base/common/errors';
9
- import { es5ClassCompat } from './es5ClassCompat';
10
- import { Position } from './position';
11
- import { Range } from './range';
12
-
13
- export enum EndOfLine {
14
- LF = 1,
15
- CRLF = 2
16
- }
17
-
18
- @es5ClassCompat
19
- export class TextEdit {
20
-
21
- static isTextEdit(thing: any): thing is TextEdit {
22
- if (thing instanceof TextEdit) {
23
- return true;
24
- }
25
- if (!thing) {
26
- return false;
27
- }
28
- return Range.isRange((<TextEdit>thing))
29
- && typeof (<TextEdit>thing).newText === 'string';
30
- }
31
-
32
- static replace(range: Range, newText: string): TextEdit {
33
- return new TextEdit(range, newText);
34
- }
35
-
36
- static insert(position: Position, newText: string): TextEdit {
37
- return TextEdit.replace(new Range(position, position), newText);
38
- }
39
-
40
- static delete(range: Range): TextEdit {
41
- return TextEdit.replace(range, '');
42
- }
43
-
44
- static setEndOfLine(eol: EndOfLine): TextEdit {
45
- const ret = new TextEdit(new Range(new Position(0, 0), new Position(0, 0)), '');
46
- ret.newEol = eol;
47
- return ret;
48
- }
49
-
50
- protected _range: Range;
51
- protected _newText: string | null;
52
- protected _newEol?: EndOfLine;
53
-
54
- get range(): Range {
55
- return this._range;
56
- }
57
-
58
- set range(value: Range) {
59
- if (value && !Range.isRange(value)) {
60
- throw illegalArgument('range');
61
- }
62
- this._range = value;
63
- }
64
-
65
- get newText(): string {
66
- return this._newText || '';
67
- }
68
-
69
- set newText(value: string) {
70
- if (value && typeof value !== 'string') {
71
- throw illegalArgument('newText');
72
- }
73
- this._newText = value;
74
- }
75
-
76
- get newEol(): EndOfLine | undefined {
77
- return this._newEol;
78
- }
79
-
80
- set newEol(value: EndOfLine | undefined) {
81
- if (value && typeof value !== 'number') {
82
- throw illegalArgument('newEol');
83
- }
84
- this._newEol = value;
85
- }
86
-
87
- constructor(range: Range, newText: string | null) {
88
- this._range = range;
89
- this._newText = newText;
90
- }
91
-
92
- toJSON(): any {
93
- return {
94
- range: this.range,
95
- newText: this.newText,
96
- newEol: this._newEol
97
- };
98
- }
99
- }
@@ -1,100 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- import * as vscode from 'vscode';
6
-
7
- export import Position = vscode.Position;
8
- export import Range = vscode.Range;
9
- export import Selection = vscode.Selection;
10
- export import EventEmitter = vscode.EventEmitter;
11
- export import CancellationTokenSource = vscode.CancellationTokenSource;
12
- export import Diagnostic = vscode.Diagnostic;
13
- export import TextEdit = vscode.TextEdit;
14
- export import WorkspaceEdit = vscode.WorkspaceEdit;
15
- export import Uri = vscode.Uri;
16
- export import MarkdownString = vscode.MarkdownString;
17
- export import TextEditorCursorStyle = vscode.TextEditorCursorStyle;
18
- export import TextEditorLineNumbersStyle = vscode.TextEditorLineNumbersStyle;
19
- export import TextEditorRevealType = vscode.TextEditorRevealType;
20
- export import EndOfLine = vscode.EndOfLine;
21
- export import DiagnosticSeverity = vscode.DiagnosticSeverity;
22
- export import ExtensionMode = vscode.ExtensionMode;
23
- export import Location = vscode.Location;
24
- export import DiagnosticRelatedInformation = vscode.DiagnosticRelatedInformation;
25
- export import ChatVariableLevel = vscode.ChatVariableLevel;
26
- export import ChatResponseClearToPreviousToolInvocationReason = vscode.ChatResponseClearToPreviousToolInvocationReason;
27
- export import ChatResponseMarkdownPart = vscode.ChatResponseMarkdownPart;
28
- export import ChatResponseThinkingProgressPart = vscode.ChatResponseThinkingProgressPart;
29
- export import ChatResponseFileTreePart = vscode.ChatResponseFileTreePart;
30
- export import ChatResponseAnchorPart = vscode.ChatResponseAnchorPart;
31
- export import ChatResponseProgressPart = vscode.ChatResponseProgressPart;
32
- export import ChatResponseProgressPart2 = vscode.ChatResponseProgressPart2;
33
- export import ChatResponseReferencePart = vscode.ChatResponseReferencePart;
34
- export import ChatResponseReferencePart2 = vscode.ChatResponseReferencePart2;
35
- export import ChatResponseCodeCitationPart = vscode.ChatResponseCodeCitationPart;
36
- export import ChatResponseCommandButtonPart = vscode.ChatResponseCommandButtonPart;
37
- export import ChatResponseWarningPart = vscode.ChatResponseWarningPart;
38
- export import ChatResponseMovePart = vscode.ChatResponseMovePart;
39
- export import ChatResponseExtensionsPart = vscode.ChatResponseExtensionsPart;
40
- export import ChatResponsePullRequestPart = vscode.ChatResponsePullRequestPart;
41
- export import ChatResponseMarkdownWithVulnerabilitiesPart = vscode.ChatResponseMarkdownWithVulnerabilitiesPart;
42
- export import ChatResponseCodeblockUriPart = vscode.ChatResponseCodeblockUriPart;
43
- export import ChatResponseTextEditPart = vscode.ChatResponseTextEditPart;
44
- export import ChatResponseNotebookEditPart = vscode.ChatResponseNotebookEditPart;
45
- export import ChatResponseConfirmationPart = vscode.ChatResponseConfirmationPart;
46
- export import ChatPrepareToolInvocationPart = vscode.ChatPrepareToolInvocationPart;
47
- export import ChatRequest = vscode.ChatRequest;
48
- export import ChatRequestTurn = vscode.ChatRequestTurn;
49
- export import ChatResponseTurn = vscode.ChatResponseTurn;
50
- export import NewSymbolName = vscode.NewSymbolName;
51
- export import NewSymbolNameTag = vscode.NewSymbolNameTag;
52
- export import NewSymbolNameTriggerKind = vscode.NewSymbolNameTriggerKind;
53
- export import ChatLocation = vscode.ChatLocation;
54
- export import ChatRequestEditorData = vscode.ChatRequestEditorData;
55
- export import ChatRequestNotebookData = vscode.ChatRequestNotebookData;
56
- export import LanguageModelToolInformation = vscode.LanguageModelToolInformation;
57
- export import LanguageModelToolResult = vscode.LanguageModelToolResult;
58
- export import ExtendedLanguageModelToolResult = vscode.ExtendedLanguageModelToolResult;
59
- export import LanguageModelToolResult2 = vscode.LanguageModelToolResult2;
60
- export import SymbolInformation = vscode.SymbolInformation;
61
- export import LanguageModelPromptTsxPart = vscode.LanguageModelPromptTsxPart;
62
- export import LanguageModelTextPart = vscode.LanguageModelTextPart;
63
- export import LanguageModelTextPart2 = vscode.LanguageModelTextPart2;
64
- export import LanguageModelDataPart = vscode.LanguageModelDataPart;
65
- export import LanguageModelDataPart2 = vscode.LanguageModelDataPart2;
66
- export import LanguageModelPartAudience = vscode.LanguageModelPartAudience;
67
- export import LanguageModelToolMCPSource = vscode.LanguageModelToolMCPSource;
68
- export import LanguageModelToolExtensionSource = vscode.LanguageModelToolExtensionSource;
69
- export import ChatImageMimeType = vscode.ChatImageMimeType;
70
- export import ChatReferenceBinaryData = vscode.ChatReferenceBinaryData;
71
- export import ChatReferenceDiagnostic = vscode.ChatReferenceDiagnostic;
72
- export import TextSearchMatch2 = vscode.TextSearchMatch2;
73
- export import AISearchKeyword = vscode.AISearchKeyword;
74
- export import ExcludeSettingOptions = vscode.ExcludeSettingOptions;
75
- export import NotebookCellKind = vscode.NotebookCellKind;
76
- export import NotebookRange = vscode.NotebookRange;
77
- export import NotebookEdit = vscode.NotebookEdit;
78
- export import NotebookCellData = vscode.NotebookCellData;
79
- export import NotebookData = vscode.NotebookData;
80
- export import ChatErrorLevel = vscode.ChatErrorLevel;
81
- export import TerminalShellExecutionCommandLineConfidence = vscode.TerminalShellExecutionCommandLineConfidence;
82
- export import ChatRequestEditedFileEventKind = vscode.ChatRequestEditedFileEventKind;
83
- export import Extension = vscode.Extension;
84
- export import LanguageModelToolCallPart = vscode.LanguageModelToolCallPart;
85
- export import LanguageModelToolResultPart = vscode.LanguageModelToolResultPart;
86
- export import LanguageModelToolResultPart2 = vscode.LanguageModelToolResultPart2;
87
- export import LanguageModelChatMessageRole = vscode.LanguageModelChatMessageRole;
88
- export import TextEditorSelectionChangeKind = vscode.TextEditorSelectionChangeKind;
89
- export import TextDocumentChangeReason = vscode.TextDocumentChangeReason;
90
- export import ChatToolInvocationPart = vscode.ChatToolInvocationPart;
91
- export import ChatResponseTurn2 = vscode.ChatResponseTurn2;
92
- export import ChatRequestTurn2 = vscode.ChatRequestTurn2;
93
-
94
- export const l10n = {
95
- /**
96
- * @deprecated Only use this import in tests. For the actual extension,
97
- * use `import { l10n } from 'vscode'` or `import * as l10n from '@vscode/l10n'`.
98
- */
99
- t: vscode.l10n.t
100
- };
package/src/main.ts DELETED
@@ -1,207 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- import type * as vscode from 'vscode';
7
- import { DebugRecorder } from './_internal/extension/inlineEdits/node/debugRecorder';
8
- import { NextEditProvider } from './_internal/extension/inlineEdits/node/nextEditProvider';
9
- import { LlmNESTelemetryBuilder } from './_internal/extension/inlineEdits/node/nextEditProviderTelemetry';
10
- import { INextEditResult } from './_internal/extension/inlineEdits/node/nextEditResult';
11
- import { ChatMLFetcherImpl } from './_internal/extension/prompt/node/chatMLFetcher';
12
- import { XtabProvider } from './_internal/extension/xtab/node/xtabProvider';
13
- import { IAuthenticationService } from './_internal/platform/authentication/common/authentication';
14
- import { ICopilotTokenManager } from './_internal/platform/authentication/common/copilotTokenManager';
15
- import { CopilotTokenStore, ICopilotTokenStore } from './_internal/platform/authentication/common/copilotTokenStore';
16
- import { StaticGitHubAuthenticationService } from './_internal/platform/authentication/common/staticGitHubAuthenticationService';
17
- import { getStaticGitHubToken } from './_internal/platform/authentication/node/copilotTokenManager';
18
- import { IChatMLFetcher } from './_internal/platform/chat/common/chatMLFetcher';
19
- import { IChatQuotaService } from './_internal/platform/chat/common/chatQuotaService';
20
- import { ChatQuotaService } from './_internal/platform/chat/common/chatQuotaServiceImpl';
21
- import { IConversationOptions } from './_internal/platform/chat/common/conversationOptions';
22
- import { IInteractionService, InteractionService } from './_internal/platform/chat/common/interactionService';
23
- import { ConfigKey, IConfigurationService } from './_internal/platform/configuration/common/configurationService';
24
- import { DefaultsOnlyConfigurationService } from './_internal/platform/configuration/common/defaultsOnlyConfigurationService';
25
- import { IDiffService } from './_internal/platform/diff/common/diffService';
26
- import { DiffServiceImpl } from './_internal/platform/diff/node/diffServiceImpl';
27
- import { ICAPIClientService } from './_internal/platform/endpoint/common/capiClient';
28
- import { IDomainService } from './_internal/platform/endpoint/common/domainService';
29
- import { CAPIClientImpl } from './_internal/platform/endpoint/node/capiClientImpl';
30
- import { DomainService } from './_internal/platform/endpoint/node/domainServiceImpl';
31
- import { IEnvService } from './_internal/platform/env/common/envService';
32
- import { NullEnvService } from './_internal/platform/env/common/nullEnvService';
33
- import { IGitExtensionService } from './_internal/platform/git/common/gitExtensionService';
34
- import { NullGitExtensionService } from './_internal/platform/git/common/nullGitExtensionService';
35
- import { IIgnoreService, NullIgnoreService } from './_internal/platform/ignore/common/ignoreService';
36
- import { DocumentId } from './_internal/platform/inlineEdits/common/dataTypes/documentId';
37
- import { InlineEditRequestLogContext } from './_internal/platform/inlineEdits/common/inlineEditLogContext';
38
- import { ObservableGit } from './_internal/platform/inlineEdits/common/observableGit';
39
- import { ObservableWorkspace } from './_internal/platform/inlineEdits/common/observableWorkspace';
40
- import { NesHistoryContextProvider } from './_internal/platform/inlineEdits/common/workspaceEditTracker/nesHistoryContextProvider';
41
- import { NesXtabHistoryTracker } from './_internal/platform/inlineEdits/common/workspaceEditTracker/nesXtabHistoryTracker';
42
- import { ILanguageContextProviderService } from './_internal/platform/languageContextProvider/common/languageContextProviderService';
43
- import { NullLanguageContextProviderService } from './_internal/platform/languageContextProvider/common/nullLanguageContextProviderService';
44
- import { ILanguageDiagnosticsService } from './_internal/platform/languages/common/languageDiagnosticsService';
45
- import { TestLanguageDiagnosticsService } from './_internal/platform/languages/common/testLanguageDiagnosticsService';
46
- import { ConsoleLog, ILogService, LogLevel, LogServiceImpl } from './_internal/platform/log/common/logService';
47
- import { FetchOptions, IAbortController, IFetcherService } from './_internal/platform/networking/common/fetcherService';
48
- import { IFetcher } from './_internal/platform/networking/common/networking';
49
- import { NullRequestLogger } from './_internal/platform/requestLogger/node/nullRequestLogger';
50
- import { IRequestLogger } from './_internal/platform/requestLogger/node/requestLogger';
51
- import { ISimulationTestContext, NulSimulationTestContext } from './_internal/platform/simulationTestContext/common/simulationTestContext';
52
- import { ISnippyService, NullSnippyService } from './_internal/platform/snippy/common/snippyService';
53
- import { IExperimentationService, NullExperimentationService } from './_internal/platform/telemetry/common/nullExperimentationService';
54
- import { NullTelemetryService } from './_internal/platform/telemetry/common/nullTelemetryService';
55
- import { ITelemetryService } from './_internal/platform/telemetry/common/telemetry';
56
- import { ITokenizerProvider, TokenizerProvider } from './_internal/platform/tokenizer/node/tokenizer';
57
- import { IWorkspaceService, NullWorkspaceService } from './_internal/platform/workspace/common/workspaceService';
58
- import { InstantiationServiceBuilder } from './_internal/util/common/services';
59
- import { CancellationToken } from './_internal/util/vs/base/common/cancellation';
60
- import { Disposable } from './_internal/util/vs/base/common/lifecycle';
61
- import { generateUuid } from './_internal/util/vs/base/common/uuid';
62
- import { SyncDescriptor } from './_internal/util/vs/platform/instantiation/common/descriptors';
63
- import { IInstantiationService } from './_internal/util/vs/platform/instantiation/common/instantiation';
64
-
65
-
66
- export function createNESProvider(workspace: ObservableWorkspace, fetcher: IFetcher, copilotTokenManager: ICopilotTokenManager): INESProvider {
67
- const instantiationService = setupServices(fetcher, copilotTokenManager);
68
- return instantiationService.createInstance(NESProvider, workspace);
69
- }
70
-
71
- class NESProvider extends Disposable implements INESProvider {
72
- private readonly _nextEditProvider: NextEditProvider;
73
- private readonly _debugRecorder: DebugRecorder;
74
-
75
- constructor(
76
- private _workspace: ObservableWorkspace,
77
- @IInstantiationService instantiationService: IInstantiationService,
78
- @IExperimentationService private readonly _expService: IExperimentationService,
79
- @IConfigurationService private readonly _configurationService: IConfigurationService,
80
- @IWorkspaceService private readonly _workspaceService: IWorkspaceService,
81
- ) {
82
- super();
83
- const statelessNextEditProvider = instantiationService.createInstance(XtabProvider);
84
- const git = instantiationService.createInstance(ObservableGit);
85
- const historyContextProvider = new NesHistoryContextProvider(this._workspace, git);
86
- const xtabDiffNEntries = this._configurationService.getExperimentBasedConfig(ConfigKey.Internal.InlineEditsXtabDiffNEntries, this._expService);
87
- const xtabHistoryTracker = new NesXtabHistoryTracker(this._workspace, xtabDiffNEntries);
88
- this._debugRecorder = this._register(new DebugRecorder(this._workspace));
89
-
90
- this._nextEditProvider = instantiationService.createInstance(NextEditProvider, this._workspace, statelessNextEditProvider, historyContextProvider, xtabHistoryTracker, this._debugRecorder);
91
- }
92
-
93
- getId(): string {
94
- return this._nextEditProvider.ID;
95
- }
96
-
97
- async getNextEdit(documentUri: vscode.Uri, cancellationToken: CancellationToken): Promise<INextEditResult> {
98
- const docId = DocumentId.create(documentUri.toString());
99
-
100
- // Create minimal required context objects
101
- const context: vscode.InlineCompletionContext = {
102
- triggerKind: 1, // Invoke
103
- selectedCompletionInfo: undefined,
104
- requestUuid: generateUuid(),
105
- requestIssuedDateTime: Date.now(),
106
- earliestShownDateTime: Date.now() + 200,
107
- };
108
-
109
- // Create log context
110
- const logContext = new InlineEditRequestLogContext(documentUri.toString(), 1, context);
111
-
112
- const document = this._workspace.getDocument(docId);
113
- if (!document) {
114
- throw new Error('DocumentNotFound');
115
- }
116
-
117
- // Create telemetry builder - we'll need to pass null/undefined for services we don't have
118
- const telemetryBuilder = new LlmNESTelemetryBuilder(
119
- new NullGitExtensionService(), // IGitExtensionService
120
- undefined, // INotebookService
121
- this._workspaceService, // IWorkspaceService
122
- this._nextEditProvider.ID, // providerId
123
- document, // doc
124
- this._debugRecorder, // debugRecorder
125
- undefined // requestBookmark
126
- );
127
-
128
- return await this._nextEditProvider.getNextEdit(docId, context, logContext, cancellationToken, telemetryBuilder);
129
- }
130
- }
131
-
132
- export interface INESProvider {
133
- getId(): string;
134
- getNextEdit(documentUri: vscode.Uri, cancellationToken: CancellationToken): Promise<INextEditResult>;
135
- dispose(): void;
136
- }
137
-
138
- function setupServices(fetcher: IFetcher, copilotTokenManager: ICopilotTokenManager) {
139
- const builder = new InstantiationServiceBuilder();
140
- builder.define(IConfigurationService, new SyncDescriptor(DefaultsOnlyConfigurationService));
141
- builder.define(IExperimentationService, new SyncDescriptor(NullExperimentationService));
142
- builder.define(ISimulationTestContext, new SyncDescriptor(NulSimulationTestContext));
143
- builder.define(IWorkspaceService, new SyncDescriptor(NullWorkspaceService));
144
- builder.define(IDiffService, new SyncDescriptor(DiffServiceImpl, [false]));
145
- builder.define(ILogService, new SyncDescriptor(LogServiceImpl, [[new ConsoleLog(undefined, LogLevel.Trace)]]));
146
- builder.define(IGitExtensionService, new SyncDescriptor(NullGitExtensionService));
147
- builder.define(ILanguageContextProviderService, new SyncDescriptor(NullLanguageContextProviderService));
148
- builder.define(ILanguageDiagnosticsService, new SyncDescriptor(TestLanguageDiagnosticsService));
149
- builder.define(IIgnoreService, new SyncDescriptor(NullIgnoreService));
150
- builder.define(ISnippyService, new SyncDescriptor(NullSnippyService));
151
- builder.define(IDomainService, new SyncDescriptor(DomainService));
152
- builder.define(ICAPIClientService, new SyncDescriptor(CAPIClientImpl));
153
- builder.define(ICopilotTokenStore, new SyncDescriptor(CopilotTokenStore));
154
- builder.define(IEnvService, new SyncDescriptor(NullEnvService));
155
- builder.define(IFetcherService, new SyncDescriptor(SingleFetcherService, [fetcher]));
156
- builder.define(ITelemetryService, new SyncDescriptor(NullTelemetryService));
157
- builder.define(IAuthenticationService, new SyncDescriptor(StaticGitHubAuthenticationService, [getStaticGitHubToken]));
158
- builder.define(ICopilotTokenManager, copilotTokenManager);
159
- builder.define(IChatMLFetcher, new SyncDescriptor(ChatMLFetcherImpl));
160
- builder.define(IChatQuotaService, new SyncDescriptor(ChatQuotaService));
161
- builder.define(IInteractionService, new SyncDescriptor(InteractionService));
162
- builder.define(IRequestLogger, new SyncDescriptor(NullRequestLogger));
163
- builder.define(ITokenizerProvider, new SyncDescriptor(TokenizerProvider, [false]));
164
- builder.define(IConversationOptions, {
165
- _serviceBrand: undefined,
166
- maxResponseTokens: undefined,
167
- temperature: 0.1,
168
- topP: 1,
169
- rejectionMessage: 'Sorry, but I can only assist with programming related questions.',
170
- });
171
- return builder.seal();
172
- }
173
-
174
- class SingleFetcherService implements IFetcherService {
175
-
176
- declare readonly _serviceBrand: undefined;
177
-
178
- constructor(
179
- private readonly _fetcher: IFetcher,
180
- ) { }
181
-
182
- getUserAgentLibrary(): string {
183
- return this._fetcher.getUserAgentLibrary();
184
- }
185
-
186
- fetch(url: string, options: FetchOptions) {
187
- return this._fetcher.fetch(url, options);
188
- }
189
- disconnectAll(): Promise<unknown> {
190
- return this._fetcher.disconnectAll();
191
- }
192
- makeAbortController(): IAbortController {
193
- return this._fetcher.makeAbortController();
194
- }
195
- isAbortError(e: any): boolean {
196
- return this._fetcher.isAbortError(e);
197
- }
198
- isInternetDisconnectedError(e: any): boolean {
199
- return this._fetcher.isInternetDisconnectedError(e);
200
- }
201
- isFetcherError(e: any): boolean {
202
- return this._fetcher.isFetcherError(e);
203
- }
204
- getUserMessageForFetcherError(err: any): string {
205
- return this._fetcher.getUserMessageForFetcherError(err);
206
- }
207
- }