@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,803 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
import type { ConfigurationChangeEvent, ConfigurationScope } from 'vscode';
|
|
7
|
-
import { createServiceIdentifier } from '../../../util/common/services';
|
|
8
|
-
import { BugIndicatingError } from '../../../util/vs/base/common/errors';
|
|
9
|
-
import { Emitter, Event } from '../../../util/vs/base/common/event';
|
|
10
|
-
import { StringSHA1 } from '../../../util/vs/base/common/hash';
|
|
11
|
-
import { Disposable } from '../../../util/vs/base/common/lifecycle';
|
|
12
|
-
import * as objects from '../../../util/vs/base/common/objects';
|
|
13
|
-
import { IObservable, observableFromEventOpts } from '../../../util/vs/base/common/observable';
|
|
14
|
-
import * as types from '../../../util/vs/base/common/types';
|
|
15
|
-
import { ICopilotTokenStore } from '../../authentication/common/copilotTokenStore';
|
|
16
|
-
import { isPreRelease, packageJson } from '../../env/common/packagejson';
|
|
17
|
-
import * as xtabPromptOptions from '../../inlineEdits/common/dataTypes/xtabPromptOptions';
|
|
18
|
-
import { LANGUAGE_CONTEXT_ENABLED_LANGUAGES, LanguageContextLanguages } from '../../inlineEdits/common/dataTypes/xtabPromptOptions';
|
|
19
|
-
import { ResponseProcessor } from '../../inlineEdits/common/responseProcessor';
|
|
20
|
-
import { AlternativeNotebookFormat } from '../../notebook/common/alternativeContentFormat';
|
|
21
|
-
import { IExperimentationService } from '../../telemetry/common/nullExperimentationService';
|
|
22
|
-
import { IValidator, vBoolean, vString } from './validator';
|
|
23
|
-
|
|
24
|
-
export const CopilotConfigPrefix = 'github.copilot';
|
|
25
|
-
|
|
26
|
-
export const IConfigurationService = createServiceIdentifier<IConfigurationService>('IConfigurationService');
|
|
27
|
-
|
|
28
|
-
export type ExperimentBasedConfigType = boolean | number | (string | undefined);
|
|
29
|
-
|
|
30
|
-
export interface InspectConfigResult<T> {
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The default value which is used when no other value is defined
|
|
34
|
-
*/
|
|
35
|
-
defaultValue?: T;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The global or installation-wide value.
|
|
39
|
-
*/
|
|
40
|
-
globalValue?: T;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The workspace-specific value.
|
|
44
|
-
*/
|
|
45
|
-
workspaceValue?: T;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The workspace-folder-specific value.
|
|
49
|
-
*/
|
|
50
|
-
workspaceFolderValue?: T;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Language specific default value when this configuration value is created for a {@link ConfigurationScope language scope}.
|
|
54
|
-
*/
|
|
55
|
-
defaultLanguageValue?: T;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Language specific global value when this configuration value is created for a {@link ConfigurationScope language scope}.
|
|
59
|
-
*/
|
|
60
|
-
globalLanguageValue?: T;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Language specific workspace value when this configuration value is created for a {@link ConfigurationScope language scope}.
|
|
64
|
-
*/
|
|
65
|
-
workspaceLanguageValue?: T;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Language specific workspace-folder value when this configuration value is created for a {@link ConfigurationScope language scope}.
|
|
69
|
-
*/
|
|
70
|
-
workspaceFolderLanguageValue?: T;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* All language identifiers for which this configuration is defined.
|
|
74
|
-
*/
|
|
75
|
-
languageIds?: string[];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface IConfigurationService {
|
|
79
|
-
|
|
80
|
-
readonly _serviceBrand: undefined;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Gets user configuration for a key from vscode (which if not defined, pulls default value from package.json).
|
|
84
|
-
* If not defined, returns the default value.
|
|
85
|
-
*
|
|
86
|
-
* @remark For object values, the user config will replace the default config.
|
|
87
|
-
*/
|
|
88
|
-
getConfig<T>(key: Config<T>, scope?: ConfigurationScope): T;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Gets an observable for the configuration of a key from vscode (which if not defined, pulls default value from package.json).
|
|
92
|
-
* If not defined, returns the default value.
|
|
93
|
-
*
|
|
94
|
-
* @remark For object values, the user config will replace the default config.
|
|
95
|
-
*/
|
|
96
|
-
getConfigObservable<T>(key: Config<T>): IObservable<T>;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Retrieve all information about a configuration setting. A configuration value
|
|
100
|
-
* often consists of a *default* value, a global or installation-wide value,
|
|
101
|
-
* a workspace-specific value and folder-specific value
|
|
102
|
-
* @param configKey The config key to look up
|
|
103
|
-
* @returns Information about a configuration setting or `undefined`.
|
|
104
|
-
*/
|
|
105
|
-
inspectConfig<T>(key: BaseConfig<T>, scope?: ConfigurationScope): InspectConfigResult<T> | undefined;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Checks if the key is configured by the user in any of the configuration scopes.
|
|
109
|
-
*/
|
|
110
|
-
isConfigured<T>(key: BaseConfig<T>, scope?: ConfigurationScope): boolean;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Proxies vscode.workspace.getConfiguration to allow getting a configuration value that is not in the Copilot namespace.
|
|
114
|
-
* @param configKey The config key to look up
|
|
115
|
-
*/
|
|
116
|
-
getNonExtensionConfig<T>(configKey: string): T | undefined;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Sets user configuration for a key in vscode.
|
|
120
|
-
*/
|
|
121
|
-
setConfig<T>(key: BaseConfig<T>, value: T): Thenable<void>;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Gets user configuration for a key from vscode (which if not defined, pulls default value from package.json).
|
|
125
|
-
* If not defined, returns the experimentation based value or falls back to the default value.
|
|
126
|
-
*
|
|
127
|
-
* @remark For object values, the user config will replace the default config.
|
|
128
|
-
*/
|
|
129
|
-
getExperimentBasedConfig<T extends ExperimentBasedConfigType>(key: ExperimentBasedConfig<T>, experimentationService: IExperimentationService, scope?: ConfigurationScope): T;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Gets the observable of a user configuration for a key from vscode (which if not defined, pulls default value from package.json).
|
|
133
|
-
* If not defined, returns the experimentation based value or falls back to the default value.
|
|
134
|
-
*
|
|
135
|
-
* @remark For object values, the user config will replace the default config.
|
|
136
|
-
*/
|
|
137
|
-
getExperimentBasedConfigObservable<T extends ExperimentBasedConfigType>(key: ExperimentBasedConfig<T>, experimentationService: IExperimentationService): IObservable<T>;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* For object values, the user config will be mixed in with the default config.
|
|
141
|
-
*/
|
|
142
|
-
getConfigMixedWithDefaults<T>(key: Config<T>): T;
|
|
143
|
-
|
|
144
|
-
getDefaultValue<T>(key: Config<T>): T;
|
|
145
|
-
getDefaultValue<T extends ExperimentBasedConfigType>(key: ExperimentBasedConfig<T>): T;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Emitted whenever a configuration value changes.
|
|
149
|
-
* This emits for all changes, not just changes to the Copilot settings.
|
|
150
|
-
*/
|
|
151
|
-
onDidChangeConfiguration: Event<ConfigurationChangeEvent>;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Called by experimentation service to trigger updates to ExP based configurations
|
|
156
|
-
*
|
|
157
|
-
* @param treatments List of treatments that have been changed
|
|
158
|
-
*/
|
|
159
|
-
updateExperimentBasedConfiguration(treatments: string[]): void;
|
|
160
|
-
|
|
161
|
-
dumpConfig(): { [key: string]: string };
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
export abstract class AbstractConfigurationService extends Disposable implements IConfigurationService {
|
|
167
|
-
declare readonly _serviceBrand: undefined;
|
|
168
|
-
|
|
169
|
-
protected _onDidChangeConfiguration = this._register(new Emitter<ConfigurationChangeEvent>());
|
|
170
|
-
readonly onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
|
171
|
-
|
|
172
|
-
protected _isInternal: boolean = false;
|
|
173
|
-
protected _isTeamMember: boolean = false;
|
|
174
|
-
private _teamMemberUsername: string | undefined = undefined;
|
|
175
|
-
|
|
176
|
-
constructor(copilotTokenStore?: ICopilotTokenStore) {
|
|
177
|
-
super();
|
|
178
|
-
if (copilotTokenStore) {
|
|
179
|
-
this._register(copilotTokenStore.onDidStoreUpdate(() => {
|
|
180
|
-
const isTeamMember = !!copilotTokenStore.copilotToken?.isVscodeTeamMember;
|
|
181
|
-
this._setUserInfo({
|
|
182
|
-
isInternal: !!copilotTokenStore.copilotToken?.isInternal,
|
|
183
|
-
isTeamMember,
|
|
184
|
-
teamMemberUsername: isTeamMember ? copilotTokenStore.copilotToken?.username : undefined
|
|
185
|
-
});
|
|
186
|
-
}));
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
getConfigMixedWithDefaults<T>(key: Config<T>): T {
|
|
191
|
-
if (key.options?.valueIgnoredForExternals && !this._isInternal) {
|
|
192
|
-
return this.getDefaultValue(key);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const userValue = this.getConfig(key);
|
|
196
|
-
|
|
197
|
-
// if user doesn't override the setting, return the default
|
|
198
|
-
if (userValue === undefined) {
|
|
199
|
-
return this.getDefaultValue(key);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// if user overrides the setting and the setting is an object, combine default with user value, with the preference to user settings
|
|
203
|
-
if (types.isObject(userValue) && types.isObject(key.defaultValue)) {
|
|
204
|
-
// If default is an object apply the default and then apply the setting
|
|
205
|
-
return { ...key.defaultValue, ...userValue };
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return userValue;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
public getDefaultValue<T>(key: BaseConfig<T>): T {
|
|
212
|
-
if (ConfigValueValidators.isDefaultValueWithTeamAndInternalValue(key.defaultValue)) {
|
|
213
|
-
return this._isUsingTeamDefault(key)
|
|
214
|
-
? key.defaultValue.teamDefaultValue
|
|
215
|
-
: this._isInternal
|
|
216
|
-
? key.defaultValue.internalDefaultValue
|
|
217
|
-
: key.defaultValue.defaultValue;
|
|
218
|
-
}
|
|
219
|
-
if (ConfigValueValidators.isDefaultValueWithTeamValue(key.defaultValue)) {
|
|
220
|
-
return this._isUsingTeamDefault(key) ? key.defaultValue.teamDefaultValue : key.defaultValue.defaultValue;
|
|
221
|
-
}
|
|
222
|
-
return key.defaultValue;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
private _setUserInfo(userInfo: { isInternal: boolean; isTeamMember: boolean; teamMemberUsername?: string }): void {
|
|
226
|
-
if (this._isInternal === userInfo.isInternal && this._isTeamMember === userInfo.isTeamMember && this._teamMemberUsername === userInfo.teamMemberUsername) {
|
|
227
|
-
// no change
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
this._isInternal = userInfo.isInternal;
|
|
232
|
-
this._isTeamMember = userInfo.isTeamMember;
|
|
233
|
-
this._teamMemberUsername = userInfo.teamMemberUsername;
|
|
234
|
-
// fire a fake change event to refresh all settings
|
|
235
|
-
this._onDidChangeConfiguration.fire({ affectsConfiguration: () => true });
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
abstract getConfig<T>(key: Config<T>, scope?: ConfigurationScope): T;
|
|
239
|
-
abstract inspectConfig<T>(key: BaseConfig<T>, scope?: ConfigurationScope): InspectConfigResult<T> | undefined;
|
|
240
|
-
abstract getNonExtensionConfig<T>(configKey: string): T | undefined;
|
|
241
|
-
abstract setConfig<T>(key: BaseConfig<T>, value: T): Thenable<void>;
|
|
242
|
-
abstract getExperimentBasedConfig<T extends ExperimentBasedConfigType>(key: ExperimentBasedConfig<T>, experimentationService: IExperimentationService): T;
|
|
243
|
-
abstract dumpConfig(): { [key: string]: string };
|
|
244
|
-
public updateExperimentBasedConfiguration(treatments: string[]): void {
|
|
245
|
-
if (treatments.length === 0) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
this._onDidChangeConfiguration.fire({ affectsConfiguration: () => true });
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
public getConfigObservable<T>(key: Config<T>): IObservable<T> {
|
|
252
|
-
return this._getObservable_$show2FramesUp(key, () => this.getConfig(key));
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
public getExperimentBasedConfigObservable<T extends ExperimentBasedConfigType>(key: ExperimentBasedConfig<T>, experimentationService: IExperimentationService): IObservable<T> {
|
|
256
|
-
return this._getObservable_$show2FramesUp(key, () => this.getExperimentBasedConfig(key, experimentationService));
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
private observables = new Map<string, IObservable<any>>();
|
|
260
|
-
|
|
261
|
-
private _getObservable_$show2FramesUp<T>(key: BaseConfig<T>, getValue: () => T): IObservable<T> {
|
|
262
|
-
let observable = this.observables.get(key.id);
|
|
263
|
-
if (!observable) {
|
|
264
|
-
observable = observableFromEventOpts(
|
|
265
|
-
{ debugName: () => `Configuration Key "${key.id}"` },
|
|
266
|
-
(handleChange) => this._register(this.onDidChangeConfiguration(e => {
|
|
267
|
-
if (e.affectsConfiguration(key.fullyQualifiedId)) {
|
|
268
|
-
handleChange(e);
|
|
269
|
-
}
|
|
270
|
-
})),
|
|
271
|
-
getValue
|
|
272
|
-
);
|
|
273
|
-
this.observables.set(key.id, observable);
|
|
274
|
-
}
|
|
275
|
-
return observable;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
protected _isUsingTeamDefault(key: BaseConfig<any>): boolean {
|
|
279
|
-
if (!this._isTeamMember) {
|
|
280
|
-
return false;
|
|
281
|
-
}
|
|
282
|
-
if (
|
|
283
|
-
!ConfigValueValidators.isDefaultValueWithTeamAndInternalValue(key.defaultValue)
|
|
284
|
-
&& !ConfigValueValidators.isDefaultValueWithTeamValue(key.defaultValue)
|
|
285
|
-
) {
|
|
286
|
-
return false;
|
|
287
|
-
}
|
|
288
|
-
const rolloutRatio = key.defaultValue.teamDefaultValueRollout;
|
|
289
|
-
if (rolloutRatio === undefined || rolloutRatio >= 1) {
|
|
290
|
-
return true;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
const selectedValue = `${key.fullyQualifiedId};${this._teamMemberUsername}`;
|
|
294
|
-
|
|
295
|
-
// Extract first 4 bytes and convert to a number between 0 and 1
|
|
296
|
-
const hashValue = AbstractConfigurationService._extractHashValue(selectedValue);
|
|
297
|
-
|
|
298
|
-
// Compare with rolloutRatio to determine if the user should get the feature
|
|
299
|
-
return hashValue < rolloutRatio;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Extracts a normalized value (0-1) from a string
|
|
304
|
-
*/
|
|
305
|
-
public static _extractHashValue(input: string): number {
|
|
306
|
-
const hash = new StringSHA1();
|
|
307
|
-
hash.update(input);
|
|
308
|
-
const firstPortion = hash.digest().substring(0, 8);
|
|
309
|
-
// Convert from hex to number
|
|
310
|
-
const hashNumber = parseInt(firstPortion, 16);
|
|
311
|
-
// Normalize to a value between 0 and 1
|
|
312
|
-
return (hashNumber / 0xFFFFFFFF);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Checks if the key is configured by the user in any of the configuration scopes.
|
|
317
|
-
*/
|
|
318
|
-
public isConfigured<T>(key: BaseConfig<T>, scope?: ConfigurationScope): boolean {
|
|
319
|
-
const inspect = this.inspectConfig<T>(key, scope);
|
|
320
|
-
const isConfigured = (
|
|
321
|
-
inspect?.globalValue !== undefined
|
|
322
|
-
|| inspect?.globalLanguageValue !== undefined
|
|
323
|
-
|| inspect?.workspaceFolderValue !== undefined
|
|
324
|
-
|| inspect?.workspaceFolderLanguageValue !== undefined
|
|
325
|
-
|| inspect?.workspaceValue !== undefined
|
|
326
|
-
|| inspect?.workspaceLanguageValue !== undefined
|
|
327
|
-
);
|
|
328
|
-
return isConfigured;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export type DefaultValueWithTeamValue<T> = {
|
|
334
|
-
defaultValue: T;
|
|
335
|
-
teamDefaultValue: T;
|
|
336
|
-
/**
|
|
337
|
-
* Roll out `teamDefaultValue` to a percentage of the team.
|
|
338
|
-
* This is a number between 0 and 1.
|
|
339
|
-
* 0 means 0% of the team will get `teamDefaultValue`
|
|
340
|
-
* 1 means 100% of the team will get `teamDefaultValue`
|
|
341
|
-
* undefined means 100% of the team will get `teamDefaultValue`
|
|
342
|
-
*/
|
|
343
|
-
teamDefaultValueRollout?: number;
|
|
344
|
-
};
|
|
345
|
-
export type DefaultValueWithTeamAndInternalValue<T> = DefaultValueWithTeamValue<T> & { internalDefaultValue: T };
|
|
346
|
-
|
|
347
|
-
export namespace ConfigValueValidators {
|
|
348
|
-
export function isDefaultValueWithTeamValue<T>(value: T | DefaultValueWithTeamValue<T>): value is DefaultValueWithTeamValue<T> {
|
|
349
|
-
return types.isObject(value) && 'defaultValue' in value && 'teamDefaultValue' in value;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export function isDefaultValueWithTeamAndInternalValue<T>(value: T | DefaultValueWithTeamAndInternalValue<T>): value is DefaultValueWithTeamAndInternalValue<T> {
|
|
353
|
-
return ConfigValueValidators.isDefaultValueWithTeamValue(value) && 'internalDefaultValue' in value;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export interface BaseConfig<T> {
|
|
358
|
-
/**
|
|
359
|
-
* Key as it appears in settings.json minus the "github.copilot." prefix.
|
|
360
|
-
* e.g. "advanced.debug.overrideProxyUrl"
|
|
361
|
-
*/
|
|
362
|
-
readonly id: string;
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* This setting is present in package.json and is visible to the general public.
|
|
366
|
-
*/
|
|
367
|
-
readonly isPublic: boolean;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* The fully qualified id, e.g. "github.copilot.advanced.debug.overrideProxyUrl".
|
|
371
|
-
* Use this with `affectsConfiguration` from the ConfigurationChangeEvent
|
|
372
|
-
*/
|
|
373
|
-
readonly fullyQualifiedId: string;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* The `X` in `github.copilot.advanced.X` settings.
|
|
377
|
-
*/
|
|
378
|
-
readonly advancedSubKey: string | undefined;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* The default value (defined either in code for hidden settings, or in package.json for non-hidden settings)
|
|
382
|
-
*/
|
|
383
|
-
readonly defaultValue: T | DefaultValueWithTeamValue<T> | DefaultValueWithTeamAndInternalValue<T>;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Setting options
|
|
387
|
-
*/
|
|
388
|
-
readonly options?: ConfigOptions;
|
|
389
|
-
|
|
390
|
-
readonly validator?: IValidator<T>;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
export const enum ConfigType {
|
|
394
|
-
Simple,
|
|
395
|
-
ExperimentBased
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export interface ConfigOptions {
|
|
399
|
-
readonly internal?: boolean;
|
|
400
|
-
readonly valueIgnoredForExternals?: boolean;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
const INTERNAL: ConfigOptions = {
|
|
404
|
-
internal: true
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
const INTERNAL_RESTRICTED: ConfigOptions = {
|
|
408
|
-
internal: true,
|
|
409
|
-
valueIgnoredForExternals: true,
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
export interface Config<T> extends BaseConfig<T> {
|
|
413
|
-
readonly configType: ConfigType.Simple;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
export interface ExperimentBasedConfig<T extends ExperimentBasedConfigType> extends BaseConfig<T> {
|
|
417
|
-
readonly configType: ConfigType.ExperimentBased;
|
|
418
|
-
readonly experimentName: string | undefined;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
let packageJsonDefaults: Map<string, any> | undefined = undefined;
|
|
422
|
-
function getPackageJsonDefaults(): Map<string, any> {
|
|
423
|
-
if (!packageJsonDefaults) {
|
|
424
|
-
packageJsonDefaults = new Map<string, any>();
|
|
425
|
-
|
|
426
|
-
// Use the information in packageJson
|
|
427
|
-
const config = packageJson.contributes.configuration;
|
|
428
|
-
const propertyGroups = config.map((c) => c.properties);
|
|
429
|
-
const configProps = Object.assign({}, ...propertyGroups);
|
|
430
|
-
for (const key in configProps) {
|
|
431
|
-
packageJsonDefaults.set(key, configProps[key].default);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return packageJsonDefaults;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
function toBaseConfig<T>(key: string, defaultValue: T | DefaultValueWithTeamValue<T> | DefaultValueWithTeamAndInternalValue<T>, options: ConfigOptions | undefined): BaseConfig<T> {
|
|
438
|
-
const fullyQualifiedId = `${CopilotConfigPrefix}.${key}`;
|
|
439
|
-
const packageJsonDefaults = getPackageJsonDefaults();
|
|
440
|
-
const isPublic = packageJsonDefaults.has(fullyQualifiedId);
|
|
441
|
-
const packageJsonDefaultValue = packageJsonDefaults.get(fullyQualifiedId);
|
|
442
|
-
if (isPublic) {
|
|
443
|
-
// make sure the default in the code matches the default in packageJson
|
|
444
|
-
const publicDefaultValue = (
|
|
445
|
-
ConfigValueValidators.isDefaultValueWithTeamAndInternalValue(defaultValue)
|
|
446
|
-
? defaultValue.defaultValue
|
|
447
|
-
: ConfigValueValidators.isDefaultValueWithTeamValue(defaultValue)
|
|
448
|
-
? defaultValue.defaultValue
|
|
449
|
-
: defaultValue
|
|
450
|
-
);
|
|
451
|
-
if (!objects.equals(publicDefaultValue, packageJsonDefaultValue)) {
|
|
452
|
-
throw new BugIndicatingError(`The default value for setting ${key} is different in packageJson and in code`);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
if (isPublic && options?.internal) {
|
|
456
|
-
throw new BugIndicatingError(`The setting ${key} is public, it therefore cannot be marked internal!`);
|
|
457
|
-
}
|
|
458
|
-
if (isPublic && options?.valueIgnoredForExternals) {
|
|
459
|
-
throw new BugIndicatingError(`The setting ${key} is public, it therefore cannot be restricted to internal!`);
|
|
460
|
-
}
|
|
461
|
-
if (
|
|
462
|
-
ConfigValueValidators.isDefaultValueWithTeamAndInternalValue(defaultValue)
|
|
463
|
-
|| ConfigValueValidators.isDefaultValueWithTeamValue(defaultValue)
|
|
464
|
-
) {
|
|
465
|
-
const rolloutRatio = defaultValue?.teamDefaultValueRollout;
|
|
466
|
-
if (rolloutRatio !== undefined && (rolloutRatio < 0 || rolloutRatio > 1)) {
|
|
467
|
-
throw new BugIndicatingError(`The rollout ratio for setting ${key} is invalid`);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
const advancedSubKey = fullyQualifiedId.startsWith('github.copilot.advanced.') ? fullyQualifiedId.substring('github.copilot.advanced.'.length) : undefined;
|
|
471
|
-
return { id: key, isPublic, fullyQualifiedId, advancedSubKey, defaultValue, options };
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
class ConfigRegistry {
|
|
475
|
-
/**
|
|
476
|
-
* A map of all registered configs, keyed by their full id, eg `github.copilot.advanced.debug.overrideProxyUrl`.
|
|
477
|
-
*/
|
|
478
|
-
public readonly configs: Map<string, Config<any> | ExperimentBasedConfig<any>> = new Map();
|
|
479
|
-
|
|
480
|
-
registerConfig(config: Config<any> | ExperimentBasedConfig<any>): void {
|
|
481
|
-
this.configs.set(config.fullyQualifiedId, config);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
export const globalConfigRegistry = new ConfigRegistry();
|
|
486
|
-
|
|
487
|
-
function defineValidatedSetting<T>(key: string, validator: IValidator<T>, defaultValue: T | DefaultValueWithTeamValue<T> | DefaultValueWithTeamAndInternalValue<T>, options?: ConfigOptions): Config<T> {
|
|
488
|
-
const value: Config<T> = { ...toBaseConfig(key, defaultValue, options), configType: ConfigType.Simple, validator };
|
|
489
|
-
globalConfigRegistry.registerConfig(value);
|
|
490
|
-
return value;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
function defineSetting<T>(key: string, defaultValue: T | DefaultValueWithTeamValue<T> | DefaultValueWithTeamAndInternalValue<T>, options?: ConfigOptions): Config<T> {
|
|
494
|
-
const value: Config<T> = { ...toBaseConfig(key, defaultValue, options), configType: ConfigType.Simple };
|
|
495
|
-
globalConfigRegistry.registerConfig(value);
|
|
496
|
-
return value;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Will define a setting which will be backed by an experiment. The experiment variable will be:
|
|
501
|
-
* ```
|
|
502
|
-
* config.github.copilot.${key}
|
|
503
|
-
*
|
|
504
|
-
* e.g.
|
|
505
|
-
* config.github.copilot.chat.advanced.inlineEdits.internalRollout
|
|
506
|
-
* ```
|
|
507
|
-
*/
|
|
508
|
-
export function defineExpSetting<T extends ExperimentBasedConfigType>(key: string, defaultValue: T | DefaultValueWithTeamValue<T> | DefaultValueWithTeamAndInternalValue<T>, options?: ConfigOptions, expOptions?: { experimentName?: string }): ExperimentBasedConfig<T> {
|
|
509
|
-
const value: ExperimentBasedConfig<T> = { ...toBaseConfig(key, defaultValue, options), configType: ConfigType.ExperimentBased, experimentName: expOptions?.experimentName };
|
|
510
|
-
if (value.advancedSubKey) {
|
|
511
|
-
// This is a `github.copilot.advanced.*` setting
|
|
512
|
-
throw new BugIndicatingError('Shared settings cannot be experiment based');
|
|
513
|
-
}
|
|
514
|
-
globalConfigRegistry.registerConfig(value);
|
|
515
|
-
return value;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
// Max CAPI tool count limit
|
|
519
|
-
export const HARD_TOOL_LIMIT = 128;
|
|
520
|
-
|
|
521
|
-
// WARNING
|
|
522
|
-
// These values are used in the request and are case sensitive. Do not change them unless advised by CAPI.
|
|
523
|
-
// It is also not recommended to use this as a type as it will never be an exhaustive list
|
|
524
|
-
export const enum CHAT_MODEL {
|
|
525
|
-
GPT41 = 'gpt-4.1-2025-04-14',
|
|
526
|
-
GPT4OMINI = 'gpt-4o-mini',
|
|
527
|
-
NES_XTAB = 'copilot-nes-xtab', // xtab model hosted in prod in proxy
|
|
528
|
-
CUSTOM_NES = 'custom-nes',
|
|
529
|
-
XTAB_4O_MINI_FINETUNED = 'xtab-4o-mini-finetuned',
|
|
530
|
-
GPT4OPROXY = 'gpt-4o-instant-apply-full-ft-v66',
|
|
531
|
-
SHORT_INSTANT_APPLY = 'gpt-4o-instant-apply-full-ft-v66-short',
|
|
532
|
-
CLAUDE_SONNET = 'claude-3.5-sonnet',
|
|
533
|
-
CLAUDE_37_SONNET = 'claude-3.7-sonnet',
|
|
534
|
-
DEEPSEEK_CHAT = 'deepseek-chat',
|
|
535
|
-
GEMINI_25_PRO = 'gemini-2.5-pro',
|
|
536
|
-
GEMINI_20_PRO = 'gemini-2.0-pro-exp-02-05',
|
|
537
|
-
GEMINI_FLASH = 'gemini-2.0-flash-001',
|
|
538
|
-
O1 = 'o1',
|
|
539
|
-
O3MINI = 'o3-mini',
|
|
540
|
-
O1MINI = 'o1-mini',
|
|
541
|
-
// A placeholder model that is used for just quickly testing new Azure endpoints.
|
|
542
|
-
// This model is not intended to be used for any real work.
|
|
543
|
-
EXPERIMENTAL = 'experimental-01'
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
export enum AuthProviderId {
|
|
547
|
-
GitHub = 'github',
|
|
548
|
-
GitHubEnterprise = 'github-enterprise',
|
|
549
|
-
Microsoft = 'microsoft',
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export enum AuthPermissionMode {
|
|
553
|
-
Default = 'default',
|
|
554
|
-
Minimal = 'minimal'
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
export type CodeGenerationImportInstruction = { language?: string; file: string };
|
|
558
|
-
export type CodeGenerationTextInstruction = { language?: string; text: string };
|
|
559
|
-
export type CodeGenerationInstruction = CodeGenerationImportInstruction | CodeGenerationTextInstruction;
|
|
560
|
-
|
|
561
|
-
export type CommitMessageGenerationInstruction = { file: string } | { text: string };
|
|
562
|
-
|
|
563
|
-
export const XTabProviderId = 'XtabProvider';
|
|
564
|
-
|
|
565
|
-
export namespace ConfigKey {
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* These settings are defined in the completions extensions and shared.
|
|
569
|
-
*
|
|
570
|
-
* We should not change the names of these settings without coordinating with Completions extension.
|
|
571
|
-
*/
|
|
572
|
-
export namespace Shared {
|
|
573
|
-
/** Allows for overriding the base domain we use for making requests to the CAPI. This helps CAPI devs develop against a local instance. */
|
|
574
|
-
export const DebugOverrideProxyUrl = defineSetting<string | undefined>('advanced.debug.overrideProxyUrl', undefined, INTERNAL_RESTRICTED);
|
|
575
|
-
export const DebugOverrideCAPIUrl = defineSetting<string | undefined>('advanced.debug.overrideCapiUrl', undefined, INTERNAL_RESTRICTED);
|
|
576
|
-
export const DebugUseNodeFetchFetcher = defineSetting('advanced.debug.useNodeFetchFetcher', true);
|
|
577
|
-
export const DebugUseNodeFetcher = defineSetting('advanced.debug.useNodeFetcher', false);
|
|
578
|
-
export const DebugUseElectronFetcher = defineSetting('advanced.debug.useElectronFetcher', true);
|
|
579
|
-
export const AuthProvider = defineSetting<AuthProviderId>('advanced.authProvider', AuthProviderId.GitHub);
|
|
580
|
-
export const AuthPermissions = defineSetting<AuthPermissionMode>('advanced.authPermissions', AuthPermissionMode.Default);
|
|
581
|
-
export const Enable = defineSetting<{ [key: string]: boolean }>('enable', {
|
|
582
|
-
"*": true,
|
|
583
|
-
"plaintext": false,
|
|
584
|
-
"markdown": false,
|
|
585
|
-
"scminput": false
|
|
586
|
-
});
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* Internal and debugging settings that should be hidden from users.
|
|
592
|
-
*
|
|
593
|
-
* Features should only be in this list temporarily, moving on to experimental to be accessible to early adopters.
|
|
594
|
-
*/
|
|
595
|
-
export namespace Internal {
|
|
596
|
-
/** Allows forcing a particular model.
|
|
597
|
-
* Note: this should not be used while self-hosting because it might lead to
|
|
598
|
-
* a fundamental different experience compared to our end-users.
|
|
599
|
-
*/
|
|
600
|
-
export const DebugOverrideChatEngine = defineSetting<string | undefined>('chat.advanced.debug.overrideChatEngine', undefined, INTERNAL_RESTRICTED);
|
|
601
|
-
/** Allows forcing a particular context window size.
|
|
602
|
-
* This setting doesn't validate values so large windows may not be supported by the model.
|
|
603
|
-
* Note: this should not be used while self-hosting because it might lead to
|
|
604
|
-
* a fundamental different experience compared to our end-users.
|
|
605
|
-
*/
|
|
606
|
-
export const DebugOverrideChatMaxTokenNum = defineSetting('chat.advanced.debug.overrideChatMaxTokenNum', 0, INTERNAL_RESTRICTED);
|
|
607
|
-
/** Allow reporting issue when clicking on the Unhelpful button
|
|
608
|
-
* Requires a window reload to take effect
|
|
609
|
-
*/
|
|
610
|
-
export const DebugReportFeedback = defineSetting('chat.advanced.debug.reportFeedback', { defaultValue: false, teamDefaultValue: true }, INTERNAL_RESTRICTED);
|
|
611
|
-
export const DebugCollectFetcherTelemetry = defineExpSetting<boolean>('chat.advanced.debug.collectFetcherTelemetry', true, INTERNAL_RESTRICTED);
|
|
612
|
-
export const GitHistoryRelatedFilesUsingEmbeddings = defineSetting('chat.advanced.suggestRelatedFilesFromGitHistory.useEmbeddings', false);
|
|
613
|
-
|
|
614
|
-
/** Uses new expanded project labels */
|
|
615
|
-
export const ProjectLabelsExpanded = defineExpSetting<boolean>('chat.advanced.projectLabels.expanded', false, INTERNAL);
|
|
616
|
-
/** Add project labels in default agent */
|
|
617
|
-
export const ProjectLabelsChat = defineExpSetting<boolean>('chat.advanced.projectLabels.chat', false, INTERNAL);
|
|
618
|
-
/** Add project labels in default agent */
|
|
619
|
-
export const ProjectLabelsInline = defineExpSetting<boolean>('chat.advanced.projectLabels.inline', false, INTERNAL);
|
|
620
|
-
export const WorkspaceMaxLocalIndexSize = defineExpSetting<number>('chat.advanced.workspace.maxLocalIndexSize', 100_000, INTERNAL);
|
|
621
|
-
export const WorkspaceEnableFullWorkspace = defineExpSetting<boolean>('chat.advanced.workspace.enableFullWorkspace', true, INTERNAL);
|
|
622
|
-
export const WorkspaceEnableCodeSearch = defineExpSetting<boolean>('chat.advanced.workspace.enableCodeSearch', true, INTERNAL);
|
|
623
|
-
export const WorkspaceEnableEmbeddingsSearch = defineExpSetting<boolean>('chat.advanced.workspace.enableEmbeddingsSearch', true, INTERNAL);
|
|
624
|
-
export const WorkspaceUseCodeSearchInstantIndexing = defineExpSetting<boolean>('chat.advanced.workspace.useCodeSearchInstantIndexing', true, INTERNAL);
|
|
625
|
-
export const WorkspacePreferredEmbeddingsModel = defineExpSetting<string>('chat.advanced.workspace.preferredEmbeddingsModel', '', INTERNAL);
|
|
626
|
-
export const WorkspaceEnableAdoCodeSearch = defineExpSetting<boolean>('chat.advanced.workspace.enabledAdoCodeSearch', true, INTERNAL);
|
|
627
|
-
export const WorkspacePrototypeAdoCodeSearchEndpointOverride = defineSetting<string>('chat.advanced.workspace.prototypeAdoCodeSearchEndpointOverride', '', INTERNAL);
|
|
628
|
-
export const FeedbackOnChange = defineSetting('chat.advanced.feedback.onChange', false, INTERNAL);
|
|
629
|
-
export const ReviewIntent = defineSetting('chat.advanced.review.intent', false, INTERNAL);
|
|
630
|
-
/** Enable the new notebook priorities experiment */
|
|
631
|
-
export const NotebookSummaryExperimentEnabled = defineSetting('chat.advanced.notebook.summaryExperimentEnabled', false, INTERNAL);
|
|
632
|
-
/** Enable filtering variables by cell document symbols */
|
|
633
|
-
export const NotebookVariableFilteringEnabled = defineSetting('chat.advanced.notebook.variableFilteringEnabled', false, INTERNAL);
|
|
634
|
-
export const NotebookAlternativeDocumentFormat = defineExpSetting<AlternativeNotebookFormat>('chat.advanced.notebook.alternativeFormat', AlternativeNotebookFormat.xml, INTERNAL);
|
|
635
|
-
export const UseAlternativeNESNotebookFormat = defineExpSetting<boolean>('chat.advanced.notebook.alternativeNESFormat.enabled', false, INTERNAL);
|
|
636
|
-
export const TerminalToDebuggerPatterns = defineSetting<string[]>('chat.advanced.debugTerminalCommandPatterns', [], INTERNAL);
|
|
637
|
-
export const InlineEditsIgnoreCompletionsDisablement = defineValidatedSetting<boolean>('chat.advanced.inlineEdits.ignoreCompletionsDisablement', vBoolean(), false, INTERNAL_RESTRICTED);
|
|
638
|
-
export const InlineEditsAsyncCompletions = defineExpSetting<boolean>('chat.advanced.inlineEdits.asyncCompletions', true, INTERNAL_RESTRICTED);
|
|
639
|
-
export const InlineEditsRevisedCacheStrategy = defineExpSetting<boolean>('chat.advanced.inlineEdits.revisedCacheStrategy', true, INTERNAL_RESTRICTED);
|
|
640
|
-
export const InlineEditsCacheTracksRejections = defineExpSetting<boolean>('chat.advanced.inlineEdits.cacheTracksRejections', true, INTERNAL_RESTRICTED);
|
|
641
|
-
export const InlineEditsRecentlyShownCacheEnabled = defineExpSetting<boolean>('chat.advanced.inlineEdits.recentlyShownCacheEnabled', false, INTERNAL_RESTRICTED);
|
|
642
|
-
export const InlineEditsDebounceUseCoreRequestTime = defineExpSetting<boolean>('chat.advanced.inlineEdits.debounceUseCoreRequestTime', false, INTERNAL_RESTRICTED);
|
|
643
|
-
export const InlineEditsYieldToCopilot = defineExpSetting<boolean>('chat.advanced.inlineEdits.yieldToCopilot', false, INTERNAL_RESTRICTED);
|
|
644
|
-
export const InlineEditsExcludedProviders = defineExpSetting<string | undefined>('chat.advanced.inlineEdits.excludedProviders', undefined, INTERNAL_RESTRICTED);
|
|
645
|
-
export const InlineEditsEnableCompletionsProvider = defineExpSetting<boolean>('chat.advanced.inlineEdits.completionsProvider.enabled', false, INTERNAL_RESTRICTED);
|
|
646
|
-
export const InlineEditsEnableGhCompletionsProvider = defineExpSetting<boolean>('chat.advanced.inlineEdits.githubCompletionsProvider.enabled', false, INTERNAL_RESTRICTED);
|
|
647
|
-
export const InlineEditsCompletionsUrl = defineExpSetting<string | undefined>('chat.advanced.inlineEdits.completionsProvider.url', undefined, INTERNAL_RESTRICTED);
|
|
648
|
-
export const InlineEditsLogContextRecorderEnabled = defineSetting('chat.advanced.inlineEdits.logContextRecorder.enabled', false, INTERNAL_RESTRICTED);
|
|
649
|
-
export const InlineEditsDebounce = defineExpSetting<number>('chat.advanced.inlineEdits.debounce', 200, INTERNAL_RESTRICTED);
|
|
650
|
-
export const InlineEditsCacheDelay = defineExpSetting<number>('chat.advanced.inlineEdits.cacheDelay', 300, INTERNAL_RESTRICTED);
|
|
651
|
-
export const InlineEditsBackoffDebounceEnabled = defineExpSetting<boolean>('chat.advanced.inlineEdits.backoffDebounceEnabled', true, INTERNAL_RESTRICTED);
|
|
652
|
-
export const InlineEditsExtraDebounceEndOfLine = defineExpSetting<number>('chat.advanced.inlineEdits.extraDebounceEndOfLine', 0, INTERNAL_RESTRICTED);
|
|
653
|
-
export const InlineEditsDebounceOnSelectionChange = defineExpSetting<number | undefined>('chat.advanced.inlineEdits.debounceOnSelectionChange', undefined, INTERNAL_RESTRICTED);
|
|
654
|
-
export const InlineEditsProviderId = defineExpSetting<string | undefined>('chat.advanced.inlineEdits.providerId', undefined, INTERNAL_RESTRICTED);
|
|
655
|
-
export const InlineEditsHideInternalInterface = defineValidatedSetting<boolean>('chat.advanced.inlineEdits.hideInternalInterface', vBoolean(), false, INTERNAL_RESTRICTED);
|
|
656
|
-
export const InlineEditsLogCancelledRequests = defineValidatedSetting<boolean>('chat.advanced.inlineEdits.logCancelledRequests', vBoolean(), false, INTERNAL_RESTRICTED);
|
|
657
|
-
export const InlineEditsUnification = defineExpSetting<boolean>('chat.advanced.inlineEdits.unification', false, INTERNAL_RESTRICTED);
|
|
658
|
-
export const InlineEditsXtabProviderUrl = defineValidatedSetting<string | undefined>('chat.advanced.inlineEdits.xtabProvider.url', vString(), undefined, INTERNAL_RESTRICTED);
|
|
659
|
-
export const InlineEditsXtabProviderApiKey = defineValidatedSetting<string | undefined>('chat.advanced.inlineEdits.xtabProvider.apiKey', vString(), undefined, INTERNAL_RESTRICTED);
|
|
660
|
-
export const InlineEditsXtabProviderModelName = defineExpSetting<string | undefined>('chat.advanced.inlineEdits.xtabProvider.modelName', undefined, INTERNAL_RESTRICTED);
|
|
661
|
-
export const InlineEditsInlineCompletionsEnabled = defineValidatedSetting<boolean>('chat.advanced.inlineEdits.inlineCompletions.enabled', vBoolean(), true, INTERNAL_RESTRICTED);
|
|
662
|
-
export const InlineEditsXtabProviderUsePrediction = defineValidatedSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.usePrediction', vBoolean(), true, INTERNAL_RESTRICTED);
|
|
663
|
-
export const InlineEditsXtabProviderUseVaryingLinesAbove = defineExpSetting<boolean | undefined>('chat.advanced.inlineEdits.xtabProvider.useVaryingLinesAbove', undefined, INTERNAL_RESTRICTED);
|
|
664
|
-
export const InlineEditsXtabProviderNLinesAbove = defineExpSetting<number | undefined>('chat.advanced.inlineEdits.xtabProvider.nLinesAbove', undefined, INTERNAL_RESTRICTED);
|
|
665
|
-
export const InlineEditsXtabProviderNLinesBelow = defineExpSetting<number | undefined>('chat.advanced.inlineEdits.xtabProvider.nLinesBelow', undefined, INTERNAL_RESTRICTED);
|
|
666
|
-
export const InlineEditsXtabProviderRetryWithNMoreLinesBelow = defineExpSetting<number | undefined>('chat.advanced.inlineEdits.xtabProvider.retryWithNMoreLinesBelow', undefined, INTERNAL_RESTRICTED);
|
|
667
|
-
export const InlineEditsAutoExpandEditWindowLines = defineExpSetting<number | undefined>('chat.advanced.inlineEdits.autoExpandEditWindowLines', undefined, INTERNAL_RESTRICTED);
|
|
668
|
-
export const InlineEditsXtabNRecentlyViewedDocuments = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.nRecentlyViewedDocuments', xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.nDocuments, INTERNAL_RESTRICTED);
|
|
669
|
-
export const InlineEditsXtabRecentlyViewedDocumentsMaxTokens = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.maxTokens', xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.maxTokens, INTERNAL_RESTRICTED);
|
|
670
|
-
export const InlineEditsXtabDiffNEntries = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.diffNEntries', xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.nEntries, INTERNAL_RESTRICTED);
|
|
671
|
-
export const InlineEditsXtabDiffMaxTokens = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.diffMaxTokens', xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.maxTokens, INTERNAL_RESTRICTED);
|
|
672
|
-
export const InlineEditsXtabProviderEmitFastCursorLineChange = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.emitFastCursorLineChange', true, INTERNAL_RESTRICTED);
|
|
673
|
-
export const InlineEditsXtabIncludeViewedFiles = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.includeViewedFiles', xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.includeViewedFiles, INTERNAL_RESTRICTED);
|
|
674
|
-
export const InlineEditsXtabPageSize = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.pageSize', xtabPromptOptions.DEFAULT_OPTIONS.pagedClipping.pageSize, INTERNAL_RESTRICTED);
|
|
675
|
-
export const InlineEditsXtabIncludeTagsInCurrentFile = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.includeTagsInCurrentFile', xtabPromptOptions.DEFAULT_OPTIONS.currentFile.includeTags, INTERNAL_RESTRICTED);
|
|
676
|
-
export const InlineEditsXtabCurrentFileMaxTokens = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.currentFileMaxTokens', xtabPromptOptions.DEFAULT_OPTIONS.currentFile.maxTokens, INTERNAL_RESTRICTED);
|
|
677
|
-
export const InlineEditsXtabPrioritizeAboveCursor = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.currentFile.prioritizeAboveCursor', xtabPromptOptions.DEFAULT_OPTIONS.currentFile.prioritizeAboveCursor, INTERNAL_RESTRICTED);
|
|
678
|
-
export const InlineEditsXtabDiffOnlyForDocsInPrompt = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.diffOnlyForDocsInPrompt', xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.onlyForDocsInPrompt, INTERNAL_RESTRICTED);
|
|
679
|
-
export const InlineEditsXtabDiffUseRelativePaths = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.diffUseRelativePaths', xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.useRelativePaths, INTERNAL_RESTRICTED);
|
|
680
|
-
export const InlineEditsXtabNNonSignificantLinesToConverge = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.nNonSignificantLinesToConverge', ResponseProcessor.DEFAULT_DIFF_PARAMS.nLinesToConverge, INTERNAL_RESTRICTED);
|
|
681
|
-
export const InlineEditsXtabNSignificantLinesToConverge = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.nSignificantLinesToConverge', ResponseProcessor.DEFAULT_DIFF_PARAMS.nSignificantLinesToConverge, INTERNAL_RESTRICTED);
|
|
682
|
-
export const InlineEditsXtabLanguageContextEnabled = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.languageContext.enabled', xtabPromptOptions.DEFAULT_OPTIONS.languageContext.enabled, INTERNAL_RESTRICTED);
|
|
683
|
-
export const InlineEditsXtabLanguageContextEnabledLanguages = defineSetting<LanguageContextLanguages>('chat.advanced.inlineEdits.xtabProvider.languageContext.enabledLanguages', LANGUAGE_CONTEXT_ENABLED_LANGUAGES, INTERNAL_RESTRICTED);
|
|
684
|
-
export const InlineEditsXtabLanguageContextMaxTokens = defineExpSetting<number>('chat.advanced.inlineEdits.xtabProvider.languageContext.maxTokens', xtabPromptOptions.DEFAULT_OPTIONS.languageContext.maxTokens, INTERNAL_RESTRICTED);
|
|
685
|
-
export const InlineEditsXtabUseUnifiedModel = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.useUnifiedModel', false, INTERNAL_RESTRICTED);
|
|
686
|
-
export const InlineEditsXtabProviderUseSimplifiedPrompt = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.simplifiedPrompt', false, INTERNAL_RESTRICTED);
|
|
687
|
-
export const InlineEditsXtabProviderUseXtab275Prompting = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.xtab275Prompting', false, INTERNAL_RESTRICTED);
|
|
688
|
-
export const InlineEditsXtabUseNes41Miniv3Prompting = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.useNes41Miniv3Prompting', false, INTERNAL_RESTRICTED);
|
|
689
|
-
export const InlineEditsXtabCodexV21NesUnified = defineExpSetting<boolean>('chat.advanced.inlineEdits.xtabProvider.codexv21nesUnified', false, INTERNAL_RESTRICTED);
|
|
690
|
-
export const InlineEditsDiagnosticsExplorationEnabled = defineSetting<boolean | undefined>('chat.advanced.inlineEdits.inlineEditsDiagnosticsExplorationEnabled', false, INTERNAL_RESTRICTED);
|
|
691
|
-
export const EditSourceTrackingShowDecorations = defineSetting('chat.advanced.editSourceTracking.showDecorations', false, INTERNAL);
|
|
692
|
-
export const EditSourceTrackingShowStatusBar = defineSetting('chat.advanced.editSourceTracking.showStatusBar', false, INTERNAL);
|
|
693
|
-
export const WorkspaceRecordingEnabled = defineSetting('chat.advanced.localWorkspaceRecording.enabled', false, INTERNAL);
|
|
694
|
-
export const EditRecordingEnabled = defineSetting('chat.advanced.editRecording.enabled', false, INTERNAL);
|
|
695
|
-
export const InternalWelcomeHintEnabled = defineSetting('chat.advanced.welcomePageHint.enabled', { defaultValue: false, internalDefaultValue: true, teamDefaultValue: true }, INTERNAL_RESTRICTED);
|
|
696
|
-
/** Configure temporal context max age */
|
|
697
|
-
export const TemporalContextMaxAge = defineExpSetting<number>('chat.advanced.temporalContext.maxAge', 100, INTERNAL);
|
|
698
|
-
export const TemporalContextPreferSameLang = defineExpSetting<boolean>('chat.advanced.temporalContext.preferSameLang', false, INTERNAL);
|
|
699
|
-
export const CodeSearchAgentEnabled = defineSetting<boolean | undefined>('chat.advanced.codesearch.agent.enabled', true, INTERNAL_RESTRICTED);
|
|
700
|
-
export const EditLinkification = defineSetting<boolean | undefined>('chat.advanced.edits.linkification', undefined, INTERNAL_RESTRICTED);
|
|
701
|
-
export const AgentTemperature = defineSetting<number | undefined>('chat.advanced.agent.temperature', undefined, INTERNAL_RESTRICTED);
|
|
702
|
-
|
|
703
|
-
export const InlineChatUseCodeMapper = defineSetting<boolean>('chat.advanced.inlineChat.useCodeMapper', false, INTERNAL_RESTRICTED);
|
|
704
|
-
export const InstantApplyModelName = defineExpSetting<string>('chat.advanced.instantApply.modelName', 'gpt-4o-instant-apply-full-ft-v66', INTERNAL_RESTRICTED);
|
|
705
|
-
export const InstantApplyShortModelName = defineExpSetting<string>('chat.advanced.instantApply.shortContextModelName', CHAT_MODEL.SHORT_INSTANT_APPLY, INTERNAL);
|
|
706
|
-
export const InstantApplyShortContextLimit = defineExpSetting<number>('chat.advanced.instantApply.shortContextLimit', 8000, INTERNAL);
|
|
707
|
-
|
|
708
|
-
export const EnableUserPreferences = defineSetting<boolean>('chat.advanced.enableUserPreferences', false, INTERNAL_RESTRICTED);
|
|
709
|
-
|
|
710
|
-
export const SweBenchAgentPrompt = defineSetting<boolean>('chat.advanced.swebench.agentPrompt', false, INTERNAL_RESTRICTED);
|
|
711
|
-
|
|
712
|
-
export const SummarizeAgentConversationHistoryThreshold = defineSetting<number | undefined>('chat.advanced.summarizeAgentConversationHistoryThreshold', undefined, INTERNAL_RESTRICTED);
|
|
713
|
-
export const AgentHistorySummarizationMode = defineSetting<string | undefined>('chat.advanced.agentHistorySummarizationMode', undefined, INTERNAL_RESTRICTED);
|
|
714
|
-
export const AgentHistorySummarizationWithPromptCache = defineExpSetting<boolean | undefined>('chat.advanced.agentHistorySummarizationWithPromptCache', false, INTERNAL_RESTRICTED);
|
|
715
|
-
export const AgentHistorySummarizationForceGpt41 = defineExpSetting<boolean | undefined>('chat.advanced.agentHistorySummarizationForceGpt41', false, INTERNAL_RESTRICTED);
|
|
716
|
-
export const UseResponsesApi = defineExpSetting<boolean | undefined>('chat.advanced.useResponsesApi', false, INTERNAL_RESTRICTED);
|
|
717
|
-
export const UseResponsesApiTruncation = defineSetting<boolean | undefined>('chat.advanced.useResponsesApiTruncation', false, INTERNAL_RESTRICTED);
|
|
718
|
-
export const ResponsesApiReasoning = defineSetting<boolean | string | undefined>('chat.advanced.responsesApiReasoning', false, INTERNAL_RESTRICTED);
|
|
719
|
-
|
|
720
|
-
export const EnableChatImageUpload = defineExpSetting<boolean>('chat.advanced.imageUpload', false, INTERNAL);
|
|
721
|
-
|
|
722
|
-
export const EnableReadFileV2 = defineExpSetting<boolean>('chat.advanced.enableReadFileV2', isPreRelease, INTERNAL_RESTRICTED);
|
|
723
|
-
export const AskAgent = defineExpSetting<boolean>('chat.advanced.enableAskAgent', { defaultValue: false, teamDefaultValue: true, internalDefaultValue: true }, INTERNAL_RESTRICTED);
|
|
724
|
-
export const VerifyTextDocumentChanges = defineExpSetting<boolean>('chat.advanced.inlineEdits.verifyTextDocumentChanges', true, INTERNAL_RESTRICTED);
|
|
725
|
-
export const OmitBaseAgentInstructions = defineSetting<boolean>('chat.advanced.omitBaseAgentInstructions', false, INTERNAL);
|
|
726
|
-
|
|
727
|
-
export const PromptFileContext = defineExpSetting<boolean>('chat.advanced.promptFileContextProvider.enabled', true);
|
|
728
|
-
export const MultiReplaceString = defineExpSetting<boolean>('chat.advanced.multiReplaceString.enabled', false, INTERNAL);
|
|
729
|
-
export const Gpt5ApplyPatchExclusively = defineExpSetting<boolean>('chat.advanced.gpt5ApplyPatchExclusively.enabled', false, INTERNAL);
|
|
730
|
-
|
|
731
|
-
export const EnableClaudeCodeAgent = defineSetting<boolean | string | undefined>('chat.advanced.claudeCode.enabled', false, INTERNAL);
|
|
732
|
-
export const ClaudeCodeDebugEnabled = defineSetting<boolean>('chat.advanced.claudeCode.debug', false, INTERNAL);
|
|
733
|
-
export const TaskToolsEnabled = defineSetting<boolean>('chat.advanced.taskTools.enabled', true);
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
export const AgentThinkingTool = defineSetting<boolean>('chat.agent.thinkingTool', false);
|
|
737
|
-
|
|
738
|
-
/** Add context from recently used files */
|
|
739
|
-
export const TemporalContextInlineChatEnabled = defineExpSetting<boolean>('chat.editor.temporalContext.enabled', false);
|
|
740
|
-
export const TemporalContextEditsEnabled = defineExpSetting<boolean>('chat.edits.temporalContext.enabled', false);
|
|
741
|
-
/** User provided code generation instructions for the chat */
|
|
742
|
-
export const CodeGenerationInstructions = defineSetting('chat.codeGeneration.instructions', [] as CodeGenerationInstruction[]);
|
|
743
|
-
export const TestGenerationInstructions = defineSetting('chat.testGeneration.instructions', [] as CodeGenerationInstruction[]);
|
|
744
|
-
export const CommitMessageGenerationInstructions = defineSetting('chat.commitMessageGeneration.instructions', [] as CommitMessageGenerationInstruction[]);
|
|
745
|
-
export const PullRequestDescriptionGenerationInstructions = defineSetting('chat.pullRequestDescriptionGeneration.instructions', [] as CommitMessageGenerationInstruction[]);
|
|
746
|
-
/** Show code lens "Generate tests" when we have test coverage info about this symbol and it's not covered */
|
|
747
|
-
export const GenerateTestsCodeLens = defineSetting('chat.generateTests.codeLens', false);
|
|
748
|
-
/** Whether new flows around setting up tests are enabled */
|
|
749
|
-
export const SetupTests = defineSetting<boolean>('chat.setupTests.enabled', true);
|
|
750
|
-
/** Whether the Copilot TypeScript context provider is enabled and if how */
|
|
751
|
-
export const TypeScriptLanguageContext = defineExpSetting<boolean>('chat.languageContext.typescript.enabled', false);
|
|
752
|
-
export const TypeScriptLanguageContextCacheTimeout = defineExpSetting<number>('chat.languageContext.typescript.cacheTimeout', 500);
|
|
753
|
-
export const TypeScriptLanguageContextFix = defineExpSetting<boolean>('chat.languageContext.fix.typescript.enabled', false);
|
|
754
|
-
export const TypeScriptLanguageContextInline = defineExpSetting<boolean>('chat.languageContext.inline.typescript.enabled', false);
|
|
755
|
-
/** Enables the start debugging intent */
|
|
756
|
-
export const StartDebuggingIntent = defineSetting('chat.startDebugging.enabled', true);
|
|
757
|
-
export const UseInstructionFiles = defineSetting('chat.codeGeneration.useInstructionFiles', true);
|
|
758
|
-
export const CodeFeedback = defineSetting('chat.reviewSelection.enabled', true);
|
|
759
|
-
export const CodeFeedbackInstructions = defineSetting('chat.reviewSelection.instructions', [] as CodeGenerationInstruction[]);
|
|
760
|
-
|
|
761
|
-
export const UseProjectTemplates = defineSetting('chat.useProjectTemplates', true);
|
|
762
|
-
export const ExplainScopeSelection = defineSetting('chat.scopeSelection', false);
|
|
763
|
-
export const EnableCodeActions = defineSetting('editor.enableCodeActions', true);
|
|
764
|
-
export const LocaleOverride = defineSetting('chat.localeOverride', 'auto');
|
|
765
|
-
export const TerminalChatLocation = defineSetting('chat.terminalChatLocation', 'chatView');
|
|
766
|
-
export const AutomaticRenameSuggestions = defineSetting('renameSuggestions.triggerAutomatically', true);
|
|
767
|
-
export const GitHistoryRelatedFilesProvider = defineSetting('chat.edits.suggestRelatedFilesFromGitHistory', true);
|
|
768
|
-
export const Test2SrcRelatedFilesProvider = defineSetting('chat.edits.suggestRelatedFilesForTests', true);
|
|
769
|
-
export const TerminalToDebuggerEnabled = defineSetting('chat.copilotDebugCommand.enabled', true);
|
|
770
|
-
export const CodeSearchAgentEnabled = defineSetting<boolean>('chat.codesearch.enabled', false);
|
|
771
|
-
export const InlineEditsEnabled = defineExpSetting<boolean>('nextEditSuggestions.enabled', { defaultValue: false, teamDefaultValue: true });
|
|
772
|
-
export const InlineEditsEnableDiagnosticsProvider = defineExpSetting<boolean>('nextEditSuggestions.fixes', { defaultValue: true, teamDefaultValue: true });
|
|
773
|
-
export const InlineEditsAllowWhitespaceOnlyChanges = defineExpSetting<boolean>('nextEditSuggestions.allowWhitespaceOnlyChanges', true);
|
|
774
|
-
export const NewWorkspaceCreationAgentEnabled = defineSetting<boolean>('chat.newWorkspaceCreation.enabled', true);
|
|
775
|
-
export const NewWorkspaceUseContext7 = defineSetting<boolean>('chat.newWorkspace.useContext7', false);
|
|
776
|
-
export const SummarizeAgentConversationHistory = defineExpSetting<boolean>('chat.summarizeAgentConversationHistory.enabled', true);
|
|
777
|
-
export const VirtualToolThreshold = defineExpSetting<number>('chat.virtualTools.threshold', HARD_TOOL_LIMIT);
|
|
778
|
-
export const CurrentEditorAgentContext = defineSetting<boolean>('chat.agent.currentEditorContext.enabled', true);
|
|
779
|
-
/** BYOK */
|
|
780
|
-
export const OllamaEndpoint = defineSetting<string>('chat.byok.ollamaEndpoint', 'http://localhost:11434');
|
|
781
|
-
export const AzureModels = defineSetting<Record<string, { name: string; url: string; toolCalling: boolean; vision: boolean; maxInputTokens: number; maxOutputTokens: number; requiresAPIKey?: boolean; thinking?: boolean }>>('chat.azureModels', {});
|
|
782
|
-
export const CustomOAIModels = defineSetting<Record<string, { name: string; url: string; toolCalling: boolean; vision: boolean; maxInputTokens: number; maxOutputTokens: number; requiresAPIKey?: boolean; thinking?: boolean }>>('chat.customOAIModels', {});
|
|
783
|
-
export const AutoFixDiagnostics = defineSetting<boolean>('chat.agent.autoFix', true);
|
|
784
|
-
export const NotebookFollowCellExecution = defineSetting<boolean>('chat.notebook.followCellExecution.enabled', false);
|
|
785
|
-
export const UseAlternativeNESNotebookFormat = defineExpSetting<boolean>('chat.notebook.enhancedNextEditSuggestions.enabled', false);
|
|
786
|
-
export const CustomInstructionsInSystemMessage = defineSetting<boolean>('chat.customInstructionsInSystemMessage', true);
|
|
787
|
-
|
|
788
|
-
export const EnableAlternateGptPrompt = defineExpSetting<boolean>('chat.alternateGptPrompt.enabled', false);
|
|
789
|
-
export const Gpt5AlternatePrompt = defineExpSetting<string>('chat.gpt5AlternatePrompt', 'default');
|
|
790
|
-
export const GrokCodeAlternatePrompt = defineExpSetting<string>('chat.grokCodeAlternatePrompt', 'default');
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
export function getAllConfigKeys(): string[] {
|
|
794
|
-
return Object.values(ConfigKey).flatMap(namespace =>
|
|
795
|
-
Object.values(namespace).map(setting => setting.fullyQualifiedId)
|
|
796
|
-
);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
const nextEditProviderIds: string[] = [];
|
|
800
|
-
export function registerNextEditProviderId(providerId: string): string {
|
|
801
|
-
nextEditProviderIds.push(providerId);
|
|
802
|
-
return providerId;
|
|
803
|
-
}
|