@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,57 +0,0 @@
|
|
|
1
|
-
import { Event } from "../../../../../base/common/event.js";
|
|
2
|
-
import { Disposable } from "../../../../../base/common/lifecycle.js";
|
|
3
|
-
import { IRange } from "../../../../../editor/common/core/range.js";
|
|
4
|
-
import { Command } from "../../../../../editor/common/languages.js";
|
|
5
|
-
import { Action2 } from "../../../../../platform/actions/common/actions.js";
|
|
6
|
-
import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js";
|
|
7
|
-
import { ILabelService } from "../../../../../platform/label/common/label.service.js";
|
|
8
|
-
import { IChatRequestVariableValue, IDynamicVariable } from "../../common/attachments/chatVariables.js";
|
|
9
|
-
import { IChatWidget } from "../chat.js";
|
|
10
|
-
import { IChatWidgetContrib } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget";
|
|
11
|
-
export declare const dynamicVariableDecorationType = "chat-dynamic-variable";
|
|
12
|
-
export declare class ChatDynamicVariableModel extends Disposable implements IChatWidgetContrib {
|
|
13
|
-
private readonly widget;
|
|
14
|
-
private readonly labelService;
|
|
15
|
-
static readonly ID = "chatDynamicVariableModel";
|
|
16
|
-
private _variables;
|
|
17
|
-
private readonly _onDidChangeReferences;
|
|
18
|
-
/**
|
|
19
|
-
* Fires whenever the set of dynamic-variable references changes (added,
|
|
20
|
-
* removed, moved, or restored). Consumers that render UI derived from the
|
|
21
|
-
* references should listen to this instead of relying on
|
|
22
|
-
* `onDidChangeParsedInput`, which does not fire when a reference is added
|
|
23
|
-
* without changing the parsed request (e.g. a `/command` reference that the
|
|
24
|
-
* parser resolves as a slash-prompt part).
|
|
25
|
-
*/
|
|
26
|
-
readonly onDidChangeReferences: Event<void>;
|
|
27
|
-
get variables(): ReadonlyArray<IDynamicVariable>;
|
|
28
|
-
get id(): string;
|
|
29
|
-
private decorationData;
|
|
30
|
-
private readonly _editorListener;
|
|
31
|
-
constructor(widget: IChatWidget, labelService: ILabelService);
|
|
32
|
-
private _subscribeToEditor;
|
|
33
|
-
private findReferenceRangeInReplacement;
|
|
34
|
-
getInputState(contrib: Record<string, unknown>): void;
|
|
35
|
-
setInputState(contrib: Readonly<Record<string, unknown>>): void;
|
|
36
|
-
addReference(ref: IDynamicVariable): void;
|
|
37
|
-
private updateDecorations;
|
|
38
|
-
private getHoverForReference;
|
|
39
|
-
private createAttachmentLabelHover;
|
|
40
|
-
/**
|
|
41
|
-
* Dispose all existing variables.
|
|
42
|
-
*/
|
|
43
|
-
private disposeVariables;
|
|
44
|
-
dispose(): void;
|
|
45
|
-
}
|
|
46
|
-
export interface IAddDynamicVariableContext {
|
|
47
|
-
id: string;
|
|
48
|
-
widget: IChatWidget;
|
|
49
|
-
range: IRange;
|
|
50
|
-
variableData: IChatRequestVariableValue;
|
|
51
|
-
command?: Command;
|
|
52
|
-
}
|
|
53
|
-
export declare class AddDynamicVariableAction extends Action2 {
|
|
54
|
-
static readonly ID = "workbench.action.chat.addDynamicVariable";
|
|
55
|
-
constructor();
|
|
56
|
-
run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void>;
|
|
57
|
-
}
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { coalesce } from '../../../../../base/common/arrays.js';
|
|
4
|
-
import { Emitter } from '../../../../../base/common/event.js';
|
|
5
|
-
import { MarkdownString } from '../../../../../base/common/htmlContent.js';
|
|
6
|
-
import { Disposable, MutableDisposable, dispose, isDisposable } from '../../../../../base/common/lifecycle.js';
|
|
7
|
-
import { URI } from '../../../../../base/common/uri.js';
|
|
8
|
-
import { Range } from '../../../../../editor/common/core/range.js';
|
|
9
|
-
import { isLocation } from '../../../../../editor/common/languages.js';
|
|
10
|
-
import { Action2, registerAction2 } from '../../../../../platform/actions/common/actions.js';
|
|
11
|
-
import { ICommandService } from '../../../../../platform/commands/common/commands.service.js';
|
|
12
|
-
import { ILabelService } from '../../../../../platform/label/common/label.service.js';
|
|
13
|
-
import { isImageVariableEntry, IChatRequestVariableEntry } from '../../common/attachments/chatVariableEntries.js';
|
|
14
|
-
import { toAttachedContextDynamicVariable } from '../../common/attachments/chatVariables.js';
|
|
15
|
-
import { addDynamicVariableActionId } from '../widget/input/editor/chatDynamicVariablesConstant.js';
|
|
16
|
-
|
|
17
|
-
var ChatDynamicVariableModel_1;
|
|
18
|
-
const dynamicVariableDecorationType = "chat-dynamic-variable";
|
|
19
|
-
let ChatDynamicVariableModel = class ChatDynamicVariableModel extends Disposable {
|
|
20
|
-
static {
|
|
21
|
-
ChatDynamicVariableModel_1 = this;
|
|
22
|
-
}
|
|
23
|
-
static {
|
|
24
|
-
this.ID = "chatDynamicVariableModel";
|
|
25
|
-
}
|
|
26
|
-
get variables() {
|
|
27
|
-
return [...this._variables];
|
|
28
|
-
}
|
|
29
|
-
get id() {
|
|
30
|
-
return ChatDynamicVariableModel_1.ID;
|
|
31
|
-
}
|
|
32
|
-
constructor(widget, labelService) {
|
|
33
|
-
super();
|
|
34
|
-
this.widget = widget;
|
|
35
|
-
this.labelService = labelService;
|
|
36
|
-
this._variables = [];
|
|
37
|
-
this._onDidChangeReferences = this._register(( new Emitter()));
|
|
38
|
-
this.onDidChangeReferences = this._onDidChangeReferences.event;
|
|
39
|
-
this.decorationData = [];
|
|
40
|
-
this._editorListener = this._register(( new MutableDisposable()));
|
|
41
|
-
this._subscribeToEditor();
|
|
42
|
-
this._register(widget.onDidChangeActiveInputEditor(() => {
|
|
43
|
-
this._subscribeToEditor();
|
|
44
|
-
this.updateDecorations();
|
|
45
|
-
}));
|
|
46
|
-
this._register(widget.input.attachmentModel.onDidChange(() => this.updateDecorations()));
|
|
47
|
-
}
|
|
48
|
-
_subscribeToEditor() {
|
|
49
|
-
this._editorListener.value = this.widget.inputEditor.onDidChangeModelContent(e => {
|
|
50
|
-
const removed = [];
|
|
51
|
-
let didChange = false;
|
|
52
|
-
this._variables = coalesce(( this._variables.map((ref, idx) => {
|
|
53
|
-
const model = this.widget.inputEditor.getModel();
|
|
54
|
-
if (!model) {
|
|
55
|
-
removed.push(ref);
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
const data = this.decorationData[idx];
|
|
59
|
-
if (!data) {
|
|
60
|
-
removed.push(ref);
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
const newRange = model.getDecorationRange(data.id);
|
|
64
|
-
if (!newRange) {
|
|
65
|
-
removed.push(ref);
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
const newText = model.getValueInRange(newRange);
|
|
69
|
-
if (newText !== data.text) {
|
|
70
|
-
const replacement = e.changes.find(
|
|
71
|
-
change => change.rangeOffset <= data.rangeOffset && change.rangeOffset + change.rangeLength >= data.rangeOffset + data.text.length
|
|
72
|
-
);
|
|
73
|
-
const preservedRange = replacement && this.findReferenceRangeInReplacement(model, e.changes, replacement, data);
|
|
74
|
-
if (preservedRange) {
|
|
75
|
-
didChange = true;
|
|
76
|
-
return {
|
|
77
|
-
...ref,
|
|
78
|
-
range: preservedRange
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
if (!replacement) {
|
|
82
|
-
this.widget.inputEditor.executeEdits(this.id, [{
|
|
83
|
-
range: newRange,
|
|
84
|
-
text: ""
|
|
85
|
-
}]);
|
|
86
|
-
this.widget.refreshParsedInput();
|
|
87
|
-
}
|
|
88
|
-
removed.push(ref);
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
if (newRange.equalsRange(ref.range)) {
|
|
92
|
-
return ref;
|
|
93
|
-
}
|
|
94
|
-
didChange = true;
|
|
95
|
-
return {
|
|
96
|
-
...ref,
|
|
97
|
-
range: newRange
|
|
98
|
-
};
|
|
99
|
-
})));
|
|
100
|
-
dispose(removed.filter(isDisposable));
|
|
101
|
-
if (didChange || removed.length > 0) {
|
|
102
|
-
this.widget.refreshParsedInput();
|
|
103
|
-
this._onDidChangeReferences.fire();
|
|
104
|
-
}
|
|
105
|
-
this.updateDecorations();
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
findReferenceRangeInReplacement(model, changes, replacement, data) {
|
|
109
|
-
if (!data.text) {
|
|
110
|
-
return undefined;
|
|
111
|
-
}
|
|
112
|
-
const previousRelativeOffset = data.rangeOffset - replacement.rangeOffset;
|
|
113
|
-
let matchOffset = replacement.text.indexOf(data.text);
|
|
114
|
-
let closestMatchOffset = matchOffset;
|
|
115
|
-
while (matchOffset !== -1) {
|
|
116
|
-
if (Math.abs(matchOffset - previousRelativeOffset) < Math.abs(closestMatchOffset - previousRelativeOffset)) {
|
|
117
|
-
closestMatchOffset = matchOffset;
|
|
118
|
-
}
|
|
119
|
-
matchOffset = replacement.text.indexOf(data.text, matchOffset + data.text.length);
|
|
120
|
-
}
|
|
121
|
-
if (closestMatchOffset === -1) {
|
|
122
|
-
return undefined;
|
|
123
|
-
}
|
|
124
|
-
const precedingChangesDelta = changes.reduce(
|
|
125
|
-
(delta, change) => change.rangeOffset < replacement.rangeOffset ? delta + change.text.length - change.rangeLength : delta,
|
|
126
|
-
0
|
|
127
|
-
);
|
|
128
|
-
const startOffset = replacement.rangeOffset + precedingChangesDelta + closestMatchOffset;
|
|
129
|
-
const range = Range.fromPositions(
|
|
130
|
-
model.getPositionAt(startOffset),
|
|
131
|
-
model.getPositionAt(startOffset + data.text.length)
|
|
132
|
-
);
|
|
133
|
-
return model.getValueInRange(range) === data.text ? range : undefined;
|
|
134
|
-
}
|
|
135
|
-
getInputState(contrib) {
|
|
136
|
-
contrib[ChatDynamicVariableModel_1.ID] = [...this._variables];
|
|
137
|
-
}
|
|
138
|
-
setInputState(contrib) {
|
|
139
|
-
let s = contrib[ChatDynamicVariableModel_1.ID];
|
|
140
|
-
if (!Array.isArray(s)) {
|
|
141
|
-
s = [];
|
|
142
|
-
}
|
|
143
|
-
this.disposeVariables();
|
|
144
|
-
this._variables = [];
|
|
145
|
-
for (const variable of s) {
|
|
146
|
-
if (!isDynamicVariable(variable)) {
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
this.addReference(variable);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
addReference(ref) {
|
|
153
|
-
if (!isValidEditorRange(ref.range)) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
const existingAttachment = this.widget.input.attachmentModel.attachments.find(attachment => attachment.id === ref.id && !attachment.range);
|
|
157
|
-
if (existingAttachment) {
|
|
158
|
-
ref = toAttachedContextDynamicVariable(existingAttachment, ref.range);
|
|
159
|
-
}
|
|
160
|
-
this._variables.push(ref);
|
|
161
|
-
this.updateDecorations();
|
|
162
|
-
this.widget.refreshParsedInput();
|
|
163
|
-
this._onDidChangeReferences.fire();
|
|
164
|
-
}
|
|
165
|
-
updateDecorations() {
|
|
166
|
-
const model = this.widget.inputEditor.getModel();
|
|
167
|
-
if (!model) {
|
|
168
|
-
this.decorationData = [];
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
const validVariables = this._variables.filter(v => isValidEditorRange(v.range));
|
|
172
|
-
const decorationIds = this.widget.inputEditor.setDecorationsByType("chat", dynamicVariableDecorationType, ( validVariables.map(r => ({
|
|
173
|
-
range: r.range,
|
|
174
|
-
hoverMessage: this.getHoverForReference(r)
|
|
175
|
-
}))));
|
|
176
|
-
this._variables = validVariables.slice(0, decorationIds.length);
|
|
177
|
-
this.decorationData = [];
|
|
178
|
-
for (let i = 0; i < decorationIds.length; i++) {
|
|
179
|
-
const range = this._variables[i].range;
|
|
180
|
-
this.decorationData.push({
|
|
181
|
-
id: decorationIds[i],
|
|
182
|
-
text: model.getValueInRange(range),
|
|
183
|
-
rangeOffset: model.getOffsetAt({
|
|
184
|
-
lineNumber: range.startLineNumber,
|
|
185
|
-
column: range.startColumn
|
|
186
|
-
})
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
getHoverForReference(ref) {
|
|
191
|
-
const attachment = this.widget.input.attachmentModel.attachments.find(attachment => attachment.id === ref.id && !attachment.range);
|
|
192
|
-
if (attachment) {
|
|
193
|
-
return isImageVariableEntry(attachment) ? undefined : this.createAttachmentLabelHover(attachment);
|
|
194
|
-
}
|
|
195
|
-
const value = ref.data;
|
|
196
|
-
if (URI.isUri(value)) {
|
|
197
|
-
return ( new MarkdownString(this.labelService.getUriLabel(value, {
|
|
198
|
-
relative: true
|
|
199
|
-
})));
|
|
200
|
-
} else if (isLocation(value)) {
|
|
201
|
-
const prefix = ref.fullName ? ` ${ref.fullName}` : "";
|
|
202
|
-
const rangeString = `#${value.range.startLineNumber}-${value.range.endLineNumber}`;
|
|
203
|
-
return ( new MarkdownString(prefix + this.labelService.getUriLabel(value.uri, {
|
|
204
|
-
relative: true
|
|
205
|
-
}) + rangeString));
|
|
206
|
-
} else {
|
|
207
|
-
return undefined;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
createAttachmentLabelHover(attachment) {
|
|
211
|
-
const resource = IChatRequestVariableEntry.toUri(attachment) ?? attachment.references?.find(reference => URI.isUri(reference.reference))?.reference;
|
|
212
|
-
const label = URI.isUri(resource) ? this.labelService.getUriLabel(resource, {
|
|
213
|
-
relative: true
|
|
214
|
-
}) : attachment.modelDescription ?? attachment.fullName ?? attachment.name;
|
|
215
|
-
return ( new MarkdownString()).appendText(label);
|
|
216
|
-
}
|
|
217
|
-
disposeVariables() {
|
|
218
|
-
for (const variable of this._variables) {
|
|
219
|
-
if (isDisposable(variable)) {
|
|
220
|
-
variable.dispose();
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
dispose() {
|
|
225
|
-
this.disposeVariables();
|
|
226
|
-
super.dispose();
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
ChatDynamicVariableModel = ChatDynamicVariableModel_1 = ( __decorate([( __param(1, ILabelService))], ChatDynamicVariableModel));
|
|
230
|
-
function isDynamicVariable(obj) {
|
|
231
|
-
return obj && typeof obj.id === "string" && Range.isIRange(obj.range) && isValidEditorRange(obj.range) && "data" in obj;
|
|
232
|
-
}
|
|
233
|
-
function isValidEditorRange(range) {
|
|
234
|
-
if (range.startLineNumber < 1 || range.endLineNumber < 1 || range.startColumn < 1 || range.endColumn < 1) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
if (range.startLineNumber > range.endLineNumber) {
|
|
238
|
-
return false;
|
|
239
|
-
}
|
|
240
|
-
if (range.startLineNumber === range.endLineNumber && range.startColumn >= range.endColumn) {
|
|
241
|
-
return false;
|
|
242
|
-
}
|
|
243
|
-
return true;
|
|
244
|
-
}
|
|
245
|
-
function isAddDynamicVariableContext(context) {
|
|
246
|
-
return "widget" in context && "range" in context && "variableData" in context;
|
|
247
|
-
}
|
|
248
|
-
class AddDynamicVariableAction extends Action2 {
|
|
249
|
-
static {
|
|
250
|
-
this.ID = addDynamicVariableActionId;
|
|
251
|
-
}
|
|
252
|
-
constructor() {
|
|
253
|
-
super({
|
|
254
|
-
id: AddDynamicVariableAction.ID,
|
|
255
|
-
title: ""
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
async run(accessor, ...args) {
|
|
259
|
-
const context = args[0];
|
|
260
|
-
if (!isAddDynamicVariableContext(context)) {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
let range = context.range;
|
|
264
|
-
const variableData = context.variableData;
|
|
265
|
-
const doCleanup = () => {
|
|
266
|
-
context.widget.inputEditor.executeEdits("chatInsertDynamicVariableWithArguments", [{
|
|
267
|
-
range: context.range,
|
|
268
|
-
text: ``
|
|
269
|
-
}]);
|
|
270
|
-
};
|
|
271
|
-
if (context.command) {
|
|
272
|
-
const commandService = accessor.get(ICommandService);
|
|
273
|
-
const selection = await commandService.executeCommand(context.command.id, ...(context.command.arguments ?? []));
|
|
274
|
-
if (!selection) {
|
|
275
|
-
doCleanup();
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const insertText = ":" + selection;
|
|
279
|
-
const insertRange = ( new Range(
|
|
280
|
-
range.startLineNumber,
|
|
281
|
-
range.endColumn,
|
|
282
|
-
range.endLineNumber,
|
|
283
|
-
range.endColumn + insertText.length
|
|
284
|
-
));
|
|
285
|
-
range = ( new Range(
|
|
286
|
-
range.startLineNumber,
|
|
287
|
-
range.startColumn,
|
|
288
|
-
range.endLineNumber,
|
|
289
|
-
range.endColumn + insertText.length
|
|
290
|
-
));
|
|
291
|
-
const editor = context.widget.inputEditor;
|
|
292
|
-
const success = editor.executeEdits("chatInsertDynamicVariableWithArguments", [{
|
|
293
|
-
range: insertRange,
|
|
294
|
-
text: insertText + " "
|
|
295
|
-
}]);
|
|
296
|
-
if (!success) {
|
|
297
|
-
doCleanup();
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
context.widget.getContrib(ChatDynamicVariableModel.ID)?.addReference({
|
|
302
|
-
id: context.id,
|
|
303
|
-
range: range,
|
|
304
|
-
isFile: true,
|
|
305
|
-
data: variableData
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
registerAction2(AddDynamicVariableAction);
|
|
310
|
-
|
|
311
|
-
export { AddDynamicVariableAction, ChatDynamicVariableModel, dynamicVariableDecorationType };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IDynamicVariable } from "../../common/attachments/chatVariables.js";
|
|
2
|
-
import { IChatVariablesService } from "../../common/attachments/chatVariables.service.js";
|
|
3
|
-
import { ToolAndToolSetEnablementMap } from "../../common/tools/languageModelToolsService.js";
|
|
4
|
-
import { IChatWidget } from "../chat.js";
|
|
5
|
-
import { IChatWidgetService } from "../chat.service.js";
|
|
6
|
-
import { URI } from "../../../../../base/common/uri.js";
|
|
7
|
-
export declare function getDynamicVariablesForWidget(widget: IChatWidget): ReadonlyArray<IDynamicVariable>;
|
|
8
|
-
export declare function getSelectedToolAndToolSetsForWidget(widget: IChatWidget): ToolAndToolSetEnablementMap;
|
|
9
|
-
export declare class ChatVariablesService implements IChatVariablesService {
|
|
10
|
-
private readonly chatWidgetService;
|
|
11
|
-
_serviceBrand: undefined;
|
|
12
|
-
constructor(chatWidgetService: IChatWidgetService);
|
|
13
|
-
getDynamicVariables(sessionResource: URI): ReadonlyArray<IDynamicVariable>;
|
|
14
|
-
getSelectedToolAndToolSets(sessionResource: URI): ToolAndToolSetEnablementMap;
|
|
15
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { ToolAndToolSetEnablementMap } from '../../common/tools/languageModelToolsService.js';
|
|
4
|
-
import { IChatWidgetService } from '../chat.service.js';
|
|
5
|
-
import { ChatDynamicVariableModel } from './chatDynamicVariables.js';
|
|
6
|
-
import { Range } from '../../../../../editor/common/core/range.js';
|
|
7
|
-
|
|
8
|
-
function getDynamicVariablesForWidget(widget) {
|
|
9
|
-
if (!widget.viewModel) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
const model = widget.getContrib(ChatDynamicVariableModel.ID);
|
|
13
|
-
if (!model) {
|
|
14
|
-
return [];
|
|
15
|
-
}
|
|
16
|
-
if (!widget.supportsFileReferences) {
|
|
17
|
-
return model.variables.filter(variable => variable.isAttachmentReference);
|
|
18
|
-
}
|
|
19
|
-
if (widget.viewModel.editing && model.variables.length > 0) {
|
|
20
|
-
return model.variables;
|
|
21
|
-
}
|
|
22
|
-
if (widget.input.attachmentModel.attachments.length > 0 && widget.viewModel.editing) {
|
|
23
|
-
const references = [];
|
|
24
|
-
const editorModel = widget.inputEditor.getModel();
|
|
25
|
-
const modelTextLength = editorModel?.getValueLength() ?? 0;
|
|
26
|
-
for (const attachment of widget.input.attachmentModel.attachments) {
|
|
27
|
-
if (attachment.range) {
|
|
28
|
-
if (attachment.range.start >= attachment.range.endExclusive) {
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (attachment.range.start < 0 || attachment.range.endExclusive > modelTextLength) {
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (!editorModel) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
const startPos = editorModel.getPositionAt(attachment.range.start);
|
|
38
|
-
const endPos = editorModel.getPositionAt(attachment.range.endExclusive);
|
|
39
|
-
const referenceObj = {
|
|
40
|
-
id: attachment.id,
|
|
41
|
-
fullName: attachment.name,
|
|
42
|
-
modelDescription: attachment.modelDescription,
|
|
43
|
-
range: ( new Range(startPos.lineNumber, startPos.column, endPos.lineNumber, endPos.column)),
|
|
44
|
-
icon: attachment.icon,
|
|
45
|
-
isFile: attachment.kind === "file",
|
|
46
|
-
isDirectory: attachment.kind === "directory",
|
|
47
|
-
data: attachment.value
|
|
48
|
-
};
|
|
49
|
-
references.push(referenceObj);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return references.length > 0 ? references : model.variables;
|
|
53
|
-
}
|
|
54
|
-
return model.variables;
|
|
55
|
-
}
|
|
56
|
-
function getSelectedToolAndToolSetsForWidget(widget) {
|
|
57
|
-
return widget.input.selectedToolsModel.entriesMap.get();
|
|
58
|
-
}
|
|
59
|
-
let ChatVariablesService = class ChatVariablesService {
|
|
60
|
-
constructor(chatWidgetService) {
|
|
61
|
-
this.chatWidgetService = chatWidgetService;
|
|
62
|
-
}
|
|
63
|
-
getDynamicVariables(sessionResource) {
|
|
64
|
-
const widget = this.chatWidgetService.getWidgetBySessionResource(sessionResource);
|
|
65
|
-
if (!widget) {
|
|
66
|
-
return [];
|
|
67
|
-
}
|
|
68
|
-
return getDynamicVariablesForWidget(widget);
|
|
69
|
-
}
|
|
70
|
-
getSelectedToolAndToolSets(sessionResource) {
|
|
71
|
-
const widget = this.chatWidgetService.getWidgetBySessionResource(sessionResource);
|
|
72
|
-
if (!widget) {
|
|
73
|
-
return ToolAndToolSetEnablementMap.fromEntries([]);
|
|
74
|
-
}
|
|
75
|
-
return getSelectedToolAndToolSetsForWidget(widget);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
ChatVariablesService = ( __decorate([( __param(0, IChatWidgetService))], ChatVariablesService));
|
|
79
|
-
|
|
80
|
-
export { ChatVariablesService, getDynamicVariablesForWidget, getSelectedToolAndToolSetsForWidget };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { renderAsPlaintext } from '../../../../../base/browser/markdownRenderer.js';
|
|
3
|
-
import { localize } from '../../../../../nls.js';
|
|
4
|
-
import { IChatToolInvocation } from '../../common/chatService/chatService.js';
|
|
5
|
-
|
|
6
|
-
function getInProgressSessionDescription(chatModel) {
|
|
7
|
-
const requests = chatModel.getRequests();
|
|
8
|
-
if (requests.length === 0) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
const lastRequest = requests.at(-1);
|
|
12
|
-
const response = lastRequest?.response;
|
|
13
|
-
if (!response) {
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
if (response.isComplete) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
const responseParts = response.response.value;
|
|
20
|
-
let description = "";
|
|
21
|
-
for (let i = responseParts.length - 1; i >= 0; i--) {
|
|
22
|
-
const part = responseParts[i];
|
|
23
|
-
if (description) {
|
|
24
|
-
break;
|
|
25
|
-
}
|
|
26
|
-
if (part.kind === "confirmation" && typeof part.message === "string") {
|
|
27
|
-
description = part.message;
|
|
28
|
-
} else if (part.kind === "toolInvocation") {
|
|
29
|
-
const toolInvocation = part;
|
|
30
|
-
if (IChatToolInvocation.isEffectivelyHidden(toolInvocation)) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const state = toolInvocation.state.get();
|
|
34
|
-
description = toolInvocation.generatedTitle || toolInvocation.pastTenseMessage || toolInvocation.invocationMessage;
|
|
35
|
-
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
36
|
-
const confirmationTitle = state.confirmationMessages?.title;
|
|
37
|
-
const titleMessage = confirmationTitle && (typeof confirmationTitle === "string" ? confirmationTitle : confirmationTitle.value);
|
|
38
|
-
const descriptionValue = typeof description === "string" ? description : description.value;
|
|
39
|
-
description = titleMessage ?? ( localize(8539, "Waiting for confirmation: {0}", descriptionValue));
|
|
40
|
-
}
|
|
41
|
-
} else if (part.kind === "toolInvocationSerialized") {
|
|
42
|
-
if (IChatToolInvocation.isEffectivelyHidden(part)) {
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
description = part.invocationMessage;
|
|
46
|
-
} else if (part.kind === "progressMessage") {
|
|
47
|
-
description = part.content;
|
|
48
|
-
} else if (part.kind === "thinking") {
|
|
49
|
-
description = ( localize(8540, "Thinking..."));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return description ? renderAsPlaintext(description, {
|
|
53
|
-
useLinkFormatter: true
|
|
54
|
-
}) : "";
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { getInProgressSessionDescription };
|