@codingame/monaco-vscode-api 37.1.0 → 37.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/missing-services.js +6 -26
- package/package.json +8 -8
- package/services.d.ts +1 -1
- package/services.js +3 -3
- package/tools.d.ts +4 -0
- package/tools.js +24 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
- package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.d.ts +81 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +97 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { URI } from "../../../../base/common/uri.js";
|
|
2
|
-
import { RawContextKey } from "../../../../platform/contextkey/common/contextkey.js";
|
|
3
|
-
import { CancellationToken } from "../../../../base/common/cancellation.js";
|
|
4
|
-
export declare const CHAT_DEBUG_HAS_ACTIVE_SESSION: RawContextKey<boolean>;
|
|
5
|
-
export declare const CHAT_DEBUG_ACTIVE_SESSION_IS_AGENT_HOST: RawContextKey<boolean>;
|
|
6
|
-
/**
|
|
7
|
-
* The severity level of a chat debug log event.
|
|
8
|
-
*/
|
|
9
|
-
export declare enum ChatDebugLogLevel {
|
|
10
|
-
Trace = 0,
|
|
11
|
-
Info = 1,
|
|
12
|
-
Warning = 2,
|
|
13
|
-
Error = 3
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The result of a hook execution.
|
|
17
|
-
*/
|
|
18
|
-
export declare enum ChatDebugHookResult {
|
|
19
|
-
/** The hook executed successfully (exit code 0). */
|
|
20
|
-
Success = 0,
|
|
21
|
-
/** The hook returned a blocking error (exit code 2). */
|
|
22
|
-
Error = 1,
|
|
23
|
-
/** The hook returned a non-blocking warning (other non-zero exit codes). */
|
|
24
|
-
NonBlockingError = 2
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Common properties shared by all chat debug event types.
|
|
28
|
-
*/
|
|
29
|
-
export interface IChatDebugEventCommon {
|
|
30
|
-
readonly id?: string;
|
|
31
|
-
readonly sessionResource: URI;
|
|
32
|
-
readonly created: Date;
|
|
33
|
-
readonly parentEventId?: string;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* A tool call event in the chat debug log.
|
|
37
|
-
*/
|
|
38
|
-
export interface IChatDebugToolCallEvent extends IChatDebugEventCommon {
|
|
39
|
-
readonly kind: "toolCall";
|
|
40
|
-
readonly toolName: string;
|
|
41
|
-
readonly toolCallId?: string;
|
|
42
|
-
readonly input?: string;
|
|
43
|
-
readonly output?: string;
|
|
44
|
-
readonly result?: "success" | "error";
|
|
45
|
-
readonly durationInMillis?: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* A model turn event representing an LLM request/response.
|
|
49
|
-
*/
|
|
50
|
-
export interface IChatDebugModelTurnEvent extends IChatDebugEventCommon {
|
|
51
|
-
readonly kind: "modelTurn";
|
|
52
|
-
readonly model?: string;
|
|
53
|
-
readonly requestName?: string;
|
|
54
|
-
readonly inputTokens?: number;
|
|
55
|
-
readonly outputTokens?: number;
|
|
56
|
-
readonly cachedTokens?: number;
|
|
57
|
-
readonly totalTokens?: number;
|
|
58
|
-
readonly copilotUsageNanoAiu?: number;
|
|
59
|
-
readonly durationInMillis?: number;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* A generic log event for unstructured or miscellaneous messages.
|
|
63
|
-
*/
|
|
64
|
-
export interface IChatDebugGenericEvent extends IChatDebugEventCommon {
|
|
65
|
-
readonly kind: "generic";
|
|
66
|
-
readonly name: string;
|
|
67
|
-
readonly details?: string;
|
|
68
|
-
readonly level: ChatDebugLogLevel;
|
|
69
|
-
readonly category?: string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* A subagent invocation event, representing a spawned sub-agent within a session.
|
|
73
|
-
*/
|
|
74
|
-
export interface IChatDebugSubagentInvocationEvent extends IChatDebugEventCommon {
|
|
75
|
-
readonly kind: "subagentInvocation";
|
|
76
|
-
readonly agentName: string;
|
|
77
|
-
readonly description?: string;
|
|
78
|
-
readonly status?: "running" | "completed" | "failed";
|
|
79
|
-
readonly durationInMillis?: number;
|
|
80
|
-
readonly toolCallCount?: number;
|
|
81
|
-
readonly modelTurnCount?: number;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* A named section within a user message or agent response.
|
|
85
|
-
*/
|
|
86
|
-
export interface IChatDebugMessageSection {
|
|
87
|
-
readonly name: string;
|
|
88
|
-
readonly content: string;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* A user message event, representing the full prompt sent by the user.
|
|
92
|
-
*/
|
|
93
|
-
export interface IChatDebugUserMessageEvent extends IChatDebugEventCommon {
|
|
94
|
-
readonly kind: "userMessage";
|
|
95
|
-
readonly message: string;
|
|
96
|
-
readonly sections: readonly IChatDebugMessageSection[];
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* An agent response event, representing the agent's response.
|
|
100
|
-
*/
|
|
101
|
-
export interface IChatDebugAgentResponseEvent extends IChatDebugEventCommon {
|
|
102
|
-
readonly kind: "agentResponse";
|
|
103
|
-
readonly message: string;
|
|
104
|
-
readonly sections: readonly IChatDebugMessageSection[];
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Union of all internal chat debug event types.
|
|
108
|
-
*/
|
|
109
|
-
export type IChatDebugEvent = IChatDebugToolCallEvent | IChatDebugModelTurnEvent | IChatDebugGenericEvent | IChatDebugSubagentInvocationEvent | IChatDebugUserMessageEvent | IChatDebugAgentResponseEvent;
|
|
110
|
-
/**
|
|
111
|
-
* Plain text content for a resolved debug event.
|
|
112
|
-
*/
|
|
113
|
-
export interface IChatDebugEventTextContent {
|
|
114
|
-
readonly kind: "text";
|
|
115
|
-
readonly value: string;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* The status of a file in a file list content.
|
|
119
|
-
*/
|
|
120
|
-
export type ChatDebugFileStatus = "loaded" | "skipped";
|
|
121
|
-
/**
|
|
122
|
-
* A single file entry in a file list content.
|
|
123
|
-
*/
|
|
124
|
-
export interface IChatDebugFileEntry {
|
|
125
|
-
readonly uri: URI;
|
|
126
|
-
readonly name?: string;
|
|
127
|
-
readonly status: ChatDebugFileStatus;
|
|
128
|
-
readonly storage?: string;
|
|
129
|
-
readonly extensionId?: string;
|
|
130
|
-
readonly skipReason?: string;
|
|
131
|
-
readonly errorMessage?: string;
|
|
132
|
-
readonly duplicateOf?: URI;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* A source folder entry in a file list content.
|
|
136
|
-
*/
|
|
137
|
-
export interface IChatDebugSourceFolderEntry {
|
|
138
|
-
readonly uri: URI;
|
|
139
|
-
readonly storage: string;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Structured file list content for a resolved debug event.
|
|
143
|
-
* Contains resolved files and skipped/failed paths for rich rendering.
|
|
144
|
-
*/
|
|
145
|
-
export interface IChatDebugEventFileListContent {
|
|
146
|
-
readonly kind: "fileList";
|
|
147
|
-
readonly discoveryType: string;
|
|
148
|
-
readonly durationInMillis: number;
|
|
149
|
-
readonly files: readonly IChatDebugFileEntry[];
|
|
150
|
-
readonly sourceFolders?: readonly IChatDebugSourceFolderEntry[];
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Structured message content for a resolved debug event,
|
|
154
|
-
* containing collapsible sections.
|
|
155
|
-
*/
|
|
156
|
-
export interface IChatDebugEventMessageContent {
|
|
157
|
-
readonly kind: "message";
|
|
158
|
-
readonly type: "user" | "agent";
|
|
159
|
-
readonly message: string;
|
|
160
|
-
readonly sections: readonly IChatDebugMessageSection[];
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Structured tool call content for a resolved debug event.
|
|
164
|
-
* Contains the tool name, status, arguments, and output for rich rendering.
|
|
165
|
-
*/
|
|
166
|
-
export interface IChatDebugEventToolCallContent {
|
|
167
|
-
readonly kind: "toolCall";
|
|
168
|
-
readonly toolName: string;
|
|
169
|
-
readonly result?: "success" | "error";
|
|
170
|
-
readonly durationInMillis?: number;
|
|
171
|
-
readonly input?: string;
|
|
172
|
-
readonly output?: string;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Structured model turn content for a resolved debug event.
|
|
176
|
-
* Contains request metadata, token usage, and timing for rich rendering.
|
|
177
|
-
*/
|
|
178
|
-
export interface IChatDebugEventModelTurnContent {
|
|
179
|
-
readonly kind: "modelTurn";
|
|
180
|
-
readonly requestName: string;
|
|
181
|
-
readonly model?: string;
|
|
182
|
-
readonly status?: string;
|
|
183
|
-
readonly durationInMillis?: number;
|
|
184
|
-
readonly timeToFirstTokenInMillis?: number;
|
|
185
|
-
readonly requestId?: string;
|
|
186
|
-
readonly maxInputTokens?: number;
|
|
187
|
-
readonly maxOutputTokens?: number;
|
|
188
|
-
readonly inputTokens?: number;
|
|
189
|
-
readonly outputTokens?: number;
|
|
190
|
-
readonly cachedTokens?: number;
|
|
191
|
-
readonly totalTokens?: number;
|
|
192
|
-
readonly requestOptions?: string;
|
|
193
|
-
readonly errorMessage?: string;
|
|
194
|
-
readonly sections?: readonly IChatDebugMessageSection[];
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Structured hook execution content for a resolved debug event.
|
|
198
|
-
* Contains the hook type, command, input, output, and result for rich rendering.
|
|
199
|
-
*/
|
|
200
|
-
export interface IChatDebugEventHookContent {
|
|
201
|
-
readonly kind: "hook";
|
|
202
|
-
readonly hookType: string;
|
|
203
|
-
readonly command?: string;
|
|
204
|
-
readonly result?: ChatDebugHookResult;
|
|
205
|
-
readonly durationInMillis?: number;
|
|
206
|
-
readonly input?: string;
|
|
207
|
-
readonly output?: string;
|
|
208
|
-
readonly exitCode?: number;
|
|
209
|
-
readonly errorMessage?: string;
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* A single entry in the customization resolution log.
|
|
213
|
-
*/
|
|
214
|
-
export interface IChatDebugCustomizationLogEntry {
|
|
215
|
-
readonly category: "applying" | "skipped" | "referenced" | "skill" | "custom-agent" | "hook";
|
|
216
|
-
readonly name: string;
|
|
217
|
-
readonly uri?: URI;
|
|
218
|
-
readonly reason?: string;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Structured customization summary content for a resolved debug event.
|
|
222
|
-
* Contains per-file resolution logs showing how applyTo patterns, agent
|
|
223
|
-
* instructions, and referenced files were resolved by the instructions
|
|
224
|
-
* context computer.
|
|
225
|
-
*/
|
|
226
|
-
export interface IChatDebugEventCustomizationSummaryContent {
|
|
227
|
-
readonly kind: "customizationSummary";
|
|
228
|
-
/** Per-file resolution detail entries. */
|
|
229
|
-
readonly resolutionLogs: readonly IChatDebugCustomizationLogEntry[];
|
|
230
|
-
/** Total wall-clock time of the collect() call in milliseconds. */
|
|
231
|
-
readonly durationInMillis: number;
|
|
232
|
-
/** Counts by type for the summary header. */
|
|
233
|
-
readonly counts: {
|
|
234
|
-
readonly instructions: number;
|
|
235
|
-
readonly skills: number;
|
|
236
|
-
readonly agents: number;
|
|
237
|
-
readonly hooks: number;
|
|
238
|
-
readonly skipped: number;
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Union of all resolved event content types.
|
|
243
|
-
*/
|
|
244
|
-
export type IChatDebugResolvedEventContent = IChatDebugEventTextContent | IChatDebugEventFileListContent | IChatDebugEventMessageContent | IChatDebugEventToolCallContent | IChatDebugEventModelTurnContent | IChatDebugEventHookContent | IChatDebugEventCustomizationSummaryContent;
|
|
245
|
-
/**
|
|
246
|
-
* Provider interface for debug events.
|
|
247
|
-
*/
|
|
248
|
-
export interface IChatDebugLogProvider {
|
|
249
|
-
provideChatDebugLog(sessionResource: URI, token: CancellationToken): Promise<IChatDebugEvent[] | undefined>;
|
|
250
|
-
resolveChatDebugLogEvent?(eventId: string, token: CancellationToken): Promise<IChatDebugResolvedEventContent | undefined>;
|
|
251
|
-
provideChatDebugLogExport?(sessionResource: URI, token: CancellationToken): Promise<Uint8Array | undefined>;
|
|
252
|
-
resolveChatDebugLogImport?(data: Uint8Array, token: CancellationToken): Promise<URI | undefined>;
|
|
253
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
|
|
3
|
-
|
|
4
|
-
const CHAT_DEBUG_HAS_ACTIVE_SESSION = ( new RawContextKey("chatDebug.hasActiveSession", false));
|
|
5
|
-
const CHAT_DEBUG_ACTIVE_SESSION_IS_AGENT_HOST = ( new RawContextKey("chatDebug.activeSessionIsAgentHost", false));
|
|
6
|
-
var ChatDebugLogLevel;
|
|
7
|
-
(function(ChatDebugLogLevel) {
|
|
8
|
-
ChatDebugLogLevel[ChatDebugLogLevel["Trace"] = 0] = "Trace";
|
|
9
|
-
ChatDebugLogLevel[ChatDebugLogLevel["Info"] = 1] = "Info";
|
|
10
|
-
ChatDebugLogLevel[ChatDebugLogLevel["Warning"] = 2] = "Warning";
|
|
11
|
-
ChatDebugLogLevel[ChatDebugLogLevel["Error"] = 3] = "Error";
|
|
12
|
-
})(ChatDebugLogLevel || (ChatDebugLogLevel = {}));
|
|
13
|
-
var ChatDebugHookResult;
|
|
14
|
-
(function(ChatDebugHookResult) {
|
|
15
|
-
ChatDebugHookResult[ChatDebugHookResult["Success"] = 0] = "Success";
|
|
16
|
-
ChatDebugHookResult[ChatDebugHookResult["Error"] = 1] = "Error";
|
|
17
|
-
ChatDebugHookResult[ChatDebugHookResult["NonBlockingError"] = 2] = "NonBlockingError";
|
|
18
|
-
})(ChatDebugHookResult || (ChatDebugHookResult = {}));
|
|
19
|
-
|
|
20
|
-
export { CHAT_DEBUG_ACTIVE_SESSION_IS_AGENT_HOST, CHAT_DEBUG_HAS_ACTIVE_SESSION, ChatDebugHookResult, ChatDebugLogLevel };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { VSBuffer } from "../../../../base/common/buffer.js";
|
|
2
|
-
import { IMarkdownString } from "../../../../base/common/htmlContent.js";
|
|
3
|
-
import { URI } from "../../../../base/common/uri.js";
|
|
4
|
-
import { IChatResponseViewModel, IChatRequestViewModel } from "./model/chatViewModel.js";
|
|
5
|
-
import { IChatToolInvocation, IChatToolInvocationSerialized } from "./chatService/chatService.js";
|
|
6
|
-
import { type IChatRequestVariableEntry } from "./attachments/chatVariableEntries.js";
|
|
7
|
-
export interface IChatExtractedImage {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly uri: URI;
|
|
10
|
-
readonly name: string;
|
|
11
|
-
readonly mimeType: string;
|
|
12
|
-
readonly data: VSBuffer;
|
|
13
|
-
readonly source: string;
|
|
14
|
-
readonly caption: string | IMarkdownString | undefined;
|
|
15
|
-
}
|
|
16
|
-
export interface IChatExtractedImageCollection {
|
|
17
|
-
readonly id: string;
|
|
18
|
-
readonly title: string;
|
|
19
|
-
readonly images: IChatExtractedImage[];
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Extract all images from a chat response's tool invocations and inline references.
|
|
23
|
-
* Tool invocation images are extracted from output details and message URIs.
|
|
24
|
-
* Inline reference images (file URIs) are read via the provided {@link readFile} callback.
|
|
25
|
-
*/
|
|
26
|
-
export declare function extractImagesFromChatResponse(response: IChatResponseViewModel, readFile: (uri: URI) => Promise<VSBuffer>): Promise<IChatExtractedImageCollection>;
|
|
27
|
-
export declare function extractImagesFromToolInvocationOutputDetails(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, sessionResource: URI): IChatExtractedImage[];
|
|
28
|
-
export declare function extractImagesFromToolInvocationMessages(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, readFile: (uri: URI) => Promise<VSBuffer>): Promise<IChatExtractedImage[]>;
|
|
29
|
-
export declare function coerceImageBuffer(value: unknown): Uint8Array | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Extract images from a chat request's variable attachments (user-attached images).
|
|
32
|
-
*/
|
|
33
|
-
export declare function extractImagesFromChatRequest(request: IChatRequestViewModel): IChatExtractedImage[];
|
|
34
|
-
export declare function extractImagesFromChatVariables(variables: readonly IChatRequestVariableEntry[]): IChatExtractedImage[];
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { decodeBase64, VSBuffer } from '../../../../base/common/buffer.js';
|
|
3
|
-
import { getExtensionForMimeType, getMediaMime } from '../../../../base/common/mime.js';
|
|
4
|
-
import { URI } from '../../../../base/common/uri.js';
|
|
5
|
-
import { localize } from '../../../../nls.js';
|
|
6
|
-
import { isLocation } from '../../../../editor/common/languages.js';
|
|
7
|
-
import { isRequestVM } from './model/chatViewModel.js';
|
|
8
|
-
import { ChatResponseResource } from './model/chatModel.js';
|
|
9
|
-
import { IChatToolInvocation } from './chatService/chatService.js';
|
|
10
|
-
import { isToolResultInputOutputDetails, isToolResultOutputDetails } from './tools/languageModelToolsService.js';
|
|
11
|
-
import { getExplicitFileOrImageAttachmentSummary, isImageVariableEntry } from './attachments/chatVariableEntries.js';
|
|
12
|
-
|
|
13
|
-
async function extractImagesFromChatResponse(response, readFile) {
|
|
14
|
-
const allImages = [];
|
|
15
|
-
for (const item of response.response.value) {
|
|
16
|
-
if (item.kind === "toolInvocation" || item.kind === "toolInvocationSerialized") {
|
|
17
|
-
const images = extractImagesFromToolInvocationOutputDetails(item, response.sessionResource);
|
|
18
|
-
allImages.push(...images);
|
|
19
|
-
const messageImages = await extractImagesFromToolInvocationMessages(item, readFile);
|
|
20
|
-
allImages.push(...messageImages);
|
|
21
|
-
} else if (item.kind === "inlineReference") {
|
|
22
|
-
const image = await extractImageFromInlineReference(item, readFile);
|
|
23
|
-
if (image) {
|
|
24
|
-
allImages.push(image);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const request = response.session.getItems().find(item => isRequestVM(item) && item.id === response.requestId);
|
|
29
|
-
const title = request ? request.messageText.trim() || getExplicitFileOrImageAttachmentSummary(request.variables) || ( localize(10410, "Images")) : ( localize(10410, "Images"));
|
|
30
|
-
return {
|
|
31
|
-
id: ( response.sessionResource.toString()) + "_" + response.id,
|
|
32
|
-
title,
|
|
33
|
-
images: allImages
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function extractImagesFromToolInvocationOutputDetails(toolInvocation, sessionResource) {
|
|
37
|
-
const images = [];
|
|
38
|
-
const resultDetails = IChatToolInvocation.resultDetails(toolInvocation);
|
|
39
|
-
const caption = toolInvocation.pastTenseMessage ?? toolInvocation.invocationMessage;
|
|
40
|
-
const pushImage = (mimeType, data, outputIndex) => {
|
|
41
|
-
const ext = getExtensionForMimeType(mimeType);
|
|
42
|
-
const permalinkBasename = ext ? `file${ext}` : "file.bin";
|
|
43
|
-
const uri = ChatResponseResource.createUri(sessionResource, toolInvocation.toolCallId, outputIndex, permalinkBasename);
|
|
44
|
-
images.push({
|
|
45
|
-
id: `${toolInvocation.toolCallId}_${outputIndex}`,
|
|
46
|
-
uri,
|
|
47
|
-
name: ( localize(10411, "Image {0}", images.length + 1)),
|
|
48
|
-
mimeType,
|
|
49
|
-
data,
|
|
50
|
-
source: ( localize(10412, "Tool: {0}", toolInvocation.toolId)),
|
|
51
|
-
caption
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
if (isToolResultInputOutputDetails(resultDetails)) {
|
|
55
|
-
for (let i = 0; i < resultDetails.output.length; i++) {
|
|
56
|
-
const outputItem = resultDetails.output[i];
|
|
57
|
-
if (outputItem.type === "embed" && outputItem.mimeType?.startsWith("image/") && !outputItem.isText) {
|
|
58
|
-
pushImage(outputItem.mimeType, decodeBase64(outputItem.value), i);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
} else if (isToolResultOutputDetails(resultDetails)) {
|
|
62
|
-
const output = resultDetails.output;
|
|
63
|
-
if (output.mimeType?.startsWith("image/")) {
|
|
64
|
-
const data = getImageDataFromOutputDetails(resultDetails, toolInvocation);
|
|
65
|
-
if (data) {
|
|
66
|
-
pushImage(output.mimeType, data, 0);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return images;
|
|
71
|
-
}
|
|
72
|
-
async function extractImagesFromToolInvocationMessages(toolInvocation, readFile) {
|
|
73
|
-
const message = toolInvocation.pastTenseMessage ?? toolInvocation.invocationMessage;
|
|
74
|
-
if (!message || typeof message === "string" || !message.uris || ( Object.keys(message.uris)).length === 0) {
|
|
75
|
-
return [];
|
|
76
|
-
}
|
|
77
|
-
const images = [];
|
|
78
|
-
for (const uriComponents of ( Object.values(message.uris))) {
|
|
79
|
-
const uri = URI.revive(uriComponents);
|
|
80
|
-
const mimeType = getMediaMime(uri.path);
|
|
81
|
-
if (mimeType?.startsWith("image/")) {
|
|
82
|
-
let data;
|
|
83
|
-
try {
|
|
84
|
-
data = await readFile(uri);
|
|
85
|
-
} catch {
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
const name = uri.path.split("/").pop() ?? "image";
|
|
89
|
-
images.push({
|
|
90
|
-
id: ( uri.toString()),
|
|
91
|
-
uri,
|
|
92
|
-
name,
|
|
93
|
-
mimeType,
|
|
94
|
-
data,
|
|
95
|
-
source: ( localize(10412, "Tool: {0}", toolInvocation.toolId)),
|
|
96
|
-
caption: message
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return images;
|
|
101
|
-
}
|
|
102
|
-
function getImageDataFromOutputDetails(resultDetails, toolInvocation) {
|
|
103
|
-
if (toolInvocation.kind === "toolInvocationSerialized") {
|
|
104
|
-
const serializedDetails = resultDetails;
|
|
105
|
-
if (serializedDetails.output.base64Data) {
|
|
106
|
-
return decodeBase64(serializedDetails.output.base64Data);
|
|
107
|
-
}
|
|
108
|
-
return undefined;
|
|
109
|
-
} else {
|
|
110
|
-
return resultDetails.output.value;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async function extractImageFromInlineReference(part, readFile) {
|
|
114
|
-
const ref = part.inlineReference;
|
|
115
|
-
const refUri = URI.isUri(ref) ? ref : isLocation(ref) ? ref.uri : ref.location.uri;
|
|
116
|
-
const mime = getMediaMime(refUri.path);
|
|
117
|
-
if (!mime?.startsWith("image/")) {
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
let data;
|
|
121
|
-
try {
|
|
122
|
-
data = await readFile(refUri);
|
|
123
|
-
} catch {
|
|
124
|
-
return undefined;
|
|
125
|
-
}
|
|
126
|
-
const name = part.name ?? refUri.path.split("/").pop() ?? "image";
|
|
127
|
-
return {
|
|
128
|
-
id: ( refUri.toString()),
|
|
129
|
-
uri: refUri,
|
|
130
|
-
name,
|
|
131
|
-
mimeType: mime,
|
|
132
|
-
data,
|
|
133
|
-
source: ( localize(10413, "File")),
|
|
134
|
-
caption: undefined
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function coerceImageBuffer(value) {
|
|
138
|
-
if (value instanceof Uint8Array) {
|
|
139
|
-
return value;
|
|
140
|
-
}
|
|
141
|
-
if (value instanceof ArrayBuffer) {
|
|
142
|
-
return ( new Uint8Array(value));
|
|
143
|
-
}
|
|
144
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
145
|
-
return undefined;
|
|
146
|
-
}
|
|
147
|
-
const record = value;
|
|
148
|
-
const keys = ( Object.keys(record)).sort((a, b) => Number(a) - Number(b));
|
|
149
|
-
if (keys.length === 0) {
|
|
150
|
-
return undefined;
|
|
151
|
-
}
|
|
152
|
-
const result = ( new Uint8Array(keys.length));
|
|
153
|
-
for (let index = 0; index < keys.length; index++) {
|
|
154
|
-
const byte = record[keys[index]];
|
|
155
|
-
if (keys[index] !== String(index) || typeof byte !== "number" || !Number.isInteger(byte) || byte < 0 || byte > 255) {
|
|
156
|
-
return undefined;
|
|
157
|
-
}
|
|
158
|
-
result[index] = byte;
|
|
159
|
-
}
|
|
160
|
-
return result;
|
|
161
|
-
}
|
|
162
|
-
function extractImagesFromChatRequest(request) {
|
|
163
|
-
return extractImagesFromChatVariables(request.variables);
|
|
164
|
-
}
|
|
165
|
-
function extractImagesFromChatVariables(variables) {
|
|
166
|
-
const images = [];
|
|
167
|
-
for (const variable of variables) {
|
|
168
|
-
if (!isImageVariableEntry(variable)) {
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
const buffer = coerceImageBuffer(variable.value);
|
|
172
|
-
if (!buffer) {
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
const mimeType = variable.mimeType ?? getMediaMime(variable.name) ?? "image/png";
|
|
176
|
-
const uri = variable.references?.[0]?.reference;
|
|
177
|
-
const imageUri = URI.isUri(uri) ? uri : ( URI.from({
|
|
178
|
-
scheme: "data",
|
|
179
|
-
path: `${variable.id}/${encodeURIComponent(variable.name)}`
|
|
180
|
-
}));
|
|
181
|
-
images.push({
|
|
182
|
-
id: ( imageUri.toString()),
|
|
183
|
-
uri: imageUri,
|
|
184
|
-
name: variable.name,
|
|
185
|
-
mimeType,
|
|
186
|
-
data: VSBuffer.wrap(buffer),
|
|
187
|
-
source: ( localize(10414, "Attachment")),
|
|
188
|
-
caption: undefined
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
return images;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export { coerceImageBuffer, extractImagesFromChatRequest, extractImagesFromChatResponse, extractImagesFromChatVariables, extractImagesFromToolInvocationMessages, extractImagesFromToolInvocationOutputDetails };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js";
|
|
2
|
-
import { StorageScope, StorageTarget } from "../../../../platform/storage/common/storage.js";
|
|
3
|
-
import { IStorageService } from "../../../../platform/storage/common/storage.service.js";
|
|
4
|
-
import { ILanguageModelChatMetadata } from "./languageModels.js";
|
|
5
|
-
import { ILanguageModelsService } from "./languageModels.service.js";
|
|
6
|
-
/**
|
|
7
|
-
* Storage key prefix for persisted model selections.
|
|
8
|
-
* Full key format: `chat.currentLanguageModel.{location}[.{modelTarget}]`
|
|
9
|
-
*/
|
|
10
|
-
export declare const SELECTED_MODEL_STORAGE_KEY_PREFIX = "chat.currentLanguageModel.";
|
|
11
|
-
export declare const SELECTED_MODEL_STORAGE_SCOPE = StorageScope.PROFILE;
|
|
12
|
-
export declare const SELECTED_MODEL_STORAGE_TARGET = StorageTarget.USER;
|
|
13
|
-
/**
|
|
14
|
-
* Builds the storage key used to persist the selected language model for a
|
|
15
|
-
* given chat location and optional model target.
|
|
16
|
-
*
|
|
17
|
-
* Shared by model-selection surfaces so they can read and write the explicit
|
|
18
|
-
* remembered preference without depending on widget internals.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getSelectedModelStorageKey(location: string, modelTarget?: string): string;
|
|
21
|
-
export declare function storeSelectedModel(storageService: IStorageService, location: string, modelTarget: string | undefined, identifier: string): void;
|
|
22
|
-
/** Reads the selected model and lazily migrates the previous application-scoped value. */
|
|
23
|
-
export declare function getStoredSelectedModel(storageService: IStorageService, location: string, modelTarget?: string): string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Resolves the currently selected chat model identifier using a two-step
|
|
26
|
-
* strategy:
|
|
27
|
-
*
|
|
28
|
-
* 1. Read the `chatModelId` context key (set when a chat widget is active).
|
|
29
|
-
* 2. Fall back to the persisted explicit model preference.
|
|
30
|
-
*
|
|
31
|
-
* Returns the raw model identifier string (may include a vendor prefix like
|
|
32
|
-
* `"copilot/gpt-4.1"` from storage, or a short id like `"gpt-4.1"` from
|
|
33
|
-
* the context key), or `undefined` if no selection is available.
|
|
34
|
-
*/
|
|
35
|
-
export declare function getSelectedModelIdentifier(contextKeyService: IContextKeyService, storageService: IStorageService): string | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Reads the persisted, fully-qualified model identifier written by a model
|
|
38
|
-
* selection surface (e.g. `"copilot/gpt-4.1"` or `"customendpoint/ANT/gpt-4.1"`).
|
|
39
|
-
*
|
|
40
|
-
* Unlike the `chatModelId` context key (which holds only the short, lower-cased
|
|
41
|
-
* model id), the persisted identifier carries the vendor and therefore
|
|
42
|
-
* disambiguates the same model served via BYOK vs CAPI. Returns `undefined`
|
|
43
|
-
* when no selection has been persisted.
|
|
44
|
-
*/
|
|
45
|
-
export declare function getPersistedSelectedModelIdentifier(contextKeyService: IContextKeyService, storageService: IStorageService): string | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Resolves the registered metadata of the currently selected chat model.
|
|
48
|
-
*
|
|
49
|
-
* The selected identifier may be a fully-qualified id (e.g. `"copilot/gpt-4.1"`
|
|
50
|
-
* from persisted storage) or a short, lower-cased model id (e.g. `"gpt-4.1"`
|
|
51
|
-
* from the `chatModelId` context key, which is set to `metadata.id`). The short
|
|
52
|
-
* id cannot disambiguate the same model served via BYOK vs CAPI, so when a
|
|
53
|
-
* direct registry lookup fails we fall back to the persisted, fully-qualified
|
|
54
|
-
* identifier (which carries the vendor) rather than matching on the short id.
|
|
55
|
-
*
|
|
56
|
-
* Returns `undefined` when no model is selected or the selection cannot be
|
|
57
|
-
* resolved to a registered model (e.g. the provider has not been activated
|
|
58
|
-
* yet); callers that only need the vendor can fall back to
|
|
59
|
-
* {@link getSelectedModelVendor}.
|
|
60
|
-
*/
|
|
61
|
-
export declare function getSelectedModelMetadata(contextKeyService: IContextKeyService, storageService: IStorageService, languageModelsService: ILanguageModelsService): ILanguageModelChatMetadata | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Resolves the vendor of the currently selected chat model.
|
|
64
|
-
*
|
|
65
|
-
* Tries the language model registry first (authoritative when models are
|
|
66
|
-
* registered), then falls back to extracting the vendor prefix from the
|
|
67
|
-
* persisted model identifier (e.g. `"copilot/gpt-4.1"` → `"copilot"`).
|
|
68
|
-
*
|
|
69
|
-
* Returns `undefined` if no model selection is available.
|
|
70
|
-
*/
|
|
71
|
-
export declare function getSelectedModelVendor(contextKeyService: IContextKeyService, storageService: IStorageService, languageModelsService: ILanguageModelsService): string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Returns whether the given model is "bring your own key", i.e. served with the user's own
|
|
74
|
-
* credentials. Agent-host copies carry `byokModelIdentifier` instead of setting `isBYOK`.
|
|
75
|
-
*/
|
|
76
|
-
export declare function isByokModel(metadata: ILanguageModelChatMetadata): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Returns whether the currently selected chat model is a Copilot model
|
|
79
|
-
* (i.e. not BYOK).
|
|
80
|
-
*
|
|
81
|
-
* When the selection resolves to registered metadata this is the inverse of
|
|
82
|
-
* {@link isByokModel}, so agent-host (CAPI-backed) models count as Copilot.
|
|
83
|
-
* When no model is selected yet (widget not initialized) this returns `true`
|
|
84
|
-
* so quota-style surfaces treat the unknown case as Copilot. As a last
|
|
85
|
-
* resort, an unregistered selection is classified by its vendor prefix.
|
|
86
|
-
*/
|
|
87
|
-
export declare function isSelectedModelCopilot(contextKeyService: IContextKeyService, storageService: IStorageService, languageModelsService: ILanguageModelsService): boolean;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
|
|
3
|
-
import { ChatContextKeys } from './actions/chatContextKeys.js';
|
|
4
|
-
import './languageModels.js';
|
|
5
|
-
|
|
6
|
-
const SELECTED_MODEL_STORAGE_KEY_PREFIX = 'chat.currentLanguageModel.';
|
|
7
|
-
const SELECTED_MODEL_STORAGE_SCOPE = StorageScope.PROFILE;
|
|
8
|
-
const SELECTED_MODEL_STORAGE_TARGET = StorageTarget.USER;
|
|
9
|
-
function getSelectedModelStorageKey(location, modelTarget) {
|
|
10
|
-
if (modelTarget) {
|
|
11
|
-
return `${SELECTED_MODEL_STORAGE_KEY_PREFIX}${location}.${modelTarget}`;
|
|
12
|
-
}
|
|
13
|
-
return `${SELECTED_MODEL_STORAGE_KEY_PREFIX}${location}`;
|
|
14
|
-
}
|
|
15
|
-
function storeSelectedModel(storageService, location, modelTarget, identifier) {
|
|
16
|
-
storageService.store(getSelectedModelStorageKey(location, modelTarget), identifier, SELECTED_MODEL_STORAGE_SCOPE, SELECTED_MODEL_STORAGE_TARGET);
|
|
17
|
-
}
|
|
18
|
-
function getStoredSelectedModel(storageService, location, modelTarget) {
|
|
19
|
-
const key = getSelectedModelStorageKey(location, modelTarget);
|
|
20
|
-
const isDefaultKey = `${key}.isDefault`;
|
|
21
|
-
const identifier = storageService.get(key, SELECTED_MODEL_STORAGE_SCOPE);
|
|
22
|
-
if (identifier) {
|
|
23
|
-
const wasAutomaticDefault = storageService.getBoolean(isDefaultKey, SELECTED_MODEL_STORAGE_SCOPE);
|
|
24
|
-
storageService.remove(isDefaultKey, SELECTED_MODEL_STORAGE_SCOPE);
|
|
25
|
-
if (wasAutomaticDefault) {
|
|
26
|
-
storageService.remove(key, SELECTED_MODEL_STORAGE_SCOPE);
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
return identifier;
|
|
30
|
-
}
|
|
31
|
-
const legacyIdentifier = storageService.get(key, StorageScope.APPLICATION);
|
|
32
|
-
if (!legacyIdentifier) {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
const wasAutomaticDefault = storageService.getBoolean(isDefaultKey, StorageScope.APPLICATION, true);
|
|
36
|
-
storageService.remove(key, StorageScope.APPLICATION);
|
|
37
|
-
storageService.remove(isDefaultKey, StorageScope.APPLICATION);
|
|
38
|
-
if (wasAutomaticDefault) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
storeSelectedModel(storageService, location, modelTarget, legacyIdentifier);
|
|
42
|
-
return legacyIdentifier;
|
|
43
|
-
}
|
|
44
|
-
function getSelectedModelIdentifier(contextKeyService, storageService) {
|
|
45
|
-
const contextKeyModelId = contextKeyService.getContextKeyValue(ChatContextKeys.chatModelId.key);
|
|
46
|
-
if (contextKeyModelId) {
|
|
47
|
-
return contextKeyModelId;
|
|
48
|
-
}
|
|
49
|
-
return getPersistedSelectedModelIdentifier(contextKeyService, storageService);
|
|
50
|
-
}
|
|
51
|
-
function getPersistedSelectedModelIdentifier(contextKeyService, storageService) {
|
|
52
|
-
const location = contextKeyService.getContextKeyValue(ChatContextKeys.location.key) ?? 'panel';
|
|
53
|
-
const sessionType = contextKeyService.getContextKeyValue(ChatContextKeys.chatSessionType.key) ?? '';
|
|
54
|
-
const candidateKeys = sessionType
|
|
55
|
-
? [sessionType, undefined]
|
|
56
|
-
: [undefined];
|
|
57
|
-
for (const modelTarget of candidateKeys) {
|
|
58
|
-
const persisted = getStoredSelectedModel(storageService, location, modelTarget);
|
|
59
|
-
if (persisted) {
|
|
60
|
-
return persisted;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
function isByokModel(metadata) {
|
|
66
|
-
return metadata.isBYOK === true || metadata.byokModelIdentifier !== undefined;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export { SELECTED_MODEL_STORAGE_KEY_PREFIX, SELECTED_MODEL_STORAGE_SCOPE, SELECTED_MODEL_STORAGE_TARGET, getPersistedSelectedModelIdentifier, getSelectedModelIdentifier, getSelectedModelStorageKey, getStoredSelectedModel, isByokModel, storeSelectedModel };
|