@codingame/monaco-vscode-chat-service-override 31.0.0 → 32.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.d.ts +1 -1
- package/index.js +21 -5
- package/package.json +5 -5
- package/vscode/src/vs/base/common/defaultAccount.d.ts +69 -0
- package/vscode/src/vs/base/common/defaultAccount.js +12 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +91 -22
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +301 -68
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +24 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +89 -16
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +17 -5
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +73 -10
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +32 -6
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +32 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.d.ts +37 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.js +15 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +242 -201
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +35 -0
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +106 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +38 -30
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +2 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +114 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +10 -10
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +52 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +7 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +42 -41
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +6 -6
- package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/transportConstants.js +6 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +4 -3
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +4 -3
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +15 -7
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.js +17 -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 +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +64 -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 +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +30 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +8 -7
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +63 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -48
- 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.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +99 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +35 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +347 -326
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +1 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +113 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +37 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +436 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +52 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +73 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +272 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +430 -185
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +44 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +480 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.d.ts +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +1216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +26 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +28 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +68 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +650 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +390 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +6 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +116 -182
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +61 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +106 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +629 -425
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +175 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +339 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +572 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +49 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +315 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +45 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +44 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +111 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +13 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +14 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +17 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +23 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +41 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +30 -12
- 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 +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +25 -6
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +108 -45
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +65 -26
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +38 -11
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +165 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +62 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -1
- 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.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +15 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +18 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +203 -180
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +35 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +27 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +14 -49
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +35 -177
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +13 -13
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +29 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +129 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -6
- 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.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +12 -38
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +77 -70
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +232 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +83 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.js +243 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +0 -749
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +0 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +0 -40
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +0 -638
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +0 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -242
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1701
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -191
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -728
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +0 -69
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js
CHANGED
|
@@ -3,10 +3,9 @@ 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 { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
6
7
|
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
7
|
-
import { Checkbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
|
|
8
8
|
import { DisposableStore, Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
-
import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
10
9
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
11
10
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
12
11
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
@@ -20,10 +19,10 @@ import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
20
19
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
21
20
|
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
22
21
|
import { promptIcon, hookIcon, instructionsIcon, skillIcon, agentIcon, workspaceIcon, userIcon, pluginIcon, builtinIcon, extensionIcon } from './aiCustomizationIcons.js';
|
|
23
|
-
import { AI_CUSTOMIZATION_ITEM_TYPE_KEY, AI_CUSTOMIZATION_ITEM_URI_KEY, AI_CUSTOMIZATION_ITEM_DISABLED_KEY,
|
|
22
|
+
import { AI_CUSTOMIZATION_ITEM_TYPE_KEY, AI_CUSTOMIZATION_ITEM_URI_KEY, AI_CUSTOMIZATION_ITEM_DISABLED_KEY, AI_CUSTOMIZATION_ITEM_STORAGE_KEY, AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, AICustomizationManagementItemMenuId, sectionToPromptType, AICustomizationManagementCreateMenuId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement';
|
|
24
23
|
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
25
24
|
import { InputBox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
26
|
-
import {
|
|
25
|
+
import { defaultInputBoxStyles, defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
27
26
|
import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
28
27
|
import { IContextViewService, IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
29
28
|
import { HighlightedLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
|
@@ -34,7 +33,6 @@ import { MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
34
33
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
35
34
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
36
35
|
import { createActionViewItem, getContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
37
|
-
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
38
36
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
39
37
|
import { IAICustomizationWorkspaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service';
|
|
40
38
|
import { Separator, Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
@@ -42,16 +40,13 @@ import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
42
40
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
43
41
|
import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
44
42
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
45
|
-
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
46
43
|
import { generateCustomizationDebugReport } from './aiCustomizationDebugPanel.js';
|
|
47
44
|
import { getCustomizationSecondaryText } from './aiCustomizationListWidgetUtils.js';
|
|
48
45
|
export { truncateToFirstLine } from './aiCustomizationListWidgetUtils.js';
|
|
49
46
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
50
47
|
import { ICustomizationHarnessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service';
|
|
51
48
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
52
|
-
import {
|
|
53
|
-
import { AICustomizationItemNormalizer, ProviderCustomizationItemSource } from './aiCustomizationItemSource.js';
|
|
54
|
-
import { PromptsServiceCustomizationItemProvider } from './promptsServiceCustomizationItemProvider.js';
|
|
49
|
+
import { IAICustomizationItemsModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.service';
|
|
55
50
|
import { AICustomizationManagementSection, BUILTIN_STORAGE } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
56
51
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
57
52
|
|
|
@@ -149,8 +144,7 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
149
144
|
menuService,
|
|
150
145
|
contextKeyService,
|
|
151
146
|
instantiationService,
|
|
152
|
-
agentPluginService
|
|
153
|
-
harnessService
|
|
147
|
+
agentPluginService
|
|
154
148
|
) {
|
|
155
149
|
this.hoverService = hoverService;
|
|
156
150
|
this.labelService = labelService;
|
|
@@ -158,16 +152,21 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
158
152
|
this.contextKeyService = contextKeyService;
|
|
159
153
|
this.instantiationService = instantiationService;
|
|
160
154
|
this.agentPluginService = agentPluginService;
|
|
161
|
-
this.harnessService = harnessService;
|
|
162
155
|
this.templateId = "aiCustomizationItem";
|
|
156
|
+
this.templates = ( new Set());
|
|
157
|
+
this.focusedIndex = -1;
|
|
158
|
+
}
|
|
159
|
+
setFocusedIndex(index) {
|
|
160
|
+
this.focusedIndex = index;
|
|
161
|
+
for (const template of this.templates) {
|
|
162
|
+
template.actionBar.setFocusable(template.currentIndex === index);
|
|
163
|
+
}
|
|
163
164
|
}
|
|
164
165
|
renderTemplate(container) {
|
|
165
166
|
const disposables = ( new DisposableStore());
|
|
166
167
|
const elementDisposables = ( new DisposableStore());
|
|
167
168
|
container.classList.add("ai-customization-list-item");
|
|
168
169
|
const leftSection = append(container, $(".item-left"));
|
|
169
|
-
const syncCheckboxContainer = append(leftSection, $(".item-sync-checkbox"));
|
|
170
|
-
syncCheckboxContainer.style.display = "none";
|
|
171
170
|
const typeIcon = append(leftSection, $(".item-type-icon"));
|
|
172
171
|
const textContainer = append(leftSection, $(".item-text"));
|
|
173
172
|
const nameRow = append(textContainer, $(".item-name-row"));
|
|
@@ -179,36 +178,28 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
179
178
|
const actionBar = disposables.add(( new ActionBar(actionsContainer, {
|
|
180
179
|
actionViewItemProvider: createActionViewItem.bind(undefined, this.instantiationService)
|
|
181
180
|
})));
|
|
182
|
-
|
|
181
|
+
actionBar.setFocusable(false);
|
|
182
|
+
const template = {
|
|
183
183
|
container,
|
|
184
184
|
actionsContainer,
|
|
185
185
|
actionBar,
|
|
186
|
-
syncCheckboxContainer,
|
|
187
186
|
typeIcon,
|
|
188
187
|
nameLabel,
|
|
189
188
|
badge,
|
|
190
189
|
statusIcon,
|
|
191
190
|
description,
|
|
192
191
|
disposables,
|
|
193
|
-
elementDisposables
|
|
192
|
+
elementDisposables,
|
|
193
|
+
currentIndex: -1
|
|
194
194
|
};
|
|
195
|
+
this.templates.add(template);
|
|
196
|
+
return template;
|
|
195
197
|
}
|
|
196
198
|
renderElement(entry, index, templateData) {
|
|
197
199
|
templateData.elementDisposables.clear();
|
|
200
|
+
templateData.currentIndex = index;
|
|
201
|
+
templateData.actionBar.setFocusable(index === this.focusedIndex);
|
|
198
202
|
const element = entry.item;
|
|
199
|
-
if (element.syncable) {
|
|
200
|
-
templateData.syncCheckboxContainer.style.display = "";
|
|
201
|
-
const title = element.synced ? ( localize(5313, "Remove {0} from sync", element.name)) : ( localize(5314, "Add {0} to sync", element.name));
|
|
202
|
-
const checkbox = templateData.elementDisposables.add(( new Checkbox(title, !!element.synced, defaultCheckboxStyles)));
|
|
203
|
-
templateData.syncCheckboxContainer.replaceChildren(checkbox.domNode);
|
|
204
|
-
templateData.elementDisposables.add(checkbox.onChange(() => {
|
|
205
|
-
const syncProvider = this.harnessService.getActiveDescriptor().syncProvider;
|
|
206
|
-
syncProvider?.toggleUri(element.uri, element.promptType);
|
|
207
|
-
}));
|
|
208
|
-
} else {
|
|
209
|
-
templateData.syncCheckboxContainer.style.display = "none";
|
|
210
|
-
templateData.syncCheckboxContainer.replaceChildren();
|
|
211
|
-
}
|
|
212
203
|
templateData.typeIcon.className = "item-type-icon";
|
|
213
204
|
templateData.typeIcon.classList.add(
|
|
214
205
|
...ThemeIcon.asClassNameArray(element.typeIcon ?? promptTypeToIcon(element.promptType))
|
|
@@ -216,9 +207,9 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
216
207
|
templateData.elementDisposables.add(this.hoverService.setupDelayedHover(templateData.container, () => {
|
|
217
208
|
let content;
|
|
218
209
|
if (element.isBuiltin) {
|
|
219
|
-
content = `${element.name}\n${( localize(
|
|
220
|
-
} else if (element.
|
|
221
|
-
content = `${element.name}\n${( localize(
|
|
210
|
+
content = `${element.name}\n${( localize(5366, "Built-in"))}`;
|
|
211
|
+
} else if (element.extensionId) {
|
|
212
|
+
content = `${element.name}\n${( localize(5367, "Extension: {0}", element.extensionId))}`;
|
|
222
213
|
} else {
|
|
223
214
|
const isWorkspaceItem = element.storage === PromptsStorage.local;
|
|
224
215
|
const uriLabel = this.labelService.getUriLabel(element.uri, {
|
|
@@ -231,7 +222,7 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
231
222
|
}
|
|
232
223
|
const plugin = element.pluginUri && this.agentPluginService.plugins.get().find(p => isEqual(p.uri, element.pluginUri));
|
|
233
224
|
if (plugin) {
|
|
234
|
-
content += `\n${( localize(
|
|
225
|
+
content += `\n${( localize(5368, "Plugin: {0}", plugin.label))}`;
|
|
235
226
|
}
|
|
236
227
|
return {
|
|
237
228
|
content,
|
|
@@ -324,11 +315,7 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
324
315
|
const overlayPairs = [
|
|
325
316
|
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, element.promptType],
|
|
326
317
|
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( element.uri.toString())],
|
|
327
|
-
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, element.disabled]
|
|
328
|
-
[
|
|
329
|
-
AI_CUSTOMIZATION_SUPPORTS_TROUBLESHOOT_KEY,
|
|
330
|
-
this.harnessService.getActiveDescriptor().supportsTroubleshoot ?? false
|
|
331
|
-
]
|
|
318
|
+
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, element.disabled]
|
|
332
319
|
];
|
|
333
320
|
if (element.storage) {
|
|
334
321
|
overlayPairs.push([AI_CUSTOMIZATION_ITEM_STORAGE_KEY, element.storage]);
|
|
@@ -356,25 +343,116 @@ let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
|
356
343
|
templateData.elementDisposables.add(menu.onDidChange(updateActions));
|
|
357
344
|
templateData.actionBar.context = context;
|
|
358
345
|
}
|
|
346
|
+
disposeElement(_entry, _index, templateData) {
|
|
347
|
+
templateData.currentIndex = -1;
|
|
348
|
+
}
|
|
359
349
|
disposeTemplate(templateData) {
|
|
350
|
+
this.templates.delete(templateData);
|
|
360
351
|
templateData.elementDisposables.dispose();
|
|
361
352
|
templateData.disposables.dispose();
|
|
362
353
|
}
|
|
363
354
|
};
|
|
364
|
-
AICustomizationItemRenderer = ( __decorate([( __param(0, IHoverService)), ( __param(1, ILabelService)), ( __param(2, IMenuService)), ( __param(3, IContextKeyService)), ( __param(4, IInstantiationService)), ( __param(5, IAgentPluginService))
|
|
365
|
-
function
|
|
355
|
+
AICustomizationItemRenderer = ( __decorate([( __param(0, IHoverService)), ( __param(1, ILabelService)), ( __param(2, IMenuService)), ( __param(3, IContextKeyService)), ( __param(4, IInstantiationService)), ( __param(5, IAgentPluginService))], AICustomizationItemRenderer));
|
|
356
|
+
function toItemsModelSection(section) {
|
|
357
|
+
switch (section) {
|
|
358
|
+
case AICustomizationManagementSection.Agents:
|
|
359
|
+
case AICustomizationManagementSection.Skills:
|
|
360
|
+
case AICustomizationManagementSection.Instructions:
|
|
361
|
+
case AICustomizationManagementSection.Prompts:
|
|
362
|
+
case AICustomizationManagementSection.Hooks:
|
|
363
|
+
return section;
|
|
364
|
+
default:
|
|
365
|
+
return undefined;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function getCountAnnouncement(section, count, isFiltering) {
|
|
366
369
|
switch (section) {
|
|
367
370
|
case AICustomizationManagementSection.Agents:
|
|
368
|
-
|
|
371
|
+
if (isFiltering) {
|
|
372
|
+
if (count === 0) {
|
|
373
|
+
return localize(5369, "No agents found");
|
|
374
|
+
}
|
|
375
|
+
if (count === 1) {
|
|
376
|
+
return localize(5370, "1 agent found");
|
|
377
|
+
}
|
|
378
|
+
return localize(5371, "{0} agents found", count);
|
|
379
|
+
}
|
|
380
|
+
if (count === 0) {
|
|
381
|
+
return localize(5372, "No agents");
|
|
382
|
+
}
|
|
383
|
+
if (count === 1) {
|
|
384
|
+
return localize(5373, "1 agent");
|
|
385
|
+
}
|
|
386
|
+
return localize(5374, "{0} agents", count);
|
|
369
387
|
case AICustomizationManagementSection.Skills:
|
|
370
|
-
|
|
388
|
+
if (isFiltering) {
|
|
389
|
+
if (count === 0) {
|
|
390
|
+
return localize(5375, "No skills found");
|
|
391
|
+
}
|
|
392
|
+
if (count === 1) {
|
|
393
|
+
return localize(5376, "1 skill found");
|
|
394
|
+
}
|
|
395
|
+
return localize(5377, "{0} skills found", count);
|
|
396
|
+
}
|
|
397
|
+
if (count === 0) {
|
|
398
|
+
return localize(5378, "No skills");
|
|
399
|
+
}
|
|
400
|
+
if (count === 1) {
|
|
401
|
+
return localize(5379, "1 skill");
|
|
402
|
+
}
|
|
403
|
+
return localize(5380, "{0} skills", count);
|
|
371
404
|
case AICustomizationManagementSection.Instructions:
|
|
372
|
-
|
|
405
|
+
if (isFiltering) {
|
|
406
|
+
if (count === 0) {
|
|
407
|
+
return localize(5381, "No instructions found");
|
|
408
|
+
}
|
|
409
|
+
if (count === 1) {
|
|
410
|
+
return localize(5382, "1 instruction file found");
|
|
411
|
+
}
|
|
412
|
+
return localize(5383, "{0} instruction files found", count);
|
|
413
|
+
}
|
|
414
|
+
if (count === 0) {
|
|
415
|
+
return localize(5384, "No instructions");
|
|
416
|
+
}
|
|
417
|
+
if (count === 1) {
|
|
418
|
+
return localize(5385, "1 instruction file");
|
|
419
|
+
}
|
|
420
|
+
return localize(5386, "{0} instruction files", count);
|
|
373
421
|
case AICustomizationManagementSection.Hooks:
|
|
374
|
-
|
|
422
|
+
if (isFiltering) {
|
|
423
|
+
if (count === 0) {
|
|
424
|
+
return localize(5387, "No hooks found");
|
|
425
|
+
}
|
|
426
|
+
if (count === 1) {
|
|
427
|
+
return localize(5388, "1 hook found");
|
|
428
|
+
}
|
|
429
|
+
return localize(5389, "{0} hooks found", count);
|
|
430
|
+
}
|
|
431
|
+
if (count === 0) {
|
|
432
|
+
return localize(5390, "No hooks");
|
|
433
|
+
}
|
|
434
|
+
if (count === 1) {
|
|
435
|
+
return localize(5391, "1 hook");
|
|
436
|
+
}
|
|
437
|
+
return localize(5392, "{0} hooks", count);
|
|
375
438
|
case AICustomizationManagementSection.Prompts:
|
|
376
439
|
default:
|
|
377
|
-
|
|
440
|
+
if (isFiltering) {
|
|
441
|
+
if (count === 0) {
|
|
442
|
+
return localize(5393, "No prompts found");
|
|
443
|
+
}
|
|
444
|
+
if (count === 1) {
|
|
445
|
+
return localize(5394, "1 prompt found");
|
|
446
|
+
}
|
|
447
|
+
return localize(5395, "{0} prompts found", count);
|
|
448
|
+
}
|
|
449
|
+
if (count === 0) {
|
|
450
|
+
return localize(5396, "No prompts");
|
|
451
|
+
}
|
|
452
|
+
if (count === 1) {
|
|
453
|
+
return localize(5397, "1 prompt");
|
|
454
|
+
}
|
|
455
|
+
return localize(5398, "{0} prompts", count);
|
|
378
456
|
}
|
|
379
457
|
}
|
|
380
458
|
let AICustomizationListWidget = class AICustomizationListWidget extends Disposable {
|
|
@@ -386,18 +464,16 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
386
464
|
contextMenuService,
|
|
387
465
|
menuService,
|
|
388
466
|
contextKeyService,
|
|
389
|
-
workspaceContextService,
|
|
390
467
|
labelService,
|
|
391
468
|
workspaceService,
|
|
392
469
|
clipboardService,
|
|
393
470
|
hoverService,
|
|
394
471
|
fileService,
|
|
395
|
-
pathService,
|
|
396
472
|
telemetryService,
|
|
397
473
|
harnessService,
|
|
398
|
-
agentPluginService,
|
|
399
474
|
commandService,
|
|
400
|
-
|
|
475
|
+
itemsModel,
|
|
476
|
+
agentPluginService
|
|
401
477
|
) {
|
|
402
478
|
super();
|
|
403
479
|
this.instantiationService = instantiationService;
|
|
@@ -407,26 +483,26 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
407
483
|
this.contextMenuService = contextMenuService;
|
|
408
484
|
this.menuService = menuService;
|
|
409
485
|
this.contextKeyService = contextKeyService;
|
|
410
|
-
this.workspaceContextService = workspaceContextService;
|
|
411
486
|
this.labelService = labelService;
|
|
412
487
|
this.workspaceService = workspaceService;
|
|
413
488
|
this.clipboardService = clipboardService;
|
|
414
489
|
this.hoverService = hoverService;
|
|
415
490
|
this.fileService = fileService;
|
|
416
|
-
this.pathService = pathService;
|
|
417
491
|
this.telemetryService = telemetryService;
|
|
418
492
|
this.harnessService = harnessService;
|
|
419
|
-
this.agentPluginService = agentPluginService;
|
|
420
493
|
this.commandService = commandService;
|
|
421
|
-
this.
|
|
494
|
+
this.itemsModel = itemsModel;
|
|
495
|
+
this.agentPluginService = agentPluginService;
|
|
422
496
|
this.currentSection = AICustomizationManagementSection.Agents;
|
|
423
497
|
this.allItems = [];
|
|
424
498
|
this.displayEntries = [];
|
|
425
499
|
this.searchQuery = "";
|
|
426
500
|
this.collapsedGroups = ( new Set());
|
|
501
|
+
this._layoutDeferred = false;
|
|
427
502
|
this.dropdownActionDisposables = this._register(( new DisposableStore()));
|
|
428
|
-
this.
|
|
503
|
+
this._sectionLoadId = 0;
|
|
429
504
|
this.delayedFilter = ( new Delayer(200));
|
|
505
|
+
this.currentSectionSubscription = this._register(( new MutableDisposable()));
|
|
430
506
|
this._onDidSelectItem = this._register(( new Emitter()));
|
|
431
507
|
this.onDidSelectItem = this._onDidSelectItem.event;
|
|
432
508
|
this._onDidChangeItemCount = this._register(( new Emitter()));
|
|
@@ -435,58 +511,30 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
435
511
|
this.onDidRequestCreate = this._onDidRequestCreate.event;
|
|
436
512
|
this._onDidRequestCreateManual = this._register(( new Emitter()));
|
|
437
513
|
this.onDidRequestCreateManual = this._onDidRequestCreateManual.event;
|
|
438
|
-
this.itemNormalizer = ( new AICustomizationItemNormalizer(
|
|
439
|
-
this.workspaceContextService,
|
|
440
|
-
this.workspaceService,
|
|
441
|
-
this.labelService,
|
|
442
|
-
this.agentPluginService,
|
|
443
|
-
this.productService
|
|
444
|
-
));
|
|
445
|
-
this.promptsServiceItemProvider = ( new PromptsServiceCustomizationItemProvider(
|
|
446
|
-
() => this.harnessService.getActiveDescriptor(),
|
|
447
|
-
this.promptsService,
|
|
448
|
-
this.workspaceService,
|
|
449
|
-
this.productService
|
|
450
|
-
));
|
|
451
514
|
this.element = $(".ai-customization-list-widget");
|
|
452
515
|
this.create();
|
|
453
|
-
this._register(
|
|
454
|
-
this.workspaceContextService.onDidChangeWorkspaceFolders(() => this.refresh())
|
|
455
|
-
);
|
|
456
516
|
this._register(autorun(reader => {
|
|
457
517
|
this.workspaceService.activeProjectRoot.read(reader);
|
|
458
518
|
this.updateAddButton();
|
|
459
|
-
this.refresh();
|
|
460
519
|
}));
|
|
461
520
|
this._register(autorun(reader => {
|
|
462
521
|
this.harnessService.activeHarness.read(reader);
|
|
463
|
-
this.updateAddButton();
|
|
464
|
-
this.refresh();
|
|
465
|
-
}));
|
|
466
|
-
this._register(autorun(reader => {
|
|
467
522
|
this.harnessService.availableHarnesses.read(reader);
|
|
468
|
-
this.
|
|
469
|
-
}));
|
|
470
|
-
const itemSourceChangeDisposable = this._register(( new MutableDisposable()));
|
|
471
|
-
this._register(autorun(reader => {
|
|
472
|
-
this.harnessService.activeHarness.read(reader);
|
|
473
|
-
this.harnessService.availableHarnesses.read(reader);
|
|
474
|
-
this.cachedItemSource = undefined;
|
|
475
|
-
const activeDescriptor = this.harnessService.getActiveDescriptor();
|
|
476
|
-
itemSourceChangeDisposable.value = this.getItemSource(activeDescriptor).onDidChange(() => this.refresh());
|
|
523
|
+
this.updateAddButton();
|
|
477
524
|
}));
|
|
478
525
|
}
|
|
479
526
|
create() {
|
|
480
527
|
this.searchAndButtonContainer = append(this.element, $(".list-search-and-button-container"));
|
|
481
528
|
this.searchContainer = append(this.searchAndButtonContainer, $(".list-search-container"));
|
|
482
529
|
this.searchInput = this._register(( new InputBox(this.searchContainer, this.contextViewService, {
|
|
483
|
-
placeholder: ( localize(
|
|
530
|
+
placeholder: ( localize(5399, "Type to search...")),
|
|
484
531
|
inputBoxStyles: defaultInputBoxStyles
|
|
485
532
|
})));
|
|
486
533
|
this._register(this.searchInput.onDidChange(() => {
|
|
487
534
|
this.searchQuery = this.searchInput.value;
|
|
488
535
|
this.delayedFilter.trigger(() => {
|
|
489
536
|
const matchCount = this.filterItems();
|
|
537
|
+
this.announceItemCount(matchCount);
|
|
490
538
|
if (this.searchQuery.trim()) {
|
|
491
539
|
this.telemetryService.publicLog2("chatCustomizationEditor.search", {
|
|
492
540
|
section: this.currentSection,
|
|
@@ -521,12 +569,13 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
521
569
|
this.emptyStateText = append(emptyStateHeader, $(".empty-state-text"));
|
|
522
570
|
this.emptyStateSubtext = append(this.emptyStateContainer, $(".empty-state-subtext"));
|
|
523
571
|
this.emptyStateContainer.style.display = "none";
|
|
572
|
+
const itemRenderer = this.instantiationService.createInstance(AICustomizationItemRenderer);
|
|
524
573
|
this.list = this._register(this.instantiationService.createInstance(
|
|
525
574
|
WorkbenchList,
|
|
526
575
|
"AICustomizationManagementList",
|
|
527
576
|
this.listContainer,
|
|
528
577
|
( new AICustomizationListDelegate()),
|
|
529
|
-
[( new GroupHeaderRenderer(this.hoverService)),
|
|
578
|
+
[( new GroupHeaderRenderer(this.hoverService)), itemRenderer],
|
|
530
579
|
{
|
|
531
580
|
identityProvider: {
|
|
532
581
|
getId: entry => entry.type === "group-header" ? entry.id : entry.item.id
|
|
@@ -535,17 +584,19 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
535
584
|
getAriaLabel: entry => {
|
|
536
585
|
if (entry.type === "group-header") {
|
|
537
586
|
return localize(
|
|
538
|
-
|
|
587
|
+
5400,
|
|
539
588
|
"{0}, {1} items, {2}",
|
|
540
589
|
entry.label,
|
|
541
590
|
entry.count,
|
|
542
|
-
entry.collapsed ? ( localize(
|
|
591
|
+
entry.collapsed ? ( localize(5401, "collapsed")) : ( localize(5402, "expanded"))
|
|
543
592
|
);
|
|
544
593
|
}
|
|
545
|
-
const
|
|
546
|
-
|
|
594
|
+
const displayName = entry.item.displayName ?? formatDisplayName(entry.item.name);
|
|
595
|
+
const secondaryText = getCustomizationSecondaryText(entry.item.description, entry.item.filename, entry.item.promptType);
|
|
596
|
+
const nameAndDesc = secondaryText ? ( localize(5403, "{0}. {1}", displayName, secondaryText)) : displayName;
|
|
597
|
+
return entry.item.disabled ? ( localize(5404, "{0}, disabled", nameAndDesc)) : nameAndDesc;
|
|
547
598
|
},
|
|
548
|
-
getWidgetAriaLabel: () => ( localize(
|
|
599
|
+
getWidgetAriaLabel: () => ( localize(5405, "Agent Customizations"))
|
|
549
600
|
},
|
|
550
601
|
keyboardNavigationLabelProvider: {
|
|
551
602
|
getKeyboardNavigationLabel: entry => entry.type === "group-header" ? entry.label : entry.item.name
|
|
@@ -563,6 +614,14 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
563
614
|
}
|
|
564
615
|
}
|
|
565
616
|
}));
|
|
617
|
+
this._register(this.list.onDidChangeFocus(e => {
|
|
618
|
+
itemRenderer.setFocusedIndex(e.indexes.length ? e.indexes[0] : -1);
|
|
619
|
+
}));
|
|
620
|
+
this._register(this.list.onDidFocus(() => {
|
|
621
|
+
if (this.list.getFocus().length === 0 && this.displayEntries.length > 0) {
|
|
622
|
+
this.list.focusFirst();
|
|
623
|
+
}
|
|
624
|
+
}));
|
|
566
625
|
this._register(this.list.onContextMenu(e => this.onContextMenu(e)));
|
|
567
626
|
this._register(this.fileService.onDidFilesChange(e => {
|
|
568
627
|
if (e.gotDeleted()) {
|
|
@@ -597,11 +656,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
597
656
|
const overlayPairs = [
|
|
598
657
|
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, item.promptType],
|
|
599
658
|
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( item.uri.toString())],
|
|
600
|
-
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, item.disabled]
|
|
601
|
-
[
|
|
602
|
-
AI_CUSTOMIZATION_SUPPORTS_TROUBLESHOOT_KEY,
|
|
603
|
-
this.harnessService.getActiveDescriptor().supportsTroubleshoot ?? false
|
|
604
|
-
]
|
|
659
|
+
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, item.disabled]
|
|
605
660
|
];
|
|
606
661
|
if (item.storage) {
|
|
607
662
|
overlayPairs.push([AI_CUSTOMIZATION_ITEM_STORAGE_KEY, item.storage]);
|
|
@@ -617,9 +672,9 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
617
672
|
const {
|
|
618
673
|
secondary
|
|
619
674
|
} = getContextMenuActions(actions, "inline");
|
|
620
|
-
const copyActions = item.isBuiltin ? [] : [( new Separator()), ( new Action("copyFullPath", ( localize(
|
|
675
|
+
const copyActions = item.isBuiltin ? [] : [( new Separator()), ( new Action("copyFullPath", ( localize(5406, "Copy Full Path")), undefined, true, async () => {
|
|
621
676
|
await this.clipboardService.writeText(item.uri.fsPath);
|
|
622
|
-
})), ( new Action("copyRelativePath", ( localize(
|
|
677
|
+
})), ( new Action("copyRelativePath", ( localize(5407, "Copy Relative Path")), undefined, true, async () => {
|
|
623
678
|
const basePath = this.workspaceService.getActiveProjectRoot();
|
|
624
679
|
if (basePath && item.uri.fsPath.startsWith(basePath.fsPath)) {
|
|
625
680
|
const relative = item.uri.fsPath.substring(basePath.fsPath.length + 1);
|
|
@@ -640,13 +695,31 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
640
695
|
this.searchAndButtonContainer.insertBefore(element, this.searchAndButtonContainer.firstChild);
|
|
641
696
|
}
|
|
642
697
|
async setSection(section) {
|
|
698
|
+
const loadId = ++this._sectionLoadId;
|
|
643
699
|
this.currentSection = section;
|
|
644
700
|
this.updateSectionHeader();
|
|
645
|
-
|
|
646
|
-
if (
|
|
701
|
+
const modelSection = toItemsModelSection(section);
|
|
702
|
+
if (!modelSection) {
|
|
703
|
+
this.currentSectionSubscription.clear();
|
|
704
|
+
this.allItems = [];
|
|
705
|
+
const matchCount = this.filterItems();
|
|
706
|
+
this._onDidChangeItemCount.fire(0);
|
|
707
|
+
this.updateAddButton();
|
|
708
|
+
this.announceItemCount(matchCount);
|
|
647
709
|
return;
|
|
648
710
|
}
|
|
711
|
+
const observable = this.itemsModel.getItems(modelSection);
|
|
712
|
+
this.currentSectionSubscription.value = autorun(reader => {
|
|
713
|
+
const items = observable.read(reader);
|
|
714
|
+
this.allItems = items;
|
|
715
|
+
this.filterItems();
|
|
716
|
+
this._onDidChangeItemCount.fire(items.length);
|
|
717
|
+
});
|
|
649
718
|
this.updateAddButton();
|
|
719
|
+
await this.itemsModel.whenSectionLoaded(modelSection);
|
|
720
|
+
if (loadId === this._sectionLoadId) {
|
|
721
|
+
this.announceItemCount(this.applySearchFilter(this.allItems).length);
|
|
722
|
+
}
|
|
650
723
|
}
|
|
651
724
|
updateSectionHeader() {
|
|
652
725
|
let description;
|
|
@@ -655,41 +728,41 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
655
728
|
switch (this.currentSection) {
|
|
656
729
|
case AICustomizationManagementSection.Agents:
|
|
657
730
|
description = ( localize(
|
|
658
|
-
|
|
731
|
+
5408,
|
|
659
732
|
"Configure the AI to adopt different personas tailored to specific development tasks. Each agent has its own instructions, tools, and behavior."
|
|
660
733
|
));
|
|
661
734
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/custom-agents";
|
|
662
|
-
learnMoreLabel = ( localize(
|
|
735
|
+
learnMoreLabel = ( localize(5409, "Learn more about custom agents"));
|
|
663
736
|
break;
|
|
664
737
|
case AICustomizationManagementSection.Skills:
|
|
665
738
|
description = ( localize(
|
|
666
|
-
|
|
739
|
+
5410,
|
|
667
740
|
"Folders of instructions, scripts, and resources that Copilot loads when relevant to perform specialized tasks."
|
|
668
741
|
));
|
|
669
742
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/agent-skills";
|
|
670
|
-
learnMoreLabel = ( localize(
|
|
743
|
+
learnMoreLabel = ( localize(5411, "Learn more about agent skills"));
|
|
671
744
|
break;
|
|
672
745
|
case AICustomizationManagementSection.Instructions:
|
|
673
746
|
description = ( localize(
|
|
674
|
-
|
|
747
|
+
5412,
|
|
675
748
|
"Define common guidelines and rules that automatically influence how AI generates code and handles development tasks."
|
|
676
749
|
));
|
|
677
750
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/custom-instructions";
|
|
678
|
-
learnMoreLabel = ( localize(
|
|
751
|
+
learnMoreLabel = ( localize(5413, "Learn more about custom instructions"));
|
|
679
752
|
break;
|
|
680
753
|
case AICustomizationManagementSection.Hooks:
|
|
681
|
-
description = ( localize(
|
|
754
|
+
description = ( localize(5414, "Prompts executed at specific points during an agentic lifecycle."));
|
|
682
755
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/hooks";
|
|
683
|
-
learnMoreLabel = ( localize(
|
|
756
|
+
learnMoreLabel = ( localize(5415, "Learn more about hooks"));
|
|
684
757
|
break;
|
|
685
758
|
case AICustomizationManagementSection.Prompts:
|
|
686
759
|
default:
|
|
687
760
|
description = ( localize(
|
|
688
|
-
|
|
761
|
+
5416,
|
|
689
762
|
"Reusable prompts for common development tasks like generating code, performing reviews, or scaffolding components."
|
|
690
763
|
));
|
|
691
764
|
docsUrl = "https://code.visualstudio.com/docs/copilot/customization/prompt-files";
|
|
692
|
-
learnMoreLabel = ( localize(
|
|
765
|
+
learnMoreLabel = ( localize(5417, "Learn more about prompt files"));
|
|
693
766
|
break;
|
|
694
767
|
}
|
|
695
768
|
this.sectionDescription.textContent = description;
|
|
@@ -781,7 +854,7 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
781
854
|
});
|
|
782
855
|
if (hasWorkspace) {
|
|
783
856
|
actions.push({
|
|
784
|
-
label: `$(${Codicon.add.id}) ${( localize(
|
|
857
|
+
label: `$(${Codicon.add.id}) ${( localize(5418, "Configure Hooks"))}`,
|
|
785
858
|
enabled: true,
|
|
786
859
|
run: () => {
|
|
787
860
|
this._onDidRequestCreateManual.fire({
|
|
@@ -793,9 +866,9 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
793
866
|
}
|
|
794
867
|
} else if (!override?.commandId) {
|
|
795
868
|
actions.push({
|
|
796
|
-
label: `$(${Codicon.add.id}) ${( localize(
|
|
869
|
+
label: `$(${Codicon.add.id}) ${( localize(5418, "Configure Hooks"))}`,
|
|
797
870
|
enabled: hasWorkspace,
|
|
798
|
-
tooltip: hasWorkspace ? undefined : ( localize(
|
|
871
|
+
tooltip: hasWorkspace ? undefined : ( localize(5419, "Open a workspace folder to configure hooks.")),
|
|
799
872
|
run: () => {
|
|
800
873
|
this._onDidRequestCreateManual.fire({
|
|
801
874
|
type: promptType,
|
|
@@ -899,69 +972,38 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
899
972
|
getTypeLabel() {
|
|
900
973
|
switch (this.currentSection) {
|
|
901
974
|
case AICustomizationManagementSection.Agents:
|
|
902
|
-
return localize(
|
|
975
|
+
return localize(5420, "Agent");
|
|
903
976
|
case AICustomizationManagementSection.Skills:
|
|
904
|
-
return localize(
|
|
977
|
+
return localize(5421, "Skill");
|
|
905
978
|
case AICustomizationManagementSection.Instructions:
|
|
906
|
-
return localize(
|
|
979
|
+
return localize(5422, "Instructions");
|
|
907
980
|
case AICustomizationManagementSection.Hooks:
|
|
908
|
-
return localize(
|
|
981
|
+
return localize(5423, "Hook");
|
|
909
982
|
case AICustomizationManagementSection.Prompts:
|
|
910
983
|
default:
|
|
911
|
-
return localize(
|
|
984
|
+
return localize(5424, "Prompt");
|
|
912
985
|
}
|
|
913
986
|
}
|
|
914
|
-
|
|
915
|
-
|
|
987
|
+
announceItemCount(count) {
|
|
988
|
+
const isFiltering = this.searchQuery.trim().length > 0;
|
|
989
|
+
status(getCountAnnouncement(this.currentSection, count, isFiltering));
|
|
990
|
+
}
|
|
991
|
+
refresh() {
|
|
916
992
|
if (this._store.isDisposed) {
|
|
917
993
|
return;
|
|
918
994
|
}
|
|
995
|
+
this.applyItemsFromModel();
|
|
919
996
|
this.updateAddButton();
|
|
920
997
|
}
|
|
921
|
-
|
|
922
|
-
const section = this.currentSection;
|
|
923
|
-
|
|
924
|
-
let items;
|
|
925
|
-
try {
|
|
926
|
-
items = await this.fetchItemsForSection(section);
|
|
927
|
-
} catch (err) {
|
|
928
|
-
onUnexpectedError(err);
|
|
929
|
-
items = [];
|
|
930
|
-
}
|
|
931
|
-
if (this._store.isDisposed || this.currentSection !== section || this._loadItemsSeq !== seq) {
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
this.allItems = items;
|
|
998
|
+
applyItemsFromModel() {
|
|
999
|
+
const section = toItemsModelSection(this.currentSection);
|
|
1000
|
+
this.allItems = section ? this.itemsModel.getItems(section).get() : [];
|
|
935
1001
|
this.filterItems();
|
|
936
|
-
this._onDidChangeItemCount.fire(
|
|
1002
|
+
this._onDidChangeItemCount.fire(this.allItems.length);
|
|
937
1003
|
}
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
return
|
|
941
|
-
}
|
|
942
|
-
async fetchItemsForSection(section) {
|
|
943
|
-
const promptType = sectionToPromptType(section);
|
|
944
|
-
return this.getItemSource(this.harnessService.getActiveDescriptor()).fetchItems(promptType);
|
|
945
|
-
}
|
|
946
|
-
getItemSource(descriptor) {
|
|
947
|
-
if (this.cachedItemSource && this.cachedItemSource.descriptorId === descriptor.id) {
|
|
948
|
-
return this.cachedItemSource.source;
|
|
949
|
-
}
|
|
950
|
-
const itemProvider = descriptor.itemProvider ?? (descriptor.syncProvider ? undefined : this.promptsServiceItemProvider);
|
|
951
|
-
const source = ( new ProviderCustomizationItemSource(
|
|
952
|
-
itemProvider,
|
|
953
|
-
descriptor.syncProvider,
|
|
954
|
-
this.promptsService,
|
|
955
|
-
this.workspaceService,
|
|
956
|
-
this.fileService,
|
|
957
|
-
this.pathService,
|
|
958
|
-
this.itemNormalizer
|
|
959
|
-
));
|
|
960
|
-
this.cachedItemSource = {
|
|
961
|
-
descriptorId: descriptor.id,
|
|
962
|
-
source
|
|
963
|
-
};
|
|
964
|
-
return source;
|
|
1004
|
+
computeItemCountForSection(section) {
|
|
1005
|
+
const modelSection = toItemsModelSection(section);
|
|
1006
|
+
return modelSection ? this.itemsModel.getCount(modelSection).get() : 0;
|
|
965
1007
|
}
|
|
966
1008
|
applySearchFilter(items) {
|
|
967
1009
|
if (!this.searchQuery.trim()) {
|
|
@@ -1027,156 +1069,129 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1027
1069
|
this.updateEmptyState();
|
|
1028
1070
|
}
|
|
1029
1071
|
groupMatchedItems(matchedItems) {
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1072
|
+
const groups = this.currentSection === AICustomizationManagementSection.Instructions ? [{
|
|
1073
|
+
groupKey: "agent-instructions",
|
|
1074
|
+
label: ( localize(5425, "Agent Instructions")),
|
|
1075
|
+
icon: instructionsIcon,
|
|
1076
|
+
description: ( localize(
|
|
1077
|
+
5426,
|
|
1078
|
+
"Instruction files automatically loaded for all agent interactions (e.g. AGENTS.md, CLAUDE.md, copilot-instructions.md)."
|
|
1079
|
+
)),
|
|
1080
|
+
items: []
|
|
1081
|
+
}, {
|
|
1082
|
+
groupKey: "context-instructions",
|
|
1083
|
+
label: ( localize(5427, "Included Based on Context")),
|
|
1084
|
+
icon: instructionsIcon,
|
|
1085
|
+
description: ( localize(
|
|
1086
|
+
5428,
|
|
1087
|
+
"Instructions automatically loaded when matching files are part of the context."
|
|
1088
|
+
)),
|
|
1089
|
+
items: []
|
|
1090
|
+
}, {
|
|
1091
|
+
groupKey: "on-demand-instructions",
|
|
1092
|
+
label: ( localize(5429, "Loaded on Demand")),
|
|
1093
|
+
icon: instructionsIcon,
|
|
1094
|
+
description: ( localize(5430, "Instructions loaded only when explicitly referenced.")),
|
|
1095
|
+
items: []
|
|
1096
|
+
}, {
|
|
1097
|
+
groupKey: PromptsStorage.local,
|
|
1098
|
+
label: ( localize(5431, "Workspace")),
|
|
1099
|
+
icon: workspaceIcon,
|
|
1100
|
+
description: ( localize(
|
|
1101
|
+
5432,
|
|
1102
|
+
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
1103
|
+
)),
|
|
1104
|
+
items: []
|
|
1105
|
+
}, {
|
|
1106
|
+
groupKey: PromptsStorage.user,
|
|
1107
|
+
label: ( localize(5433, "User")),
|
|
1108
|
+
icon: userIcon,
|
|
1109
|
+
description: ( localize(
|
|
1110
|
+
5434,
|
|
1111
|
+
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
1112
|
+
)),
|
|
1113
|
+
items: []
|
|
1114
|
+
}, {
|
|
1115
|
+
groupKey: PromptsStorage.plugin,
|
|
1116
|
+
label: ( localize(5435, "Plugins")),
|
|
1117
|
+
icon: pluginIcon,
|
|
1118
|
+
description: ( localize(5436, "Read-only customizations provided by installed plugins.")),
|
|
1119
|
+
items: []
|
|
1120
|
+
}, {
|
|
1121
|
+
groupKey: BUILTIN_STORAGE,
|
|
1122
|
+
label: ( localize(5437, "Built-in")),
|
|
1123
|
+
icon: builtinIcon,
|
|
1124
|
+
description: ( localize(5438, "Built-in customizations shipped with the application.")),
|
|
1125
|
+
items: []
|
|
1126
|
+
}] : [{
|
|
1127
|
+
groupKey: PromptsStorage.local,
|
|
1128
|
+
label: ( localize(5431, "Workspace")),
|
|
1129
|
+
icon: workspaceIcon,
|
|
1130
|
+
description: ( localize(
|
|
1131
|
+
5432,
|
|
1132
|
+
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
1133
|
+
)),
|
|
1134
|
+
items: []
|
|
1135
|
+
}, {
|
|
1136
|
+
groupKey: PromptsStorage.user,
|
|
1137
|
+
label: ( localize(5433, "User")),
|
|
1138
|
+
icon: userIcon,
|
|
1139
|
+
description: ( localize(
|
|
1140
|
+
5434,
|
|
1141
|
+
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
1142
|
+
)),
|
|
1143
|
+
items: []
|
|
1144
|
+
}, {
|
|
1145
|
+
groupKey: PromptsStorage.plugin,
|
|
1146
|
+
label: ( localize(5435, "Plugins")),
|
|
1147
|
+
icon: pluginIcon,
|
|
1148
|
+
description: ( localize(5436, "Read-only customizations provided by installed plugins.")),
|
|
1149
|
+
items: []
|
|
1150
|
+
}, {
|
|
1151
|
+
groupKey: PromptsStorage.extension,
|
|
1152
|
+
label: ( localize(5439, "Extensions")),
|
|
1153
|
+
icon: extensionIcon,
|
|
1154
|
+
description: ( localize(5440, "Read-only customizations provided by installed extensions.")),
|
|
1155
|
+
items: []
|
|
1156
|
+
}, {
|
|
1157
|
+
groupKey: BUILTIN_STORAGE,
|
|
1158
|
+
label: ( localize(5437, "Built-in")),
|
|
1159
|
+
icon: builtinIcon,
|
|
1160
|
+
description: ( localize(5438, "Built-in customizations shipped with the application.")),
|
|
1161
|
+
items: []
|
|
1162
|
+
}];
|
|
1163
|
+
for (const item of matchedItems) {
|
|
1164
|
+
const key = item.groupKey ?? item.storage ?? PromptsStorage.local;
|
|
1165
|
+
let group = groups.find(g => g.groupKey === key);
|
|
1166
|
+
if (!group) {
|
|
1167
|
+
let label;
|
|
1168
|
+
switch (key) {
|
|
1169
|
+
case "remote-host":
|
|
1170
|
+
label = ( localize(5441, "Remote"));
|
|
1171
|
+
break;
|
|
1172
|
+
case "remote-client":
|
|
1173
|
+
label = ( localize(5442, "Local"));
|
|
1174
|
+
break;
|
|
1175
|
+
default:
|
|
1176
|
+
label = formatDisplayName(key);
|
|
1068
1177
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
items: []
|
|
1081
|
-
}, {
|
|
1082
|
-
groupKey: "context-instructions",
|
|
1083
|
-
label: ( localize(5348, "Included Based on Context")),
|
|
1084
|
-
icon: instructionsIcon,
|
|
1085
|
-
description: ( localize(
|
|
1086
|
-
5349,
|
|
1087
|
-
"Instructions automatically loaded when matching files are part of the context."
|
|
1088
|
-
)),
|
|
1089
|
-
items: []
|
|
1090
|
-
}, {
|
|
1091
|
-
groupKey: "on-demand-instructions",
|
|
1092
|
-
label: ( localize(5350, "Loaded on Demand")),
|
|
1093
|
-
icon: instructionsIcon,
|
|
1094
|
-
description: ( localize(5351, "Instructions loaded only when explicitly referenced.")),
|
|
1095
|
-
items: []
|
|
1096
|
-
}, {
|
|
1097
|
-
groupKey: PromptsStorage.local,
|
|
1098
|
-
label: ( localize(5352, "Workspace")),
|
|
1099
|
-
icon: workspaceIcon,
|
|
1100
|
-
description: ( localize(
|
|
1101
|
-
5353,
|
|
1102
|
-
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
1103
|
-
)),
|
|
1104
|
-
items: []
|
|
1105
|
-
}, {
|
|
1106
|
-
groupKey: PromptsStorage.user,
|
|
1107
|
-
label: ( localize(5354, "User")),
|
|
1108
|
-
icon: userIcon,
|
|
1109
|
-
description: ( localize(
|
|
1110
|
-
5355,
|
|
1111
|
-
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
1112
|
-
)),
|
|
1113
|
-
items: []
|
|
1114
|
-
}, {
|
|
1115
|
-
groupKey: PromptsStorage.plugin,
|
|
1116
|
-
label: ( localize(5356, "Plugins")),
|
|
1117
|
-
icon: pluginIcon,
|
|
1118
|
-
description: ( localize(5357, "Read-only customizations provided by installed plugins.")),
|
|
1119
|
-
items: []
|
|
1120
|
-
}, {
|
|
1121
|
-
groupKey: BUILTIN_STORAGE,
|
|
1122
|
-
label: ( localize(5358, "Built-in")),
|
|
1123
|
-
icon: builtinIcon,
|
|
1124
|
-
description: ( localize(5359, "Built-in customizations shipped with the application.")),
|
|
1125
|
-
items: []
|
|
1126
|
-
}] : [{
|
|
1127
|
-
groupKey: PromptsStorage.local,
|
|
1128
|
-
label: ( localize(5352, "Workspace")),
|
|
1129
|
-
icon: workspaceIcon,
|
|
1130
|
-
description: ( localize(
|
|
1131
|
-
5353,
|
|
1132
|
-
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
1133
|
-
)),
|
|
1134
|
-
items: []
|
|
1135
|
-
}, {
|
|
1136
|
-
groupKey: PromptsStorage.user,
|
|
1137
|
-
label: ( localize(5354, "User")),
|
|
1138
|
-
icon: userIcon,
|
|
1139
|
-
description: ( localize(
|
|
1140
|
-
5355,
|
|
1141
|
-
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
1142
|
-
)),
|
|
1143
|
-
items: []
|
|
1144
|
-
}, {
|
|
1145
|
-
groupKey: PromptsStorage.plugin,
|
|
1146
|
-
label: ( localize(5356, "Plugins")),
|
|
1147
|
-
icon: pluginIcon,
|
|
1148
|
-
description: ( localize(5357, "Read-only customizations provided by installed plugins.")),
|
|
1149
|
-
items: []
|
|
1150
|
-
}, {
|
|
1151
|
-
groupKey: PromptsStorage.extension,
|
|
1152
|
-
label: ( localize(5360, "Extensions")),
|
|
1153
|
-
icon: extensionIcon,
|
|
1154
|
-
description: ( localize(5361, "Read-only customizations provided by installed extensions.")),
|
|
1155
|
-
items: []
|
|
1156
|
-
}, {
|
|
1157
|
-
groupKey: BUILTIN_STORAGE,
|
|
1158
|
-
label: ( localize(5358, "Built-in")),
|
|
1159
|
-
icon: builtinIcon,
|
|
1160
|
-
description: ( localize(5359, "Built-in customizations shipped with the application.")),
|
|
1161
|
-
items: []
|
|
1162
|
-
}];
|
|
1163
|
-
for (const item of matchedItems) {
|
|
1164
|
-
const key = item.groupKey ?? item.storage ?? PromptsStorage.local;
|
|
1165
|
-
let group = groups.find(g => g.groupKey === key);
|
|
1166
|
-
if (!group) {
|
|
1167
|
-
group = {
|
|
1168
|
-
groupKey: key,
|
|
1169
|
-
label: formatDisplayName(key),
|
|
1170
|
-
icon: Codicon.folder,
|
|
1171
|
-
description: "",
|
|
1172
|
-
items: []
|
|
1173
|
-
};
|
|
1178
|
+
group = {
|
|
1179
|
+
groupKey: key,
|
|
1180
|
+
label,
|
|
1181
|
+
icon: Codicon.folder,
|
|
1182
|
+
description: "",
|
|
1183
|
+
items: []
|
|
1184
|
+
};
|
|
1185
|
+
const builtinIdx = groups.findIndex(g => g.groupKey === BUILTIN_STORAGE);
|
|
1186
|
+
if (builtinIdx >= 0) {
|
|
1187
|
+
groups.splice(builtinIdx, 0, group);
|
|
1188
|
+
} else {
|
|
1174
1189
|
groups.push(group);
|
|
1175
1190
|
}
|
|
1176
|
-
group.items.push(item);
|
|
1177
1191
|
}
|
|
1178
|
-
|
|
1192
|
+
group.items.push(item);
|
|
1179
1193
|
}
|
|
1194
|
+
this.buildGroupedEntries(groups);
|
|
1180
1195
|
this.commitDisplayEntries();
|
|
1181
1196
|
}
|
|
1182
1197
|
filterItems() {
|
|
@@ -1201,8 +1216,8 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1201
1216
|
const sectionIcon = this.getSectionIcon();
|
|
1202
1217
|
this.emptyStateIcon.classList.add(...ThemeIcon.asClassNameArray(sectionIcon));
|
|
1203
1218
|
if (this.searchQuery.trim()) {
|
|
1204
|
-
this.emptyStateText.textContent = ( localize(
|
|
1205
|
-
this.emptyStateSubtext.textContent = ( localize(
|
|
1219
|
+
this.emptyStateText.textContent = ( localize(5443, "No items match '{0}'", this.searchQuery));
|
|
1220
|
+
this.emptyStateSubtext.textContent = ( localize(5444, "Try a different search term"));
|
|
1206
1221
|
} else {
|
|
1207
1222
|
const emptyInfo = this.getEmptyStateInfo();
|
|
1208
1223
|
this.emptyStateText.textContent = emptyInfo.title;
|
|
@@ -1232,29 +1247,29 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1232
1247
|
switch (this.currentSection) {
|
|
1233
1248
|
case AICustomizationManagementSection.Agents:
|
|
1234
1249
|
return {
|
|
1235
|
-
title: ( localize(
|
|
1236
|
-
description: ( localize(
|
|
1250
|
+
title: ( localize(5445, "No agents yet")),
|
|
1251
|
+
description: ( localize(5446, "Create your first custom agent to get started"))
|
|
1237
1252
|
};
|
|
1238
1253
|
case AICustomizationManagementSection.Skills:
|
|
1239
1254
|
return {
|
|
1240
|
-
title: ( localize(
|
|
1241
|
-
description: ( localize(
|
|
1255
|
+
title: ( localize(5447, "No skills yet")),
|
|
1256
|
+
description: ( localize(5448, "Create your first skill to extend agent capabilities"))
|
|
1242
1257
|
};
|
|
1243
1258
|
case AICustomizationManagementSection.Instructions:
|
|
1244
1259
|
return {
|
|
1245
|
-
title: ( localize(
|
|
1246
|
-
description: ( localize(
|
|
1260
|
+
title: ( localize(5449, "No instructions yet")),
|
|
1261
|
+
description: ( localize(5450, "Add instructions to teach Copilot about your codebase"))
|
|
1247
1262
|
};
|
|
1248
1263
|
case AICustomizationManagementSection.Hooks:
|
|
1249
1264
|
return {
|
|
1250
|
-
title: ( localize(
|
|
1251
|
-
description: ( localize(
|
|
1265
|
+
title: ( localize(5451, "No hooks yet")),
|
|
1266
|
+
description: ( localize(5452, "Create hooks to execute commands at agent lifecycle events"))
|
|
1252
1267
|
};
|
|
1253
1268
|
case AICustomizationManagementSection.Prompts:
|
|
1254
1269
|
default:
|
|
1255
1270
|
return {
|
|
1256
|
-
title: ( localize(
|
|
1257
|
-
description: ( localize(
|
|
1271
|
+
title: ( localize(5453, "No prompts yet")),
|
|
1272
|
+
description: ( localize(5454, "Create reusable prompts for common tasks"))
|
|
1258
1273
|
};
|
|
1259
1274
|
}
|
|
1260
1275
|
}
|
|
@@ -1282,8 +1297,15 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1282
1297
|
this.element.style.height = `${height}px`;
|
|
1283
1298
|
this.searchInput.layout();
|
|
1284
1299
|
const searchBarHeight = this.searchAndButtonContainer.offsetHeight;
|
|
1285
|
-
if (searchBarHeight === 0) {
|
|
1286
|
-
|
|
1300
|
+
if (searchBarHeight === 0 && !this._layoutDeferred) {
|
|
1301
|
+
this._layoutDeferred = true;
|
|
1302
|
+
getWindow(this.element).requestAnimationFrame(() => {
|
|
1303
|
+
try {
|
|
1304
|
+
this.layout(height, width);
|
|
1305
|
+
} finally {
|
|
1306
|
+
this._layoutDeferred = false;
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1287
1309
|
return;
|
|
1288
1310
|
}
|
|
1289
1311
|
const footerHeight = this.sectionHeader.offsetHeight;
|
|
@@ -1295,7 +1317,6 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1295
1317
|
return this.allItems.length;
|
|
1296
1318
|
}
|
|
1297
1319
|
async generateDebugReport() {
|
|
1298
|
-
await this.loadItems();
|
|
1299
1320
|
if (this._store.isDisposed) {
|
|
1300
1321
|
return "";
|
|
1301
1322
|
}
|
|
@@ -1303,9 +1324,9 @@ let AICustomizationListWidget = class AICustomizationListWidget extends Disposab
|
|
|
1303
1324
|
return generateCustomizationDebugReport(this.currentSection, this.promptsService, this.workspaceService, {
|
|
1304
1325
|
allItems: this.allItems,
|
|
1305
1326
|
displayEntries: this.displayEntries
|
|
1306
|
-
}, activeDescriptor, this.
|
|
1327
|
+
}, activeDescriptor, this.itemsModel.getPromptsServiceItemProvider(), this.harnessService, this.agentPluginService);
|
|
1307
1328
|
}
|
|
1308
1329
|
};
|
|
1309
|
-
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,
|
|
1330
|
+
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, ILabelService)), ( __param(8, IAICustomizationWorkspaceService)), ( __param(9, IClipboardService)), ( __param(10, IHoverService)), ( __param(11, IFileService)), ( __param(12, ITelemetryService)), ( __param(13, ICustomizationHarnessService)), ( __param(14, ICommandService)), ( __param(15, IAICustomizationItemsModel)), ( __param(16, IAgentPluginService))], AICustomizationListWidget));
|
|
1310
1331
|
|
|
1311
|
-
export { AICustomizationListWidget, formatDisplayName,
|
|
1332
|
+
export { AICustomizationListWidget, formatDisplayName, getCountAnnouncement };
|