@vscode/chat-lib 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts +2 -1
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts.map +1 -1
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js +70 -28
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js.map +1 -1
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.d.ts +4 -3
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.d.ts.map +1 -1
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.js +85 -109
- package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.js.map +1 -1
- package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts.map +1 -1
- package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js +14 -6
- package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js.map +1 -1
- package/dist/src/_internal/extension/xtab/common/promptCrafting.d.ts.map +1 -1
- package/dist/src/_internal/extension/xtab/common/promptCrafting.js +6 -5
- package/dist/src/_internal/extension/xtab/common/promptCrafting.js.map +1 -1
- package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts +1 -0
- package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts.map +1 -1
- package/dist/src/_internal/extension/xtab/node/xtabProvider.js +44 -42
- package/dist/src/_internal/extension/xtab/node/xtabProvider.js.map +1 -1
- package/dist/src/_internal/platform/authentication/node/copilotTokenManager.d.ts.map +1 -1
- package/dist/src/_internal/platform/authentication/node/copilotTokenManager.js +8 -4
- package/dist/src/_internal/platform/authentication/node/copilotTokenManager.js.map +1 -1
- package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +8 -0
- package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
- package/dist/src/_internal/platform/configuration/common/configurationService.js +11 -3
- package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
- package/dist/src/_internal/platform/endpoint/common/capiClient.d.ts +1 -1
- package/dist/src/_internal/platform/endpoint/common/capiClient.d.ts.map +1 -1
- package/dist/src/_internal/platform/endpoint/common/capiClient.js +2 -2
- package/dist/src/_internal/platform/endpoint/common/capiClient.js.map +1 -1
- package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts +4 -0
- package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts.map +1 -1
- package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js +7 -0
- package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js.map +1 -1
- package/dist/src/_internal/platform/endpoint/node/capiClientImpl.d.ts.map +1 -1
- package/dist/src/_internal/platform/endpoint/node/capiClientImpl.js +1 -1
- package/dist/src/_internal/platform/endpoint/node/capiClientImpl.js.map +1 -1
- package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts +1 -1
- package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts.map +1 -1
- package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js.map +1 -1
- package/dist/src/_internal/platform/endpoint/node/responsesApi.js +10 -4
- package/dist/src/_internal/platform/endpoint/node/responsesApi.js.map +1 -1
- package/dist/src/_internal/platform/env/common/envService.d.ts +5 -0
- package/dist/src/_internal/platform/env/common/envService.d.ts.map +1 -1
- package/dist/src/_internal/platform/env/common/envService.js +2 -1
- package/dist/src/_internal/platform/env/common/envService.js.map +1 -1
- package/dist/src/_internal/platform/env/common/nullEnvService.d.ts +3 -0
- package/dist/src/_internal/platform/env/common/nullEnvService.d.ts.map +1 -1
- package/dist/src/_internal/platform/env/common/nullEnvService.js +8 -1
- package/dist/src/_internal/platform/env/common/nullEnvService.js.map +1 -1
- package/dist/src/_internal/platform/github/common/githubService.d.ts +3 -3
- package/dist/src/_internal/platform/github/common/githubService.d.ts.map +1 -1
- package/dist/src/_internal/platform/github/common/githubService.js.map +1 -1
- package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.d.ts +0 -3
- package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.d.ts.map +1 -1
- package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.js +0 -5
- package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.js.map +1 -1
- package/dist/src/_internal/platform/networking/common/fetcherService.d.ts +2 -1
- package/dist/src/_internal/platform/networking/common/fetcherService.d.ts.map +1 -1
- package/dist/src/_internal/platform/networking/common/fetcherService.js.map +1 -1
- package/dist/src/_internal/platform/networking/common/networking.d.ts.map +1 -1
- package/dist/src/_internal/platform/networking/common/networking.js.map +1 -1
- package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.d.ts +7 -0
- package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.d.ts.map +1 -1
- package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.js +1 -0
- package/dist/src/_internal/platform/telemetry/common/nullExperimentationService.js.map +1 -1
- package/dist/src/_internal/platform/telemetry/common/telemetry.d.ts +1 -0
- package/dist/src/_internal/platform/telemetry/common/telemetry.d.ts.map +1 -1
- package/dist/src/_internal/platform/telemetry/common/telemetry.js.map +1 -1
- package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts +8 -0
- package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts.map +1 -1
- package/dist/src/_internal/util/common/test/shims/chatTypes.js +19 -1
- package/dist/src/_internal/util/common/test/shims/chatTypes.js.map +1 -1
- package/dist/src/_internal/util/common/test/shims/enums.d.ts +6 -0
- package/dist/src/_internal/util/common/test/shims/enums.d.ts.map +1 -1
- package/dist/src/_internal/util/common/test/shims/enums.js +8 -1
- package/dist/src/_internal/util/common/test/shims/enums.js.map +1 -1
- package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.d.ts.map +1 -1
- package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js +9 -1
- package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js.map +1 -1
- package/dist/src/_internal/vscodeTypes.d.ts +5 -0
- package/dist/src/_internal/vscodeTypes.d.ts.map +1 -1
- package/dist/src/_internal/vscodeTypes.js +6 -1
- package/dist/src/_internal/vscodeTypes.js.map +1 -1
- package/dist/src/main.d.ts +15 -1
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js +73 -13
- package/dist/src/main.js.map +1 -1
- package/dist/src/package.json +70 -31
- package/package.json +7 -9
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/fragments.d.ts +0 -42
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/fragments.d.ts.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/fragments.js +0 -125
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/fragments.js.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/implementation.d.ts +0 -60
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/implementation.d.ts.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/implementation.js +0 -416
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/implementation.js.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/projectedText.d.ts +0 -30
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/projectedText.d.ts.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/projectedText.js +0 -64
- package/dist/src/_internal/extension/prompts/node/inline/summarizedDocument/projectedText.js.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/visualization.d.ts +0 -26
- package/dist/src/_internal/extension/prompts/node/inline/visualization.d.ts.map +0 -1
- package/dist/src/_internal/extension/prompts/node/inline/visualization.js +0 -41
- package/dist/src/_internal/extension/prompts/node/inline/visualization.js.map +0 -1
- package/dist/src/_internal/platform/editing/common/abstractText.d.ts +0 -58
- package/dist/src/_internal/platform/editing/common/abstractText.d.ts.map +0 -1
- package/dist/src/_internal/platform/editing/common/abstractText.js +0 -129
- package/dist/src/_internal/platform/editing/common/abstractText.js.map +0 -1
- package/dist/src/_internal/platform/parser/node/nodes.d.ts +0 -93
- package/dist/src/_internal/platform/parser/node/nodes.d.ts.map +0 -1
- package/dist/src/_internal/platform/parser/node/nodes.js +0 -133
- package/dist/src/_internal/platform/parser/node/nodes.js.map +0 -1
- package/dist/src/_internal/platform/telemetry/common/nullTelemetryService.d.ts +0 -18
- package/dist/src/_internal/platform/telemetry/common/nullTelemetryService.d.ts.map +0 -1
- package/dist/src/_internal/platform/telemetry/common/nullTelemetryService.js +0 -50
- package/dist/src/_internal/platform/telemetry/common/nullTelemetryService.js.map +0 -1
- package/dist/src/_internal/util/common/arrays.d.ts +0 -18
- package/dist/src/_internal/util/common/arrays.d.ts.map +0 -1
- package/dist/src/_internal/util/common/arrays.js +0 -80
- package/dist/src/_internal/util/common/arrays.js.map +0 -1
- package/src/_internal/extension/byok/node/openAIEndpoint.ts +0 -171
- package/src/_internal/extension/common/constants.ts +0 -90
- package/src/_internal/extension/inlineEdits/common/delayer.ts +0 -108
- package/src/_internal/extension/inlineEdits/common/editRebase.ts +0 -268
- package/src/_internal/extension/inlineEdits/common/ghNearbyNesProvider.tsx +0 -163
- package/src/_internal/extension/inlineEdits/common/nearbyCursorInlineEditProvider.ts +0 -225
- package/src/_internal/extension/inlineEdits/common/rejectionCollector.ts +0 -164
- package/src/_internal/extension/inlineEdits/node/debugRecorder.ts +0 -205
- package/src/_internal/extension/inlineEdits/node/importFiltering.ts +0 -25
- package/src/_internal/extension/inlineEdits/node/nesConfigs.ts +0 -12
- package/src/_internal/extension/inlineEdits/node/nextEditCache.ts +0 -278
- package/src/_internal/extension/inlineEdits/node/nextEditProvider.ts +0 -778
- package/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.ts +0 -983
- package/src/_internal/extension/inlineEdits/node/nextEditResult.ts +0 -40
- package/src/_internal/extension/prompt/common/importStatement.ts +0 -25
- package/src/_internal/extension/prompt/node/chatMLFetcher.ts +0 -706
- package/src/_internal/extension/prompts/node/inline/summarizedDocument/fragments.ts +0 -146
- package/src/_internal/extension/prompts/node/inline/summarizedDocument/implementation.ts +0 -527
- package/src/_internal/extension/prompts/node/inline/summarizedDocument/projectedText.ts +0 -76
- package/src/_internal/extension/prompts/node/inline/visualization.ts +0 -65
- package/src/_internal/extension/vscode.proposed.activeComment.d.ts +0 -23
- package/src/_internal/extension/vscode.proposed.aiRelatedInformation.d.ts +0 -49
- package/src/_internal/extension/vscode.proposed.aiSettingsSearch.d.ts +0 -31
- package/src/_internal/extension/vscode.proposed.aiTextSearchProvider.d.ts +0 -41
- package/src/_internal/extension/vscode.proposed.authLearnMore.d.ts +0 -16
- package/src/_internal/extension/vscode.proposed.chatBinaryReferenceData.d.ts +0 -41
- package/src/_internal/extension/vscode.proposed.chatEditing.d.ts +0 -29
- package/src/_internal/extension/vscode.proposed.chatParticipantAdditions.d.ts +0 -636
- package/src/_internal/extension/vscode.proposed.chatParticipantPrivate.d.ts +0 -276
- package/src/_internal/extension/vscode.proposed.chatProvider.d.ts +0 -62
- package/src/_internal/extension/vscode.proposed.chatReadonlyPromptReference.d.ts +0 -17
- package/src/_internal/extension/vscode.proposed.chatReferenceDiagnostic.d.ts +0 -23
- package/src/_internal/extension/vscode.proposed.chatSessionsProvider.d.ts +0 -218
- package/src/_internal/extension/vscode.proposed.chatStatusItem.d.ts +0 -61
- package/src/_internal/extension/vscode.proposed.codeActionAI.d.ts +0 -16
- package/src/_internal/extension/vscode.proposed.commentReveal.d.ts +0 -32
- package/src/_internal/extension/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +0 -8
- package/src/_internal/extension/vscode.proposed.contribCommentsViewThreadMenus.d.ts +0 -6
- package/src/_internal/extension/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +0 -7
- package/src/_internal/extension/vscode.proposed.dataChannels.d.ts +0 -19
- package/src/_internal/extension/vscode.proposed.defaultChatParticipant.d.ts +0 -52
- package/src/_internal/extension/vscode.proposed.documentFiltersExclusive.d.ts +0 -13
- package/src/_internal/extension/vscode.proposed.embeddings.d.ts +0 -33
- package/src/_internal/extension/vscode.proposed.extensionsAny.d.ts +0 -40
- package/src/_internal/extension/vscode.proposed.findFiles2.d.ts +0 -125
- package/src/_internal/extension/vscode.proposed.findTextInFiles.d.ts +0 -104
- package/src/_internal/extension/vscode.proposed.findTextInFiles2.d.ts +0 -144
- package/src/_internal/extension/vscode.proposed.inlineCompletionsAdditions.d.ts +0 -202
- package/src/_internal/extension/vscode.proposed.interactive.d.ts +0 -11
- package/src/_internal/extension/vscode.proposed.languageModelCapabilities.d.ts +0 -25
- package/src/_internal/extension/vscode.proposed.languageModelDataPart.d.ts +0 -163
- package/src/_internal/extension/vscode.proposed.languageModelSystem.d.ts +0 -17
- package/src/_internal/extension/vscode.proposed.languageModelThinkingPart.d.ts +0 -49
- package/src/_internal/extension/vscode.proposed.languageModelToolResultAudience.d.ts +0 -36
- package/src/_internal/extension/vscode.proposed.mappedEditsProvider.d.ts +0 -110
- package/src/_internal/extension/vscode.proposed.newSymbolNamesProvider.d.ts +0 -47
- package/src/_internal/extension/vscode.proposed.readonlyMessage.d.ts +0 -14
- package/src/_internal/extension/vscode.proposed.resolvers.d.ts +0 -475
- package/src/_internal/extension/vscode.proposed.scmInputBoxValueProvider.d.ts +0 -25
- package/src/_internal/extension/vscode.proposed.taskProblemMatcherStatus.d.ts +0 -42
- package/src/_internal/extension/vscode.proposed.terminalDataWriteEvent.d.ts +0 -32
- package/src/_internal/extension/vscode.proposed.terminalExecuteCommandEvent.d.ts +0 -48
- package/src/_internal/extension/vscode.proposed.terminalQuickFixProvider.d.ts +0 -87
- package/src/_internal/extension/vscode.proposed.terminalSelection.d.ts +0 -16
- package/src/_internal/extension/vscode.proposed.testObserver.d.ts +0 -199
- package/src/_internal/extension/vscode.proposed.textDocumentChangeReason.d.ts +0 -30
- package/src/_internal/extension/vscode.proposed.textSearchProvider.d.ts +0 -281
- package/src/_internal/extension/vscode.proposed.textSearchProvider2.d.ts +0 -297
- package/src/_internal/extension/xtab/common/promptCrafting.ts +0 -670
- package/src/_internal/extension/xtab/node/xtabEndpoint.ts +0 -102
- package/src/_internal/extension/xtab/node/xtabProvider.ts +0 -976
- package/src/_internal/extension/xtab/node/xtabUtils.ts +0 -62
- package/src/_internal/platform/authentication/common/authentication.ts +0 -309
- package/src/_internal/platform/authentication/common/copilotToken.ts +0 -300
- package/src/_internal/platform/authentication/common/copilotTokenManager.ts +0 -59
- package/src/_internal/platform/authentication/common/copilotTokenStore.ts +0 -40
- package/src/_internal/platform/authentication/common/staticGitHubAuthenticationService.ts +0 -96
- package/src/_internal/platform/authentication/node/copilotTokenManager.ts +0 -303
- package/src/_internal/platform/chat/common/chatMLFetcher.ts +0 -124
- package/src/_internal/platform/chat/common/chatQuotaService.ts +0 -63
- package/src/_internal/platform/chat/common/chatQuotaServiceImpl.ts +0 -96
- package/src/_internal/platform/chat/common/commonTypes.ts +0 -353
- package/src/_internal/platform/chat/common/conversationOptions.ts +0 -16
- package/src/_internal/platform/chat/common/globalStringUtils.ts +0 -54
- package/src/_internal/platform/chat/common/interactionService.ts +0 -35
- package/src/_internal/platform/configuration/common/configurationService.ts +0 -803
- package/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.ts +0 -39
- package/src/_internal/platform/configuration/common/jsonSchema.ts +0 -139
- package/src/_internal/platform/configuration/common/validator.ts +0 -242
- package/src/_internal/platform/diff/common/diffService.ts +0 -41
- package/src/_internal/platform/diff/common/diffWorker.ts +0 -83
- package/src/_internal/platform/diff/node/diffServiceImpl.ts +0 -85
- package/src/_internal/platform/editing/common/abstractText.ts +0 -177
- package/src/_internal/platform/editing/common/notebookDocumentSnapshot.ts +0 -122
- package/src/_internal/platform/editing/common/positionOffsetTransformer.ts +0 -202
- package/src/_internal/platform/editing/common/textDocumentSnapshot.ts +0 -274
- package/src/_internal/platform/endpoint/common/capiClient.ts +0 -37
- package/src/_internal/platform/endpoint/common/chatModelCapabilities.ts +0 -115
- package/src/_internal/platform/endpoint/common/domainService.ts +0 -27
- package/src/_internal/platform/endpoint/common/endpointProvider.ts +0 -104
- package/src/_internal/platform/endpoint/common/endpointTypes.ts +0 -12
- package/src/_internal/platform/endpoint/common/licenseAgreement.ts +0 -11
- package/src/_internal/platform/endpoint/common/statefulMarkerContainer.tsx +0 -85
- package/src/_internal/platform/endpoint/common/thinkingDataContainer.tsx +0 -44
- package/src/_internal/platform/endpoint/node/capiClientImpl.ts +0 -18
- package/src/_internal/platform/endpoint/node/chatEndpoint.ts +0 -435
- package/src/_internal/platform/endpoint/node/domainServiceImpl.ts +0 -80
- package/src/_internal/platform/endpoint/node/proxyXtabEndpoint.ts +0 -43
- package/src/_internal/platform/endpoint/node/responsesApi.ts +0 -326
- package/src/_internal/platform/env/common/envService.ts +0 -134
- package/src/_internal/platform/env/common/nullEnvService.ts +0 -68
- package/src/_internal/platform/env/common/packagejson.ts +0 -49
- package/src/_internal/platform/git/common/gitExtensionService.ts +0 -21
- package/src/_internal/platform/git/common/nullGitExtensionService.ts +0 -20
- package/src/_internal/platform/git/vscode/git.d.ts +0 -414
- package/src/_internal/platform/github/common/githubAPI.ts +0 -44
- package/src/_internal/platform/github/common/githubService.ts +0 -87
- package/src/_internal/platform/github/common/nullOctokitServiceImpl.ts +0 -21
- package/src/_internal/platform/ignore/common/ignoreService.ts +0 -72
- package/src/_internal/platform/inlineCompletions/common/api.ts +0 -198
- package/src/_internal/platform/inlineEdits/common/dataTypes/diagnosticData.ts +0 -32
- package/src/_internal/platform/inlineEdits/common/dataTypes/documentId.ts +0 -52
- package/src/_internal/platform/inlineEdits/common/dataTypes/edit.ts +0 -165
- package/src/_internal/platform/inlineEdits/common/dataTypes/editUtils.ts +0 -74
- package/src/_internal/platform/inlineEdits/common/dataTypes/fetchCancellationError.ts +0 -14
- package/src/_internal/platform/inlineEdits/common/dataTypes/languageContext.ts +0 -107
- package/src/_internal/platform/inlineEdits/common/dataTypes/languageId.ts +0 -14
- package/src/_internal/platform/inlineEdits/common/dataTypes/permutation.ts +0 -69
- package/src/_internal/platform/inlineEdits/common/dataTypes/rootedLineEdit.ts +0 -49
- package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLength.ts +0 -74
- package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLengthHelper/combineTextEditInfos.ts +0 -132
- package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLengthHelper/length.ts +0 -184
- package/src/_internal/platform/inlineEdits/common/dataTypes/textEditLengthHelper/textEditInfo.ts +0 -32
- package/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.ts +0 -89
- package/src/_internal/platform/inlineEdits/common/debugRecorderBookmark.ts +0 -10
- package/src/_internal/platform/inlineEdits/common/editReason.ts +0 -134
- package/src/_internal/platform/inlineEdits/common/inlineEditLogContext.ts +0 -490
- package/src/_internal/platform/inlineEdits/common/observableGit.ts +0 -49
- package/src/_internal/platform/inlineEdits/common/observableWorkspace.ts +0 -239
- package/src/_internal/platform/inlineEdits/common/responseProcessor.ts +0 -249
- package/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.ts +0 -468
- package/src/_internal/platform/inlineEdits/common/statelessNextEditProviders.ts +0 -59
- package/src/_internal/platform/inlineEdits/common/utils/observable.ts +0 -54
- package/src/_internal/platform/inlineEdits/common/utils/stringifyChatMessages.ts +0 -29
- package/src/_internal/platform/inlineEdits/common/utils/utils.ts +0 -56
- package/src/_internal/platform/inlineEdits/common/workspaceEditTracker/historyContextProvider.ts +0 -60
- package/src/_internal/platform/inlineEdits/common/workspaceEditTracker/nesHistoryContextProvider.ts +0 -353
- package/src/_internal/platform/inlineEdits/common/workspaceEditTracker/nesXtabHistoryTracker.ts +0 -176
- package/src/_internal/platform/languageContextProvider/common/languageContextProviderService.ts +0 -25
- package/src/_internal/platform/languageContextProvider/common/nullLanguageContextProviderService.ts +0 -38
- package/src/_internal/platform/languageServer/common/languageContextService.ts +0 -186
- package/src/_internal/platform/languages/common/languageDiagnosticsService.ts +0 -67
- package/src/_internal/platform/languages/common/testLanguageDiagnosticsService.ts +0 -28
- package/src/_internal/platform/log/common/logService.ts +0 -232
- package/src/_internal/platform/nesFetch/common/completionsAPI.ts +0 -78
- package/src/_internal/platform/nesFetch/common/completionsFetchService.ts +0 -118
- package/src/_internal/platform/nesFetch/common/responseStream.ts +0 -151
- package/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.ts +0 -236
- package/src/_internal/platform/nesFetch/node/streamTransformer.ts +0 -95
- package/src/_internal/platform/networking/common/fetch.ts +0 -349
- package/src/_internal/platform/networking/common/fetcherService.ts +0 -84
- package/src/_internal/platform/networking/common/networking.ts +0 -442
- package/src/_internal/platform/networking/common/openai.ts +0 -273
- package/src/_internal/platform/networking/node/chatStream.ts +0 -137
- package/src/_internal/platform/networking/node/stream.ts +0 -749
- package/src/_internal/platform/notebook/common/alternativeContent.ts +0 -89
- package/src/_internal/platform/notebook/common/alternativeContentFormat.ts +0 -10
- package/src/_internal/platform/notebook/common/alternativeContentProvider.json.ts +0 -262
- package/src/_internal/platform/notebook/common/alternativeContentProvider.text.ts +0 -243
- package/src/_internal/platform/notebook/common/alternativeContentProvider.ts +0 -41
- package/src/_internal/platform/notebook/common/alternativeContentProvider.xml.ts +0 -205
- package/src/_internal/platform/notebook/common/alternativeNotebookDocument.ts +0 -155
- package/src/_internal/platform/notebook/common/helpers.ts +0 -212
- package/src/_internal/platform/notebook/common/notebookService.ts +0 -43
- package/src/_internal/platform/openai/node/fetch.ts +0 -596
- package/src/_internal/platform/parser/node/nodes.ts +0 -190
- package/src/_internal/platform/requestLogger/node/nullRequestLogger.ts +0 -26
- package/src/_internal/platform/requestLogger/node/requestLogger.ts +0 -383
- package/src/_internal/platform/simulationTestContext/common/simulationTestContext.ts +0 -29
- package/src/_internal/platform/snippy/common/snippyService.ts +0 -25
- package/src/_internal/platform/telemetry/common/nullExperimentationService.ts +0 -64
- package/src/_internal/platform/telemetry/common/nullTelemetryService.ts +0 -53
- package/src/_internal/platform/telemetry/common/telemetry.ts +0 -215
- package/src/_internal/platform/telemetry/common/telemetryData.ts +0 -205
- package/src/_internal/platform/thinking/common/thinking.ts +0 -61
- package/src/_internal/platform/thinking/common/thinkingUtils.ts +0 -57
- package/src/_internal/platform/tokenizer/node/parseTikTokens.ts +0 -23
- package/src/_internal/platform/tokenizer/node/tikTokenizerImpl.ts +0 -74
- package/src/_internal/platform/tokenizer/node/tikTokenizerWorker.ts +0 -24
- package/src/_internal/platform/tokenizer/node/tokenizer.ts +0 -357
- package/src/_internal/platform/workspace/common/workspaceService.ts +0 -226
- package/src/_internal/platform/workspaceRecorder/common/workspaceLog.ts +0 -118
- package/src/_internal/util/common/anomalyDetection.ts +0 -112
- package/src/_internal/util/common/arrays.ts +0 -81
- package/src/_internal/util/common/async.ts +0 -155
- package/src/_internal/util/common/cache.ts +0 -183
- package/src/_internal/util/common/crypto.ts +0 -41
- package/src/_internal/util/common/errors.ts +0 -22
- package/src/_internal/util/common/globals.d.ts +0 -12
- package/src/_internal/util/common/imageUtils.ts +0 -154
- package/src/_internal/util/common/languages.ts +0 -940
- package/src/_internal/util/common/notebooks.ts +0 -286
- package/src/_internal/util/common/result.ts +0 -71
- package/src/_internal/util/common/services.ts +0 -43
- package/src/_internal/util/common/test/shims/chatTypes.ts +0 -448
- package/src/_internal/util/common/test/shims/editing.ts +0 -233
- package/src/_internal/util/common/test/shims/enums.ts +0 -61
- package/src/_internal/util/common/test/shims/l10n.ts +0 -37
- package/src/_internal/util/common/test/shims/newSymbolName.ts +0 -23
- package/src/_internal/util/common/test/shims/terminal.ts +0 -33
- package/src/_internal/util/common/test/shims/vscodeTypesShim.ts +0 -115
- package/src/_internal/util/common/time.ts +0 -31
- package/src/_internal/util/common/tokenizer.ts +0 -30
- package/src/_internal/util/common/tracing.ts +0 -52
- package/src/_internal/util/common/types.ts +0 -33
- package/src/_internal/util/common/variableLengthQuantity.ts +0 -40
- package/src/_internal/util/node/worker.ts +0 -130
- package/src/_internal/util/vs/base/common/arrays.ts +0 -926
- package/src/_internal/util/vs/base/common/arraysFind.ts +0 -206
- package/src/_internal/util/vs/base/common/assert.ts +0 -89
- package/src/_internal/util/vs/base/common/async.ts +0 -2582
- package/src/_internal/util/vs/base/common/buffer.ts +0 -501
- package/src/_internal/util/vs/base/common/cache.ts +0 -122
- package/src/_internal/util/vs/base/common/cancellation.ts +0 -150
- package/src/_internal/util/vs/base/common/charCode.ts +0 -452
- package/src/_internal/util/vs/base/common/codicons.ts +0 -66
- package/src/_internal/util/vs/base/common/codiconsLibrary.ts +0 -618
- package/src/_internal/util/vs/base/common/codiconsUtil.ts +0 -30
- package/src/_internal/util/vs/base/common/collections.ts +0 -156
- package/src/_internal/util/vs/base/common/diff/diff.ts +0 -1317
- package/src/_internal/util/vs/base/common/diff/diffChange.ts +0 -62
- package/src/_internal/util/vs/base/common/equals.ts +0 -148
- package/src/_internal/util/vs/base/common/errors.ts +0 -342
- package/src/_internal/util/vs/base/common/event.ts +0 -1782
- package/src/_internal/util/vs/base/common/extpath.ts +0 -425
- package/src/_internal/util/vs/base/common/filters.ts +0 -928
- package/src/_internal/util/vs/base/common/functional.ts +0 -34
- package/src/_internal/util/vs/base/common/glob.ts +0 -839
- package/src/_internal/util/vs/base/common/hash.ts +0 -326
- package/src/_internal/util/vs/base/common/htmlContent.ts +0 -212
- package/src/_internal/util/vs/base/common/iconLabels.ts +0 -118
- package/src/_internal/util/vs/base/common/iterator.ts +0 -196
- package/src/_internal/util/vs/base/common/lazy.ts +0 -59
- package/src/_internal/util/vs/base/common/lifecycle.ts +0 -845
- package/src/_internal/util/vs/base/common/linkedList.ts +0 -144
- package/src/_internal/util/vs/base/common/map.ts +0 -954
- package/src/_internal/util/vs/base/common/marshallingIds.ts +0 -35
- package/src/_internal/util/vs/base/common/mime.ts +0 -136
- package/src/_internal/util/vs/base/common/naturalLanguage/korean.ts +0 -425
- package/src/_internal/util/vs/base/common/network.ts +0 -429
- package/src/_internal/util/vs/base/common/numbers.ts +0 -166
- package/src/_internal/util/vs/base/common/objects.ts +0 -242
- package/src/_internal/util/vs/base/common/observable.ts +0 -10
- package/src/_internal/util/vs/base/common/observableInternal/base.ts +0 -208
- package/src/_internal/util/vs/base/common/observableInternal/changeTracker.ts +0 -96
- package/src/_internal/util/vs/base/common/observableInternal/commonFacade/cancellation.ts +0 -9
- package/src/_internal/util/vs/base/common/observableInternal/commonFacade/deps.ts +0 -12
- package/src/_internal/util/vs/base/common/observableInternal/debugLocation.ts +0 -88
- package/src/_internal/util/vs/base/common/observableInternal/debugName.ts +0 -150
- package/src/_internal/util/vs/base/common/observableInternal/experimental/utils.ts +0 -62
- package/src/_internal/util/vs/base/common/observableInternal/index.ts +0 -61
- package/src/_internal/util/vs/base/common/observableInternal/logging/consoleObservableLogger.ts +0 -388
- package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerApi.d.ts +0 -154
- package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerRpc.ts +0 -80
- package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/devToolsLogger.ts +0 -485
- package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/rpc.ts +0 -103
- package/src/_internal/util/vs/base/common/observableInternal/logging/debugger/utils.ts +0 -69
- package/src/_internal/util/vs/base/common/observableInternal/logging/logging.ts +0 -133
- package/src/_internal/util/vs/base/common/observableInternal/map.ts +0 -81
- package/src/_internal/util/vs/base/common/observableInternal/observables/baseObservable.ts +0 -172
- package/src/_internal/util/vs/base/common/observableInternal/observables/constObservable.ts +0 -44
- package/src/_internal/util/vs/base/common/observableInternal/observables/derived.ts +0 -190
- package/src/_internal/util/vs/base/common/observableInternal/observables/derivedImpl.ts +0 -445
- package/src/_internal/util/vs/base/common/observableInternal/observables/lazyObservableValue.ts +0 -154
- package/src/_internal/util/vs/base/common/observableInternal/observables/observableFromEvent.ts +0 -174
- package/src/_internal/util/vs/base/common/observableInternal/observables/observableSignal.ts +0 -67
- package/src/_internal/util/vs/base/common/observableInternal/observables/observableSignalFromEvent.ts +0 -62
- package/src/_internal/util/vs/base/common/observableInternal/observables/observableValue.ts +0 -131
- package/src/_internal/util/vs/base/common/observableInternal/observables/observableValueOpts.ts +0 -37
- package/src/_internal/util/vs/base/common/observableInternal/reactions/autorun.ts +0 -188
- package/src/_internal/util/vs/base/common/observableInternal/reactions/autorunImpl.ts +0 -256
- package/src/_internal/util/vs/base/common/observableInternal/set.ts +0 -78
- package/src/_internal/util/vs/base/common/observableInternal/transaction.ts +0 -115
- package/src/_internal/util/vs/base/common/observableInternal/utils/promise.ts +0 -129
- package/src/_internal/util/vs/base/common/observableInternal/utils/runOnChange.ts +0 -65
- package/src/_internal/util/vs/base/common/observableInternal/utils/utils.ts +0 -281
- package/src/_internal/util/vs/base/common/observableInternal/utils/utilsCancellation.ts +0 -101
- package/src/_internal/util/vs/base/common/observableInternal/utils/valueWithChangeEvent.ts +0 -31
- package/src/_internal/util/vs/base/common/path.ts +0 -1591
- package/src/_internal/util/vs/base/common/platform.ts +0 -282
- package/src/_internal/util/vs/base/common/process.ts +0 -78
- package/src/_internal/util/vs/base/common/resources.ts +0 -446
- package/src/_internal/util/vs/base/common/sequence.ts +0 -36
- package/src/_internal/util/vs/base/common/sseParser.ts +0 -247
- package/src/_internal/util/vs/base/common/stopwatch.ts +0 -43
- package/src/_internal/util/vs/base/common/stream.ts +0 -792
- package/src/_internal/util/vs/base/common/strings.ts +0 -1364
- package/src/_internal/util/vs/base/common/symbols.ts +0 -11
- package/src/_internal/util/vs/base/common/themables.ts +0 -106
- package/src/_internal/util/vs/base/common/types.ts +0 -345
- package/src/_internal/util/vs/base/common/uint.ts +0 -61
- package/src/_internal/util/vs/base/common/uri.ts +0 -752
- package/src/_internal/util/vs/base/common/uuid.ts +0 -72
- package/src/_internal/util/vs/base-common.d.ts +0 -42
- package/src/_internal/util/vs/editor/common/core/editOperation.ts +0 -62
- package/src/_internal/util/vs/editor/common/core/edits/edit.ts +0 -399
- package/src/_internal/util/vs/editor/common/core/edits/lineEdit.ts +0 -414
- package/src/_internal/util/vs/editor/common/core/edits/stringEdit.ts +0 -568
- package/src/_internal/util/vs/editor/common/core/edits/textEdit.ts +0 -411
- package/src/_internal/util/vs/editor/common/core/position.ts +0 -186
- package/src/_internal/util/vs/editor/common/core/range.ts +0 -519
- package/src/_internal/util/vs/editor/common/core/ranges/lineRange.ts +0 -416
- package/src/_internal/util/vs/editor/common/core/ranges/offsetRange.ts +0 -275
- package/src/_internal/util/vs/editor/common/core/text/abstractText.ts +0 -127
- package/src/_internal/util/vs/editor/common/core/text/positionToOffset.ts +0 -26
- package/src/_internal/util/vs/editor/common/core/text/positionToOffsetImpl.ts +0 -144
- package/src/_internal/util/vs/editor/common/core/text/textLength.ts +0 -150
- package/src/_internal/util/vs/editor/common/core/wordHelper.ts +0 -177
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.ts +0 -210
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing.ts +0 -109
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm.ts +0 -178
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines.ts +0 -331
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.ts +0 -273
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.ts +0 -475
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/lineSequence.ts +0 -47
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.ts +0 -248
- package/src/_internal/util/vs/editor/common/diff/defaultLinesDiffComputer/utils.ts +0 -76
- package/src/_internal/util/vs/editor/common/diff/legacyLinesDiffComputer.ts +0 -693
- package/src/_internal/util/vs/editor/common/diff/linesDiffComputer.ts +0 -61
- package/src/_internal/util/vs/editor/common/diff/rangeMapping.ts +0 -418
- package/src/_internal/util/vs/editor/common/model/prefixSumComputer.ts +0 -304
- package/src/_internal/util/vs/nls.messages.ts +0 -21
- package/src/_internal/util/vs/nls.ts +0 -243
- package/src/_internal/util/vs/platform/instantiation/common/descriptors.ts +0 -23
- package/src/_internal/util/vs/platform/instantiation/common/graph.ts +0 -113
- package/src/_internal/util/vs/platform/instantiation/common/instantiation.ts +0 -127
- package/src/_internal/util/vs/platform/instantiation/common/instantiationService.ts +0 -483
- package/src/_internal/util/vs/platform/instantiation/common/serviceCollection.ts +0 -34
- package/src/_internal/util/vs/vscode-globals-nls.d.ts +0 -42
- package/src/_internal/util/vs/vscode-globals-product.d.ts +0 -35
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/diagnostic.ts +0 -109
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/es5ClassCompat.ts +0 -34
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/location.ts +0 -51
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/markdownString.ts +0 -83
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/notebooks.ts +0 -296
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/position.ts +0 -195
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/range.ts +0 -167
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/selection.ts +0 -94
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/snippetString.ts +0 -103
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/snippetTextEdit.ts +0 -44
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/symbolInformation.ts +0 -89
- package/src/_internal/util/vs/workbench/api/common/extHostTypes/textEdit.ts +0 -99
- package/src/_internal/vscodeTypes.ts +0 -100
- package/src/main.ts +0 -207
- package/src/package.json +0 -4063
|
@@ -1,62 +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
|
-
/**
|
|
9
|
-
* Represents information about a specific difference between two sequences.
|
|
10
|
-
*/
|
|
11
|
-
export class DiffChange {
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The position of the first element in the original sequence which
|
|
15
|
-
* this change affects.
|
|
16
|
-
*/
|
|
17
|
-
public originalStart: number;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The number of elements from the original sequence which were
|
|
21
|
-
* affected.
|
|
22
|
-
*/
|
|
23
|
-
public originalLength: number;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The position of the first element in the modified sequence which
|
|
27
|
-
* this change affects.
|
|
28
|
-
*/
|
|
29
|
-
public modifiedStart: number;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The number of elements from the modified sequence which were
|
|
33
|
-
* affected (added).
|
|
34
|
-
*/
|
|
35
|
-
public modifiedLength: number;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Constructs a new DiffChange with the given sequence information
|
|
39
|
-
* and content.
|
|
40
|
-
*/
|
|
41
|
-
constructor(originalStart: number, originalLength: number, modifiedStart: number, modifiedLength: number) {
|
|
42
|
-
//Debug.Assert(originalLength > 0 || modifiedLength > 0, "originalLength and modifiedLength cannot both be <= 0");
|
|
43
|
-
this.originalStart = originalStart;
|
|
44
|
-
this.originalLength = originalLength;
|
|
45
|
-
this.modifiedStart = modifiedStart;
|
|
46
|
-
this.modifiedLength = modifiedLength;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The end point (exclusive) of the change in the original sequence.
|
|
51
|
-
*/
|
|
52
|
-
public getOriginalEnd() {
|
|
53
|
-
return this.originalStart + this.originalLength;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The end point (exclusive) of the change in the modified sequence.
|
|
58
|
-
*/
|
|
59
|
-
public getModifiedEnd() {
|
|
60
|
-
return this.modifiedStart + this.modifiedLength;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,148 +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 * as arrays from './arrays';
|
|
9
|
-
|
|
10
|
-
export type EqualityComparer<T> = (a: T, b: T) => boolean;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Compares two items for equality using strict equality.
|
|
14
|
-
*/
|
|
15
|
-
export const strictEquals: EqualityComparer<any> = (a, b) => a === b;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Checks if the items of two arrays are equal.
|
|
19
|
-
* By default, strict equality is used to compare elements, but a custom equality comparer can be provided.
|
|
20
|
-
*/
|
|
21
|
-
export function itemsEquals<T>(itemEquals: EqualityComparer<T> = strictEquals): EqualityComparer<readonly T[]> {
|
|
22
|
-
return (a, b) => arrays.equals(a, b, itemEquals);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Two items are considered equal, if their stringified representations are equal.
|
|
27
|
-
*/
|
|
28
|
-
export function jsonStringifyEquals<T>(): EqualityComparer<T> {
|
|
29
|
-
return (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Uses `item.equals(other)` to determine equality.
|
|
34
|
-
*/
|
|
35
|
-
export function itemEquals<T extends { equals(other: T): boolean }>(): EqualityComparer<T> {
|
|
36
|
-
return (a, b) => a.equals(b);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Checks if two items are both null or undefined, or are equal according to the provided equality comparer.
|
|
41
|
-
*/
|
|
42
|
-
export function equalsIfDefined<T>(v1: T | undefined | null, v2: T | undefined | null, equals: EqualityComparer<T>): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Returns an equality comparer that checks if two items are both null or undefined, or are equal according to the provided equality comparer.
|
|
45
|
-
*/
|
|
46
|
-
export function equalsIfDefined<T>(equals: EqualityComparer<T>): EqualityComparer<T | undefined | null>;
|
|
47
|
-
export function equalsIfDefined<T>(equalsOrV1: EqualityComparer<T> | T, v2?: T | undefined | null, equals?: EqualityComparer<T>): EqualityComparer<T | undefined | null> | boolean {
|
|
48
|
-
if (equals !== undefined) {
|
|
49
|
-
const v1 = equalsOrV1 as T | undefined;
|
|
50
|
-
if (v1 === undefined || v1 === null || v2 === undefined || v2 === null) {
|
|
51
|
-
return v2 === v1;
|
|
52
|
-
}
|
|
53
|
-
return equals(v1, v2);
|
|
54
|
-
} else {
|
|
55
|
-
const equals = equalsOrV1 as EqualityComparer<T>;
|
|
56
|
-
return (v1, v2) => {
|
|
57
|
-
if (v1 === undefined || v1 === null || v2 === undefined || v2 === null) {
|
|
58
|
-
return v2 === v1;
|
|
59
|
-
}
|
|
60
|
-
return equals(v1, v2);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Drills into arrays (items ordered) and objects (keys unordered) and uses strict equality on everything else.
|
|
67
|
-
*/
|
|
68
|
-
export function structuralEquals<T>(a: T, b: T): boolean {
|
|
69
|
-
if (a === b) {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
74
|
-
if (a.length !== b.length) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
for (let i = 0; i < a.length; i++) {
|
|
78
|
-
if (!structuralEquals(a[i], b[i])) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (a && typeof a === 'object' && b && typeof b === 'object') {
|
|
86
|
-
if (Object.getPrototypeOf(a) === Object.prototype && Object.getPrototypeOf(b) === Object.prototype) {
|
|
87
|
-
const aObj = a as Record<string, unknown>;
|
|
88
|
-
const bObj = b as Record<string, unknown>;
|
|
89
|
-
const keysA = Object.keys(aObj);
|
|
90
|
-
const keysB = Object.keys(bObj);
|
|
91
|
-
const keysBSet = new Set(keysB);
|
|
92
|
-
|
|
93
|
-
if (keysA.length !== keysB.length) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
for (const key of keysA) {
|
|
98
|
-
if (!keysBSet.has(key)) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
if (!structuralEquals(aObj[key], bObj[key])) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* `getStructuralKey(a) === getStructuralKey(b) <=> structuralEquals(a, b)`
|
|
115
|
-
* (assuming that a and b are not cyclic structures and nothing extends globalThis Array).
|
|
116
|
-
*/
|
|
117
|
-
export function getStructuralKey(t: unknown): string {
|
|
118
|
-
return JSON.stringify(toNormalizedJsonStructure(t));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let objectId = 0;
|
|
122
|
-
const objIds = new WeakMap<object, number>();
|
|
123
|
-
|
|
124
|
-
function toNormalizedJsonStructure(t: unknown): unknown {
|
|
125
|
-
if (Array.isArray(t)) {
|
|
126
|
-
return t.map(toNormalizedJsonStructure);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (t && typeof t === 'object') {
|
|
130
|
-
if (Object.getPrototypeOf(t) === Object.prototype) {
|
|
131
|
-
const tObj = t as Record<string, unknown>;
|
|
132
|
-
const res: Record<string, unknown> = Object.create(null);
|
|
133
|
-
for (const key of Object.keys(tObj).sort()) {
|
|
134
|
-
res[key] = toNormalizedJsonStructure(tObj[key]);
|
|
135
|
-
}
|
|
136
|
-
return res;
|
|
137
|
-
} else {
|
|
138
|
-
let objId = objIds.get(t);
|
|
139
|
-
if (objId === undefined) {
|
|
140
|
-
objId = objectId++;
|
|
141
|
-
objIds.set(t, objId);
|
|
142
|
-
}
|
|
143
|
-
// Random string to prevent collisions
|
|
144
|
-
return objId + '----2b76a038c20c4bcc';
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return t;
|
|
148
|
-
}
|
|
@@ -1,342 +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
|
-
export interface ErrorListenerCallback {
|
|
9
|
-
(error: any): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface ErrorListenerUnbind {
|
|
13
|
-
(): void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Avoid circular dependency on EventEmitter by implementing a subset of the interface.
|
|
17
|
-
export class ErrorHandler {
|
|
18
|
-
private unexpectedErrorHandler: (e: any) => void;
|
|
19
|
-
private listeners: ErrorListenerCallback[];
|
|
20
|
-
|
|
21
|
-
constructor() {
|
|
22
|
-
|
|
23
|
-
this.listeners = [];
|
|
24
|
-
|
|
25
|
-
this.unexpectedErrorHandler = function (e: any) {
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
if (e.stack) {
|
|
28
|
-
if (ErrorNoTelemetry.isErrorNoTelemetry(e)) {
|
|
29
|
-
throw new ErrorNoTelemetry(e.message + '\n\n' + e.stack);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
throw new Error(e.message + '\n\n' + e.stack);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
throw e;
|
|
36
|
-
}, 0);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
addListener(listener: ErrorListenerCallback): ErrorListenerUnbind {
|
|
41
|
-
this.listeners.push(listener);
|
|
42
|
-
|
|
43
|
-
return () => {
|
|
44
|
-
this._removeListener(listener);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
private emit(e: any): void {
|
|
49
|
-
this.listeners.forEach((listener) => {
|
|
50
|
-
listener(e);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
private _removeListener(listener: ErrorListenerCallback): void {
|
|
55
|
-
this.listeners.splice(this.listeners.indexOf(listener), 1);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
setUnexpectedErrorHandler(newUnexpectedErrorHandler: (e: any) => void): void {
|
|
59
|
-
this.unexpectedErrorHandler = newUnexpectedErrorHandler;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
getUnexpectedErrorHandler(): (e: any) => void {
|
|
63
|
-
return this.unexpectedErrorHandler;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
onUnexpectedError(e: any): void {
|
|
67
|
-
this.unexpectedErrorHandler(e);
|
|
68
|
-
this.emit(e);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// For external errors, we don't want the listeners to be called
|
|
72
|
-
onUnexpectedExternalError(e: any): void {
|
|
73
|
-
this.unexpectedErrorHandler(e);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export const errorHandler = new ErrorHandler();
|
|
78
|
-
|
|
79
|
-
/** @skipMangle */
|
|
80
|
-
export function setUnexpectedErrorHandler(newUnexpectedErrorHandler: (e: any) => void): void {
|
|
81
|
-
errorHandler.setUnexpectedErrorHandler(newUnexpectedErrorHandler);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Returns if the error is a SIGPIPE error. SIGPIPE errors should generally be
|
|
86
|
-
* logged at most once, to avoid a loop.
|
|
87
|
-
*
|
|
88
|
-
* @see https://github.com/microsoft/vscode-remote-release/issues/6481
|
|
89
|
-
*/
|
|
90
|
-
export function isSigPipeError(e: unknown): e is Error {
|
|
91
|
-
if (!e || typeof e !== 'object') {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const cast = e as Record<string, string | undefined>;
|
|
96
|
-
return cast.code === 'EPIPE' && cast.syscall?.toUpperCase() === 'WRITE';
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* This function should only be called with errors that indicate a bug in the product.
|
|
101
|
-
* E.g. buggy extensions/invalid user-input/network issues should not be able to trigger this code path.
|
|
102
|
-
* If they are, this indicates there is also a bug in the product.
|
|
103
|
-
*/
|
|
104
|
-
export function onBugIndicatingError(e: any): undefined {
|
|
105
|
-
errorHandler.onUnexpectedError(e);
|
|
106
|
-
return undefined;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export function onUnexpectedError(e: any): undefined {
|
|
110
|
-
// ignore errors from cancelled promises
|
|
111
|
-
if (!isCancellationError(e)) {
|
|
112
|
-
errorHandler.onUnexpectedError(e);
|
|
113
|
-
}
|
|
114
|
-
return undefined;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function onUnexpectedExternalError(e: any): undefined {
|
|
118
|
-
// ignore errors from cancelled promises
|
|
119
|
-
if (!isCancellationError(e)) {
|
|
120
|
-
errorHandler.onUnexpectedExternalError(e);
|
|
121
|
-
}
|
|
122
|
-
return undefined;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export interface SerializedError {
|
|
126
|
-
readonly $isError: true;
|
|
127
|
-
readonly name: string;
|
|
128
|
-
readonly message: string;
|
|
129
|
-
readonly stack: string;
|
|
130
|
-
readonly noTelemetry: boolean;
|
|
131
|
-
readonly code?: string;
|
|
132
|
-
readonly cause?: SerializedError;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
type ErrorWithCode = Error & {
|
|
136
|
-
code: string | undefined;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export function transformErrorForSerialization(error: Error): SerializedError;
|
|
140
|
-
export function transformErrorForSerialization(error: any): any;
|
|
141
|
-
export function transformErrorForSerialization(error: any): any {
|
|
142
|
-
if (error instanceof Error) {
|
|
143
|
-
const { name, message, cause } = error;
|
|
144
|
-
const stack: string = (<any>error).stacktrace || (<any>error).stack;
|
|
145
|
-
return {
|
|
146
|
-
$isError: true,
|
|
147
|
-
name,
|
|
148
|
-
message,
|
|
149
|
-
stack,
|
|
150
|
-
noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error),
|
|
151
|
-
cause: cause ? transformErrorForSerialization(cause) : undefined,
|
|
152
|
-
code: (<ErrorWithCode>error).code
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// return as is
|
|
157
|
-
return error;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function transformErrorFromSerialization(data: SerializedError): Error {
|
|
161
|
-
let error: Error;
|
|
162
|
-
if (data.noTelemetry) {
|
|
163
|
-
error = new ErrorNoTelemetry();
|
|
164
|
-
} else {
|
|
165
|
-
error = new Error();
|
|
166
|
-
error.name = data.name;
|
|
167
|
-
}
|
|
168
|
-
error.message = data.message;
|
|
169
|
-
error.stack = data.stack;
|
|
170
|
-
if (data.code) {
|
|
171
|
-
(<ErrorWithCode>error).code = data.code;
|
|
172
|
-
}
|
|
173
|
-
if (data.cause) {
|
|
174
|
-
error.cause = transformErrorFromSerialization(data.cause);
|
|
175
|
-
}
|
|
176
|
-
return error;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// see https://github.com/v8/v8/wiki/Stack%20Trace%20API#basic-stack-traces
|
|
180
|
-
export interface V8CallSite {
|
|
181
|
-
getThis(): unknown;
|
|
182
|
-
getTypeName(): string | null;
|
|
183
|
-
getFunction(): Function | undefined;
|
|
184
|
-
getFunctionName(): string | null;
|
|
185
|
-
getMethodName(): string | null;
|
|
186
|
-
getFileName(): string | null;
|
|
187
|
-
getLineNumber(): number | null;
|
|
188
|
-
getColumnNumber(): number | null;
|
|
189
|
-
getEvalOrigin(): string | undefined;
|
|
190
|
-
isToplevel(): boolean;
|
|
191
|
-
isEval(): boolean;
|
|
192
|
-
isNative(): boolean;
|
|
193
|
-
isConstructor(): boolean;
|
|
194
|
-
toString(): string;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export const canceledName = 'Canceled';
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Checks if the given error is a promise in canceled state
|
|
201
|
-
*/
|
|
202
|
-
export function isCancellationError(error: any): boolean {
|
|
203
|
-
if (error instanceof CancellationError) {
|
|
204
|
-
return true;
|
|
205
|
-
}
|
|
206
|
-
return error instanceof Error && error.name === canceledName && error.message === canceledName;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// !!!IMPORTANT!!!
|
|
210
|
-
// Do NOT change this class because it is also used as an API-type.
|
|
211
|
-
export class CancellationError extends Error {
|
|
212
|
-
constructor() {
|
|
213
|
-
super(canceledName);
|
|
214
|
-
this.name = this.message;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export class PendingMigrationError extends Error {
|
|
219
|
-
|
|
220
|
-
private static readonly _name = 'PendingMigrationError';
|
|
221
|
-
|
|
222
|
-
static is(error: unknown): error is PendingMigrationError {
|
|
223
|
-
return error instanceof PendingMigrationError || (error instanceof Error && error.name === PendingMigrationError._name);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
constructor(message: string) {
|
|
227
|
-
super(message);
|
|
228
|
-
this.name = PendingMigrationError._name;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* @deprecated use {@link CancellationError `new CancellationError()`} instead
|
|
234
|
-
*/
|
|
235
|
-
export function canceled(): Error {
|
|
236
|
-
const error = new Error(canceledName);
|
|
237
|
-
error.name = error.message;
|
|
238
|
-
return error;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export function illegalArgument(name?: string): Error {
|
|
242
|
-
if (name) {
|
|
243
|
-
return new Error(`Illegal argument: ${name}`);
|
|
244
|
-
} else {
|
|
245
|
-
return new Error('Illegal argument');
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export function illegalState(name?: string): Error {
|
|
250
|
-
if (name) {
|
|
251
|
-
return new Error(`Illegal state: ${name}`);
|
|
252
|
-
} else {
|
|
253
|
-
return new Error('Illegal state');
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export class ReadonlyError extends TypeError {
|
|
258
|
-
constructor(name?: string) {
|
|
259
|
-
super(name ? `${name} is read-only and cannot be changed` : 'Cannot change read-only property');
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export function getErrorMessage(err: any): string {
|
|
264
|
-
if (!err) {
|
|
265
|
-
return 'Error';
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
if (err.message) {
|
|
269
|
-
return err.message;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
if (err.stack) {
|
|
273
|
-
return err.stack.split('\n')[0];
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return String(err);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export class NotImplementedError extends Error {
|
|
280
|
-
constructor(message?: string) {
|
|
281
|
-
super('NotImplemented');
|
|
282
|
-
if (message) {
|
|
283
|
-
this.message = message;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export class NotSupportedError extends Error {
|
|
289
|
-
constructor(message?: string) {
|
|
290
|
-
super('NotSupported');
|
|
291
|
-
if (message) {
|
|
292
|
-
this.message = message;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export class ExpectedError extends Error {
|
|
298
|
-
readonly isExpected = true;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Error that when thrown won't be logged in telemetry as an unhandled error.
|
|
303
|
-
*/
|
|
304
|
-
export class ErrorNoTelemetry extends Error {
|
|
305
|
-
override readonly name: string;
|
|
306
|
-
|
|
307
|
-
constructor(msg?: string) {
|
|
308
|
-
super(msg);
|
|
309
|
-
this.name = 'CodeExpectedError';
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
public static fromError(err: Error): ErrorNoTelemetry {
|
|
313
|
-
if (err instanceof ErrorNoTelemetry) {
|
|
314
|
-
return err;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
const result = new ErrorNoTelemetry();
|
|
318
|
-
result.message = err.message;
|
|
319
|
-
result.stack = err.stack;
|
|
320
|
-
return result;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
public static isErrorNoTelemetry(err: Error): err is ErrorNoTelemetry {
|
|
324
|
-
return err.name === 'CodeExpectedError';
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* This error indicates a bug.
|
|
330
|
-
* Do not throw this for invalid user input.
|
|
331
|
-
* Only catch this error to recover gracefully from bugs.
|
|
332
|
-
*/
|
|
333
|
-
export class BugIndicatingError extends Error {
|
|
334
|
-
constructor(message?: string) {
|
|
335
|
-
super(message || 'An unexpected bug occurred.');
|
|
336
|
-
Object.setPrototypeOf(this, BugIndicatingError.prototype);
|
|
337
|
-
|
|
338
|
-
// Because we know for sure only buggy code throws this,
|
|
339
|
-
// we definitely want to break here and fix the bug.
|
|
340
|
-
// debugger;
|
|
341
|
-
}
|
|
342
|
-
}
|