@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.
- 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/platform/configuration/common/configurationService.d.ts +1 -0
- package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
- package/dist/src/_internal/platform/configuration/common/configurationService.js +1 -0
- package/dist/src/_internal/platform/configuration/common/configurationService.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/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/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/vscodeTypesShim.d.ts.map +1 -1
- package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js +8 -1
- package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js.map +1 -1
- package/dist/src/_internal/vscodeTypes.d.ts +4 -0
- package/dist/src/_internal/vscodeTypes.d.ts.map +1 -1
- package/dist/src/_internal/vscodeTypes.js +5 -1
- package/dist/src/_internal/vscodeTypes.js.map +1 -1
- package/dist/src/main.d.ts +5 -0
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js +12 -0
- package/dist/src/main.js.map +1 -1
- package/dist/src/package.json +46 -19
- package/package.json +3 -6
- 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,195 +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 type * as vscode from 'vscode';
|
|
9
|
-
import { illegalArgument } from '../../../../base/common/errors';
|
|
10
|
-
import { es5ClassCompat } from './es5ClassCompat';
|
|
11
|
-
|
|
12
|
-
@es5ClassCompat
|
|
13
|
-
export class Position {
|
|
14
|
-
|
|
15
|
-
static Min(...positions: Position[]): Position {
|
|
16
|
-
if (positions.length === 0) {
|
|
17
|
-
throw new TypeError();
|
|
18
|
-
}
|
|
19
|
-
let result = positions[0];
|
|
20
|
-
for (let i = 1; i < positions.length; i++) {
|
|
21
|
-
const p = positions[i];
|
|
22
|
-
if (p.isBefore(result)) {
|
|
23
|
-
result = p;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static Max(...positions: Position[]): Position {
|
|
30
|
-
if (positions.length === 0) {
|
|
31
|
-
throw new TypeError();
|
|
32
|
-
}
|
|
33
|
-
let result = positions[0];
|
|
34
|
-
for (let i = 1; i < positions.length; i++) {
|
|
35
|
-
const p = positions[i];
|
|
36
|
-
if (p.isAfter(result)) {
|
|
37
|
-
result = p;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
static isPosition(other: any): other is Position {
|
|
44
|
-
if (!other) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
if (other instanceof Position) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
const { line, character } = <Position>other;
|
|
51
|
-
if (typeof line === 'number' && typeof character === 'number') {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static of(obj: vscode.Position): Position {
|
|
58
|
-
if (obj instanceof Position) {
|
|
59
|
-
return obj;
|
|
60
|
-
} else if (this.isPosition(obj)) {
|
|
61
|
-
return new Position(obj.line, obj.character);
|
|
62
|
-
}
|
|
63
|
-
throw new Error('Invalid argument, is NOT a position-like object');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private _line: number;
|
|
67
|
-
private _character: number;
|
|
68
|
-
|
|
69
|
-
get line(): number {
|
|
70
|
-
return this._line;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
get character(): number {
|
|
74
|
-
return this._character;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
constructor(line: number, character: number) {
|
|
78
|
-
if (line < 0) {
|
|
79
|
-
throw illegalArgument('line must be non-negative');
|
|
80
|
-
}
|
|
81
|
-
if (character < 0) {
|
|
82
|
-
throw illegalArgument('character must be non-negative');
|
|
83
|
-
}
|
|
84
|
-
this._line = line;
|
|
85
|
-
this._character = character;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
isBefore(other: Position): boolean {
|
|
89
|
-
if (this._line < other._line) {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
if (other._line < this._line) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
return this._character < other._character;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
isBeforeOrEqual(other: Position): boolean {
|
|
99
|
-
if (this._line < other._line) {
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
if (other._line < this._line) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
return this._character <= other._character;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
isAfter(other: Position): boolean {
|
|
109
|
-
return !this.isBeforeOrEqual(other);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
isAfterOrEqual(other: Position): boolean {
|
|
113
|
-
return !this.isBefore(other);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
isEqual(other: Position): boolean {
|
|
117
|
-
return this._line === other._line && this._character === other._character;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
compareTo(other: Position): number {
|
|
121
|
-
if (this._line < other._line) {
|
|
122
|
-
return -1;
|
|
123
|
-
} else if (this._line > other.line) {
|
|
124
|
-
return 1;
|
|
125
|
-
} else {
|
|
126
|
-
// equal line
|
|
127
|
-
if (this._character < other._character) {
|
|
128
|
-
return -1;
|
|
129
|
-
} else if (this._character > other._character) {
|
|
130
|
-
return 1;
|
|
131
|
-
} else {
|
|
132
|
-
// equal line and character
|
|
133
|
-
return 0;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
translate(change: { lineDelta?: number; characterDelta?: number }): Position;
|
|
139
|
-
translate(lineDelta?: number, characterDelta?: number): Position;
|
|
140
|
-
translate(lineDeltaOrChange: number | undefined | { lineDelta?: number; characterDelta?: number }, characterDelta: number = 0): Position {
|
|
141
|
-
|
|
142
|
-
if (lineDeltaOrChange === null || characterDelta === null) {
|
|
143
|
-
throw illegalArgument();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
let lineDelta: number;
|
|
147
|
-
if (typeof lineDeltaOrChange === 'undefined') {
|
|
148
|
-
lineDelta = 0;
|
|
149
|
-
} else if (typeof lineDeltaOrChange === 'number') {
|
|
150
|
-
lineDelta = lineDeltaOrChange;
|
|
151
|
-
} else {
|
|
152
|
-
lineDelta = typeof lineDeltaOrChange.lineDelta === 'number' ? lineDeltaOrChange.lineDelta : 0;
|
|
153
|
-
characterDelta = typeof lineDeltaOrChange.characterDelta === 'number' ? lineDeltaOrChange.characterDelta : 0;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (lineDelta === 0 && characterDelta === 0) {
|
|
157
|
-
return this;
|
|
158
|
-
}
|
|
159
|
-
return new Position(this.line + lineDelta, this.character + characterDelta);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
with(change: { line?: number; character?: number }): Position;
|
|
163
|
-
with(line?: number, character?: number): Position;
|
|
164
|
-
with(lineOrChange: number | undefined | { line?: number; character?: number }, character: number = this.character): Position {
|
|
165
|
-
|
|
166
|
-
if (lineOrChange === null || character === null) {
|
|
167
|
-
throw illegalArgument();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
let line: number;
|
|
171
|
-
if (typeof lineOrChange === 'undefined') {
|
|
172
|
-
line = this.line;
|
|
173
|
-
|
|
174
|
-
} else if (typeof lineOrChange === 'number') {
|
|
175
|
-
line = lineOrChange;
|
|
176
|
-
|
|
177
|
-
} else {
|
|
178
|
-
line = typeof lineOrChange.line === 'number' ? lineOrChange.line : this.line;
|
|
179
|
-
character = typeof lineOrChange.character === 'number' ? lineOrChange.character : this.character;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (line === this.line && character === this.character) {
|
|
183
|
-
return this;
|
|
184
|
-
}
|
|
185
|
-
return new Position(line, character);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
toJSON(): any {
|
|
189
|
-
return { line: this.line, character: this.character };
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
[Symbol.for('debug.description')]() {
|
|
193
|
-
return `(${this.line}:${this.character})`;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
@@ -1,167 +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 type * as vscode from 'vscode';
|
|
9
|
-
import { illegalArgument } from '../../../../base/common/errors';
|
|
10
|
-
import { es5ClassCompat } from './es5ClassCompat';
|
|
11
|
-
import { Position } from './position';
|
|
12
|
-
|
|
13
|
-
@es5ClassCompat
|
|
14
|
-
export class Range {
|
|
15
|
-
|
|
16
|
-
static isRange(thing: any): thing is vscode.Range {
|
|
17
|
-
if (thing instanceof Range) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
if (!thing) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
return Position.isPosition((<Range>thing).start)
|
|
24
|
-
&& Position.isPosition((<Range>thing.end));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
static of(obj: vscode.Range): Range {
|
|
28
|
-
if (obj instanceof Range) {
|
|
29
|
-
return obj;
|
|
30
|
-
}
|
|
31
|
-
if (this.isRange(obj)) {
|
|
32
|
-
return new Range(obj.start, obj.end);
|
|
33
|
-
}
|
|
34
|
-
throw new Error('Invalid argument, is NOT a range-like object');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
protected _start: Position;
|
|
38
|
-
protected _end: Position;
|
|
39
|
-
|
|
40
|
-
get start(): Position {
|
|
41
|
-
return this._start;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
get end(): Position {
|
|
45
|
-
return this._end;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
constructor(start: vscode.Position, end: vscode.Position);
|
|
49
|
-
constructor(start: Position, end: Position);
|
|
50
|
-
constructor(startLine: number, startColumn: number, endLine: number, endColumn: number);
|
|
51
|
-
constructor(startLineOrStart: number | Position | vscode.Position, startColumnOrEnd: number | Position | vscode.Position, endLine?: number, endColumn?: number) {
|
|
52
|
-
let start: Position | undefined;
|
|
53
|
-
let end: Position | undefined;
|
|
54
|
-
|
|
55
|
-
if (typeof startLineOrStart === 'number' && typeof startColumnOrEnd === 'number' && typeof endLine === 'number' && typeof endColumn === 'number') {
|
|
56
|
-
start = new Position(startLineOrStart, startColumnOrEnd);
|
|
57
|
-
end = new Position(endLine, endColumn);
|
|
58
|
-
} else if (Position.isPosition(startLineOrStart) && Position.isPosition(startColumnOrEnd)) {
|
|
59
|
-
start = Position.of(startLineOrStart);
|
|
60
|
-
end = Position.of(startColumnOrEnd);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (!start || !end) {
|
|
64
|
-
throw new Error('Invalid arguments');
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (start.isBefore(end)) {
|
|
68
|
-
this._start = start;
|
|
69
|
-
this._end = end;
|
|
70
|
-
} else {
|
|
71
|
-
this._start = end;
|
|
72
|
-
this._end = start;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
contains(positionOrRange: Position | Range): boolean {
|
|
77
|
-
if (Range.isRange(positionOrRange)) {
|
|
78
|
-
return this.contains(positionOrRange.start)
|
|
79
|
-
&& this.contains(positionOrRange.end);
|
|
80
|
-
|
|
81
|
-
} else if (Position.isPosition(positionOrRange)) {
|
|
82
|
-
if (Position.of(positionOrRange).isBefore(this._start)) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
if (this._end.isBefore(positionOrRange)) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
isEqual(other: Range): boolean {
|
|
94
|
-
return this._start.isEqual(other._start) && this._end.isEqual(other._end);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
intersection(other: Range): Range | undefined {
|
|
98
|
-
const start = Position.Max(other.start, this._start);
|
|
99
|
-
const end = Position.Min(other.end, this._end);
|
|
100
|
-
if (start.isAfter(end)) {
|
|
101
|
-
// this happens when there is no overlap:
|
|
102
|
-
// |-----|
|
|
103
|
-
// |----|
|
|
104
|
-
return undefined;
|
|
105
|
-
}
|
|
106
|
-
return new Range(start, end);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
union(other: Range): Range {
|
|
110
|
-
if (this.contains(other)) {
|
|
111
|
-
return this;
|
|
112
|
-
} else if (other.contains(this)) {
|
|
113
|
-
return other;
|
|
114
|
-
}
|
|
115
|
-
const start = Position.Min(other.start, this._start);
|
|
116
|
-
const end = Position.Max(other.end, this.end);
|
|
117
|
-
return new Range(start, end);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
get isEmpty(): boolean {
|
|
121
|
-
return this._start.isEqual(this._end);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
get isSingleLine(): boolean {
|
|
125
|
-
return this._start.line === this._end.line;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
with(change: { start?: Position; end?: Position }): Range;
|
|
129
|
-
with(start?: Position, end?: Position): Range;
|
|
130
|
-
with(startOrChange: Position | undefined | { start?: Position; end?: Position }, end: Position = this.end): Range {
|
|
131
|
-
|
|
132
|
-
if (startOrChange === null || end === null) {
|
|
133
|
-
throw illegalArgument();
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
let start: Position;
|
|
137
|
-
if (!startOrChange) {
|
|
138
|
-
start = this.start;
|
|
139
|
-
|
|
140
|
-
} else if (Position.isPosition(startOrChange)) {
|
|
141
|
-
start = startOrChange;
|
|
142
|
-
|
|
143
|
-
} else {
|
|
144
|
-
start = startOrChange.start || this.start;
|
|
145
|
-
end = startOrChange.end || this.end;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (start.isEqual(this._start) && end.isEqual(this.end)) {
|
|
149
|
-
return this;
|
|
150
|
-
}
|
|
151
|
-
return new Range(start, end);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
toJSON(): any {
|
|
155
|
-
return [this.start, this.end];
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
[Symbol.for('debug.description')]() {
|
|
159
|
-
return getDebugDescriptionOfRange(this);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function getDebugDescriptionOfRange(range: vscode.Range): string {
|
|
164
|
-
return range.isEmpty
|
|
165
|
-
? `[${range.start.line}:${range.start.character})`
|
|
166
|
-
: `[${range.start.line}:${range.start.character} -> ${range.end.line}:${range.end.character})`;
|
|
167
|
-
}
|
|
@@ -1,94 +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 type * as vscode from 'vscode';
|
|
9
|
-
import { es5ClassCompat } from './es5ClassCompat';
|
|
10
|
-
import { Position } from './position';
|
|
11
|
-
import { getDebugDescriptionOfRange, Range } from './range';
|
|
12
|
-
|
|
13
|
-
@es5ClassCompat
|
|
14
|
-
export class Selection extends Range {
|
|
15
|
-
|
|
16
|
-
static isSelection(thing: any): thing is Selection {
|
|
17
|
-
if (thing instanceof Selection) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
if (!thing) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
return Range.isRange(thing)
|
|
24
|
-
&& Position.isPosition((<Selection>thing).anchor)
|
|
25
|
-
&& Position.isPosition((<Selection>thing).active)
|
|
26
|
-
&& typeof (<Selection>thing).isReversed === 'boolean';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private _anchor: Position;
|
|
30
|
-
|
|
31
|
-
public get anchor(): Position {
|
|
32
|
-
return this._anchor;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private _active: Position;
|
|
36
|
-
|
|
37
|
-
public get active(): Position {
|
|
38
|
-
return this._active;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
constructor(anchor: Position, active: Position);
|
|
42
|
-
constructor(anchorLine: number, anchorColumn: number, activeLine: number, activeColumn: number);
|
|
43
|
-
constructor(anchorLineOrAnchor: number | Position, anchorColumnOrActive: number | Position, activeLine?: number, activeColumn?: number) {
|
|
44
|
-
let anchor: Position | undefined;
|
|
45
|
-
let active: Position | undefined;
|
|
46
|
-
|
|
47
|
-
if (typeof anchorLineOrAnchor === 'number' && typeof anchorColumnOrActive === 'number' && typeof activeLine === 'number' && typeof activeColumn === 'number') {
|
|
48
|
-
anchor = new Position(anchorLineOrAnchor, anchorColumnOrActive);
|
|
49
|
-
active = new Position(activeLine, activeColumn);
|
|
50
|
-
} else if (Position.isPosition(anchorLineOrAnchor) && Position.isPosition(anchorColumnOrActive)) {
|
|
51
|
-
anchor = Position.of(anchorLineOrAnchor);
|
|
52
|
-
active = Position.of(anchorColumnOrActive);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (!anchor || !active) {
|
|
56
|
-
throw new Error('Invalid arguments');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
super(anchor, active);
|
|
60
|
-
|
|
61
|
-
this._anchor = anchor;
|
|
62
|
-
this._active = active;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
get isReversed(): boolean {
|
|
66
|
-
return this._anchor === this._end;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
override toJSON() {
|
|
70
|
-
return {
|
|
71
|
-
start: this.start,
|
|
72
|
-
end: this.end,
|
|
73
|
-
active: this.active,
|
|
74
|
-
anchor: this.anchor
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
[Symbol.for('debug.description')]() {
|
|
80
|
-
return getDebugDescriptionOfSelection(this);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function getDebugDescriptionOfSelection(selection: vscode.Selection): string {
|
|
85
|
-
let rangeStr = getDebugDescriptionOfRange(selection);
|
|
86
|
-
if (!selection.isEmpty) {
|
|
87
|
-
if (selection.active.isEqual(selection.start)) {
|
|
88
|
-
rangeStr = `|${rangeStr}`;
|
|
89
|
-
} else {
|
|
90
|
-
rangeStr = `${rangeStr}|`;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return rangeStr;
|
|
94
|
-
}
|
|
@@ -1,103 +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 { es5ClassCompat } from './es5ClassCompat';
|
|
9
|
-
|
|
10
|
-
@es5ClassCompat
|
|
11
|
-
export class SnippetString {
|
|
12
|
-
|
|
13
|
-
static isSnippetString(thing: any): thing is SnippetString {
|
|
14
|
-
if (thing instanceof SnippetString) {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
if (!thing) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
return typeof (<SnippetString>thing).value === 'string';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
private static _escape(value: string): string {
|
|
24
|
-
return value.replace(/\$|}|\\/g, '\\$&');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
private _tabstop: number = 1;
|
|
28
|
-
|
|
29
|
-
value: string;
|
|
30
|
-
|
|
31
|
-
constructor(value?: string) {
|
|
32
|
-
this.value = value || '';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
appendText(string: string): SnippetString {
|
|
36
|
-
this.value += SnippetString._escape(string);
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
appendTabstop(number: number = this._tabstop++): SnippetString {
|
|
41
|
-
this.value += '$';
|
|
42
|
-
this.value += number;
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
appendPlaceholder(value: string | ((snippet: SnippetString) => any), number: number = this._tabstop++): SnippetString {
|
|
47
|
-
|
|
48
|
-
if (typeof value === 'function') {
|
|
49
|
-
const nested = new SnippetString();
|
|
50
|
-
nested._tabstop = this._tabstop;
|
|
51
|
-
value(nested);
|
|
52
|
-
this._tabstop = nested._tabstop;
|
|
53
|
-
value = nested.value;
|
|
54
|
-
} else {
|
|
55
|
-
value = SnippetString._escape(value);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
this.value += '${';
|
|
59
|
-
this.value += number;
|
|
60
|
-
this.value += ':';
|
|
61
|
-
this.value += value;
|
|
62
|
-
this.value += '}';
|
|
63
|
-
|
|
64
|
-
return this;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
appendChoice(values: string[], number: number = this._tabstop++): SnippetString {
|
|
68
|
-
const value = values.map(s => s.replaceAll(/[|\\,]/g, '\\$&')).join(',');
|
|
69
|
-
|
|
70
|
-
this.value += '${';
|
|
71
|
-
this.value += number;
|
|
72
|
-
this.value += '|';
|
|
73
|
-
this.value += value;
|
|
74
|
-
this.value += '|}';
|
|
75
|
-
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
appendVariable(name: string, defaultValue?: string | ((snippet: SnippetString) => any)): SnippetString {
|
|
80
|
-
|
|
81
|
-
if (typeof defaultValue === 'function') {
|
|
82
|
-
const nested = new SnippetString();
|
|
83
|
-
nested._tabstop = this._tabstop;
|
|
84
|
-
defaultValue(nested);
|
|
85
|
-
this._tabstop = nested._tabstop;
|
|
86
|
-
defaultValue = nested.value;
|
|
87
|
-
|
|
88
|
-
} else if (typeof defaultValue === 'string') {
|
|
89
|
-
defaultValue = defaultValue.replace(/\$|}/g, '\\$&'); // CodeQL [SM02383] I do not want to escape backslashes here
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
this.value += '${';
|
|
93
|
-
this.value += name;
|
|
94
|
-
if (defaultValue) {
|
|
95
|
-
this.value += ':';
|
|
96
|
-
this.value += defaultValue;
|
|
97
|
-
}
|
|
98
|
-
this.value += '}';
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,44 +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 type * as vscode from 'vscode';
|
|
9
|
-
import { SnippetString } from './snippetString';
|
|
10
|
-
import { Position } from './position';
|
|
11
|
-
import { Range } from './range';
|
|
12
|
-
|
|
13
|
-
export class SnippetTextEdit implements vscode.SnippetTextEdit {
|
|
14
|
-
|
|
15
|
-
static isSnippetTextEdit(thing: any): thing is SnippetTextEdit {
|
|
16
|
-
if (thing instanceof SnippetTextEdit) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
if (!thing) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return Range.isRange((<SnippetTextEdit>thing).range)
|
|
23
|
-
&& SnippetString.isSnippetString((<SnippetTextEdit>thing).snippet);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static replace(range: Range, snippet: SnippetString): SnippetTextEdit {
|
|
27
|
-
return new SnippetTextEdit(range, snippet);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static insert(position: Position, snippet: SnippetString): SnippetTextEdit {
|
|
31
|
-
return SnippetTextEdit.replace(new Range(position, position), snippet);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
range: Range;
|
|
35
|
-
|
|
36
|
-
snippet: SnippetString;
|
|
37
|
-
|
|
38
|
-
keepWhitespace?: boolean;
|
|
39
|
-
|
|
40
|
-
constructor(range: Range, snippet: SnippetString) {
|
|
41
|
-
this.range = range;
|
|
42
|
-
this.snippet = snippet;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,89 +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 { URI } from '../../../../base/common/uri';
|
|
9
|
-
import { es5ClassCompat } from './es5ClassCompat';
|
|
10
|
-
import { Location } from './location';
|
|
11
|
-
import { Range } from './range';
|
|
12
|
-
|
|
13
|
-
export enum SymbolKind {
|
|
14
|
-
File = 0,
|
|
15
|
-
Module = 1,
|
|
16
|
-
Namespace = 2,
|
|
17
|
-
Package = 3,
|
|
18
|
-
Class = 4,
|
|
19
|
-
Method = 5,
|
|
20
|
-
Property = 6,
|
|
21
|
-
Field = 7,
|
|
22
|
-
Constructor = 8,
|
|
23
|
-
Enum = 9,
|
|
24
|
-
Interface = 10,
|
|
25
|
-
Function = 11,
|
|
26
|
-
Variable = 12,
|
|
27
|
-
Constant = 13,
|
|
28
|
-
String = 14,
|
|
29
|
-
Number = 15,
|
|
30
|
-
Boolean = 16,
|
|
31
|
-
Array = 17,
|
|
32
|
-
Object = 18,
|
|
33
|
-
Key = 19,
|
|
34
|
-
Null = 20,
|
|
35
|
-
EnumMember = 21,
|
|
36
|
-
Struct = 22,
|
|
37
|
-
Event = 23,
|
|
38
|
-
Operator = 24,
|
|
39
|
-
TypeParameter = 25
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export enum SymbolTag {
|
|
43
|
-
Deprecated = 1
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@es5ClassCompat
|
|
47
|
-
export class SymbolInformation {
|
|
48
|
-
|
|
49
|
-
static validate(candidate: SymbolInformation): void {
|
|
50
|
-
if (!candidate.name) {
|
|
51
|
-
throw new Error('name must not be falsy');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
name: string;
|
|
56
|
-
location!: Location;
|
|
57
|
-
kind: SymbolKind;
|
|
58
|
-
tags?: SymbolTag[];
|
|
59
|
-
containerName: string | undefined;
|
|
60
|
-
|
|
61
|
-
constructor(name: string, kind: SymbolKind, containerName: string | undefined, location: Location);
|
|
62
|
-
constructor(name: string, kind: SymbolKind, range: Range, uri?: URI, containerName?: string);
|
|
63
|
-
constructor(name: string, kind: SymbolKind, rangeOrContainer: string | undefined | Range, locationOrUri?: Location | URI, containerName?: string) {
|
|
64
|
-
this.name = name;
|
|
65
|
-
this.kind = kind;
|
|
66
|
-
this.containerName = containerName;
|
|
67
|
-
|
|
68
|
-
if (typeof rangeOrContainer === 'string') {
|
|
69
|
-
this.containerName = rangeOrContainer;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (locationOrUri instanceof Location) {
|
|
73
|
-
this.location = locationOrUri;
|
|
74
|
-
} else if (rangeOrContainer instanceof Range) {
|
|
75
|
-
this.location = new Location(locationOrUri!, rangeOrContainer);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
SymbolInformation.validate(this);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
toJSON(): any {
|
|
82
|
-
return {
|
|
83
|
-
name: this.name,
|
|
84
|
-
kind: SymbolKind[this.kind],
|
|
85
|
-
location: this.location,
|
|
86
|
-
containerName: this.containerName
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|