@codingame/monaco-vscode-chat-service-override 28.4.0 → 29.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 +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +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.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
- 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 +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -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 +76 -10
- 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 +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
- 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.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- 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 +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- 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 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- 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.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- 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/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- 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/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
- 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 +57 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- 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 +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- 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/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- 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/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- 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/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- 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 +3 -3
- 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.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- 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 +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js
CHANGED
|
@@ -3,13 +3,15 @@ import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
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
|
+
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
6
7
|
import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
8
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
9
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
9
10
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
10
|
-
import { basename, dirname, isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
11
|
+
import { isEqual, basename, dirname, isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
11
12
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
12
13
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
14
|
+
import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
13
15
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
14
16
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
15
17
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -17,8 +19,9 @@ import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
|
|
|
17
19
|
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
18
20
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
19
21
|
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
20
|
-
import {
|
|
21
|
-
import { AICustomizationManagementItemMenuId } from '
|
|
22
|
+
import { promptIcon, hookIcon, instructionsIcon, skillIcon, agentIcon, pluginIcon, extensionIcon, userIcon, workspaceIcon, builtinIcon } from './aiCustomizationIcons.js';
|
|
23
|
+
import { AI_CUSTOMIZATION_ITEM_TYPE_KEY, AI_CUSTOMIZATION_ITEM_STORAGE_KEY, AI_CUSTOMIZATION_ITEM_URI_KEY, AI_CUSTOMIZATION_ITEM_DISABLED_KEY, AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, AICustomizationManagementItemMenuId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement';
|
|
24
|
+
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
22
25
|
import { InputBox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
23
26
|
import { defaultInputBoxStyles, defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
24
27
|
import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
@@ -29,23 +32,34 @@ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
29
32
|
import { Button, ButtonWithDropdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
30
33
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
31
34
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
32
|
-
import {
|
|
35
|
+
import { createActionViewItem, getContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
33
36
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
34
37
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
35
|
-
import { AICustomizationManagementSection, applyStorageSourceFilter } from '
|
|
38
|
+
import { AICustomizationManagementSection, BUILTIN_STORAGE, applyStorageSourceFilter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
36
39
|
import { IAICustomizationWorkspaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service';
|
|
37
40
|
import { Separator, Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
38
41
|
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
39
42
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
43
|
+
import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
40
44
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
41
45
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
42
46
|
import { generateCustomizationDebugReport } from './aiCustomizationDebugPanel.js';
|
|
47
|
+
import { getCustomizationSecondaryText } from './aiCustomizationListWidgetUtils.js';
|
|
48
|
+
export { truncateToFirstLine } from './aiCustomizationListWidgetUtils.js';
|
|
43
49
|
import { parseHooksFromFile } from '../../common/promptSyntax/hookCompatibility.js';
|
|
44
50
|
import { formatHookCommandLabel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
45
51
|
import { HOOK_METADATA, HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
46
52
|
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
47
53
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
48
54
|
import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
55
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
56
|
+
import { matchesWorkspaceSubpath, matchesInstructionFileFilter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService';
|
|
57
|
+
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
|
+
import { evaluateApplyToPattern } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions';
|
|
61
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
62
|
+
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
49
63
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
50
64
|
|
|
51
65
|
registerCss(aiCustomizationManagement);
|
|
@@ -116,10 +130,54 @@ class GroupHeaderRenderer {
|
|
|
116
130
|
templateData.disposables.dispose();
|
|
117
131
|
}
|
|
118
132
|
}
|
|
133
|
+
function promptTypeToIcon(type) {
|
|
134
|
+
switch (type) {
|
|
135
|
+
case PromptsType.agent:
|
|
136
|
+
return agentIcon;
|
|
137
|
+
case PromptsType.skill:
|
|
138
|
+
return skillIcon;
|
|
139
|
+
case PromptsType.instructions:
|
|
140
|
+
return instructionsIcon;
|
|
141
|
+
case PromptsType.prompt:
|
|
142
|
+
return promptIcon;
|
|
143
|
+
case PromptsType.hook:
|
|
144
|
+
return hookIcon;
|
|
145
|
+
default:
|
|
146
|
+
return promptIcon;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function storageToIcon(storage) {
|
|
150
|
+
switch (storage) {
|
|
151
|
+
case PromptsStorage.local:
|
|
152
|
+
return workspaceIcon;
|
|
153
|
+
case PromptsStorage.user:
|
|
154
|
+
return userIcon;
|
|
155
|
+
case PromptsStorage.extension:
|
|
156
|
+
return extensionIcon;
|
|
157
|
+
case PromptsStorage.plugin:
|
|
158
|
+
return pluginIcon;
|
|
159
|
+
default:
|
|
160
|
+
return instructionsIcon;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function formatDisplayName(name) {
|
|
164
|
+
return name.replace(/\.md$/i, "").replace(/[-_]/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
165
|
+
}
|
|
119
166
|
let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
120
|
-
constructor(
|
|
167
|
+
constructor(
|
|
168
|
+
hoverService,
|
|
169
|
+
labelService,
|
|
170
|
+
menuService,
|
|
171
|
+
contextKeyService,
|
|
172
|
+
instantiationService,
|
|
173
|
+
agentPluginService
|
|
174
|
+
) {
|
|
121
175
|
this.hoverService = hoverService;
|
|
122
176
|
this.labelService = labelService;
|
|
177
|
+
this.menuService = menuService;
|
|
178
|
+
this.contextKeyService = contextKeyService;
|
|
179
|
+
this.instantiationService = instantiationService;
|
|
180
|
+
this.agentPluginService = agentPluginService;
|
|
123
181
|
this.templateId = "aiCustomizationItem";
|
|
124
182
|
}
|
|
125
183
|
renderTemplate(container) {
|
|
@@ -127,14 +185,23 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
127
185
|
const elementDisposables = ( new DisposableStore());
|
|
128
186
|
container.classList.add("ai-customization-list-item");
|
|
129
187
|
const leftSection = append(container, $(".item-left"));
|
|
188
|
+
const typeIcon = append(leftSection, $(".item-type-icon"));
|
|
130
189
|
const textContainer = append(leftSection, $(".item-text"));
|
|
131
|
-
const
|
|
190
|
+
const nameRow = append(textContainer, $(".item-name-row"));
|
|
191
|
+
const nameLabel = disposables.add(( new HighlightedLabel(append(nameRow, $(".item-name")))));
|
|
192
|
+
const badge = append(nameRow, $(".inline-badge.item-badge"));
|
|
132
193
|
const description = disposables.add(( new HighlightedLabel(append(textContainer, $(".item-description")))));
|
|
133
194
|
const actionsContainer = append(container, $(".item-right"));
|
|
195
|
+
const actionBar = disposables.add(( new ActionBar(actionsContainer, {
|
|
196
|
+
actionViewItemProvider: createActionViewItem.bind(undefined, this.instantiationService)
|
|
197
|
+
})));
|
|
134
198
|
return {
|
|
135
199
|
container,
|
|
136
200
|
actionsContainer,
|
|
201
|
+
actionBar,
|
|
202
|
+
typeIcon,
|
|
137
203
|
nameLabel,
|
|
204
|
+
badge,
|
|
138
205
|
description,
|
|
139
206
|
disposables,
|
|
140
207
|
elementDisposables
|
|
@@ -143,38 +210,116 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
143
210
|
renderElement(entry, index, templateData) {
|
|
144
211
|
templateData.elementDisposables.clear();
|
|
145
212
|
const element = entry.item;
|
|
213
|
+
templateData.typeIcon.className = "item-type-icon";
|
|
214
|
+
templateData.typeIcon.classList.add(
|
|
215
|
+
...ThemeIcon.asClassNameArray(element.typeIcon ?? promptTypeToIcon(element.promptType))
|
|
216
|
+
);
|
|
146
217
|
templateData.elementDisposables.add(this.hoverService.setupDelayedHover(templateData.container, () => {
|
|
147
218
|
const uriLabel = this.labelService.getUriLabel(element.uri, {
|
|
148
219
|
relative: false
|
|
149
220
|
});
|
|
221
|
+
let content = `${element.name}\n${uriLabel}`;
|
|
222
|
+
if (element.badgeTooltip) {
|
|
223
|
+
content += `\n\n${element.badgeTooltip}`;
|
|
224
|
+
}
|
|
225
|
+
const plugin = element.pluginUri && this.agentPluginService.plugins.get().find(p => isEqual(p.uri, element.pluginUri));
|
|
226
|
+
if (plugin) {
|
|
227
|
+
content += `\n${( localize(5274, "Plugin: {0}", plugin.label))}`;
|
|
228
|
+
}
|
|
150
229
|
return {
|
|
151
|
-
content
|
|
230
|
+
content,
|
|
152
231
|
appearance: {
|
|
153
232
|
compact: true,
|
|
154
233
|
skipFadeInAnimation: true
|
|
155
234
|
}
|
|
156
235
|
};
|
|
157
236
|
}));
|
|
158
|
-
templateData.
|
|
159
|
-
const
|
|
237
|
+
templateData.container.classList.toggle("disabled", element.disabled);
|
|
238
|
+
const displayName = element.displayName ?? formatDisplayName(element.name);
|
|
239
|
+
templateData.nameLabel.set(displayName, element.nameMatches);
|
|
240
|
+
if (element.badge) {
|
|
241
|
+
templateData.badge.textContent = element.badge;
|
|
242
|
+
templateData.badge.style.display = "";
|
|
243
|
+
if (element.badgeTooltip) {
|
|
244
|
+
templateData.elementDisposables.add(
|
|
245
|
+
this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), templateData.badge, element.badgeTooltip)
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
} else {
|
|
249
|
+
templateData.badge.textContent = "";
|
|
250
|
+
templateData.badge.style.display = "none";
|
|
251
|
+
}
|
|
252
|
+
const secondaryText = getCustomizationSecondaryText(element.description, element.filename, element.promptType);
|
|
253
|
+
let secondaryTextMatches;
|
|
254
|
+
if (secondaryText && element.description && element.descriptionMatches) {
|
|
255
|
+
if (secondaryText === element.description) {
|
|
256
|
+
secondaryTextMatches = element.descriptionMatches;
|
|
257
|
+
} else {
|
|
258
|
+
const maxLength = secondaryText.length;
|
|
259
|
+
const clampedMatches = ( element.descriptionMatches.map(match => {
|
|
260
|
+
if (match.start >= maxLength || match.end <= 0) {
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
const clampedStart = Math.max(0, match.start);
|
|
264
|
+
const clampedEnd = Math.min(match.end, maxLength);
|
|
265
|
+
return clampedEnd > clampedStart ? {
|
|
266
|
+
start: clampedStart,
|
|
267
|
+
end: clampedEnd
|
|
268
|
+
} : undefined;
|
|
269
|
+
})).filter(match => !!match);
|
|
270
|
+
secondaryTextMatches = clampedMatches.length ? clampedMatches : undefined;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
160
273
|
if (secondaryText) {
|
|
161
|
-
templateData.description.set(
|
|
162
|
-
secondaryText,
|
|
163
|
-
element.description ? element.descriptionMatches : undefined
|
|
164
|
-
);
|
|
274
|
+
templateData.description.set(secondaryText, secondaryTextMatches);
|
|
165
275
|
templateData.description.element.style.display = "";
|
|
166
276
|
templateData.description.element.classList.toggle("is-filename", !element.description);
|
|
167
277
|
} else {
|
|
168
278
|
templateData.description.set("", undefined);
|
|
169
279
|
templateData.description.element.style.display = "none";
|
|
170
280
|
}
|
|
281
|
+
const context = {
|
|
282
|
+
uri: ( element.uri.toString()),
|
|
283
|
+
name: element.name,
|
|
284
|
+
promptType: element.promptType,
|
|
285
|
+
storage: element.storage,
|
|
286
|
+
pluginUri: element.pluginUri?.toString()
|
|
287
|
+
};
|
|
288
|
+
const overlayPairs = [
|
|
289
|
+
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, element.promptType],
|
|
290
|
+
[AI_CUSTOMIZATION_ITEM_STORAGE_KEY, element.storage],
|
|
291
|
+
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( element.uri.toString())],
|
|
292
|
+
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, element.disabled]
|
|
293
|
+
];
|
|
294
|
+
if (element.pluginUri) {
|
|
295
|
+
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( element.pluginUri.toString())]);
|
|
296
|
+
}
|
|
297
|
+
const overlay = this.contextKeyService.createOverlay(overlayPairs);
|
|
298
|
+
const menu = templateData.elementDisposables.add(this.menuService.createMenu(AICustomizationManagementItemMenuId, overlay));
|
|
299
|
+
const updateActions = () => {
|
|
300
|
+
const actions = menu.getActions({
|
|
301
|
+
arg: context,
|
|
302
|
+
shouldForwardArgs: true
|
|
303
|
+
});
|
|
304
|
+
const {
|
|
305
|
+
primary
|
|
306
|
+
} = getContextMenuActions(actions, "inline");
|
|
307
|
+
templateData.actionBar.clear();
|
|
308
|
+
templateData.actionBar.push(primary, {
|
|
309
|
+
icon: true,
|
|
310
|
+
label: false
|
|
311
|
+
});
|
|
312
|
+
};
|
|
313
|
+
updateActions();
|
|
314
|
+
templateData.elementDisposables.add(menu.onDidChange(updateActions));
|
|
315
|
+
templateData.actionBar.context = context;
|
|
171
316
|
}
|
|
172
317
|
disposeTemplate(templateData) {
|
|
173
318
|
templateData.elementDisposables.dispose();
|
|
174
319
|
templateData.disposables.dispose();
|
|
175
320
|
}
|
|
176
321
|
};
|
|
177
|
-
AICustomizationItemRenderer = ( __decorate([( __param(0, IHoverService)), ( __param(1, ILabelService))], AICustomizationItemRenderer));
|
|
322
|
+
AICustomizationItemRenderer = ( __decorate([( __param(0, IHoverService)), ( __param(1, ILabelService)), ( __param(2, IMenuService)), ( __param(3, IContextKeyService)), ( __param(4, IInstantiationService)), ( __param(5, IAgentPluginService))], AICustomizationItemRenderer));
|
|
178
323
|
function sectionToPromptType(section) {
|
|
179
324
|
switch (section) {
|
|
180
325
|
case AICustomizationManagementSection.Agents:
|
|
@@ -205,7 +350,12 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
205
350
|
clipboardService,
|
|
206
351
|
hoverService,
|
|
207
352
|
fileService,
|
|
208
|
-
pathService
|
|
353
|
+
pathService,
|
|
354
|
+
telemetryService,
|
|
355
|
+
harnessService,
|
|
356
|
+
agentPluginService,
|
|
357
|
+
commandService,
|
|
358
|
+
productService
|
|
209
359
|
) {
|
|
210
360
|
super();
|
|
211
361
|
this.instantiationService = instantiationService;
|
|
@@ -222,6 +372,11 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
222
372
|
this.hoverService = hoverService;
|
|
223
373
|
this.fileService = fileService;
|
|
224
374
|
this.pathService = pathService;
|
|
375
|
+
this.telemetryService = telemetryService;
|
|
376
|
+
this.harnessService = harnessService;
|
|
377
|
+
this.agentPluginService = agentPluginService;
|
|
378
|
+
this.commandService = commandService;
|
|
379
|
+
this.productService = productService;
|
|
225
380
|
this.currentSection = AICustomizationManagementSection.Agents;
|
|
226
381
|
this.allItems = [];
|
|
227
382
|
this.displayEntries = [];
|
|
@@ -247,17 +402,30 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
247
402
|
this.updateAddButton();
|
|
248
403
|
this.refresh();
|
|
249
404
|
}));
|
|
405
|
+
this._register(autorun(reader => {
|
|
406
|
+
this.harnessService.activeHarness.read(reader);
|
|
407
|
+
this.updateAddButton();
|
|
408
|
+
this.refresh();
|
|
409
|
+
}));
|
|
250
410
|
}
|
|
251
411
|
create() {
|
|
252
412
|
this.searchAndButtonContainer = append(this.element, $(".list-search-and-button-container"));
|
|
253
413
|
this.searchContainer = append(this.searchAndButtonContainer, $(".list-search-container"));
|
|
254
414
|
this.searchInput = this._register(( new InputBox(this.searchContainer, this.contextViewService, {
|
|
255
|
-
placeholder: ( localize(
|
|
415
|
+
placeholder: ( localize(5275, "Type to search...")),
|
|
256
416
|
inputBoxStyles: defaultInputBoxStyles
|
|
257
417
|
})));
|
|
258
418
|
this._register(this.searchInput.onDidChange(() => {
|
|
259
419
|
this.searchQuery = this.searchInput.value;
|
|
260
|
-
this.delayedFilter.trigger(() =>
|
|
420
|
+
this.delayedFilter.trigger(() => {
|
|
421
|
+
const matchCount = this.filterItems();
|
|
422
|
+
if (this.searchQuery.trim()) {
|
|
423
|
+
this.telemetryService.publicLog2("chatCustomizationEditor.search", {
|
|
424
|
+
section: this.currentSection,
|
|
425
|
+
resultCount: matchCount
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
});
|
|
261
429
|
}));
|
|
262
430
|
this.addButtonContainer = append(this.searchAndButtonContainer, $(".list-add-button-container"));
|
|
263
431
|
this.addButtonSimple = this._register(( new Button(this.addButtonContainer, {
|
|
@@ -280,8 +448,9 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
280
448
|
this.updateAddButton();
|
|
281
449
|
this.listContainer = append(this.element, $(".list-container"));
|
|
282
450
|
this.emptyStateContainer = append(this.element, $(".list-empty-state"));
|
|
283
|
-
|
|
284
|
-
this.
|
|
451
|
+
const emptyStateHeader = append(this.emptyStateContainer, $(".empty-state-header"));
|
|
452
|
+
this.emptyStateIcon = append(emptyStateHeader, $(".empty-state-icon"));
|
|
453
|
+
this.emptyStateText = append(emptyStateHeader, $(".empty-state-text"));
|
|
285
454
|
this.emptyStateSubtext = append(this.emptyStateContainer, $(".empty-state-subtext"));
|
|
286
455
|
this.emptyStateContainer.style.display = "none";
|
|
287
456
|
this.list = this._register(this.instantiationService.createInstance(
|
|
@@ -298,16 +467,17 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
298
467
|
getAriaLabel: entry => {
|
|
299
468
|
if (entry.type === "group-header") {
|
|
300
469
|
return localize(
|
|
301
|
-
|
|
470
|
+
5276,
|
|
302
471
|
"{0}, {1} items, {2}",
|
|
303
472
|
entry.label,
|
|
304
473
|
entry.count,
|
|
305
|
-
entry.collapsed ? ( localize(
|
|
474
|
+
entry.collapsed ? ( localize(5277, "collapsed")) : ( localize(5278, "expanded"))
|
|
306
475
|
);
|
|
307
476
|
}
|
|
308
|
-
|
|
477
|
+
const nameAndDesc = entry.item.description ? ( localize(5279, "{0}, {1}", entry.item.name, entry.item.description)) : entry.item.name;
|
|
478
|
+
return entry.item.disabled ? ( localize(5280, "{0}, disabled", nameAndDesc)) : nameAndDesc;
|
|
309
479
|
},
|
|
310
|
-
getWidgetAriaLabel: () => ( localize(
|
|
480
|
+
getWidgetAriaLabel: () => ( localize(5281, "Chat Customizations"))
|
|
311
481
|
},
|
|
312
482
|
keyboardNavigationLabelProvider: {
|
|
313
483
|
getKeyboardNavigationLabel: entry => entry.type === "group-header" ? entry.label : entry.item.name
|
|
@@ -328,6 +498,12 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
328
498
|
this._register(this.list.onContextMenu(e => this.onContextMenu(e)));
|
|
329
499
|
this._register(this.promptsService.onDidChangeCustomAgents(() => this.refresh()));
|
|
330
500
|
this._register(this.promptsService.onDidChangeSlashCommands(() => this.refresh()));
|
|
501
|
+
this._register(this.promptsService.onDidChangeSkills(() => this.refresh()));
|
|
502
|
+
this._register(this.fileService.onDidFilesChange(e => {
|
|
503
|
+
if (e.gotDeleted()) {
|
|
504
|
+
this.refresh();
|
|
505
|
+
}
|
|
506
|
+
}));
|
|
331
507
|
this.sectionHeader = append(this.element, $(".section-footer"));
|
|
332
508
|
this.sectionDescription = append(this.sectionHeader, $("p.section-footer-description"));
|
|
333
509
|
this.sectionLink = append(this.sectionHeader, $("a.section-footer-link"));
|
|
@@ -349,16 +525,29 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
349
525
|
uri: ( item.uri.toString()),
|
|
350
526
|
name: item.name,
|
|
351
527
|
promptType: item.promptType,
|
|
352
|
-
storage: item.storage
|
|
528
|
+
storage: item.storage,
|
|
529
|
+
pluginUri: item.pluginUri?.toString()
|
|
353
530
|
};
|
|
354
|
-
const
|
|
531
|
+
const overlayPairs = [
|
|
532
|
+
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, item.promptType],
|
|
533
|
+
[AI_CUSTOMIZATION_ITEM_STORAGE_KEY, item.storage],
|
|
534
|
+
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( item.uri.toString())],
|
|
535
|
+
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, item.disabled]
|
|
536
|
+
];
|
|
537
|
+
if (item.pluginUri) {
|
|
538
|
+
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( item.pluginUri.toString())]);
|
|
539
|
+
}
|
|
540
|
+
const overlay = this.contextKeyService.createOverlay(overlayPairs);
|
|
541
|
+
const actions = this.menuService.getMenuActions(AICustomizationManagementItemMenuId, overlay, {
|
|
355
542
|
arg: context,
|
|
356
543
|
shouldForwardArgs: true
|
|
357
544
|
});
|
|
358
|
-
const
|
|
359
|
-
|
|
545
|
+
const {
|
|
546
|
+
secondary
|
|
547
|
+
} = getContextMenuActions(actions, "inline");
|
|
548
|
+
const copyActions = [( new Separator()), ( new Action("copyFullPath", ( localize(5282, "Copy Full Path")), undefined, true, async () => {
|
|
360
549
|
await this.clipboardService.writeText(item.uri.fsPath);
|
|
361
|
-
})), ( new Action("copyRelativePath", ( localize(
|
|
550
|
+
})), ( new Action("copyRelativePath", ( localize(5283, "Copy Relative Path")), undefined, true, async () => {
|
|
362
551
|
const basePath = this.workspaceService.getActiveProjectRoot();
|
|
363
552
|
if (basePath && item.uri.fsPath.startsWith(basePath.fsPath)) {
|
|
364
553
|
const relative = item.uri.fsPath.substring(basePath.fsPath.length + 1);
|
|
@@ -372,7 +561,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
372
561
|
}))];
|
|
373
562
|
this.contextMenuService.showContextMenu({
|
|
374
563
|
getAnchor: () => e.anchor,
|
|
375
|
-
getActions: () => [...
|
|
564
|
+
getActions: () => [...secondary, ...copyActions]
|
|
376
565
|
});
|
|
377
566
|
}
|
|
378
567
|
async setSection(section) {
|
|
@@ -388,41 +577,41 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
388
577
|
switch (this.currentSection) {
|
|
389
578
|
case AICustomizationManagementSection.Agents:
|
|
390
579
|
description = ( localize(
|
|
391
|
-
|
|
580
|
+
5284,
|
|
392
581
|
"Configure the AI to adopt different personas tailored to specific development tasks. Each agent has its own instructions, tools, and behavior."
|
|
393
582
|
));
|
|
394
583
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/custom-agents";
|
|
395
|
-
learnMoreLabel = ( localize(
|
|
584
|
+
learnMoreLabel = ( localize(5285, "Learn more about custom agents"));
|
|
396
585
|
break;
|
|
397
586
|
case AICustomizationManagementSection.Skills:
|
|
398
587
|
description = ( localize(
|
|
399
|
-
|
|
588
|
+
5286,
|
|
400
589
|
"Folders of instructions, scripts, and resources that Copilot loads when relevant to perform specialized tasks."
|
|
401
590
|
));
|
|
402
591
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/agent-skills";
|
|
403
|
-
learnMoreLabel = ( localize(
|
|
592
|
+
learnMoreLabel = ( localize(5287, "Learn more about agent skills"));
|
|
404
593
|
break;
|
|
405
594
|
case AICustomizationManagementSection.Instructions:
|
|
406
595
|
description = ( localize(
|
|
407
|
-
|
|
596
|
+
5288,
|
|
408
597
|
"Define common guidelines and rules that automatically influence how AI generates code and handles development tasks."
|
|
409
598
|
));
|
|
410
599
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/custom-instructions";
|
|
411
|
-
learnMoreLabel = ( localize(
|
|
600
|
+
learnMoreLabel = ( localize(5289, "Learn more about custom instructions"));
|
|
412
601
|
break;
|
|
413
602
|
case AICustomizationManagementSection.Hooks:
|
|
414
|
-
description = ( localize(
|
|
603
|
+
description = ( localize(5290, "Prompts executed at specific points during an agentic lifecycle."));
|
|
415
604
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/hooks";
|
|
416
|
-
learnMoreLabel = ( localize(
|
|
605
|
+
learnMoreLabel = ( localize(5291, "Learn more about hooks"));
|
|
417
606
|
break;
|
|
418
607
|
case AICustomizationManagementSection.Prompts:
|
|
419
608
|
default:
|
|
420
609
|
description = ( localize(
|
|
421
|
-
|
|
610
|
+
5292,
|
|
422
611
|
"Reusable prompts for common development tasks like generating code, performing reviews, or scaffolding components."
|
|
423
612
|
));
|
|
424
613
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/prompt-files";
|
|
425
|
-
learnMoreLabel = ( localize(
|
|
614
|
+
learnMoreLabel = ( localize(5293, "Learn more about prompt files"));
|
|
426
615
|
break;
|
|
427
616
|
}
|
|
428
617
|
this.sectionDescription.textContent = description;
|
|
@@ -430,145 +619,197 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
430
619
|
this.sectionLink.href = docsUrl;
|
|
431
620
|
}
|
|
432
621
|
updateAddButton() {
|
|
433
|
-
const
|
|
434
|
-
const
|
|
435
|
-
const hasDropdown =
|
|
622
|
+
const actions = this.buildCreateActions();
|
|
623
|
+
const [primary, ...dropdown] = actions;
|
|
624
|
+
const hasDropdown = dropdown.length > 0;
|
|
436
625
|
this.addButton.element.style.display = hasDropdown ? "" : "none";
|
|
437
626
|
this.addButtonSimple.element.style.display = hasDropdown ? "none" : "";
|
|
438
|
-
if (
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
this.addButton.primaryButton.setTitle(disabledTitle);
|
|
449
|
-
this.addButton.dropdownButton.setTitle(disabledTitle);
|
|
450
|
-
}
|
|
451
|
-
} else {
|
|
452
|
-
this.addButtonSimple.label = label;
|
|
453
|
-
this.addButtonSimple.enabled = hasWorkspace;
|
|
454
|
-
if (!hasWorkspace) {
|
|
455
|
-
this.addButtonSimple.setTitle(( localize(5249, "Open a workspace folder to create customizations.")));
|
|
456
|
-
} else {
|
|
457
|
-
this.addButtonSimple.setTitle("");
|
|
458
|
-
}
|
|
459
|
-
}
|
|
627
|
+
if (!primary) {
|
|
628
|
+
this.addButtonSimple.element.style.display = "none";
|
|
629
|
+
this.addButton.element.style.display = "none";
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
if (hasDropdown) {
|
|
633
|
+
this.addButton.label = primary.label;
|
|
634
|
+
this.addButton.enabled = primary.enabled;
|
|
635
|
+
this.addButton.primaryButton.setTitle(primary.tooltip ?? "");
|
|
636
|
+
this.addButton.dropdownButton.setTitle("");
|
|
460
637
|
} else {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
this.addButton.enabled = true;
|
|
465
|
-
this.addButton.primaryButton.setTitle("");
|
|
466
|
-
this.addButton.dropdownButton.setTitle("");
|
|
467
|
-
} else {
|
|
468
|
-
this.addButtonSimple.label = label;
|
|
469
|
-
this.addButtonSimple.enabled = true;
|
|
470
|
-
this.addButtonSimple.setTitle("");
|
|
471
|
-
}
|
|
638
|
+
this.addButtonSimple.label = primary.label;
|
|
639
|
+
this.addButtonSimple.enabled = primary.enabled;
|
|
640
|
+
this.addButtonSimple.setTitle(primary.tooltip ?? "");
|
|
472
641
|
}
|
|
473
642
|
}
|
|
474
|
-
|
|
475
|
-
this.dropdownActionDisposables.clear();
|
|
643
|
+
buildCreateActions() {
|
|
476
644
|
const typeLabel = this.getTypeLabel();
|
|
477
|
-
const actions = [];
|
|
478
645
|
const promptType = sectionToPromptType(this.currentSection);
|
|
646
|
+
const descriptor = this.harnessService.getActiveDescriptor();
|
|
647
|
+
const override = descriptor.sectionOverrides?.get(this.currentSection);
|
|
648
|
+
const hasWorkspace = this.hasActiveWorkspace();
|
|
649
|
+
if (override?.commandId) {
|
|
650
|
+
return [{
|
|
651
|
+
label: `$(${Codicon.add.id}) ${override.label}`,
|
|
652
|
+
enabled: true,
|
|
653
|
+
run: () => {
|
|
654
|
+
this.commandService.executeCommand(override.commandId);
|
|
655
|
+
}
|
|
656
|
+
}];
|
|
657
|
+
}
|
|
658
|
+
const createTypeLabel = override?.typeLabel ?? typeLabel;
|
|
659
|
+
const actions = [];
|
|
660
|
+
const addedTargets = ( new Set());
|
|
661
|
+
if (override?.rootFile && hasWorkspace) {
|
|
662
|
+
actions.push({
|
|
663
|
+
label: `$(${Codicon.add.id}) ${override.label}`,
|
|
664
|
+
enabled: true,
|
|
665
|
+
run: () => {
|
|
666
|
+
this._onDidRequestCreateManual.fire({
|
|
667
|
+
type: promptType,
|
|
668
|
+
target: "workspace-root"
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
addedTargets.add("workspace-root");
|
|
673
|
+
}
|
|
479
674
|
if (promptType === PromptsType.hook) {
|
|
480
|
-
if (this.workspaceService.isSessionsWindow)
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
675
|
+
if (!this.workspaceService.isSessionsWindow && !descriptor.hideGenerateButton) {
|
|
676
|
+
actions.push({
|
|
677
|
+
label: `$(${Codicon.sparkle.id}) Generate ${typeLabel}`,
|
|
678
|
+
enabled: true,
|
|
679
|
+
run: () => {
|
|
680
|
+
this._onDidRequestCreate.fire(promptType);
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
if (hasWorkspace) {
|
|
684
|
+
actions.push({
|
|
685
|
+
label: `$(${Codicon.add.id}) Configure Hooks`,
|
|
686
|
+
enabled: true,
|
|
687
|
+
run: () => {
|
|
489
688
|
this._onDidRequestCreateManual.fire({
|
|
490
689
|
type: promptType,
|
|
491
690
|
target: "workspace"
|
|
492
691
|
});
|
|
493
692
|
}
|
|
494
|
-
)
|
|
693
|
+
});
|
|
495
694
|
}
|
|
695
|
+
} else if (!override?.commandId) {
|
|
696
|
+
actions.push({
|
|
697
|
+
label: `$(${Codicon.add.id}) New ${typeLabel} (Workspace)`,
|
|
698
|
+
enabled: hasWorkspace,
|
|
699
|
+
tooltip: hasWorkspace ? undefined : ( localize(5294, "Open a workspace folder to create customizations.")),
|
|
700
|
+
run: () => {
|
|
701
|
+
this._onDidRequestCreateManual.fire({
|
|
702
|
+
type: promptType,
|
|
703
|
+
target: "workspace"
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
});
|
|
496
707
|
}
|
|
497
708
|
return actions;
|
|
498
709
|
}
|
|
499
|
-
if (
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
if (this.hasActiveWorkspace()) {
|
|
514
|
-
actions.push(this.dropdownActionDisposables.add(( new Action(
|
|
515
|
-
"createWorkspace",
|
|
516
|
-
`$(${Codicon.folder.id}) New ${typeLabel} (Workspace)`,
|
|
517
|
-
undefined,
|
|
518
|
-
true,
|
|
519
|
-
() => {
|
|
710
|
+
if (!override?.rootFile) {
|
|
711
|
+
if (!this.workspaceService.isSessionsWindow && !descriptor.hideGenerateButton) {
|
|
712
|
+
actions.push({
|
|
713
|
+
label: `$(${Codicon.sparkle.id}) Generate ${typeLabel}`,
|
|
714
|
+
enabled: true,
|
|
715
|
+
run: () => {
|
|
716
|
+
this._onDidRequestCreate.fire(promptType);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
} else if (hasWorkspace) {
|
|
720
|
+
actions.push({
|
|
721
|
+
label: `$(${Codicon.add.id}) New ${createTypeLabel} (Workspace)`,
|
|
722
|
+
enabled: true,
|
|
723
|
+
run: () => {
|
|
520
724
|
this._onDidRequestCreateManual.fire({
|
|
521
725
|
type: promptType,
|
|
522
726
|
target: "workspace"
|
|
523
727
|
});
|
|
524
728
|
}
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
729
|
+
});
|
|
730
|
+
addedTargets.add("workspace");
|
|
731
|
+
} else {
|
|
732
|
+
actions.push({
|
|
733
|
+
label: `$(${Codicon.add.id}) New ${createTypeLabel} (User)`,
|
|
734
|
+
enabled: true,
|
|
735
|
+
run: () => {
|
|
736
|
+
this._onDidRequestCreateManual.fire({
|
|
737
|
+
type: promptType,
|
|
738
|
+
target: "user"
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
addedTargets.add("user");
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
if (hasWorkspace && !( addedTargets.has("workspace"))) {
|
|
746
|
+
actions.push({
|
|
747
|
+
label: `$(${Codicon.folder.id}) New ${createTypeLabel} (Workspace)`,
|
|
748
|
+
enabled: true,
|
|
749
|
+
run: () => {
|
|
750
|
+
this._onDidRequestCreateManual.fire({
|
|
751
|
+
type: promptType,
|
|
752
|
+
target: "workspace"
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
if (!( addedTargets.has("user"))) {
|
|
758
|
+
actions.push({
|
|
759
|
+
label: `$(${Codicon.account.id}) New ${createTypeLabel} (User)`,
|
|
760
|
+
enabled: true,
|
|
761
|
+
run: () => {
|
|
533
762
|
this._onDidRequestCreateManual.fire({
|
|
534
763
|
type: promptType,
|
|
535
764
|
target: "user"
|
|
536
765
|
});
|
|
537
766
|
}
|
|
538
|
-
)
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
if (hasWorkspace && override?.rootFileShortcuts && !( addedTargets.has("workspace-root"))) {
|
|
770
|
+
for (const fileName of override.rootFileShortcuts) {
|
|
771
|
+
actions.push({
|
|
772
|
+
label: `$(${Codicon.file.id}) New ${fileName}`,
|
|
773
|
+
enabled: true,
|
|
774
|
+
run: () => {
|
|
775
|
+
this._onDidRequestCreateManual.fire({
|
|
776
|
+
type: promptType,
|
|
777
|
+
target: "workspace-root",
|
|
778
|
+
rootFileName: fileName
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
}
|
|
539
783
|
}
|
|
540
784
|
return actions;
|
|
541
785
|
}
|
|
786
|
+
getDropdownActions() {
|
|
787
|
+
this.dropdownActionDisposables.clear();
|
|
788
|
+
const allActions = this.buildCreateActions();
|
|
789
|
+
return ( allActions.slice(1).map((a, i) => this.dropdownActionDisposables.add(( new Action(`create_${i}`, a.label, undefined, a.enabled, () => a.run())))));
|
|
790
|
+
}
|
|
542
791
|
hasActiveWorkspace() {
|
|
543
792
|
return !!this.workspaceService.getActiveProjectRoot();
|
|
544
793
|
}
|
|
545
794
|
executePrimaryCreateAction() {
|
|
546
|
-
const
|
|
547
|
-
if (
|
|
548
|
-
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
this._onDidRequestCreateManual.fire({
|
|
552
|
-
type: promptType,
|
|
553
|
-
target: "workspace"
|
|
554
|
-
});
|
|
555
|
-
} else {
|
|
556
|
-
this._onDidRequestCreate.fire(promptType);
|
|
795
|
+
const actions = this.buildCreateActions();
|
|
796
|
+
if (actions.length > 0 && actions[0].enabled) {
|
|
797
|
+
actions[0].run();
|
|
557
798
|
}
|
|
558
799
|
}
|
|
559
800
|
getTypeLabel() {
|
|
560
801
|
switch (this.currentSection) {
|
|
561
802
|
case AICustomizationManagementSection.Agents:
|
|
562
|
-
return localize(
|
|
803
|
+
return localize(5295, "Agent");
|
|
563
804
|
case AICustomizationManagementSection.Skills:
|
|
564
|
-
return localize(
|
|
805
|
+
return localize(5296, "Skill");
|
|
565
806
|
case AICustomizationManagementSection.Instructions:
|
|
566
|
-
return localize(
|
|
807
|
+
return localize(5297, "Instructions");
|
|
567
808
|
case AICustomizationManagementSection.Hooks:
|
|
568
|
-
return localize(
|
|
809
|
+
return localize(5298, "Hook");
|
|
569
810
|
case AICustomizationManagementSection.Prompts:
|
|
570
811
|
default:
|
|
571
|
-
return localize(
|
|
812
|
+
return localize(5299, "Prompt");
|
|
572
813
|
}
|
|
573
814
|
}
|
|
574
815
|
async refresh() {
|
|
@@ -577,8 +818,48 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
577
818
|
}
|
|
578
819
|
async loadItems() {
|
|
579
820
|
const section = this.currentSection;
|
|
821
|
+
const items = await this.fetchItemsForSection(section);
|
|
822
|
+
if (this.currentSection !== section) {
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
this.allItems = items;
|
|
826
|
+
this.filterItems();
|
|
827
|
+
this._onDidChangeItemCount.fire(items.length);
|
|
828
|
+
}
|
|
829
|
+
async computeItemCountForSection(section) {
|
|
830
|
+
const items = await this.fetchItemsForSection(section);
|
|
831
|
+
return items.length;
|
|
832
|
+
}
|
|
833
|
+
isChatExtensionItem(extensionId) {
|
|
834
|
+
const chatExtensionId = this.productService.defaultChatAgent?.chatExtensionId;
|
|
835
|
+
return !!chatExtensionId && ExtensionIdentifier.equals(extensionId, chatExtensionId);
|
|
836
|
+
}
|
|
837
|
+
resolveExtensionGroupKey(extensionId) {
|
|
838
|
+
if (extensionId && this.isChatExtensionItem(extensionId)) {
|
|
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
|
+
}
|
|
848
|
+
if (item.storage !== PromptsStorage.extension) {
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
const extId = extensionIdByUri.get(( item.uri.toString()));
|
|
852
|
+
const override = this.resolveExtensionGroupKey(extId);
|
|
853
|
+
if (override) {
|
|
854
|
+
item.groupKey = override;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
async fetchItemsForSection(section) {
|
|
580
859
|
const promptType = sectionToPromptType(section);
|
|
581
860
|
const items = [];
|
|
861
|
+
const disabledUris = this.promptsService.getDisabledPromptFiles(promptType);
|
|
862
|
+
const extensionIdByUri = ( new Map());
|
|
582
863
|
if (promptType === PromptsType.agent) {
|
|
583
864
|
const agents = await this.promptsService.getCustomAgents(CancellationToken.None);
|
|
584
865
|
for (const agent of agents) {
|
|
@@ -590,14 +871,27 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
590
871
|
filename,
|
|
591
872
|
description: agent.description,
|
|
592
873
|
storage: agent.source.storage,
|
|
593
|
-
promptType
|
|
874
|
+
promptType,
|
|
875
|
+
pluginUri: agent.source.storage === PromptsStorage.plugin ? agent.source.pluginUri : undefined,
|
|
876
|
+
disabled: ( disabledUris.has(agent.uri))
|
|
594
877
|
});
|
|
878
|
+
if (agent.source.storage === PromptsStorage.extension) {
|
|
879
|
+
extensionIdByUri.set(( agent.uri.toString()), agent.source.extensionId);
|
|
880
|
+
}
|
|
595
881
|
}
|
|
596
882
|
} else if (promptType === PromptsType.skill) {
|
|
597
883
|
const skills = await this.promptsService.findAgentSkills(CancellationToken.None);
|
|
884
|
+
const allSkillFiles = await this.promptsService.listPromptFiles(PromptsType.skill, CancellationToken.None);
|
|
885
|
+
for (const file of allSkillFiles) {
|
|
886
|
+
if (file.extension) {
|
|
887
|
+
extensionIdByUri.set(( file.uri.toString()), file.extension.identifier);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
const seenUris = ( new ResourceSet());
|
|
598
891
|
for (const skill of skills || []) {
|
|
599
892
|
const filename = basename(skill.uri);
|
|
600
893
|
const skillName = skill.name || basename(dirname(skill.uri)) || filename;
|
|
894
|
+
seenUris.add(skill.uri);
|
|
601
895
|
items.push({
|
|
602
896
|
id: ( skill.uri.toString()),
|
|
603
897
|
uri: skill.uri,
|
|
@@ -605,9 +899,28 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
605
899
|
filename,
|
|
606
900
|
description: skill.description,
|
|
607
901
|
storage: skill.storage,
|
|
608
|
-
promptType
|
|
902
|
+
promptType,
|
|
903
|
+
pluginUri: skill.storage === PromptsStorage.plugin ? this.findPluginUri(skill.uri) : undefined,
|
|
904
|
+
disabled: false
|
|
609
905
|
});
|
|
610
906
|
}
|
|
907
|
+
if (disabledUris.size > 0) {
|
|
908
|
+
for (const file of allSkillFiles) {
|
|
909
|
+
if (!( seenUris.has(file.uri)) && ( disabledUris.has(file.uri))) {
|
|
910
|
+
const filename = basename(file.uri);
|
|
911
|
+
items.push({
|
|
912
|
+
id: ( file.uri.toString()),
|
|
913
|
+
uri: file.uri,
|
|
914
|
+
name: file.name || basename(dirname(file.uri)) || filename,
|
|
915
|
+
filename,
|
|
916
|
+
description: file.description,
|
|
917
|
+
storage: file.storage,
|
|
918
|
+
promptType,
|
|
919
|
+
disabled: true
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
611
924
|
} else if (promptType === PromptsType.prompt) {
|
|
612
925
|
const commands = await this.promptsService.getPromptSlashCommands(CancellationToken.None);
|
|
613
926
|
for (const command of commands) {
|
|
@@ -622,8 +935,13 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
622
935
|
filename,
|
|
623
936
|
description: command.description,
|
|
624
937
|
storage: command.promptPath.storage,
|
|
625
|
-
promptType
|
|
938
|
+
promptType,
|
|
939
|
+
pluginUri: command.promptPath.storage === PromptsStorage.plugin ? command.promptPath.pluginUri : undefined,
|
|
940
|
+
disabled: ( disabledUris.has(command.promptPath.uri))
|
|
626
941
|
});
|
|
942
|
+
if (command.promptPath.extension) {
|
|
943
|
+
extensionIdByUri.set(( command.promptPath.uri.toString()), command.promptPath.extension.identifier);
|
|
944
|
+
}
|
|
627
945
|
}
|
|
628
946
|
} else if (promptType === PromptsType.hook) {
|
|
629
947
|
const hookFiles = await this.promptsService.listPromptFiles(PromptsType.hook, CancellationToken.None);
|
|
@@ -631,6 +949,20 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
631
949
|
const userHomeUri = await this.pathService.userHome();
|
|
632
950
|
const userHome = userHomeUri.scheme === Schemas.file ? userHomeUri.fsPath : userHomeUri.path;
|
|
633
951
|
for (const hookFile of hookFiles) {
|
|
952
|
+
if (hookFile.storage === PromptsStorage.plugin) {
|
|
953
|
+
const filename = basename(hookFile.uri);
|
|
954
|
+
items.push({
|
|
955
|
+
id: ( hookFile.uri.toString()) + ":" + hookFile.name,
|
|
956
|
+
uri: hookFile.uri,
|
|
957
|
+
name: hookFile.name || this.getFriendlyName(filename),
|
|
958
|
+
filename,
|
|
959
|
+
storage: hookFile.storage,
|
|
960
|
+
promptType,
|
|
961
|
+
pluginUri: hookFile.pluginUri,
|
|
962
|
+
disabled: ( disabledUris.has(hookFile.uri))
|
|
963
|
+
});
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
634
966
|
let parsedHooks = false;
|
|
635
967
|
try {
|
|
636
968
|
const content = await this.fileService.readFile(hookFile.uri);
|
|
@@ -651,9 +983,10 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
651
983
|
uri: hookFile.uri,
|
|
652
984
|
name: hookMeta?.label ?? entry.originalId,
|
|
653
985
|
filename: basename(hookFile.uri),
|
|
654
|
-
description: truncatedCmd || ( localize(
|
|
986
|
+
description: truncatedCmd || ( localize(5300, "(unset)")),
|
|
655
987
|
storage: hookFile.storage,
|
|
656
|
-
promptType
|
|
988
|
+
promptType,
|
|
989
|
+
disabled: ( disabledUris.has(hookFile.uri))
|
|
657
990
|
});
|
|
658
991
|
}
|
|
659
992
|
}
|
|
@@ -664,10 +997,11 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
664
997
|
items.push({
|
|
665
998
|
id: ( hookFile.uri.toString()),
|
|
666
999
|
uri: hookFile.uri,
|
|
667
|
-
name: this.getFriendlyName(filename),
|
|
1000
|
+
name: hookFile.name || this.getFriendlyName(filename),
|
|
668
1001
|
filename,
|
|
669
1002
|
storage: hookFile.storage,
|
|
670
|
-
promptType
|
|
1003
|
+
promptType,
|
|
1004
|
+
disabled: ( disabledUris.has(hookFile.uri))
|
|
671
1005
|
});
|
|
672
1006
|
}
|
|
673
1007
|
}
|
|
@@ -691,67 +1025,146 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
691
1025
|
uri: agent.uri,
|
|
692
1026
|
name: hookMeta?.label ?? hookType,
|
|
693
1027
|
filename: basename(agent.uri),
|
|
694
|
-
description: `${agent.name}: ${truncatedCmd || ( localize(
|
|
1028
|
+
description: `${agent.name}: ${truncatedCmd || ( localize(5300, "(unset)"))}`,
|
|
695
1029
|
storage: agent.source.storage,
|
|
696
1030
|
groupKey: "agents",
|
|
697
|
-
promptType
|
|
1031
|
+
promptType,
|
|
1032
|
+
pluginUri: agent.source.storage === PromptsStorage.plugin ? agent.source.pluginUri : undefined,
|
|
1033
|
+
disabled: ( disabledUris.has(agent.uri))
|
|
698
1034
|
});
|
|
699
1035
|
}
|
|
700
1036
|
}
|
|
701
1037
|
}
|
|
702
1038
|
} else {
|
|
703
1039
|
const promptFiles = await this.promptsService.listPromptFiles(promptType, CancellationToken.None);
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
1040
|
+
for (const file of promptFiles) {
|
|
1041
|
+
if (file.extension) {
|
|
1042
|
+
extensionIdByUri.set(( file.uri.toString()), file.extension.identifier);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
const agentInstructionFiles = await this.promptsService.listAgentInstructions(CancellationToken.None, undefined);
|
|
1046
|
+
const agentInstructionUris = ( new ResourceSet(( agentInstructionFiles.map(f => f.uri))));
|
|
1047
|
+
const workspaceFolderUris = ( this.workspaceContextService.getWorkspace().folders.map(f => f.uri));
|
|
1048
|
+
const activeRoot = this.workspaceService.getActiveProjectRoot();
|
|
1049
|
+
if (activeRoot) {
|
|
1050
|
+
workspaceFolderUris.push(activeRoot);
|
|
1051
|
+
}
|
|
1052
|
+
for (const file of agentInstructionFiles) {
|
|
1053
|
+
const storage = PromptsStorage.local;
|
|
1054
|
+
const filename = basename(file.uri);
|
|
1055
|
+
items.push({
|
|
1056
|
+
id: ( file.uri.toString()),
|
|
1057
|
+
uri: file.uri,
|
|
1058
|
+
name: filename,
|
|
1059
|
+
filename: this.labelService.getUriLabel(file.uri, {
|
|
1060
|
+
relative: true
|
|
1061
|
+
}),
|
|
1062
|
+
displayName: filename,
|
|
1063
|
+
storage,
|
|
1064
|
+
promptType,
|
|
1065
|
+
typeIcon: storageToIcon(storage),
|
|
1066
|
+
groupKey: "agent-instructions",
|
|
1067
|
+
disabled: ( disabledUris.has(file.uri))
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
const promptFilesToParse = promptFiles.filter(item => !( agentInstructionUris.has(item.uri)));
|
|
1071
|
+
const parseResults = await Promise.all(( promptFilesToParse.map(async item => {
|
|
1072
|
+
try {
|
|
1073
|
+
const parsed = await this.promptsService.parseNew(item.uri, CancellationToken.None);
|
|
1074
|
+
return {
|
|
1075
|
+
item,
|
|
1076
|
+
parsed
|
|
1077
|
+
};
|
|
1078
|
+
} catch {
|
|
1079
|
+
return {
|
|
1080
|
+
item,
|
|
1081
|
+
parsed: undefined
|
|
1082
|
+
};
|
|
711
1083
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
1084
|
+
})));
|
|
1085
|
+
for (const {
|
|
1086
|
+
item,
|
|
1087
|
+
parsed
|
|
1088
|
+
} of parseResults) {
|
|
1089
|
+
const applyTo = evaluateApplyToPattern(parsed?.header, isInClaudeRulesFolder(item.uri));
|
|
1090
|
+
const name = parsed?.header?.name;
|
|
1091
|
+
let description = parsed?.header?.description;
|
|
1092
|
+
const friendlyName = this.getFriendlyName(name || item.name || getCleanPromptName(item.uri));
|
|
1093
|
+
description = description || item.description;
|
|
1094
|
+
if (applyTo !== undefined) {
|
|
1095
|
+
const badge = applyTo === "**" ? ( localize(5301, "always added")) : applyTo;
|
|
1096
|
+
const badgeTooltip = applyTo === "**" ? ( localize(5302, "This instruction is automatically included in every interaction.")) : ( localize(
|
|
1097
|
+
5303,
|
|
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))
|
|
719
1133
|
});
|
|
720
1134
|
}
|
|
721
1135
|
}
|
|
722
|
-
const workspaceItems = allItems.filter(item => item.storage === PromptsStorage.local);
|
|
723
|
-
const userItems = allItems.filter(item => item.storage === PromptsStorage.user);
|
|
724
|
-
const extensionItems = allItems.filter(item => item.storage === PromptsStorage.extension);
|
|
725
|
-
const pluginItems = allItems.filter(item => item.storage === PromptsStorage.plugin);
|
|
726
|
-
const mapToListItem = item => {
|
|
727
|
-
const filename = basename(item.uri);
|
|
728
|
-
const friendlyName = item.name || this.getFriendlyName(filename);
|
|
729
|
-
return {
|
|
730
|
-
id: ( item.uri.toString()),
|
|
731
|
-
uri: item.uri,
|
|
732
|
-
name: friendlyName,
|
|
733
|
-
filename,
|
|
734
|
-
description: item.description,
|
|
735
|
-
storage: item.storage,
|
|
736
|
-
promptType
|
|
737
|
-
};
|
|
738
|
-
};
|
|
739
|
-
items.push(...( workspaceItems.map(mapToListItem)));
|
|
740
|
-
items.push(...( userItems.map(mapToListItem)));
|
|
741
|
-
items.push(...( extensionItems.map(mapToListItem)));
|
|
742
|
-
items.push(...( pluginItems.map(mapToListItem)));
|
|
743
1136
|
}
|
|
1137
|
+
this.applyBuiltinGroupKeys(items, extensionIdByUri);
|
|
744
1138
|
const filter = this.workspaceService.getStorageSourceFilter(promptType);
|
|
745
1139
|
const filteredItems = applyStorageSourceFilter(items, filter);
|
|
746
1140
|
items.length = 0;
|
|
747
1141
|
items.push(...filteredItems);
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
1142
|
+
const descriptor = this.harnessService.getActiveDescriptor();
|
|
1143
|
+
const subpaths = descriptor.workspaceSubpaths;
|
|
1144
|
+
const instrFilter = descriptor.instructionFileFilter;
|
|
1145
|
+
if (subpaths) {
|
|
1146
|
+
const projectRoot = this.workspaceService.getActiveProjectRoot();
|
|
1147
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
1148
|
+
const item = items[i];
|
|
1149
|
+
if (item.storage === PromptsStorage.local && projectRoot && isEqualOrParent(item.uri, projectRoot)) {
|
|
1150
|
+
if (!matchesWorkspaceSubpath(item.uri.path, subpaths)) {
|
|
1151
|
+
if (instrFilter && promptType === PromptsType.instructions && matchesInstructionFileFilter(item.uri.path, instrFilter)) {
|
|
1152
|
+
continue;
|
|
1153
|
+
}
|
|
1154
|
+
items.splice(i, 1);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
751
1158
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
1159
|
+
if (instrFilter && promptType === PromptsType.instructions) {
|
|
1160
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
1161
|
+
if (!matchesInstructionFileFilter(items[i].uri.path, instrFilter)) {
|
|
1162
|
+
items.splice(i, 1);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
items.sort((a, b) => a.name.localeCompare(b.name));
|
|
1167
|
+
return items;
|
|
755
1168
|
}
|
|
756
1169
|
getFriendlyName(filename) {
|
|
757
1170
|
let name = filename.replace(/\.instructions\.md$/i, "").replace(/\.prompt\.md$/i, "").replace(/\.agent\.md$/i, "").replace(/\.md$/i, "");
|
|
@@ -770,10 +1183,12 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
770
1183
|
const query = this.searchQuery.toLowerCase();
|
|
771
1184
|
matchedItems = [];
|
|
772
1185
|
for (const item of this.allItems) {
|
|
773
|
-
const
|
|
1186
|
+
const displayName = item.displayName ?? formatDisplayName(item.name);
|
|
1187
|
+
const nameMatches = matchesContiguousSubString(query, displayName);
|
|
774
1188
|
const descriptionMatches = item.description ? matchesContiguousSubString(query, item.description) : null;
|
|
775
1189
|
const filenameMatches = matchesContiguousSubString(query, item.filename);
|
|
776
|
-
|
|
1190
|
+
const badgeMatches = item.badge ? matchesContiguousSubString(query, item.badge) : null;
|
|
1191
|
+
if (nameMatches || descriptionMatches || filenameMatches || badgeMatches) {
|
|
777
1192
|
matchedItems.push({
|
|
778
1193
|
...item,
|
|
779
1194
|
nameMatches: nameMatches || undefined,
|
|
@@ -784,41 +1199,71 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
784
1199
|
}
|
|
785
1200
|
const promptType = sectionToPromptType(this.currentSection);
|
|
786
1201
|
const visibleSources = ( new Set(this.workspaceService.getStorageSourceFilter(promptType).sources));
|
|
787
|
-
const groups = [{
|
|
1202
|
+
const groups = this.currentSection === AICustomizationManagementSection.Instructions ? [{
|
|
1203
|
+
groupKey: "agent-instructions",
|
|
1204
|
+
label: ( localize(5304, "Agent Instructions")),
|
|
1205
|
+
icon: instructionsIcon,
|
|
1206
|
+
description: ( localize(
|
|
1207
|
+
5305,
|
|
1208
|
+
"Instruction files automatically loaded for all agent interactions (e.g. AGENTS.md, CLAUDE.md, copilot-instructions.md)."
|
|
1209
|
+
)),
|
|
1210
|
+
items: []
|
|
1211
|
+
}, {
|
|
1212
|
+
groupKey: "context-instructions",
|
|
1213
|
+
label: ( localize(5306, "Included Based on Context")),
|
|
1214
|
+
icon: instructionsIcon,
|
|
1215
|
+
description: ( localize(
|
|
1216
|
+
5307,
|
|
1217
|
+
"Instructions automatically loaded when matching files are part of the context."
|
|
1218
|
+
)),
|
|
1219
|
+
items: []
|
|
1220
|
+
}, {
|
|
1221
|
+
groupKey: "on-demand-instructions",
|
|
1222
|
+
label: ( localize(5308, "Loaded on Demand")),
|
|
1223
|
+
icon: instructionsIcon,
|
|
1224
|
+
description: ( localize(5309, "Instructions loaded only when explicitly referenced.")),
|
|
1225
|
+
items: []
|
|
1226
|
+
}] : [{
|
|
788
1227
|
groupKey: PromptsStorage.local,
|
|
789
|
-
label: ( localize(
|
|
1228
|
+
label: ( localize(5310, "Workspace")),
|
|
790
1229
|
icon: workspaceIcon,
|
|
791
1230
|
description: ( localize(
|
|
792
|
-
|
|
1231
|
+
5311,
|
|
793
1232
|
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
794
1233
|
)),
|
|
795
1234
|
items: []
|
|
796
1235
|
}, {
|
|
797
1236
|
groupKey: PromptsStorage.user,
|
|
798
|
-
label: ( localize(
|
|
1237
|
+
label: ( localize(5312, "User")),
|
|
799
1238
|
icon: userIcon,
|
|
800
1239
|
description: ( localize(
|
|
801
|
-
|
|
1240
|
+
5313,
|
|
802
1241
|
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
803
1242
|
)),
|
|
804
1243
|
items: []
|
|
1244
|
+
}, {
|
|
1245
|
+
groupKey: PromptsStorage.plugin,
|
|
1246
|
+
label: ( localize(5314, "Plugins")),
|
|
1247
|
+
icon: pluginIcon,
|
|
1248
|
+
description: ( localize(5315, "Read-only customizations provided by installed plugins.")),
|
|
1249
|
+
items: []
|
|
805
1250
|
}, {
|
|
806
1251
|
groupKey: PromptsStorage.extension,
|
|
807
|
-
label: ( localize(
|
|
1252
|
+
label: ( localize(5316, "Extensions")),
|
|
808
1253
|
icon: extensionIcon,
|
|
809
|
-
description: ( localize(
|
|
1254
|
+
description: ( localize(5317, "Read-only customizations provided by installed extensions.")),
|
|
810
1255
|
items: []
|
|
811
1256
|
}, {
|
|
812
|
-
groupKey:
|
|
813
|
-
label: ( localize(
|
|
814
|
-
icon:
|
|
815
|
-
description: ( localize(
|
|
1257
|
+
groupKey: BUILTIN_STORAGE,
|
|
1258
|
+
label: ( localize(5318, "Built-in")),
|
|
1259
|
+
icon: builtinIcon,
|
|
1260
|
+
description: ( localize(5319, "Built-in customizations shipped with the application.")),
|
|
816
1261
|
items: []
|
|
817
1262
|
}, {
|
|
818
1263
|
groupKey: "agents",
|
|
819
|
-
label: ( localize(
|
|
1264
|
+
label: ( localize(5320, "Agents")),
|
|
820
1265
|
icon: agentIcon,
|
|
821
|
-
description: ( localize(
|
|
1266
|
+
description: ( localize(5321, "Hooks defined in agent files.")),
|
|
822
1267
|
items: []
|
|
823
1268
|
}].filter(g => ( visibleSources.has(g.groupKey)) || g.groupKey === "agents");
|
|
824
1269
|
for (const item of matchedItems) {
|
|
@@ -861,6 +1306,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
861
1306
|
}
|
|
862
1307
|
this.list.splice(0, this.list.length, this.displayEntries);
|
|
863
1308
|
this.updateEmptyState();
|
|
1309
|
+
return matchedItems.length;
|
|
864
1310
|
}
|
|
865
1311
|
toggleGroup(entry) {
|
|
866
1312
|
if (( this.collapsedGroups.has(entry.groupKey))) {
|
|
@@ -879,8 +1325,8 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
879
1325
|
const sectionIcon = this.getSectionIcon();
|
|
880
1326
|
this.emptyStateIcon.classList.add(...ThemeIcon.asClassNameArray(sectionIcon));
|
|
881
1327
|
if (this.searchQuery.trim()) {
|
|
882
|
-
this.emptyStateText.textContent = ( localize(
|
|
883
|
-
this.emptyStateSubtext.textContent = ( localize(
|
|
1328
|
+
this.emptyStateText.textContent = ( localize(5322, "No items match '{0}'", this.searchQuery));
|
|
1329
|
+
this.emptyStateSubtext.textContent = ( localize(5323, "Try a different search term"));
|
|
884
1330
|
} else {
|
|
885
1331
|
const emptyInfo = this.getEmptyStateInfo();
|
|
886
1332
|
this.emptyStateText.textContent = emptyInfo.title;
|
|
@@ -906,33 +1352,41 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
906
1352
|
return promptIcon;
|
|
907
1353
|
}
|
|
908
1354
|
}
|
|
1355
|
+
findPluginUri(itemUri) {
|
|
1356
|
+
for (const plugin of this.agentPluginService.plugins.get()) {
|
|
1357
|
+
if (isEqualOrParent(itemUri, plugin.uri)) {
|
|
1358
|
+
return plugin.uri;
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
return undefined;
|
|
1362
|
+
}
|
|
909
1363
|
getEmptyStateInfo() {
|
|
910
1364
|
switch (this.currentSection) {
|
|
911
1365
|
case AICustomizationManagementSection.Agents:
|
|
912
1366
|
return {
|
|
913
|
-
title: ( localize(
|
|
914
|
-
description: ( localize(
|
|
1367
|
+
title: ( localize(5324, "No agents yet")),
|
|
1368
|
+
description: ( localize(5325, "Create your first custom agent to get started"))
|
|
915
1369
|
};
|
|
916
1370
|
case AICustomizationManagementSection.Skills:
|
|
917
1371
|
return {
|
|
918
|
-
title: ( localize(
|
|
919
|
-
description: ( localize(
|
|
1372
|
+
title: ( localize(5326, "No skills yet")),
|
|
1373
|
+
description: ( localize(5327, "Create your first skill to extend agent capabilities"))
|
|
920
1374
|
};
|
|
921
1375
|
case AICustomizationManagementSection.Instructions:
|
|
922
1376
|
return {
|
|
923
|
-
title: ( localize(
|
|
924
|
-
description: ( localize(
|
|
1377
|
+
title: ( localize(5328, "No instructions yet")),
|
|
1378
|
+
description: ( localize(5329, "Add instructions to teach Copilot about your codebase"))
|
|
925
1379
|
};
|
|
926
1380
|
case AICustomizationManagementSection.Hooks:
|
|
927
1381
|
return {
|
|
928
|
-
title: ( localize(
|
|
929
|
-
description: ( localize(
|
|
1382
|
+
title: ( localize(5330, "No hooks yet")),
|
|
1383
|
+
description: ( localize(5331, "Create hooks to execute commands at agent lifecycle events"))
|
|
930
1384
|
};
|
|
931
1385
|
case AICustomizationManagementSection.Prompts:
|
|
932
1386
|
default:
|
|
933
1387
|
return {
|
|
934
|
-
title: ( localize(
|
|
935
|
-
description: ( localize(
|
|
1388
|
+
title: ( localize(5332, "No prompts yet")),
|
|
1389
|
+
description: ( localize(5333, "Create reusable prompts for common tasks"))
|
|
936
1390
|
};
|
|
937
1391
|
}
|
|
938
1392
|
}
|
|
@@ -982,6 +1436,6 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
982
1436
|
});
|
|
983
1437
|
}
|
|
984
1438
|
};
|
|
985
|
-
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))], AICustomizationListWidget));
|
|
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));
|
|
986
1440
|
|
|
987
|
-
export { AICustomizationListWidget, sectionToPromptType };
|
|
1441
|
+
export { AICustomizationListWidget, formatDisplayName, sectionToPromptType };
|