@codingame/monaco-vscode-chat-service-override 29.1.1 → 30.0.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/index.js +5 -2
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +37 -39
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +11 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +4 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +132 -42
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +54 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +5 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +188 -51
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +7 -6
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +7 -2
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +6 -0
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +14 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +37 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +37 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +20 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +18 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +482 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +43 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +27 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +86 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +38 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +38 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +427 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +108 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +3 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +65 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +64 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +288 -195
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +19 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +54 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +86 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +65 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +24 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +3 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +54 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +24 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +72 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +181 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +28 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +1 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +148 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +16 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +158 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +155 -76
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +228 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +25 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +130 -107
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +19 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +2 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +169 -266
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +12 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +149 -206
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +20 -8
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +183 -43
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +26 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +4 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +150 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +66 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +239 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +0 -208
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +0 -637
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +0 -384
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +0 -55
- /package/vscode/src/vs/workbench/contrib/chat/{common → browser}/promptSyntax/promptFileContributions.d.ts +0 -0
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { isFalsyOrEmpty } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
-
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
-
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
-
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
8
|
-
import { basename, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
-
import { isFalsyOrWhitespace } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
10
|
-
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
11
|
-
import { isObject, assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
12
|
-
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
|
-
import { Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
14
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
15
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
16
|
-
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
17
|
-
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
18
|
-
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
19
|
-
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
20
|
-
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
21
|
-
import { CHAT_CONFIG_MENU_ID, CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
22
|
-
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
23
|
-
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
24
|
-
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
25
|
-
import { getAllCodicons, Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
26
|
-
import { isValidBasename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/extpath';
|
|
27
|
-
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
28
|
-
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/jsonc';
|
|
29
|
-
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
30
|
-
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
31
|
-
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
32
|
-
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
33
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
34
|
-
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
35
|
-
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
36
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
37
|
-
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
38
|
-
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
39
|
-
|
|
40
|
-
const toolEnumValues = [];
|
|
41
|
-
const toolEnumDescriptions = [];
|
|
42
|
-
const toolSetSchemaId = "vscode://schemas/toolsets";
|
|
43
|
-
const toolSetsSchema = {
|
|
44
|
-
id: toolSetSchemaId,
|
|
45
|
-
allowComments: true,
|
|
46
|
-
allowTrailingCommas: true,
|
|
47
|
-
defaultSnippets: [{
|
|
48
|
-
label: ( localize(6632, "Empty tool set")),
|
|
49
|
-
body: {
|
|
50
|
-
"${1:toolSetName}": {
|
|
51
|
-
"tools": ["${2:someTool}", "${3:anotherTool}"],
|
|
52
|
-
"description": "${4:description}",
|
|
53
|
-
"icon": "${5:tools}"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}],
|
|
57
|
-
type: "object",
|
|
58
|
-
description: ( localize(6633, "User tool sets configuration")),
|
|
59
|
-
additionalProperties: {
|
|
60
|
-
type: "object",
|
|
61
|
-
required: ["tools"],
|
|
62
|
-
additionalProperties: false,
|
|
63
|
-
properties: {
|
|
64
|
-
tools: {
|
|
65
|
-
description: ( localize(
|
|
66
|
-
6634,
|
|
67
|
-
"A list of tools or tool sets to include in this tool set. Cannot be empty and must reference tools the way they are referenced in prompts."
|
|
68
|
-
)),
|
|
69
|
-
type: "array",
|
|
70
|
-
minItems: 1,
|
|
71
|
-
items: {
|
|
72
|
-
type: "string",
|
|
73
|
-
enum: toolEnumValues,
|
|
74
|
-
enumDescriptions: toolEnumDescriptions
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
icon: {
|
|
78
|
-
description: ( localize(
|
|
79
|
-
6635,
|
|
80
|
-
"Icon to use for this tool set in the UI. Uses the \"\\$(name)\"-syntax, like \"\\$(zap)\""
|
|
81
|
-
)),
|
|
82
|
-
type: "string",
|
|
83
|
-
enum: Array.from(getAllCodicons(), icon => icon.id),
|
|
84
|
-
markdownEnumDescriptions: Array.from(getAllCodicons(), icon => `$(${icon.id})`)
|
|
85
|
-
},
|
|
86
|
-
description: {
|
|
87
|
-
description: ( localize(6636, "A short description of this tool set.")),
|
|
88
|
-
type: "string"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const reg = ( Registry.as(Extensions.JSONContribution));
|
|
94
|
-
class RawToolSetsShape {
|
|
95
|
-
static {
|
|
96
|
-
this.suffix = ".toolsets.jsonc";
|
|
97
|
-
}
|
|
98
|
-
static isToolSetFileName(uri) {
|
|
99
|
-
return basename(uri).endsWith(RawToolSetsShape.suffix);
|
|
100
|
-
}
|
|
101
|
-
static from(data, logService) {
|
|
102
|
-
if (!isObject(data)) {
|
|
103
|
-
throw ( new Error(`Invalid tool set data`));
|
|
104
|
-
}
|
|
105
|
-
const map = ( new Map());
|
|
106
|
-
for (const [name, value] of Object.entries(data)) {
|
|
107
|
-
if (isFalsyOrWhitespace(name)) {
|
|
108
|
-
logService.error(`Tool set name cannot be empty`);
|
|
109
|
-
}
|
|
110
|
-
if (isFalsyOrEmpty(value.tools)) {
|
|
111
|
-
logService.error(`Tool set '${name}' cannot have an empty tools array`);
|
|
112
|
-
}
|
|
113
|
-
map.set(name, {
|
|
114
|
-
name,
|
|
115
|
-
tools: value.tools,
|
|
116
|
-
description: value.description,
|
|
117
|
-
icon: value.icon
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
return new class extends RawToolSetsShape {}(map);
|
|
121
|
-
}
|
|
122
|
-
constructor(entries) {
|
|
123
|
-
this.entries = ( Object.freeze(( new Map(entries))));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
let UserToolSetsContributions = class UserToolSetsContributions extends Disposable {
|
|
127
|
-
static {
|
|
128
|
-
this.ID = "chat.userToolSets";
|
|
129
|
-
}
|
|
130
|
-
constructor(
|
|
131
|
-
extensionService,
|
|
132
|
-
lifecycleService,
|
|
133
|
-
_languageModelToolsService,
|
|
134
|
-
_userDataProfileService,
|
|
135
|
-
_fileService,
|
|
136
|
-
_logService
|
|
137
|
-
) {
|
|
138
|
-
super();
|
|
139
|
-
this._languageModelToolsService = _languageModelToolsService;
|
|
140
|
-
this._userDataProfileService = _userDataProfileService;
|
|
141
|
-
this._fileService = _fileService;
|
|
142
|
-
this._logService = _logService;
|
|
143
|
-
Promise.allSettled([
|
|
144
|
-
extensionService.whenInstalledExtensionsRegistered,
|
|
145
|
-
lifecycleService.when(LifecyclePhase.Restored)
|
|
146
|
-
]).then(() => this._initToolSets());
|
|
147
|
-
const toolsObs = observableFromEvent(
|
|
148
|
-
this,
|
|
149
|
-
_languageModelToolsService.onDidChangeTools,
|
|
150
|
-
() => Array.from(_languageModelToolsService.getAllToolsIncludingDisabled())
|
|
151
|
-
);
|
|
152
|
-
const store = this._store.add(( new DisposableStore()));
|
|
153
|
-
this._store.add(autorun(r => {
|
|
154
|
-
const tools = toolsObs.read(r);
|
|
155
|
-
const toolSets = this._languageModelToolsService.toolSets.read(r);
|
|
156
|
-
const data = [];
|
|
157
|
-
for (const tool of tools) {
|
|
158
|
-
if (tool.canBeReferencedInPrompt) {
|
|
159
|
-
data.push({
|
|
160
|
-
name: tool.toolReferenceName ?? tool.displayName,
|
|
161
|
-
sourceLabel: ToolDataSource.classify(tool.source).label,
|
|
162
|
-
sourceOrdinal: ToolDataSource.classify(tool.source).ordinal,
|
|
163
|
-
description: tool.userDescription ?? tool.modelDescription
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
for (const toolSet of toolSets) {
|
|
168
|
-
data.push({
|
|
169
|
-
name: toolSet.referenceName,
|
|
170
|
-
sourceLabel: ToolDataSource.classify(toolSet.source).label,
|
|
171
|
-
sourceOrdinal: ToolDataSource.classify(toolSet.source).ordinal,
|
|
172
|
-
description: toolSet.description
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
toolEnumValues.length = 0;
|
|
176
|
-
toolEnumDescriptions.length = 0;
|
|
177
|
-
data.sort((a, b) => {
|
|
178
|
-
if (a.sourceOrdinal !== b.sourceOrdinal) {
|
|
179
|
-
return a.sourceOrdinal - b.sourceOrdinal;
|
|
180
|
-
}
|
|
181
|
-
if (a.sourceLabel !== b.sourceLabel) {
|
|
182
|
-
return a.sourceLabel.localeCompare(b.sourceLabel);
|
|
183
|
-
}
|
|
184
|
-
return a.name.localeCompare(b.name);
|
|
185
|
-
});
|
|
186
|
-
for (const item of data) {
|
|
187
|
-
toolEnumValues.push(item.name);
|
|
188
|
-
toolEnumDescriptions.push(( localize(6637, "{1} ({0})\n\n{2}", item.sourceLabel, item.name, item.description)));
|
|
189
|
-
}
|
|
190
|
-
store.clear();
|
|
191
|
-
reg.registerSchema(toolSetSchemaId, toolSetsSchema, store);
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
_initToolSets() {
|
|
195
|
-
const promptFolder = observableFromEvent(
|
|
196
|
-
this,
|
|
197
|
-
this._userDataProfileService.onDidChangeCurrentProfile,
|
|
198
|
-
() => this._userDataProfileService.currentProfile.promptsHome
|
|
199
|
-
);
|
|
200
|
-
const toolsSig = observableSignalFromEvent(this, this._languageModelToolsService.onDidChangeTools);
|
|
201
|
-
const fileEventSig = observableSignalFromEvent(
|
|
202
|
-
this,
|
|
203
|
-
Event.filter(this._fileService.onDidFilesChange, e => e.affects(promptFolder.get()))
|
|
204
|
-
);
|
|
205
|
-
const store = this._store.add(( new DisposableStore()));
|
|
206
|
-
const getFilesInFolder = async folder => {
|
|
207
|
-
try {
|
|
208
|
-
return (await this._fileService.resolve(folder)).children ?? [];
|
|
209
|
-
} catch (err) {
|
|
210
|
-
return [];
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
this._store.add(autorun(async r => {
|
|
214
|
-
store.clear();
|
|
215
|
-
toolsSig.read(r);
|
|
216
|
-
fileEventSig.read(r);
|
|
217
|
-
const uri = promptFolder.read(r);
|
|
218
|
-
const cts = ( new CancellationTokenSource());
|
|
219
|
-
store.add(toDisposable(() => cts.dispose(true)));
|
|
220
|
-
const entries = await getFilesInFolder(uri);
|
|
221
|
-
if (cts.token.isCancellationRequested) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
for (const entry of entries) {
|
|
225
|
-
if (!entry.isFile || !RawToolSetsShape.isToolSetFileName(entry.resource)) {
|
|
226
|
-
continue;
|
|
227
|
-
}
|
|
228
|
-
store.add(this._fileService.watch(entry.resource));
|
|
229
|
-
let data;
|
|
230
|
-
try {
|
|
231
|
-
const content = await this._fileService.readFile(entry.resource, undefined, cts.token);
|
|
232
|
-
const rawObj = parse(( content.value.toString()));
|
|
233
|
-
data = RawToolSetsShape.from(rawObj, this._logService);
|
|
234
|
-
} catch (err) {
|
|
235
|
-
this._logService.error(`Error reading tool set file ${( entry.resource.toString())}:`, err);
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
238
|
-
if (cts.token.isCancellationRequested) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
for (const [name, value] of data.entries) {
|
|
242
|
-
const tools = [];
|
|
243
|
-
const toolSets = [];
|
|
244
|
-
value.tools.forEach(name => {
|
|
245
|
-
const tool = this._languageModelToolsService.getToolByName(name);
|
|
246
|
-
if (tool) {
|
|
247
|
-
tools.push(tool);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const toolSet = this._languageModelToolsService.getToolSetByName(name);
|
|
251
|
-
if (toolSet) {
|
|
252
|
-
toolSets.push(toolSet);
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
if (tools.length === 0 && toolSets.length === 0) {
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
const toolset = this._languageModelToolsService.createToolSet({
|
|
260
|
-
type: "user",
|
|
261
|
-
file: entry.resource,
|
|
262
|
-
label: basename(entry.resource)
|
|
263
|
-
}, `user/${( entry.resource.toString())}/${name}`, name, {
|
|
264
|
-
icon: value.icon ? ThemeIcon.fromId(value.icon) : undefined,
|
|
265
|
-
description: value.description
|
|
266
|
-
});
|
|
267
|
-
transaction(tx => {
|
|
268
|
-
store.add(toolset);
|
|
269
|
-
tools.forEach(tool => store.add(toolset.addTool(tool, tx)));
|
|
270
|
-
toolSets.forEach(toolSet => store.add(toolset.addToolSet(toolSet, tx)));
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}));
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
UserToolSetsContributions = ( __decorate([( __param(0, IExtensionService)), ( __param(1, ILifecycleService)), ( __param(2, ILanguageModelToolsService)), ( __param(3, IUserDataProfileService)), ( __param(4, IFileService)), ( __param(5, ILogService))], UserToolSetsContributions));
|
|
278
|
-
class ConfigureToolSets extends Action2 {
|
|
279
|
-
static {
|
|
280
|
-
this.ID = "chat.configureToolSets";
|
|
281
|
-
}
|
|
282
|
-
constructor() {
|
|
283
|
-
super({
|
|
284
|
-
id: ConfigureToolSets.ID,
|
|
285
|
-
title: ( localize2(6638, "Configure Tool Sets...")),
|
|
286
|
-
shortTitle: ( localize(6639, "Tool Sets")),
|
|
287
|
-
category: CHAT_CATEGORY,
|
|
288
|
-
f1: true,
|
|
289
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.Tools.toolsCount.greater(0))),
|
|
290
|
-
menu: [{
|
|
291
|
-
id: CHAT_CONFIG_MENU_ID,
|
|
292
|
-
when: ( ContextKeyExpr.equals("view", ChatViewId)),
|
|
293
|
-
order: 11,
|
|
294
|
-
group: "2_level"
|
|
295
|
-
}, {
|
|
296
|
-
id: MenuId.ViewTitle,
|
|
297
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.equals("view", ChatViewId)), ( ContextKeyExpr.has(`config.${ChatConfiguration.ChatCustomizationMenuEnabled}`)))),
|
|
298
|
-
order: 11,
|
|
299
|
-
group: "2_level"
|
|
300
|
-
}]
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
async run(accessor) {
|
|
304
|
-
const toolsService = accessor.get(ILanguageModelToolsService);
|
|
305
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
306
|
-
const editorService = accessor.get(IEditorService);
|
|
307
|
-
const userDataProfileService = accessor.get(IUserDataProfileService);
|
|
308
|
-
const fileService = accessor.get(IFileService);
|
|
309
|
-
const textFileService = accessor.get(ITextFileService);
|
|
310
|
-
const picks = [];
|
|
311
|
-
picks.push({
|
|
312
|
-
label: ( localize(6640, "Create new tool sets file...")),
|
|
313
|
-
alwaysShow: true,
|
|
314
|
-
iconClass: ThemeIcon.asClassName(Codicon.plus)
|
|
315
|
-
});
|
|
316
|
-
for (const toolSet of toolsService.toolSets.get()) {
|
|
317
|
-
if (toolSet.source.type !== "user") {
|
|
318
|
-
continue;
|
|
319
|
-
}
|
|
320
|
-
picks.push({
|
|
321
|
-
label: toolSet.referenceName,
|
|
322
|
-
toolset: toolSet,
|
|
323
|
-
tooltip: toolSet.description,
|
|
324
|
-
iconClass: ThemeIcon.asClassName(toolSet.icon)
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
const pick = await quickInputService.pick(picks, {
|
|
328
|
-
canPickMany: false,
|
|
329
|
-
placeHolder: ( localize(6641, "Select a tool set to configure"))
|
|
330
|
-
});
|
|
331
|
-
if (!pick) {
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
let resource;
|
|
335
|
-
if (!pick.toolset) {
|
|
336
|
-
const name = await quickInputService.input({
|
|
337
|
-
placeHolder: ( localize(6642, "Type tool sets file name")),
|
|
338
|
-
validateInput: async input => {
|
|
339
|
-
if (!input) {
|
|
340
|
-
return localize(6643, "Invalid file name");
|
|
341
|
-
}
|
|
342
|
-
if (!isValidBasename(input)) {
|
|
343
|
-
return localize(6644, "'{0}' is not a valid file name", input);
|
|
344
|
-
}
|
|
345
|
-
return undefined;
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
if (isFalsyOrWhitespace(name)) {
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
resource = joinPath(
|
|
352
|
-
userDataProfileService.currentProfile.promptsHome,
|
|
353
|
-
`${name}${RawToolSetsShape.suffix}`
|
|
354
|
-
);
|
|
355
|
-
if (!(await fileService.exists(resource))) {
|
|
356
|
-
await textFileService.write(resource, [
|
|
357
|
-
"// Place your tool sets here...",
|
|
358
|
-
"// Example:",
|
|
359
|
-
"// {",
|
|
360
|
-
"// \t\"toolSetName\": {",
|
|
361
|
-
"// \t\t\"tools\": [",
|
|
362
|
-
"// \t\t\t\"someTool\",",
|
|
363
|
-
"// \t\t\t\"anotherTool\"",
|
|
364
|
-
"// \t\t],",
|
|
365
|
-
"// \t\t\"description\": \"description\",",
|
|
366
|
-
"// \t\t\"icon\": \"tools\"",
|
|
367
|
-
"// \t}",
|
|
368
|
-
"// }"
|
|
369
|
-
].join("\n"));
|
|
370
|
-
}
|
|
371
|
-
} else {
|
|
372
|
-
assertType(pick.toolset.source.type === "user");
|
|
373
|
-
resource = pick.toolset.source.file;
|
|
374
|
-
}
|
|
375
|
-
await editorService.openEditor({
|
|
376
|
-
resource,
|
|
377
|
-
options: {
|
|
378
|
-
pinned: true
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export { ConfigureToolSets, UserToolSetsContributions };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
|
-
import { IAgentSkill, IInternalPromptPath } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
5
|
-
import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
6
|
-
import { InternalSkill } from "./internalSkill.js";
|
|
7
|
-
export { InternalSkill } from "./internalSkill.js";
|
|
8
|
-
/**
|
|
9
|
-
* Manages built-in internal customizations (skills, instructions, agents, etc.)
|
|
10
|
-
* backed by a readonly virtual filesystem.
|
|
11
|
-
*
|
|
12
|
-
* To add a new internal skill, create an {@link InternalSkill} instance and
|
|
13
|
-
* register it in the constructor.
|
|
14
|
-
*/
|
|
15
|
-
export declare class ChatInternalCustomizations extends Disposable {
|
|
16
|
-
private readonly skills;
|
|
17
|
-
private readonly skillsByUri;
|
|
18
|
-
constructor(fileService: IFileService);
|
|
19
|
-
/**
|
|
20
|
-
* Returns the {@link IAgentSkill} metadata for all internal skills,
|
|
21
|
-
* for injection into the skills list.
|
|
22
|
-
*/
|
|
23
|
-
getSkills(): readonly IAgentSkill[];
|
|
24
|
-
/**
|
|
25
|
-
* Looks up the {@link InternalSkill} instance for a given URI,
|
|
26
|
-
* e.g. to check its {@link InternalSkill.when} clause.
|
|
27
|
-
*/
|
|
28
|
-
getInternalSkillByUri(uri: URI): InternalSkill | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Returns internal prompt file paths for a given customization type.
|
|
31
|
-
*/
|
|
32
|
-
getPromptPaths(type: PromptsType): readonly IInternalPromptPath[];
|
|
33
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
4
|
-
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
5
|
-
import { registerChatInternalFileSystem } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem';
|
|
6
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
7
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
8
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
9
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
10
|
-
|
|
11
|
-
class ChatInternalCustomizations extends Disposable {
|
|
12
|
-
constructor(fileService) {
|
|
13
|
-
super();
|
|
14
|
-
this.skillsByUri = ( new Map());
|
|
15
|
-
const {
|
|
16
|
-
provider,
|
|
17
|
-
disposable: fsDisposable
|
|
18
|
-
} = registerChatInternalFileSystem(fileService);
|
|
19
|
-
this._register(fsDisposable);
|
|
20
|
-
this.skills = [];
|
|
21
|
-
for (const skill of this.skills) {
|
|
22
|
-
provider.registerFile(skill.uri, skill.content);
|
|
23
|
-
this.skillsByUri.set(( skill.uri.toString()), skill);
|
|
24
|
-
this._register(skill);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
getSkills() {
|
|
28
|
-
return ( this.skills.map(s => s.skill));
|
|
29
|
-
}
|
|
30
|
-
getInternalSkillByUri(uri) {
|
|
31
|
-
return this.skillsByUri.get(( uri.toString()));
|
|
32
|
-
}
|
|
33
|
-
getPromptPaths(type) {
|
|
34
|
-
if (type === PromptsType.skill) {
|
|
35
|
-
return ( this.skills.map(s => ({
|
|
36
|
-
uri: s.uri,
|
|
37
|
-
storage: PromptsStorage.internal,
|
|
38
|
-
type,
|
|
39
|
-
name: s.name,
|
|
40
|
-
description: s.description
|
|
41
|
-
})));
|
|
42
|
-
}
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { ChatInternalCustomizations };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { ContextKeyExpression } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
4
|
-
import { IAgentSkill } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
5
|
-
/**
|
|
6
|
-
* A built-in skill backed by the internal readonly virtual filesystem.
|
|
7
|
-
*
|
|
8
|
-
* To add a new internal skill, create an instance documenting the skill
|
|
9
|
-
* name, description and SKILL.md content, then add it to the
|
|
10
|
-
* {@link internalSkills} array in {@link internalCustomizations.ts}.
|
|
11
|
-
*/
|
|
12
|
-
export declare class InternalSkill extends Disposable {
|
|
13
|
-
readonly name: string;
|
|
14
|
-
readonly description: string;
|
|
15
|
-
readonly content: string;
|
|
16
|
-
/** Virtual filesystem URI for the SKILL.md file. */
|
|
17
|
-
readonly uri: URI;
|
|
18
|
-
/** The skill metadata exposed to the skills list and system prompt. */
|
|
19
|
-
readonly skill: IAgentSkill;
|
|
20
|
-
/**
|
|
21
|
-
* Optional context key expression. When set, the skill is only included
|
|
22
|
-
* in the system prompt when this expression evaluates to true.
|
|
23
|
-
*/
|
|
24
|
-
readonly when: ContextKeyExpression | undefined;
|
|
25
|
-
constructor(name: string, description: string, content: string, options?: {
|
|
26
|
-
disableModelInvocation?: boolean;
|
|
27
|
-
userInvocable?: boolean;
|
|
28
|
-
when?: ContextKeyExpression;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { PromptLinkProvider } from './languageProviders/promptLinkProvider.js';
|
|
4
|
-
import { PromptBodyAutocompletion } from './languageProviders/promptBodyAutocompletion.js';
|
|
5
|
-
import { PromptHeaderAutocompletion } from './languageProviders/promptHeaderAutocompletion.js';
|
|
6
|
-
import { PromptHoverProvider } from './languageProviders/promptHovers.js';
|
|
7
|
-
import { PromptHeaderDefinitionProvider } from './languageProviders/PromptHeaderDefinitionProvider.js';
|
|
8
|
-
import { PromptValidatorContribution } from './languageProviders/promptValidator.js';
|
|
9
|
-
import { PromptDocumentSemanticTokensProvider } from './languageProviders/promptDocumentSemanticTokensProvider.js';
|
|
10
|
-
import { PromptCodeActionProvider } from './languageProviders/promptCodeActions.js';
|
|
11
|
-
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
12
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
13
|
-
import { ALL_PROMPTS_LANGUAGE_SELECTOR } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
14
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
-
|
|
16
|
-
let PromptLanguageFeaturesProvider = class PromptLanguageFeaturesProvider extends Disposable {
|
|
17
|
-
static {
|
|
18
|
-
this.ID = "chat.promptLanguageFeatures";
|
|
19
|
-
}
|
|
20
|
-
constructor(languageService, instantiationService) {
|
|
21
|
-
super();
|
|
22
|
-
this._register(languageService.linkProvider.register(
|
|
23
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
24
|
-
instantiationService.createInstance(PromptLinkProvider)
|
|
25
|
-
));
|
|
26
|
-
this._register(languageService.completionProvider.register(
|
|
27
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
28
|
-
instantiationService.createInstance(PromptBodyAutocompletion)
|
|
29
|
-
));
|
|
30
|
-
this._register(languageService.completionProvider.register(
|
|
31
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
32
|
-
instantiationService.createInstance(PromptHeaderAutocompletion)
|
|
33
|
-
));
|
|
34
|
-
this._register(languageService.hoverProvider.register(
|
|
35
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
36
|
-
instantiationService.createInstance(PromptHoverProvider)
|
|
37
|
-
));
|
|
38
|
-
this._register(languageService.definitionProvider.register(
|
|
39
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
40
|
-
instantiationService.createInstance(PromptHeaderDefinitionProvider)
|
|
41
|
-
));
|
|
42
|
-
this._register(languageService.documentSemanticTokensProvider.register(
|
|
43
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
44
|
-
instantiationService.createInstance(PromptDocumentSemanticTokensProvider)
|
|
45
|
-
));
|
|
46
|
-
this._register(languageService.codeActionProvider.register(
|
|
47
|
-
ALL_PROMPTS_LANGUAGE_SELECTOR,
|
|
48
|
-
instantiationService.createInstance(PromptCodeActionProvider)
|
|
49
|
-
));
|
|
50
|
-
this._register(instantiationService.createInstance(PromptValidatorContribution));
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
PromptLanguageFeaturesProvider = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1, IInstantiationService))], PromptLanguageFeaturesProvider));
|
|
54
|
-
|
|
55
|
-
export { PromptLanguageFeaturesProvider };
|
|
File without changes
|