@codingame/monaco-vscode-chat-service-override 29.1.0 → 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
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js
CHANGED
|
@@ -4,11 +4,11 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
4
4
|
import * as aiCustomizationManagement from './media/aiCustomizationManagement.css';
|
|
5
5
|
import { $ as $$1, append, addDisposableListener, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
7
|
-
import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { DisposableStore, Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
8
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
9
9
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
10
10
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
|
-
import {
|
|
11
|
+
import { basename, isEqual, dirname, isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
12
12
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
13
13
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
14
14
|
import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
@@ -20,7 +20,7 @@ import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
20
20
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
21
21
|
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
22
22
|
import { promptIcon, hookIcon, instructionsIcon, skillIcon, agentIcon, pluginIcon, extensionIcon, userIcon, workspaceIcon, builtinIcon } from './aiCustomizationIcons.js';
|
|
23
|
-
import { AI_CUSTOMIZATION_ITEM_TYPE_KEY,
|
|
23
|
+
import { AI_CUSTOMIZATION_ITEM_TYPE_KEY, AI_CUSTOMIZATION_ITEM_URI_KEY, AI_CUSTOMIZATION_ITEM_DISABLED_KEY, AI_CUSTOMIZATION_ITEM_STORAGE_KEY, AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, AICustomizationManagementItemMenuId, AICustomizationManagementCreateMenuId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement';
|
|
24
24
|
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
25
25
|
import { InputBox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
26
26
|
import { defaultInputBoxStyles, defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
@@ -30,6 +30,7 @@ import { HighlightedLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/br
|
|
|
30
30
|
import { matchesContiguousSubString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/filters';
|
|
31
31
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
32
32
|
import { Button, ButtonWithDropdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
33
|
+
import { MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
33
34
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
34
35
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
35
36
|
import { createActionViewItem, getContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
@@ -55,11 +56,12 @@ import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform'
|
|
|
55
56
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
56
57
|
import { matchesWorkspaceSubpath, matchesInstructionFileFilter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService';
|
|
57
58
|
import { ICustomizationHarnessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service';
|
|
58
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
59
|
-
import { isInClaudeRulesFolder, getCleanPromptName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
60
59
|
import { evaluateApplyToPattern } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions';
|
|
61
|
-
import {
|
|
60
|
+
import { AGENT_MD_FILENAME, CLAUDE_MD_FILENAME, CLAUDE_LOCAL_MD_FILENAME, COPILOT_CUSTOM_INSTRUCTIONS_FILENAME, getCleanPromptName, isInClaudeRulesFolder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
62
61
|
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
62
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
63
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
64
|
+
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
63
65
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
64
66
|
|
|
65
67
|
registerCss(aiCustomizationManagement);
|
|
@@ -161,7 +163,16 @@ function storageToIcon(storage) {
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
function formatDisplayName(name) {
|
|
164
|
-
return name.replace(/\.md$/i, "")
|
|
166
|
+
return name.replace(/\.md$/i, "");
|
|
167
|
+
}
|
|
168
|
+
const AGENT_INSTRUCTION_FILENAMES = ( new Set([
|
|
169
|
+
AGENT_MD_FILENAME.toLowerCase(),
|
|
170
|
+
CLAUDE_MD_FILENAME.toLowerCase(),
|
|
171
|
+
CLAUDE_LOCAL_MD_FILENAME.toLowerCase(),
|
|
172
|
+
COPILOT_CUSTOM_INSTRUCTIONS_FILENAME.toLowerCase()
|
|
173
|
+
]));
|
|
174
|
+
function isAgentInstructionFile(uri) {
|
|
175
|
+
return ( AGENT_INSTRUCTION_FILENAMES.has(basename(uri).toLowerCase()));
|
|
165
176
|
}
|
|
166
177
|
let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
167
178
|
constructor(
|
|
@@ -215,16 +226,24 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
215
226
|
...ThemeIcon.asClassNameArray(element.typeIcon ?? promptTypeToIcon(element.promptType))
|
|
216
227
|
);
|
|
217
228
|
templateData.elementDisposables.add(this.hoverService.setupDelayedHover(templateData.container, () => {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
229
|
+
let content;
|
|
230
|
+
if (element.isBuiltin) {
|
|
231
|
+
content = `${element.name}\n${( localize(5301, "Built-in"))}`;
|
|
232
|
+
} else if (element.extensionLabel) {
|
|
233
|
+
content = `${element.name}\n${( localize(5302, "Extension: {0}", element.extensionLabel))}`;
|
|
234
|
+
} else {
|
|
235
|
+
const isWorkspaceItem = element.storage === PromptsStorage.local;
|
|
236
|
+
const uriLabel = this.labelService.getUriLabel(element.uri, {
|
|
237
|
+
relative: isWorkspaceItem
|
|
238
|
+
});
|
|
239
|
+
content = `${element.name}\n${uriLabel}`;
|
|
240
|
+
}
|
|
222
241
|
if (element.badgeTooltip) {
|
|
223
242
|
content += `\n\n${element.badgeTooltip}`;
|
|
224
243
|
}
|
|
225
244
|
const plugin = element.pluginUri && this.agentPluginService.plugins.get().find(p => isEqual(p.uri, element.pluginUri));
|
|
226
245
|
if (plugin) {
|
|
227
|
-
content += `\n${( localize(
|
|
246
|
+
content += `\n${( localize(5303, "Plugin: {0}", plugin.label))}`;
|
|
228
247
|
}
|
|
229
248
|
return {
|
|
230
249
|
content,
|
|
@@ -287,10 +306,12 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
287
306
|
};
|
|
288
307
|
const overlayPairs = [
|
|
289
308
|
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, element.promptType],
|
|
290
|
-
[AI_CUSTOMIZATION_ITEM_STORAGE_KEY, element.storage],
|
|
291
309
|
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( element.uri.toString())],
|
|
292
310
|
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, element.disabled]
|
|
293
311
|
];
|
|
312
|
+
if (element.storage) {
|
|
313
|
+
overlayPairs.push([AI_CUSTOMIZATION_ITEM_STORAGE_KEY, element.storage]);
|
|
314
|
+
}
|
|
294
315
|
if (element.pluginUri) {
|
|
295
316
|
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( element.pluginUri.toString())]);
|
|
296
317
|
}
|
|
@@ -355,7 +376,8 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
355
376
|
harnessService,
|
|
356
377
|
agentPluginService,
|
|
357
378
|
commandService,
|
|
358
|
-
productService
|
|
379
|
+
productService,
|
|
380
|
+
userDataProfileService
|
|
359
381
|
) {
|
|
360
382
|
super();
|
|
361
383
|
this.instantiationService = instantiationService;
|
|
@@ -377,6 +399,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
377
399
|
this.agentPluginService = agentPluginService;
|
|
378
400
|
this.commandService = commandService;
|
|
379
401
|
this.productService = productService;
|
|
402
|
+
this.userDataProfileService = userDataProfileService;
|
|
380
403
|
this.currentSection = AICustomizationManagementSection.Agents;
|
|
381
404
|
this.allItems = [];
|
|
382
405
|
this.displayEntries = [];
|
|
@@ -407,12 +430,26 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
407
430
|
this.updateAddButton();
|
|
408
431
|
this.refresh();
|
|
409
432
|
}));
|
|
433
|
+
this._register(autorun(reader => {
|
|
434
|
+
this.harnessService.availableHarnesses.read(reader);
|
|
435
|
+
this.refresh();
|
|
436
|
+
}));
|
|
437
|
+
const providerChangeDisposable = this._register(( new MutableDisposable()));
|
|
438
|
+
this._register(autorun(reader => {
|
|
439
|
+
this.harnessService.activeHarness.read(reader);
|
|
440
|
+
const activeDescriptor = this.harnessService.getActiveDescriptor();
|
|
441
|
+
if (activeDescriptor.itemProvider) {
|
|
442
|
+
providerChangeDisposable.value = activeDescriptor.itemProvider.onDidChange(() => this.refresh());
|
|
443
|
+
} else {
|
|
444
|
+
providerChangeDisposable.clear();
|
|
445
|
+
}
|
|
446
|
+
}));
|
|
410
447
|
}
|
|
411
448
|
create() {
|
|
412
449
|
this.searchAndButtonContainer = append(this.element, $(".list-search-and-button-container"));
|
|
413
450
|
this.searchContainer = append(this.searchAndButtonContainer, $(".list-search-container"));
|
|
414
451
|
this.searchInput = this._register(( new InputBox(this.searchContainer, this.contextViewService, {
|
|
415
|
-
placeholder: ( localize(
|
|
452
|
+
placeholder: ( localize(5304, "Type to search...")),
|
|
416
453
|
inputBoxStyles: defaultInputBoxStyles
|
|
417
454
|
})));
|
|
418
455
|
this._register(this.searchInput.onDidChange(() => {
|
|
@@ -467,17 +504,17 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
467
504
|
getAriaLabel: entry => {
|
|
468
505
|
if (entry.type === "group-header") {
|
|
469
506
|
return localize(
|
|
470
|
-
|
|
507
|
+
5305,
|
|
471
508
|
"{0}, {1} items, {2}",
|
|
472
509
|
entry.label,
|
|
473
510
|
entry.count,
|
|
474
|
-
entry.collapsed ? ( localize(
|
|
511
|
+
entry.collapsed ? ( localize(5306, "collapsed")) : ( localize(5307, "expanded"))
|
|
475
512
|
);
|
|
476
513
|
}
|
|
477
|
-
const nameAndDesc = entry.item.description ? ( localize(
|
|
478
|
-
return entry.item.disabled ? ( localize(
|
|
514
|
+
const nameAndDesc = entry.item.description ? ( localize(5308, "{0}, {1}", entry.item.name, entry.item.description)) : entry.item.name;
|
|
515
|
+
return entry.item.disabled ? ( localize(5309, "{0}, disabled", nameAndDesc)) : nameAndDesc;
|
|
479
516
|
},
|
|
480
|
-
getWidgetAriaLabel: () => ( localize(
|
|
517
|
+
getWidgetAriaLabel: () => ( localize(5310, "Chat Customizations"))
|
|
481
518
|
},
|
|
482
519
|
keyboardNavigationLabelProvider: {
|
|
483
520
|
getKeyboardNavigationLabel: entry => entry.type === "group-header" ? entry.label : entry.item.name
|
|
@@ -530,10 +567,12 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
530
567
|
};
|
|
531
568
|
const overlayPairs = [
|
|
532
569
|
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, item.promptType],
|
|
533
|
-
[AI_CUSTOMIZATION_ITEM_STORAGE_KEY, item.storage],
|
|
534
570
|
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( item.uri.toString())],
|
|
535
571
|
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, item.disabled]
|
|
536
572
|
];
|
|
573
|
+
if (item.storage) {
|
|
574
|
+
overlayPairs.push([AI_CUSTOMIZATION_ITEM_STORAGE_KEY, item.storage]);
|
|
575
|
+
}
|
|
537
576
|
if (item.pluginUri) {
|
|
538
577
|
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( item.pluginUri.toString())]);
|
|
539
578
|
}
|
|
@@ -545,9 +584,9 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
545
584
|
const {
|
|
546
585
|
secondary
|
|
547
586
|
} = getContextMenuActions(actions, "inline");
|
|
548
|
-
const copyActions = [( new Separator()), ( new Action("copyFullPath", ( localize(
|
|
587
|
+
const copyActions = item.isBuiltin ? [] : [( new Separator()), ( new Action("copyFullPath", ( localize(5311, "Copy Full Path")), undefined, true, async () => {
|
|
549
588
|
await this.clipboardService.writeText(item.uri.fsPath);
|
|
550
|
-
})), ( new Action("copyRelativePath", ( localize(
|
|
589
|
+
})), ( new Action("copyRelativePath", ( localize(5312, "Copy Relative Path")), undefined, true, async () => {
|
|
551
590
|
const basePath = this.workspaceService.getActiveProjectRoot();
|
|
552
591
|
if (basePath && item.uri.fsPath.startsWith(basePath.fsPath)) {
|
|
553
592
|
const relative = item.uri.fsPath.substring(basePath.fsPath.length + 1);
|
|
@@ -567,8 +606,8 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
567
606
|
async setSection(section) {
|
|
568
607
|
this.currentSection = section;
|
|
569
608
|
this.updateSectionHeader();
|
|
570
|
-
this.updateAddButton();
|
|
571
609
|
await this.loadItems();
|
|
610
|
+
this.updateAddButton();
|
|
572
611
|
}
|
|
573
612
|
updateSectionHeader() {
|
|
574
613
|
let description;
|
|
@@ -577,41 +616,41 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
577
616
|
switch (this.currentSection) {
|
|
578
617
|
case AICustomizationManagementSection.Agents:
|
|
579
618
|
description = ( localize(
|
|
580
|
-
|
|
619
|
+
5313,
|
|
581
620
|
"Configure the AI to adopt different personas tailored to specific development tasks. Each agent has its own instructions, tools, and behavior."
|
|
582
621
|
));
|
|
583
622
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/custom-agents";
|
|
584
|
-
learnMoreLabel = ( localize(
|
|
623
|
+
learnMoreLabel = ( localize(5314, "Learn more about custom agents"));
|
|
585
624
|
break;
|
|
586
625
|
case AICustomizationManagementSection.Skills:
|
|
587
626
|
description = ( localize(
|
|
588
|
-
|
|
627
|
+
5315,
|
|
589
628
|
"Folders of instructions, scripts, and resources that Copilot loads when relevant to perform specialized tasks."
|
|
590
629
|
));
|
|
591
630
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/agent-skills";
|
|
592
|
-
learnMoreLabel = ( localize(
|
|
631
|
+
learnMoreLabel = ( localize(5316, "Learn more about agent skills"));
|
|
593
632
|
break;
|
|
594
633
|
case AICustomizationManagementSection.Instructions:
|
|
595
634
|
description = ( localize(
|
|
596
|
-
|
|
635
|
+
5317,
|
|
597
636
|
"Define common guidelines and rules that automatically influence how AI generates code and handles development tasks."
|
|
598
637
|
));
|
|
599
638
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/custom-instructions";
|
|
600
|
-
learnMoreLabel = ( localize(
|
|
639
|
+
learnMoreLabel = ( localize(5318, "Learn more about custom instructions"));
|
|
601
640
|
break;
|
|
602
641
|
case AICustomizationManagementSection.Hooks:
|
|
603
|
-
description = ( localize(
|
|
642
|
+
description = ( localize(5319, "Prompts executed at specific points during an agentic lifecycle."));
|
|
604
643
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/hooks";
|
|
605
|
-
learnMoreLabel = ( localize(
|
|
644
|
+
learnMoreLabel = ( localize(5320, "Learn more about hooks"));
|
|
606
645
|
break;
|
|
607
646
|
case AICustomizationManagementSection.Prompts:
|
|
608
647
|
default:
|
|
609
648
|
description = ( localize(
|
|
610
|
-
|
|
649
|
+
5321,
|
|
611
650
|
"Reusable prompts for common development tasks like generating code, performing reviews, or scaffolding components."
|
|
612
651
|
));
|
|
613
652
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/prompt-files";
|
|
614
|
-
learnMoreLabel = ( localize(
|
|
653
|
+
learnMoreLabel = ( localize(5322, "Learn more about prompt files"));
|
|
615
654
|
break;
|
|
616
655
|
}
|
|
617
656
|
this.sectionDescription.textContent = description;
|
|
@@ -696,7 +735,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
696
735
|
actions.push({
|
|
697
736
|
label: `$(${Codicon.add.id}) New ${typeLabel} (Workspace)`,
|
|
698
737
|
enabled: hasWorkspace,
|
|
699
|
-
tooltip: hasWorkspace ? undefined : ( localize(
|
|
738
|
+
tooltip: hasWorkspace ? undefined : ( localize(5323, "Open a workspace folder to create customizations.")),
|
|
700
739
|
run: () => {
|
|
701
740
|
this._onDidRequestCreateManual.fire({
|
|
702
741
|
type: promptType,
|
|
@@ -781,6 +820,27 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
781
820
|
});
|
|
782
821
|
}
|
|
783
822
|
}
|
|
823
|
+
const menuActions = this.menuService.getMenuActions(AICustomizationManagementCreateMenuId, this.contextKeyService, {
|
|
824
|
+
shouldForwardArgs: true
|
|
825
|
+
});
|
|
826
|
+
const extensionCreateActions = [];
|
|
827
|
+
for (const [, group] of menuActions) {
|
|
828
|
+
for (const menuItem of group) {
|
|
829
|
+
if (menuItem instanceof MenuItemAction) {
|
|
830
|
+
const icon = ThemeIcon.isThemeIcon(menuItem.item.icon) ? menuItem.item.icon.id : Codicon.add.id;
|
|
831
|
+
extensionCreateActions.push({
|
|
832
|
+
label: `$(${icon}) ${typeof menuItem.item.title === "string" ? menuItem.item.title : menuItem.item.title.value}`,
|
|
833
|
+
enabled: menuItem.enabled,
|
|
834
|
+
run: () => {
|
|
835
|
+
menuItem.run();
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
if (extensionCreateActions.length > 0) {
|
|
842
|
+
return extensionCreateActions;
|
|
843
|
+
}
|
|
784
844
|
return actions;
|
|
785
845
|
}
|
|
786
846
|
getDropdownActions() {
|
|
@@ -800,21 +860,21 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
800
860
|
getTypeLabel() {
|
|
801
861
|
switch (this.currentSection) {
|
|
802
862
|
case AICustomizationManagementSection.Agents:
|
|
803
|
-
return localize(
|
|
863
|
+
return localize(5324, "Agent");
|
|
804
864
|
case AICustomizationManagementSection.Skills:
|
|
805
|
-
return localize(
|
|
865
|
+
return localize(5325, "Skill");
|
|
806
866
|
case AICustomizationManagementSection.Instructions:
|
|
807
|
-
return localize(
|
|
867
|
+
return localize(5326, "Instructions");
|
|
808
868
|
case AICustomizationManagementSection.Hooks:
|
|
809
|
-
return localize(
|
|
869
|
+
return localize(5327, "Hook");
|
|
810
870
|
case AICustomizationManagementSection.Prompts:
|
|
811
871
|
default:
|
|
812
|
-
return localize(
|
|
872
|
+
return localize(5328, "Prompt");
|
|
813
873
|
}
|
|
814
874
|
}
|
|
815
875
|
async refresh() {
|
|
816
|
-
this.updateAddButton();
|
|
817
876
|
await this.loadItems();
|
|
877
|
+
this.updateAddButton();
|
|
818
878
|
}
|
|
819
879
|
async loadItems() {
|
|
820
880
|
const section = this.currentSection;
|
|
@@ -834,34 +894,53 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
834
894
|
const chatExtensionId = this.productService.defaultChatAgent?.chatExtensionId;
|
|
835
895
|
return !!chatExtensionId && ExtensionIdentifier.equals(extensionId, chatExtensionId);
|
|
836
896
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
return BUILTIN_STORAGE;
|
|
840
|
-
}
|
|
841
|
-
return undefined;
|
|
842
|
-
}
|
|
843
|
-
applyBuiltinGroupKeys(items, extensionIdByUri) {
|
|
844
|
-
for (const item of items) {
|
|
845
|
-
if (item.groupKey !== undefined) {
|
|
846
|
-
continue;
|
|
847
|
-
}
|
|
897
|
+
applyBuiltinGroupKeys(items, extensionInfoByUri) {
|
|
898
|
+
return ( items.map(item => {
|
|
848
899
|
if (item.storage !== PromptsStorage.extension) {
|
|
849
|
-
|
|
900
|
+
return item;
|
|
850
901
|
}
|
|
851
|
-
const
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
item.groupKey = override;
|
|
902
|
+
const extInfo = extensionInfoByUri.get(( item.uri.toString()));
|
|
903
|
+
if (!extInfo) {
|
|
904
|
+
return item;
|
|
855
905
|
}
|
|
856
|
-
|
|
906
|
+
const isBuiltin = this.isChatExtensionItem(extInfo.id);
|
|
907
|
+
if (isBuiltin) {
|
|
908
|
+
return {
|
|
909
|
+
...item,
|
|
910
|
+
isBuiltin: true,
|
|
911
|
+
groupKey: item.groupKey ?? BUILTIN_STORAGE
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
return {
|
|
915
|
+
...item,
|
|
916
|
+
extensionLabel: extInfo.displayName || extInfo.id.value
|
|
917
|
+
};
|
|
918
|
+
}));
|
|
857
919
|
}
|
|
858
920
|
async fetchItemsForSection(section) {
|
|
859
921
|
const promptType = sectionToPromptType(section);
|
|
922
|
+
const activeDescriptor = this.harnessService.getActiveDescriptor();
|
|
923
|
+
if (activeDescriptor.itemProvider && promptType) {
|
|
924
|
+
const items = await this.fetchItemsFromProvider(activeDescriptor.itemProvider, promptType);
|
|
925
|
+
if (promptType === PromptsType.instructions) {
|
|
926
|
+
return this.enrichProviderInstructionItems(items);
|
|
927
|
+
}
|
|
928
|
+
return items;
|
|
929
|
+
}
|
|
860
930
|
const items = [];
|
|
861
931
|
const disabledUris = this.promptsService.getDisabledPromptFiles(promptType);
|
|
862
|
-
const
|
|
932
|
+
const extensionInfoByUri = ( new Map());
|
|
863
933
|
if (promptType === PromptsType.agent) {
|
|
864
934
|
const agents = await this.promptsService.getCustomAgents(CancellationToken.None);
|
|
935
|
+
const allAgentFiles = await this.promptsService.listPromptFiles(PromptsType.agent, CancellationToken.None);
|
|
936
|
+
for (const file of allAgentFiles) {
|
|
937
|
+
if (file.extension) {
|
|
938
|
+
extensionInfoByUri.set(( file.uri.toString()), {
|
|
939
|
+
id: file.extension.identifier,
|
|
940
|
+
displayName: file.extension.displayName
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
}
|
|
865
944
|
for (const agent of agents) {
|
|
866
945
|
const filename = basename(agent.uri);
|
|
867
946
|
items.push({
|
|
@@ -875,8 +954,10 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
875
954
|
pluginUri: agent.source.storage === PromptsStorage.plugin ? agent.source.pluginUri : undefined,
|
|
876
955
|
disabled: ( disabledUris.has(agent.uri))
|
|
877
956
|
});
|
|
878
|
-
if (agent.source.storage === PromptsStorage.extension) {
|
|
879
|
-
|
|
957
|
+
if (agent.source.storage === PromptsStorage.extension && !( extensionInfoByUri.has(( agent.uri.toString())))) {
|
|
958
|
+
extensionInfoByUri.set(( agent.uri.toString()), {
|
|
959
|
+
id: agent.source.extensionId
|
|
960
|
+
});
|
|
880
961
|
}
|
|
881
962
|
}
|
|
882
963
|
} else if (promptType === PromptsType.skill) {
|
|
@@ -884,14 +965,20 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
884
965
|
const allSkillFiles = await this.promptsService.listPromptFiles(PromptsType.skill, CancellationToken.None);
|
|
885
966
|
for (const file of allSkillFiles) {
|
|
886
967
|
if (file.extension) {
|
|
887
|
-
|
|
968
|
+
extensionInfoByUri.set(( file.uri.toString()), {
|
|
969
|
+
id: file.extension.identifier,
|
|
970
|
+
displayName: file.extension.displayName
|
|
971
|
+
});
|
|
888
972
|
}
|
|
889
973
|
}
|
|
974
|
+
const uiIntegrations = this.workspaceService.getSkillUIIntegrations();
|
|
890
975
|
const seenUris = ( new ResourceSet());
|
|
891
976
|
for (const skill of skills || []) {
|
|
892
977
|
const filename = basename(skill.uri);
|
|
893
978
|
const skillName = skill.name || basename(dirname(skill.uri)) || filename;
|
|
894
979
|
seenUris.add(skill.uri);
|
|
980
|
+
const skillFolderName = basename(dirname(skill.uri));
|
|
981
|
+
const uiTooltip = uiIntegrations.get(skillFolderName);
|
|
895
982
|
items.push({
|
|
896
983
|
id: ( skill.uri.toString()),
|
|
897
984
|
uri: skill.uri,
|
|
@@ -901,22 +988,29 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
901
988
|
storage: skill.storage,
|
|
902
989
|
promptType,
|
|
903
990
|
pluginUri: skill.storage === PromptsStorage.plugin ? this.findPluginUri(skill.uri) : undefined,
|
|
904
|
-
disabled: false
|
|
991
|
+
disabled: false,
|
|
992
|
+
badge: uiTooltip ? ( localize(5329, "UI Integration")) : undefined,
|
|
993
|
+
badgeTooltip: uiTooltip
|
|
905
994
|
});
|
|
906
995
|
}
|
|
907
996
|
if (disabledUris.size > 0) {
|
|
908
997
|
for (const file of allSkillFiles) {
|
|
909
998
|
if (!( seenUris.has(file.uri)) && ( disabledUris.has(file.uri))) {
|
|
910
999
|
const filename = basename(file.uri);
|
|
1000
|
+
const disabledName = file.name || basename(dirname(file.uri)) || filename;
|
|
1001
|
+
const disabledFolderName = basename(dirname(file.uri));
|
|
1002
|
+
const uiTooltip = uiIntegrations.get(disabledFolderName);
|
|
911
1003
|
items.push({
|
|
912
1004
|
id: ( file.uri.toString()),
|
|
913
1005
|
uri: file.uri,
|
|
914
|
-
name:
|
|
1006
|
+
name: disabledName,
|
|
915
1007
|
filename,
|
|
916
1008
|
description: file.description,
|
|
917
1009
|
storage: file.storage,
|
|
918
1010
|
promptType,
|
|
919
|
-
disabled: true
|
|
1011
|
+
disabled: true,
|
|
1012
|
+
badge: uiTooltip ? ( localize(5329, "UI Integration")) : undefined,
|
|
1013
|
+
badgeTooltip: uiTooltip
|
|
920
1014
|
});
|
|
921
1015
|
}
|
|
922
1016
|
}
|
|
@@ -940,7 +1034,10 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
940
1034
|
disabled: ( disabledUris.has(command.promptPath.uri))
|
|
941
1035
|
});
|
|
942
1036
|
if (command.promptPath.extension) {
|
|
943
|
-
|
|
1037
|
+
extensionInfoByUri.set(( command.promptPath.uri.toString()), {
|
|
1038
|
+
id: command.promptPath.extension.identifier,
|
|
1039
|
+
displayName: command.promptPath.extension.displayName
|
|
1040
|
+
});
|
|
944
1041
|
}
|
|
945
1042
|
}
|
|
946
1043
|
} else if (promptType === PromptsType.hook) {
|
|
@@ -983,7 +1080,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
983
1080
|
uri: hookFile.uri,
|
|
984
1081
|
name: hookMeta?.label ?? entry.originalId,
|
|
985
1082
|
filename: basename(hookFile.uri),
|
|
986
|
-
description: truncatedCmd || ( localize(
|
|
1083
|
+
description: truncatedCmd || ( localize(5330, "(unset)")),
|
|
987
1084
|
storage: hookFile.storage,
|
|
988
1085
|
promptType,
|
|
989
1086
|
disabled: ( disabledUris.has(hookFile.uri))
|
|
@@ -1025,7 +1122,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1025
1122
|
uri: agent.uri,
|
|
1026
1123
|
name: hookMeta?.label ?? hookType,
|
|
1027
1124
|
filename: basename(agent.uri),
|
|
1028
|
-
description: `${agent.name}: ${truncatedCmd || ( localize(
|
|
1125
|
+
description: `${agent.name}: ${truncatedCmd || ( localize(5330, "(unset)"))}`,
|
|
1029
1126
|
storage: agent.source.storage,
|
|
1030
1127
|
groupKey: "agents",
|
|
1031
1128
|
promptType,
|
|
@@ -1039,7 +1136,10 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1039
1136
|
const promptFiles = await this.promptsService.listPromptFiles(promptType, CancellationToken.None);
|
|
1040
1137
|
for (const file of promptFiles) {
|
|
1041
1138
|
if (file.extension) {
|
|
1042
|
-
|
|
1139
|
+
extensionInfoByUri.set(( file.uri.toString()), {
|
|
1140
|
+
id: file.extension.identifier,
|
|
1141
|
+
displayName: file.extension.displayName
|
|
1142
|
+
});
|
|
1043
1143
|
}
|
|
1044
1144
|
}
|
|
1045
1145
|
const agentInstructionFiles = await this.promptsService.listAgentInstructions(CancellationToken.None, undefined);
|
|
@@ -1086,57 +1186,22 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1086
1186
|
item,
|
|
1087
1187
|
parsed
|
|
1088
1188
|
} of parseResults) {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
"This instruction is automatically included when files matching '{0}' are in context.",
|
|
1099
|
-
applyTo
|
|
1100
|
-
));
|
|
1101
|
-
items.push({
|
|
1102
|
-
id: ( item.uri.toString()),
|
|
1103
|
-
uri: item.uri,
|
|
1104
|
-
name: friendlyName,
|
|
1105
|
-
filename: this.labelService.getUriLabel(item.uri, {
|
|
1106
|
-
relative: true
|
|
1107
|
-
}),
|
|
1108
|
-
displayName: friendlyName,
|
|
1109
|
-
badge,
|
|
1110
|
-
badgeTooltip,
|
|
1111
|
-
description: description,
|
|
1112
|
-
storage: item.storage,
|
|
1113
|
-
promptType,
|
|
1114
|
-
typeIcon: storageToIcon(item.storage),
|
|
1115
|
-
groupKey: "context-instructions",
|
|
1116
|
-
pluginUri: item.storage === PromptsStorage.plugin ? item.pluginUri : undefined,
|
|
1117
|
-
disabled: ( disabledUris.has(item.uri))
|
|
1118
|
-
});
|
|
1119
|
-
} else {
|
|
1120
|
-
items.push({
|
|
1121
|
-
id: ( item.uri.toString()),
|
|
1122
|
-
uri: item.uri,
|
|
1123
|
-
name: friendlyName,
|
|
1124
|
-
filename: basename(item.uri),
|
|
1125
|
-
displayName: friendlyName,
|
|
1126
|
-
description: description,
|
|
1127
|
-
storage: item.storage,
|
|
1128
|
-
promptType,
|
|
1129
|
-
typeIcon: storageToIcon(item.storage),
|
|
1130
|
-
groupKey: "on-demand-instructions",
|
|
1131
|
-
pluginUri: item.storage === PromptsStorage.plugin ? item.pluginUri : undefined,
|
|
1132
|
-
disabled: ( disabledUris.has(item.uri))
|
|
1133
|
-
});
|
|
1134
|
-
}
|
|
1189
|
+
items.push(this.buildInstructionListItem(
|
|
1190
|
+
item.uri,
|
|
1191
|
+
item.name || getCleanPromptName(item.uri),
|
|
1192
|
+
item.description,
|
|
1193
|
+
item.storage,
|
|
1194
|
+
parsed?.header,
|
|
1195
|
+
( disabledUris.has(item.uri)),
|
|
1196
|
+
item.storage === PromptsStorage.plugin ? item.pluginUri : undefined
|
|
1197
|
+
));
|
|
1135
1198
|
}
|
|
1136
1199
|
}
|
|
1137
|
-
this.applyBuiltinGroupKeys(items,
|
|
1200
|
+
const groupedItems = this.applyBuiltinGroupKeys(items, extensionInfoByUri);
|
|
1138
1201
|
const filter = this.workspaceService.getStorageSourceFilter(promptType);
|
|
1139
|
-
const
|
|
1202
|
+
const withStorage = groupedItems.filter(item => item.storage !== undefined);
|
|
1203
|
+
const withoutStorage = groupedItems.filter(item => item.storage === undefined);
|
|
1204
|
+
const filteredItems = [...applyStorageSourceFilter(withStorage, filter), ...withoutStorage];
|
|
1140
1205
|
items.length = 0;
|
|
1141
1206
|
items.push(...filteredItems);
|
|
1142
1207
|
const descriptor = this.harnessService.getActiveDescriptor();
|
|
@@ -1166,6 +1231,145 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1166
1231
|
items.sort((a, b) => a.name.localeCompare(b.name));
|
|
1167
1232
|
return items;
|
|
1168
1233
|
}
|
|
1234
|
+
async fetchItemsFromProvider(provider, promptType) {
|
|
1235
|
+
const allItems = await provider.provideChatSessionCustomizations(CancellationToken.None);
|
|
1236
|
+
if (!allItems) {
|
|
1237
|
+
return [];
|
|
1238
|
+
}
|
|
1239
|
+
return ( allItems.filter(item => item.type === promptType).map(item => {
|
|
1240
|
+
const pluginUri = this.findPluginUri(item.uri);
|
|
1241
|
+
const storage = pluginUri ? PromptsStorage.plugin : this.inferStorageFromUri(item.uri);
|
|
1242
|
+
return {
|
|
1243
|
+
id: ( item.uri.toString()),
|
|
1244
|
+
uri: item.uri,
|
|
1245
|
+
name: item.name,
|
|
1246
|
+
filename: basename(item.uri),
|
|
1247
|
+
description: item.description,
|
|
1248
|
+
promptType,
|
|
1249
|
+
disabled: false,
|
|
1250
|
+
groupKey: item.groupKey,
|
|
1251
|
+
badge: item.badge,
|
|
1252
|
+
badgeTooltip: item.badgeTooltip,
|
|
1253
|
+
storage,
|
|
1254
|
+
pluginUri
|
|
1255
|
+
};
|
|
1256
|
+
})).sort((a, b) => a.name.localeCompare(b.name));
|
|
1257
|
+
}
|
|
1258
|
+
async enrichProviderInstructionItems(items) {
|
|
1259
|
+
const result = [];
|
|
1260
|
+
const toParse = items.filter(item => !item.groupKey);
|
|
1261
|
+
const passThrough = items.filter(item => !!item.groupKey);
|
|
1262
|
+
const parseResults = await Promise.all(( toParse.map(async item => {
|
|
1263
|
+
try {
|
|
1264
|
+
const parsed = await this.promptsService.parseNew(item.uri, CancellationToken.None);
|
|
1265
|
+
return {
|
|
1266
|
+
item,
|
|
1267
|
+
parsed
|
|
1268
|
+
};
|
|
1269
|
+
} catch {
|
|
1270
|
+
return {
|
|
1271
|
+
item,
|
|
1272
|
+
parsed: undefined
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
})));
|
|
1276
|
+
for (const {
|
|
1277
|
+
item,
|
|
1278
|
+
parsed
|
|
1279
|
+
} of parseResults) {
|
|
1280
|
+
result.push(this.buildInstructionListItem(
|
|
1281
|
+
item.uri,
|
|
1282
|
+
item.name,
|
|
1283
|
+
item.description,
|
|
1284
|
+
item.storage ?? PromptsStorage.local,
|
|
1285
|
+
parsed?.header,
|
|
1286
|
+
item.disabled,
|
|
1287
|
+
item.pluginUri
|
|
1288
|
+
));
|
|
1289
|
+
}
|
|
1290
|
+
result.push(...passThrough);
|
|
1291
|
+
result.sort((a, b) => a.name.localeCompare(b.name));
|
|
1292
|
+
return result;
|
|
1293
|
+
}
|
|
1294
|
+
buildInstructionListItem(uri, rawName, rawDescription, storage, header, disabled, pluginUri) {
|
|
1295
|
+
const name = header?.name;
|
|
1296
|
+
const description = header?.description ?? rawDescription;
|
|
1297
|
+
const friendlyName = this.getFriendlyName(name || rawName || getCleanPromptName(uri));
|
|
1298
|
+
const filename = basename(uri);
|
|
1299
|
+
if (isAgentInstructionFile(uri)) {
|
|
1300
|
+
return {
|
|
1301
|
+
id: ( uri.toString()),
|
|
1302
|
+
uri,
|
|
1303
|
+
name: friendlyName,
|
|
1304
|
+
filename: this.labelService.getUriLabel(uri, {
|
|
1305
|
+
relative: true
|
|
1306
|
+
}),
|
|
1307
|
+
displayName: friendlyName,
|
|
1308
|
+
description,
|
|
1309
|
+
storage,
|
|
1310
|
+
promptType: PromptsType.instructions,
|
|
1311
|
+
typeIcon: storageToIcon(storage),
|
|
1312
|
+
groupKey: "agent-instructions",
|
|
1313
|
+
pluginUri,
|
|
1314
|
+
disabled
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
const applyTo = evaluateApplyToPattern(header, isInClaudeRulesFolder(uri));
|
|
1318
|
+
if (applyTo !== undefined) {
|
|
1319
|
+
const badge = applyTo === "**" ? ( localize(5331, "always added")) : applyTo;
|
|
1320
|
+
const badgeTooltip = applyTo === "**" ? ( localize(5332, "This instruction is automatically included in every interaction.")) : ( localize(
|
|
1321
|
+
5333,
|
|
1322
|
+
"This instruction is automatically included when files matching '{0}' are in context.",
|
|
1323
|
+
applyTo
|
|
1324
|
+
));
|
|
1325
|
+
return {
|
|
1326
|
+
id: ( uri.toString()),
|
|
1327
|
+
uri,
|
|
1328
|
+
name: friendlyName,
|
|
1329
|
+
filename: this.labelService.getUriLabel(uri, {
|
|
1330
|
+
relative: true
|
|
1331
|
+
}),
|
|
1332
|
+
displayName: friendlyName,
|
|
1333
|
+
badge,
|
|
1334
|
+
badgeTooltip,
|
|
1335
|
+
description,
|
|
1336
|
+
storage,
|
|
1337
|
+
promptType: PromptsType.instructions,
|
|
1338
|
+
typeIcon: storageToIcon(storage),
|
|
1339
|
+
groupKey: "context-instructions",
|
|
1340
|
+
pluginUri,
|
|
1341
|
+
disabled
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
return {
|
|
1345
|
+
id: ( uri.toString()),
|
|
1346
|
+
uri,
|
|
1347
|
+
name: friendlyName,
|
|
1348
|
+
filename,
|
|
1349
|
+
displayName: friendlyName,
|
|
1350
|
+
description,
|
|
1351
|
+
storage,
|
|
1352
|
+
promptType: PromptsType.instructions,
|
|
1353
|
+
typeIcon: storageToIcon(storage),
|
|
1354
|
+
groupKey: "on-demand-instructions",
|
|
1355
|
+
pluginUri,
|
|
1356
|
+
disabled
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
inferStorageFromUri(uri) {
|
|
1360
|
+
if (this.workspaceContextService.getWorkspaceFolder(uri)) {
|
|
1361
|
+
return PromptsStorage.local;
|
|
1362
|
+
}
|
|
1363
|
+
const activeProjectRoot = this.workspaceService.getActiveProjectRoot();
|
|
1364
|
+
if (activeProjectRoot && isEqualOrParent(uri, activeProjectRoot)) {
|
|
1365
|
+
return PromptsStorage.local;
|
|
1366
|
+
}
|
|
1367
|
+
const promptsHome = this.userDataProfileService.currentProfile.promptsHome;
|
|
1368
|
+
if (isEqualOrParent(uri, promptsHome)) {
|
|
1369
|
+
return PromptsStorage.user;
|
|
1370
|
+
}
|
|
1371
|
+
return PromptsStorage.user;
|
|
1372
|
+
}
|
|
1169
1373
|
getFriendlyName(filename) {
|
|
1170
1374
|
let name = filename.replace(/\.instructions\.md$/i, "").replace(/\.prompt\.md$/i, "").replace(/\.agent\.md$/i, "").replace(/\.md$/i, "");
|
|
1171
1375
|
name = name.replace(/[-_]/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
@@ -1197,77 +1401,135 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1197
1401
|
}
|
|
1198
1402
|
}
|
|
1199
1403
|
}
|
|
1404
|
+
const activeDescriptor = this.harnessService.getActiveDescriptor();
|
|
1405
|
+
if (activeDescriptor.itemProvider) {
|
|
1406
|
+
const hasExplicitGroups = ( matchedItems.some(item => item.groupKey !== undefined));
|
|
1407
|
+
if (hasExplicitGroups) {
|
|
1408
|
+
const ungroupedKey = "__ungrouped__";
|
|
1409
|
+
const groupsMap = ( new Map());
|
|
1410
|
+
for (const item of matchedItems) {
|
|
1411
|
+
const key = item.groupKey ?? ungroupedKey;
|
|
1412
|
+
let group = groupsMap.get(key);
|
|
1413
|
+
if (!group) {
|
|
1414
|
+
group = {
|
|
1415
|
+
groupKey: key,
|
|
1416
|
+
label: key === ungroupedKey ? ( localize(5334, "Other")) : key,
|
|
1417
|
+
icon: this.getSectionIcon(),
|
|
1418
|
+
description: "",
|
|
1419
|
+
items: []
|
|
1420
|
+
};
|
|
1421
|
+
groupsMap.set(key, group);
|
|
1422
|
+
}
|
|
1423
|
+
group.items.push(item);
|
|
1424
|
+
}
|
|
1425
|
+
const groups = Array.from(( groupsMap.values()));
|
|
1426
|
+
for (const group of groups) {
|
|
1427
|
+
group.items.sort((a, b) => a.name.localeCompare(b.name));
|
|
1428
|
+
}
|
|
1429
|
+
this.displayEntries = [];
|
|
1430
|
+
let isFirstGroup = true;
|
|
1431
|
+
for (const group of groups) {
|
|
1432
|
+
if (group.items.length === 0) {
|
|
1433
|
+
continue;
|
|
1434
|
+
}
|
|
1435
|
+
const collapsed = ( this.collapsedGroups.has(group.groupKey));
|
|
1436
|
+
this.displayEntries.push({
|
|
1437
|
+
type: "group-header",
|
|
1438
|
+
id: `group-${group.groupKey}`,
|
|
1439
|
+
groupKey: group.groupKey,
|
|
1440
|
+
label: group.label,
|
|
1441
|
+
icon: group.icon,
|
|
1442
|
+
count: group.items.length,
|
|
1443
|
+
isFirst: isFirstGroup,
|
|
1444
|
+
description: group.description,
|
|
1445
|
+
collapsed
|
|
1446
|
+
});
|
|
1447
|
+
isFirstGroup = false;
|
|
1448
|
+
if (!collapsed) {
|
|
1449
|
+
for (const item of group.items) {
|
|
1450
|
+
this.displayEntries.push({
|
|
1451
|
+
type: "file-item",
|
|
1452
|
+
item
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
this.list.splice(0, this.list.length, this.displayEntries);
|
|
1458
|
+
this.updateEmptyState();
|
|
1459
|
+
return matchedItems.length;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1200
1462
|
const promptType = sectionToPromptType(this.currentSection);
|
|
1201
1463
|
const visibleSources = ( new Set(this.workspaceService.getStorageSourceFilter(promptType).sources));
|
|
1202
1464
|
const groups = this.currentSection === AICustomizationManagementSection.Instructions ? [{
|
|
1203
1465
|
groupKey: "agent-instructions",
|
|
1204
|
-
label: ( localize(
|
|
1466
|
+
label: ( localize(5335, "Agent Instructions")),
|
|
1205
1467
|
icon: instructionsIcon,
|
|
1206
1468
|
description: ( localize(
|
|
1207
|
-
|
|
1469
|
+
5336,
|
|
1208
1470
|
"Instruction files automatically loaded for all agent interactions (e.g. AGENTS.md, CLAUDE.md, copilot-instructions.md)."
|
|
1209
1471
|
)),
|
|
1210
1472
|
items: []
|
|
1211
1473
|
}, {
|
|
1212
1474
|
groupKey: "context-instructions",
|
|
1213
|
-
label: ( localize(
|
|
1475
|
+
label: ( localize(5337, "Included Based on Context")),
|
|
1214
1476
|
icon: instructionsIcon,
|
|
1215
1477
|
description: ( localize(
|
|
1216
|
-
|
|
1478
|
+
5338,
|
|
1217
1479
|
"Instructions automatically loaded when matching files are part of the context."
|
|
1218
1480
|
)),
|
|
1219
1481
|
items: []
|
|
1220
1482
|
}, {
|
|
1221
1483
|
groupKey: "on-demand-instructions",
|
|
1222
|
-
label: ( localize(
|
|
1484
|
+
label: ( localize(5339, "Loaded on Demand")),
|
|
1223
1485
|
icon: instructionsIcon,
|
|
1224
|
-
description: ( localize(
|
|
1486
|
+
description: ( localize(5340, "Instructions loaded only when explicitly referenced.")),
|
|
1225
1487
|
items: []
|
|
1226
1488
|
}] : [{
|
|
1227
1489
|
groupKey: PromptsStorage.local,
|
|
1228
|
-
label: ( localize(
|
|
1490
|
+
label: ( localize(5341, "Workspace")),
|
|
1229
1491
|
icon: workspaceIcon,
|
|
1230
1492
|
description: ( localize(
|
|
1231
|
-
|
|
1493
|
+
5342,
|
|
1232
1494
|
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
1233
1495
|
)),
|
|
1234
1496
|
items: []
|
|
1235
1497
|
}, {
|
|
1236
1498
|
groupKey: PromptsStorage.user,
|
|
1237
|
-
label: ( localize(
|
|
1499
|
+
label: ( localize(5343, "User")),
|
|
1238
1500
|
icon: userIcon,
|
|
1239
1501
|
description: ( localize(
|
|
1240
|
-
|
|
1502
|
+
5344,
|
|
1241
1503
|
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
1242
1504
|
)),
|
|
1243
1505
|
items: []
|
|
1244
1506
|
}, {
|
|
1245
1507
|
groupKey: PromptsStorage.plugin,
|
|
1246
|
-
label: ( localize(
|
|
1508
|
+
label: ( localize(5345, "Plugins")),
|
|
1247
1509
|
icon: pluginIcon,
|
|
1248
|
-
description: ( localize(
|
|
1510
|
+
description: ( localize(5346, "Read-only customizations provided by installed plugins.")),
|
|
1249
1511
|
items: []
|
|
1250
1512
|
}, {
|
|
1251
1513
|
groupKey: PromptsStorage.extension,
|
|
1252
|
-
label: ( localize(
|
|
1514
|
+
label: ( localize(5347, "Extensions")),
|
|
1253
1515
|
icon: extensionIcon,
|
|
1254
|
-
description: ( localize(
|
|
1516
|
+
description: ( localize(5348, "Read-only customizations provided by installed extensions.")),
|
|
1255
1517
|
items: []
|
|
1256
1518
|
}, {
|
|
1257
1519
|
groupKey: BUILTIN_STORAGE,
|
|
1258
|
-
label: ( localize(
|
|
1520
|
+
label: ( localize(5349, "Built-in")),
|
|
1259
1521
|
icon: builtinIcon,
|
|
1260
|
-
description: ( localize(
|
|
1522
|
+
description: ( localize(5350, "Built-in customizations shipped with the application.")),
|
|
1261
1523
|
items: []
|
|
1262
1524
|
}, {
|
|
1263
1525
|
groupKey: "agents",
|
|
1264
|
-
label: ( localize(
|
|
1526
|
+
label: ( localize(5351, "Agents")),
|
|
1265
1527
|
icon: agentIcon,
|
|
1266
|
-
description: ( localize(
|
|
1528
|
+
description: ( localize(5352, "Hooks defined in agent files.")),
|
|
1267
1529
|
items: []
|
|
1268
1530
|
}].filter(g => ( visibleSources.has(g.groupKey)) || g.groupKey === "agents");
|
|
1269
1531
|
for (const item of matchedItems) {
|
|
1270
|
-
const key = item.groupKey ?? item.storage;
|
|
1532
|
+
const key = item.groupKey ?? item.storage ?? PromptsStorage.local;
|
|
1271
1533
|
const group = groups.find(g => g.groupKey === key);
|
|
1272
1534
|
if (group) {
|
|
1273
1535
|
group.items.push(item);
|
|
@@ -1325,8 +1587,8 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1325
1587
|
const sectionIcon = this.getSectionIcon();
|
|
1326
1588
|
this.emptyStateIcon.classList.add(...ThemeIcon.asClassNameArray(sectionIcon));
|
|
1327
1589
|
if (this.searchQuery.trim()) {
|
|
1328
|
-
this.emptyStateText.textContent = ( localize(
|
|
1329
|
-
this.emptyStateSubtext.textContent = ( localize(
|
|
1590
|
+
this.emptyStateText.textContent = ( localize(5353, "No items match '{0}'", this.searchQuery));
|
|
1591
|
+
this.emptyStateSubtext.textContent = ( localize(5354, "Try a different search term"));
|
|
1330
1592
|
} else {
|
|
1331
1593
|
const emptyInfo = this.getEmptyStateInfo();
|
|
1332
1594
|
this.emptyStateText.textContent = emptyInfo.title;
|
|
@@ -1364,29 +1626,29 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1364
1626
|
switch (this.currentSection) {
|
|
1365
1627
|
case AICustomizationManagementSection.Agents:
|
|
1366
1628
|
return {
|
|
1367
|
-
title: ( localize(
|
|
1368
|
-
description: ( localize(
|
|
1629
|
+
title: ( localize(5355, "No agents yet")),
|
|
1630
|
+
description: ( localize(5356, "Create your first custom agent to get started"))
|
|
1369
1631
|
};
|
|
1370
1632
|
case AICustomizationManagementSection.Skills:
|
|
1371
1633
|
return {
|
|
1372
|
-
title: ( localize(
|
|
1373
|
-
description: ( localize(
|
|
1634
|
+
title: ( localize(5357, "No skills yet")),
|
|
1635
|
+
description: ( localize(5358, "Create your first skill to extend agent capabilities"))
|
|
1374
1636
|
};
|
|
1375
1637
|
case AICustomizationManagementSection.Instructions:
|
|
1376
1638
|
return {
|
|
1377
|
-
title: ( localize(
|
|
1378
|
-
description: ( localize(
|
|
1639
|
+
title: ( localize(5359, "No instructions yet")),
|
|
1640
|
+
description: ( localize(5360, "Add instructions to teach Copilot about your codebase"))
|
|
1379
1641
|
};
|
|
1380
1642
|
case AICustomizationManagementSection.Hooks:
|
|
1381
1643
|
return {
|
|
1382
|
-
title: ( localize(
|
|
1383
|
-
description: ( localize(
|
|
1644
|
+
title: ( localize(5361, "No hooks yet")),
|
|
1645
|
+
description: ( localize(5362, "Create hooks to execute commands at agent lifecycle events"))
|
|
1384
1646
|
};
|
|
1385
1647
|
case AICustomizationManagementSection.Prompts:
|
|
1386
1648
|
default:
|
|
1387
1649
|
return {
|
|
1388
|
-
title: ( localize(
|
|
1389
|
-
description: ( localize(
|
|
1650
|
+
title: ( localize(5363, "No prompts yet")),
|
|
1651
|
+
description: ( localize(5364, "Create reusable prompts for common tasks"))
|
|
1390
1652
|
};
|
|
1391
1653
|
}
|
|
1392
1654
|
}
|
|
@@ -1405,37 +1667,35 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1405
1667
|
this.list.setFocus([0]);
|
|
1406
1668
|
}
|
|
1407
1669
|
}
|
|
1670
|
+
revealLastItem() {
|
|
1671
|
+
if (this.displayEntries.length > 0) {
|
|
1672
|
+
this.list.reveal(this.displayEntries.length - 1);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1408
1675
|
layout(height, width) {
|
|
1409
|
-
|
|
1410
|
-
const searchBarHeight = this.searchAndButtonContainer.offsetHeight || 52;
|
|
1411
|
-
const listHeight = height - sectionFooterHeight - searchBarHeight;
|
|
1676
|
+
this.element.style.height = `${height}px`;
|
|
1412
1677
|
this.searchInput.layout();
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
if (this._store.isDisposed) {
|
|
1418
|
-
return;
|
|
1419
|
-
}
|
|
1420
|
-
const actualFooterHeight = this.sectionHeader.offsetHeight;
|
|
1421
|
-
if (actualFooterHeight > 0) {
|
|
1422
|
-
const correctedHeight = height - actualFooterHeight - searchBarHeight;
|
|
1423
|
-
this.listContainer.style.height = `${Math.max(0, correctedHeight)}px`;
|
|
1424
|
-
this.list.layout(Math.max(0, correctedHeight), width);
|
|
1425
|
-
}
|
|
1426
|
-
});
|
|
1678
|
+
const searchBarHeight = this.searchAndButtonContainer.offsetHeight;
|
|
1679
|
+
if (searchBarHeight === 0) {
|
|
1680
|
+
getWindow(this.element).requestAnimationFrame(() => this.layout(height, width));
|
|
1681
|
+
return;
|
|
1427
1682
|
}
|
|
1683
|
+
const footerHeight = this.sectionHeader.offsetHeight;
|
|
1684
|
+
const listHeight = Math.max(0, height - searchBarHeight - footerHeight);
|
|
1685
|
+
this.listContainer.style.height = `${listHeight}px`;
|
|
1686
|
+
this.list.layout(listHeight, width);
|
|
1428
1687
|
}
|
|
1429
1688
|
get itemCount() {
|
|
1430
1689
|
return this.allItems.length;
|
|
1431
1690
|
}
|
|
1432
1691
|
async generateDebugReport() {
|
|
1692
|
+
const activeDescriptor = this.harnessService.getActiveDescriptor();
|
|
1433
1693
|
return generateCustomizationDebugReport(this.currentSection, this.promptsService, this.workspaceService, {
|
|
1434
1694
|
allItems: this.allItems,
|
|
1435
1695
|
displayEntries: this.displayEntries
|
|
1436
|
-
});
|
|
1696
|
+
}, activeDescriptor.itemProvider);
|
|
1437
1697
|
}
|
|
1438
1698
|
};
|
|
1439
|
-
AICustomizationListWidget = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IPromptsService)), ( __param(2, IContextViewService)), ( __param(3, IOpenerService)), ( __param(4, IContextMenuService)), ( __param(5, IMenuService)), ( __param(6, IContextKeyService)), ( __param(7, IWorkspaceContextService)), ( __param(8, ILabelService)), ( __param(9, IAICustomizationWorkspaceService)), ( __param(10, IClipboardService)), ( __param(11, IHoverService)), ( __param(12, IFileService)), ( __param(13, IPathService)), ( __param(14, ITelemetryService)), ( __param(15, ICustomizationHarnessService)), ( __param(16, IAgentPluginService)), ( __param(17, ICommandService)), ( __param(18, IProductService))], AICustomizationListWidget));
|
|
1699
|
+
AICustomizationListWidget = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IPromptsService)), ( __param(2, IContextViewService)), ( __param(3, IOpenerService)), ( __param(4, IContextMenuService)), ( __param(5, IMenuService)), ( __param(6, IContextKeyService)), ( __param(7, IWorkspaceContextService)), ( __param(8, ILabelService)), ( __param(9, IAICustomizationWorkspaceService)), ( __param(10, IClipboardService)), ( __param(11, IHoverService)), ( __param(12, IFileService)), ( __param(13, IPathService)), ( __param(14, ITelemetryService)), ( __param(15, ICustomizationHarnessService)), ( __param(16, IAgentPluginService)), ( __param(17, ICommandService)), ( __param(18, IProductService)), ( __param(19, IUserDataProfileService))], AICustomizationListWidget));
|
|
1440
1700
|
|
|
1441
1701
|
export { AICustomizationListWidget, formatDisplayName, sectionToPromptType };
|