@codingame/monaco-vscode-chat-service-override 37.2.0 → 37.3.1
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/common.d.ts +9 -0
- package/common.js +372 -0
- package/index.d.ts +4 -6
- package/index.js +20 -377
- package/package.json +12 -5
- package/session.d.ts +8 -0
- package/session.js +56 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +5 -2
- package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +1 -1
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +2 -2
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +35 -11
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +2 -2
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +34 -18
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +54 -54
- package/vscode/src/vs/platform/agentHost/common/agentModelPricing.js +20 -23
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +8 -8
- package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/otlp/otlpLogEmitter.d.ts +198 -0
- package/vscode/src/vs/platform/agentHost/common/otlp/otlpLogEmitter.js +197 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +14 -14
- package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.d.ts +63 -0
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.js +7 -0
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.service.d.ts +51 -0
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.service.js +6 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +3 -3
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +1 -1
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +6 -6
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/media/mobileMultiDiffView.css +215 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffHelpers.d.ts +28 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffHelpers.js +429 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.d.ts +100 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.js +675 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffView.d.ts +86 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffView.js +860 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffVirtualizer.d.ts +35 -0
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffVirtualizer.js +67 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/agentHostDelegation.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/agentHostDelegation.js +41 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +85 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +247 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.d.ts +16 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.js +71 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.js +106 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.js +438 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/chatPetAchievements.d.ts +8 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/chatPetAchievements.js +25 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/customizationsDebugLog.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/customizationsDebugLog.contribution.js +173 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/media/runScriptAction.css +186 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +9 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.d.ts +12 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.js +104 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/nullInlineChatSessionService.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/nullInlineChatSessionService.js +23 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.d.ts +51 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.js +151 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/promptsService.d.ts +32 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/promptsService.js +85 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/registerDefaultSessionTaskRunners.d.ts +14 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/registerDefaultSessionTaskRunners.js +20 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/requestOriginProvider.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/requestOriginProvider.contribution.js +34 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.d.ts +39 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.js +828 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptCustomTaskWidget.d.ts +48 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptCustomTaskWidget.js +215 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.d.ts +27 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.js +237 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.js +348 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsOpenerParticipant.d.ts +6 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsOpenerParticipant.js +35 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.d.ts +45 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.js +189 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/unifiedWorkspacePickerConfiguration.d.ts +3 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/unifiedWorkspacePickerConfiguration.js +17 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.d.ts +14 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.js +381 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/workbenchSessionTaskRunner.d.ts +23 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/workbenchSessionTaskRunner.js +48 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/worktreeCreatedTaskDispatcher.d.ts +40 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/worktreeCreatedTaskDispatcher.js +116 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.js +300 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.js +74 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.d.ts +55 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.js +103 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsShared.d.ts +50 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsShared.js +72 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.js +70 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.d.ts +69 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +151 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openAgentHostStateFileAction.d.ts +17 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openAgentHostStateFileAction.js +39 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.d.ts +31 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.js +150 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +42 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.d.ts +19 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +199 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +104 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +301 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +518 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +3121 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.contribution.js +37 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.d.ts +25 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.js +97 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.d.ts +74 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.js +355 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/permissionPicker.d.ts +135 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/permissionPicker.js +521 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.d.ts +26 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.js +86 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +14 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +166 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +586 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxConnectionCustomization.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxConnectionCustomization.js +47 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxReadOnlySessionHandler.d.ts +45 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxReadOnlySessionHandler.js +109 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +49 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +69 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.d.ts +47 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.js +109 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.js +72 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.d.ts +79 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.js +353 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.js +161 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.d.ts +95 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.js +172 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/hostFilter.css +259 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/hostPickerSheet.css +351 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.d.ts +36 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.js +236 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.d.ts +80 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.js +686 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.d.ts +20 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +1210 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostCustomizationHarness.d.ts +31 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostCustomizationHarness.js +136 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostLogForwarder.d.ts +103 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostLogForwarder.js +173 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostTerminal.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostTerminal.contribution.js +51 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.d.ts +74 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.js +438 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/webSocketAgentHost.contribution.d.ts +14 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/webSocketAgentHost.contribution.js +52 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.d.ts +44 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.js +171 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.js +98 -0
- package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.d.ts +24 -0
- package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.js +142 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +22 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +14 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +9 -7
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +35 -35
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +4 -4
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +20 -20
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +7 -7
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +14 -14
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +40 -40
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +27 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +97 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +50 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +431 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +83 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +48 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +56 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +20 -20
- 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 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +48 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +26 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +400 -426
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +42 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +36 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +136 -136
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +75 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- 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 +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +35 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +42 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +36 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +18 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +11 -11
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +38 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +60 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +39 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +22 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +36 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +46 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +68 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +99 -95
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/editorHoverWrapper.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +28 -26
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +18 -12
- 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.js +157 -157
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +29 -25
- 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 +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +22 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +4 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.js +28 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +79 -79
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +11 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +16 -16
- 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/terminalCommandArtifactCollector.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +7 -7
- package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +4 -4
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +3 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +4 -4
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +1 -1
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.js +6 -6
- package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.js +25 -25
- package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.d.ts +0 -603
- package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +0 -1911
- package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.d.ts +0 -9
- package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.js +0 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.d.ts +0 -144
- package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.js +0 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +0 -204
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +0 -440
- package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.d.ts +0 -47
- package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.js +0 -75
- package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.d.ts +0 -68
- package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.js +0 -161
- package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.d.ts +0 -16
- package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/agentMerge.d.ts +0 -261
- package/vscode/src/vs/platform/agentHost/common/agentMerge.js +0 -67
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +0 -39
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +0 -169
- package/vscode/src/vs/platform/agentHost/common/changesetUri.d.ts +0 -130
- package/vscode/src/vs/platform/agentHost/common/changesetUri.js +0 -41
- package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +0 -42
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +0 -20
- package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.d.ts +0 -110
- package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +0 -79
- package/vscode/src/vs/platform/agentHost/common/meta/agentHostArtifactRemovalMeta.d.ts +0 -4
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.d.ts +0 -1
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.js +0 -26
- package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.d.ts +0 -75
- package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.js +0 -84
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +0 -461
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +0 -803
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.d.ts +0 -18
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +0 -89
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.d.ts +0 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.js +0 -37
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.d.ts +0 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.js +0 -45
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +0 -13
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +0 -147
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.d.ts +0 -6
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +0 -544
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.d.ts +0 -6
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.js +0 -30
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.d.ts +0 -6
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +0 -430
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +0 -6
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +0 -114
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.js +0 -9
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.d.ts +0 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.js +0 -7
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +0 -67
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +0 -117
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +0 -106
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +0 -23
- package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +0 -15
- package/vscode/src/vs/platform/agentHost/common/transportConstants.js +0 -6
- package/vscode/src/vs/platform/agentHost/common/worktreePaths.d.ts +0 -24
- package/vscode/src/vs/platform/agentHost/common/worktreePaths.js +0 -15
- package/vscode/src/vs/platform/domWidget/browser/domWidget.d.ts +0 -52
- package/vscode/src/vs/platform/domWidget/browser/domWidget.js +0 -53
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +0 -54
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +0 -210
- package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +0 -8
- package/vscode/src/vs/platform/networkFilter/common/settings.js +0 -10
- package/vscode/src/vs/workbench/browser/chatChangesPill.d.ts +0 -29
- package/vscode/src/vs/workbench/browser/chatChangesPill.js +0 -84
- package/vscode/src/vs/workbench/common/chatPullRequest.d.ts +0 -19
- package/vscode/src/vs/workbench/common/chatPullRequest.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.js +0 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.js +0 -73
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +0 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.js +0 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/sessionSummaryHover.css +0 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.d.ts +0 -115
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +0 -168
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +0 -294
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +0 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -147
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +0 -83
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +0 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +0 -278
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +0 -2036
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +0 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +0 -4127
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +0 -93
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.js +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +0 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +0 -369
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +0 -302
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +0 -70
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +0 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +0 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +0 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.js +0 -240
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.d.ts +0 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +0 -762
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.d.ts +0 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +0 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +0 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +0 -743
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +0 -130
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +0 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +0 -217
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +0 -91
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +0 -357
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +0 -2656
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +0 -3742
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +0 -301
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/customizationMigrationDashboard.css +0 -354
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +0 -197
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +0 -2205
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -317
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +0 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +0 -1216
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.d.ts +0 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.js +0 -282
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +0 -118
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +0 -540
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +0 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +0 -1448
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +0 -329
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.js +0 -114
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +0 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +0 -1268
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +0 -552
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +0 -676
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +0 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +0 -225
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.js +0 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +0 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +0 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +0 -16
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.js +0 -163
- package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.js +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/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/customizationMigrationService.d.ts +0 -115
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
- package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.d.ts +0 -60
- package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.js +0 -139
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js
DELETED
|
@@ -1,2036 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
-
import * as aiCustomizationManagement from './media/aiCustomizationManagement.css';
|
|
5
|
-
import { $ as $$1, append, createTextNode, addDisposableListener, getWindow, DisposableResizeObserver, EventType, getActiveElement, clearNode, scheduleAtNextAnimationFrame, addDisposableGenericMouseDownListener } 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';
|
|
7
|
-
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
8
|
-
import { DisposableStore, Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
10
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
|
-
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
12
|
-
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
13
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
14
|
-
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
15
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
|
-
import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
18
|
-
import { NotSelectableGroupId } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/list';
|
|
19
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
20
|
-
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
21
|
-
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
22
|
-
import { promptIcon, hookIcon, instructionsIcon, skillIcon, agentIcon, workspaceIcon, userIcon, pluginIcon, extensionIcon, builtinIcon } from './aiCustomizationIcons.js';
|
|
23
|
-
import { AI_CUSTOMIZATION_ITEM_TYPE_KEY, AI_CUSTOMIZATION_ITEM_URI_KEY, AI_CUSTOMIZATION_ITEM_DISABLED_KEY, AI_CUSTOMIZATION_ITEM_STORAGE_KEY, AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, getAICustomizationManagementItemMenuId, sectionToPromptType, AICustomizationManagementCreateMenuId } 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';
|
|
25
|
-
import { InputBox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
26
|
-
import { defaultInputBoxStyles, defaultButtonStyles, getButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
27
|
-
import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
28
|
-
import { IContextViewService, IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
29
|
-
import { HighlightedLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
|
30
|
-
import { matchesContiguousSubString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/filters';
|
|
31
|
-
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
32
|
-
import { Button, ButtonWithDropdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
33
|
-
import { MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
34
|
-
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
35
|
-
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
36
|
-
import { createActionViewItem, getContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
37
|
-
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
38
|
-
import { AICustomizationSources, AICustomizationManagementSection } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
39
|
-
import { IAICustomizationWorkspaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service';
|
|
40
|
-
import { Action, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
41
|
-
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
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';
|
|
44
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
45
|
-
import { hasReadableCustomizationContent } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostCustomizationUri';
|
|
46
|
-
import { generateCustomizationDebugReport } from './aiCustomizationDebugPanel.js';
|
|
47
|
-
import { getCustomizationSecondaryText } from './aiCustomizationListWidgetUtils.js';
|
|
48
|
-
export { truncateToFirstLine } from './aiCustomizationListWidgetUtils.js';
|
|
49
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
50
|
-
import { ICustomizationHarnessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service';
|
|
51
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
52
|
-
import { IAICustomizationItemsModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.service';
|
|
53
|
-
import { setupCollapsibleSection, renderVirtualizedSectionLoadingPlaceholder, layoutVirtualizedSections, getVirtualizedSectionMinimumHeight, layoutVirtualizedSectionList, createCustomizationCardPrimaryAction } from './customizationCardList.js';
|
|
54
|
-
import { DomScrollableElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
|
|
55
|
-
import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
|
|
56
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
57
|
-
|
|
58
|
-
registerCss(aiCustomizationManagement);
|
|
59
|
-
const $ = $$1;
|
|
60
|
-
const ITEM_HEIGHT = 44;
|
|
61
|
-
const GROUP_HEADER_HEIGHT = 36;
|
|
62
|
-
const GROUP_HEADER_HEIGHT_WITH_SEPARATOR = 40;
|
|
63
|
-
class AICustomizationListDelegate {
|
|
64
|
-
getHeight(element) {
|
|
65
|
-
if (element.type === "group-header") {
|
|
66
|
-
return element.isFirst ? GROUP_HEADER_HEIGHT : GROUP_HEADER_HEIGHT_WITH_SEPARATOR;
|
|
67
|
-
}
|
|
68
|
-
return ITEM_HEIGHT;
|
|
69
|
-
}
|
|
70
|
-
getTemplateId(element) {
|
|
71
|
-
return element.type === "group-header" ? "groupHeader" : "aiCustomizationItem";
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
class GroupHeaderRenderer {
|
|
75
|
-
constructor(hoverService) {
|
|
76
|
-
this.hoverService = hoverService;
|
|
77
|
-
this.templateId = "groupHeader";
|
|
78
|
-
}
|
|
79
|
-
renderTemplate(container) {
|
|
80
|
-
const disposables = ( new DisposableStore());
|
|
81
|
-
const elementDisposables = ( new DisposableStore());
|
|
82
|
-
container.classList.add("ai-customization-group-header");
|
|
83
|
-
const chevron = append(container, $(".group-chevron"));
|
|
84
|
-
const icon = append(container, $(".group-icon"));
|
|
85
|
-
const labelGroup = append(container, $(".group-label-group"));
|
|
86
|
-
const label = append(labelGroup, $(".group-label"));
|
|
87
|
-
const count = append(container, $(".group-count"));
|
|
88
|
-
const infoIcon = append(container, $(".group-info"));
|
|
89
|
-
infoIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.info));
|
|
90
|
-
return {
|
|
91
|
-
container,
|
|
92
|
-
chevron,
|
|
93
|
-
icon,
|
|
94
|
-
label,
|
|
95
|
-
count,
|
|
96
|
-
infoIcon,
|
|
97
|
-
disposables,
|
|
98
|
-
elementDisposables
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
renderElement(element, _index, templateData) {
|
|
102
|
-
templateData.elementDisposables.clear();
|
|
103
|
-
templateData.chevron.className = "group-chevron";
|
|
104
|
-
templateData.chevron.classList.add(...ThemeIcon.asClassNameArray(
|
|
105
|
-
element.collapsed ? Codicon.chevronRightCompact : Codicon.chevronDownCompact
|
|
106
|
-
));
|
|
107
|
-
templateData.icon.className = "group-icon";
|
|
108
|
-
templateData.icon.classList.add(...ThemeIcon.asClassNameArray(element.icon));
|
|
109
|
-
templateData.label.textContent = element.label;
|
|
110
|
-
templateData.count.textContent = `${element.count}`;
|
|
111
|
-
templateData.elementDisposables.add(this.hoverService.setupDelayedHover(templateData.infoIcon, () => ({
|
|
112
|
-
content: element.description,
|
|
113
|
-
appearance: {
|
|
114
|
-
compact: true,
|
|
115
|
-
skipFadeInAnimation: true
|
|
116
|
-
}
|
|
117
|
-
})));
|
|
118
|
-
templateData.container.classList.toggle("collapsed", element.collapsed);
|
|
119
|
-
templateData.container.classList.toggle("has-previous-group", !element.isFirst);
|
|
120
|
-
}
|
|
121
|
-
disposeTemplate(templateData) {
|
|
122
|
-
templateData.elementDisposables.dispose();
|
|
123
|
-
templateData.disposables.dispose();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function promptTypeToIcon(type) {
|
|
127
|
-
switch (type) {
|
|
128
|
-
case PromptsType.agent:
|
|
129
|
-
return agentIcon;
|
|
130
|
-
case PromptsType.skill:
|
|
131
|
-
return skillIcon;
|
|
132
|
-
case PromptsType.instructions:
|
|
133
|
-
return instructionsIcon;
|
|
134
|
-
case PromptsType.prompt:
|
|
135
|
-
return promptIcon;
|
|
136
|
-
case PromptsType.hook:
|
|
137
|
-
return hookIcon;
|
|
138
|
-
default:
|
|
139
|
-
return promptIcon;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function formatDisplayName(name) {
|
|
143
|
-
return name.replace(/\.md$/i, "");
|
|
144
|
-
}
|
|
145
|
-
let AICustomizationItemRenderer = class AICustomizationItemRenderer {
|
|
146
|
-
constructor(
|
|
147
|
-
showItemActions,
|
|
148
|
-
hoverService,
|
|
149
|
-
labelService,
|
|
150
|
-
menuService,
|
|
151
|
-
contextKeyService,
|
|
152
|
-
instantiationService,
|
|
153
|
-
agentPluginService
|
|
154
|
-
) {
|
|
155
|
-
this.showItemActions = showItemActions;
|
|
156
|
-
this.hoverService = hoverService;
|
|
157
|
-
this.labelService = labelService;
|
|
158
|
-
this.menuService = menuService;
|
|
159
|
-
this.contextKeyService = contextKeyService;
|
|
160
|
-
this.instantiationService = instantiationService;
|
|
161
|
-
this.agentPluginService = agentPluginService;
|
|
162
|
-
this.templateId = "aiCustomizationItem";
|
|
163
|
-
this.templates = ( new Set());
|
|
164
|
-
this.focusedIndex = -1;
|
|
165
|
-
}
|
|
166
|
-
setFocusedIndex(index) {
|
|
167
|
-
this.focusedIndex = index;
|
|
168
|
-
for (const template of this.templates) {
|
|
169
|
-
template.actionBar.setFocusable(index !== -1 && template.currentIndex === index);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
renderTemplate(container) {
|
|
173
|
-
const disposables = ( new DisposableStore());
|
|
174
|
-
const elementDisposables = ( new DisposableStore());
|
|
175
|
-
container.classList.add("ai-customization-list-item");
|
|
176
|
-
const leftSection = append(container, $(".item-left"));
|
|
177
|
-
const typeIcon = append(leftSection, $(".item-type-icon"));
|
|
178
|
-
const textContainer = append(leftSection, $(".item-text"));
|
|
179
|
-
const nameRow = append(textContainer, $(".item-name-row"));
|
|
180
|
-
const nameLabel = disposables.add(( new HighlightedLabel(append(nameRow, $(".item-name")))));
|
|
181
|
-
const badge = append(nameRow, $(".inline-badge.item-badge"));
|
|
182
|
-
const statusIcon = append(nameRow, $(".item-status-icon"));
|
|
183
|
-
const description = disposables.add(( new HighlightedLabel(append(textContainer, $(".item-description")))));
|
|
184
|
-
const actionsContainer = append(container, $(".item-right"));
|
|
185
|
-
const actionBar = disposables.add(( new ActionBar(actionsContainer, {
|
|
186
|
-
actionViewItemProvider: createActionViewItem.bind(undefined, this.instantiationService)
|
|
187
|
-
})));
|
|
188
|
-
actionBar.setFocusable(false);
|
|
189
|
-
const template = {
|
|
190
|
-
container,
|
|
191
|
-
actionsContainer,
|
|
192
|
-
actionBar,
|
|
193
|
-
typeIcon,
|
|
194
|
-
nameLabel,
|
|
195
|
-
badge,
|
|
196
|
-
statusIcon,
|
|
197
|
-
description,
|
|
198
|
-
disposables,
|
|
199
|
-
elementDisposables,
|
|
200
|
-
currentIndex: -1
|
|
201
|
-
};
|
|
202
|
-
this.templates.add(template);
|
|
203
|
-
return template;
|
|
204
|
-
}
|
|
205
|
-
renderElement(entry, index, templateData) {
|
|
206
|
-
templateData.elementDisposables.clear();
|
|
207
|
-
templateData.currentIndex = index;
|
|
208
|
-
templateData.actionBar.setFocusable(this.focusedIndex !== -1 && index === this.focusedIndex);
|
|
209
|
-
const element = entry.item;
|
|
210
|
-
templateData.typeIcon.className = "item-type-icon";
|
|
211
|
-
templateData.typeIcon.classList.add(
|
|
212
|
-
...ThemeIcon.asClassNameArray(element.typeIcon ?? promptTypeToIcon(element.promptType))
|
|
213
|
-
);
|
|
214
|
-
templateData.elementDisposables.add(this.hoverService.setupDelayedHover(templateData.container, () => {
|
|
215
|
-
let content;
|
|
216
|
-
if (element.isBuiltin) {
|
|
217
|
-
content = `${element.name}\n${( localize(6373, "Built-in"))}`;
|
|
218
|
-
} else if (element.extensionId) {
|
|
219
|
-
content = `${element.name}\n${( localize(6374, "Extension: {0}", element.extensionId))}`;
|
|
220
|
-
} else {
|
|
221
|
-
const isWorkspaceItem = element.source === AICustomizationSources.local;
|
|
222
|
-
const uriLabel = this.labelService.getUriLabel(element.uri, {
|
|
223
|
-
relative: isWorkspaceItem
|
|
224
|
-
});
|
|
225
|
-
content = `${element.name}\n${uriLabel}`;
|
|
226
|
-
}
|
|
227
|
-
if (element.badgeTooltip) {
|
|
228
|
-
content += `\n\n${element.badgeTooltip}`;
|
|
229
|
-
}
|
|
230
|
-
const plugin = element.pluginUri && this.agentPluginService.plugins.get().find(p => isEqual(p.uri, element.pluginUri));
|
|
231
|
-
if (plugin) {
|
|
232
|
-
content += `\n${( localize(6375, "Plugin: {0}", plugin.label))}`;
|
|
233
|
-
}
|
|
234
|
-
return {
|
|
235
|
-
content,
|
|
236
|
-
appearance: {
|
|
237
|
-
compact: true,
|
|
238
|
-
skipFadeInAnimation: true
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
}));
|
|
242
|
-
templateData.container.classList.toggle("disabled", element.disabled);
|
|
243
|
-
const displayName = element.displayName ?? formatDisplayName(element.name);
|
|
244
|
-
templateData.nameLabel.set(displayName, element.nameMatches);
|
|
245
|
-
if (element.badge && element.promptType !== PromptsType.instructions) {
|
|
246
|
-
templateData.badge.textContent = element.badge;
|
|
247
|
-
templateData.badge.style.display = "";
|
|
248
|
-
if (element.badgeTooltip) {
|
|
249
|
-
templateData.elementDisposables.add(
|
|
250
|
-
this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), templateData.badge, element.badgeTooltip)
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
} else {
|
|
254
|
-
templateData.badge.textContent = "";
|
|
255
|
-
templateData.badge.style.display = "none";
|
|
256
|
-
}
|
|
257
|
-
const hideLoadedStatus = element.status === "loaded" && (element.promptType === PromptsType.agent || element.promptType === PromptsType.skill || element.promptType === PromptsType.instructions);
|
|
258
|
-
if (element.status && !hideLoadedStatus) {
|
|
259
|
-
templateData.statusIcon.style.display = "";
|
|
260
|
-
templateData.statusIcon.className = "item-status-icon";
|
|
261
|
-
switch (element.status) {
|
|
262
|
-
case "loading":
|
|
263
|
-
templateData.statusIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.loading), "codicon-modifier-spin");
|
|
264
|
-
break;
|
|
265
|
-
case "loaded":
|
|
266
|
-
templateData.statusIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.check));
|
|
267
|
-
break;
|
|
268
|
-
case "degraded":
|
|
269
|
-
templateData.statusIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.warning));
|
|
270
|
-
break;
|
|
271
|
-
case "error":
|
|
272
|
-
templateData.statusIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.error));
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
if (element.statusMessage) {
|
|
276
|
-
templateData.elementDisposables.add(this.hoverService.setupManagedHover(
|
|
277
|
-
getDefaultHoverDelegate("mouse"),
|
|
278
|
-
templateData.statusIcon,
|
|
279
|
-
element.statusMessage
|
|
280
|
-
));
|
|
281
|
-
}
|
|
282
|
-
} else {
|
|
283
|
-
templateData.statusIcon.style.display = "none";
|
|
284
|
-
templateData.statusIcon.className = "item-status-icon";
|
|
285
|
-
}
|
|
286
|
-
const secondaryText = getCustomizationSecondaryText(element.description, element.filename, element.promptType);
|
|
287
|
-
let secondaryTextMatches;
|
|
288
|
-
if (secondaryText && element.description && element.descriptionMatches) {
|
|
289
|
-
if (secondaryText === element.description) {
|
|
290
|
-
secondaryTextMatches = element.descriptionMatches;
|
|
291
|
-
} else {
|
|
292
|
-
const maxLength = secondaryText.length;
|
|
293
|
-
const clampedMatches = ( element.descriptionMatches.map(match => {
|
|
294
|
-
if (match.start >= maxLength || match.end <= 0) {
|
|
295
|
-
return undefined;
|
|
296
|
-
}
|
|
297
|
-
const clampedStart = Math.max(0, match.start);
|
|
298
|
-
const clampedEnd = Math.min(match.end, maxLength);
|
|
299
|
-
return clampedEnd > clampedStart ? {
|
|
300
|
-
start: clampedStart,
|
|
301
|
-
end: clampedEnd
|
|
302
|
-
} : undefined;
|
|
303
|
-
})).filter(match => !!match);
|
|
304
|
-
secondaryTextMatches = clampedMatches.length ? clampedMatches : undefined;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
if (secondaryText) {
|
|
308
|
-
templateData.description.set(secondaryText, secondaryTextMatches);
|
|
309
|
-
templateData.description.element.style.display = "";
|
|
310
|
-
templateData.description.element.classList.toggle("is-filename", !element.description);
|
|
311
|
-
} else {
|
|
312
|
-
templateData.description.set("", undefined);
|
|
313
|
-
templateData.description.element.style.display = "none";
|
|
314
|
-
}
|
|
315
|
-
const context = {
|
|
316
|
-
uri: ( element.uri.toString()),
|
|
317
|
-
name: element.name,
|
|
318
|
-
promptType: element.promptType,
|
|
319
|
-
source: element.source,
|
|
320
|
-
pluginUri: element.pluginUri?.toString(),
|
|
321
|
-
itemId: element.id
|
|
322
|
-
};
|
|
323
|
-
const overlayPairs = [
|
|
324
|
-
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, element.promptType],
|
|
325
|
-
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( element.uri.toString())],
|
|
326
|
-
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, element.disabled]
|
|
327
|
-
];
|
|
328
|
-
if (element.source) {
|
|
329
|
-
overlayPairs.push([AI_CUSTOMIZATION_ITEM_STORAGE_KEY, element.source]);
|
|
330
|
-
}
|
|
331
|
-
if (element.pluginUri) {
|
|
332
|
-
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( element.pluginUri.toString())]);
|
|
333
|
-
}
|
|
334
|
-
const overlay = this.contextKeyService.createOverlay(overlayPairs);
|
|
335
|
-
const menu = templateData.elementDisposables.add(
|
|
336
|
-
this.menuService.createMenu(getAICustomizationManagementItemMenuId(element.uri), overlay)
|
|
337
|
-
);
|
|
338
|
-
const updateActions = () => {
|
|
339
|
-
templateData.actionBar.clear();
|
|
340
|
-
if (element.promptType === PromptsType.agent || element.promptType === PromptsType.skill || element.promptType === PromptsType.instructions) {
|
|
341
|
-
const moreAction = templateData.elementDisposables.add(( new Action("aiCustomization.moreActions", ( localize(6376, "More actions for {0}", displayName)), ThemeIcon.asClassName(Codicon.ellipsis), true, () => this.showItemActions(element, templateData.actionsContainer))));
|
|
342
|
-
templateData.actionBar.push(moreAction, {
|
|
343
|
-
icon: true,
|
|
344
|
-
label: false
|
|
345
|
-
});
|
|
346
|
-
} else {
|
|
347
|
-
const actions = menu.getActions({
|
|
348
|
-
arg: context,
|
|
349
|
-
shouldForwardArgs: true
|
|
350
|
-
});
|
|
351
|
-
const {
|
|
352
|
-
primary
|
|
353
|
-
} = getContextMenuActions(actions, "inline");
|
|
354
|
-
templateData.actionBar.push(primary, {
|
|
355
|
-
icon: true,
|
|
356
|
-
label: false
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
updateActions();
|
|
361
|
-
templateData.elementDisposables.add(menu.onDidChange(updateActions));
|
|
362
|
-
templateData.actionBar.context = context;
|
|
363
|
-
}
|
|
364
|
-
disposeElement(_entry, _index, templateData) {
|
|
365
|
-
templateData.currentIndex = -1;
|
|
366
|
-
}
|
|
367
|
-
disposeTemplate(templateData) {
|
|
368
|
-
this.templates.delete(templateData);
|
|
369
|
-
templateData.elementDisposables.dispose();
|
|
370
|
-
templateData.disposables.dispose();
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
AICustomizationItemRenderer = ( __decorate([( __param(1, IHoverService)), ( __param(2, ILabelService)), ( __param(3, IMenuService)), ( __param(4, IContextKeyService)), ( __param(5, IInstantiationService)), ( __param(6, IAgentPluginService))], AICustomizationItemRenderer));
|
|
374
|
-
function toItemsModelSection(section) {
|
|
375
|
-
switch (section) {
|
|
376
|
-
case AICustomizationManagementSection.Agents:
|
|
377
|
-
case AICustomizationManagementSection.Skills:
|
|
378
|
-
case AICustomizationManagementSection.Instructions:
|
|
379
|
-
case AICustomizationManagementSection.Prompts:
|
|
380
|
-
case AICustomizationManagementSection.Hooks:
|
|
381
|
-
return section;
|
|
382
|
-
default:
|
|
383
|
-
return undefined;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
function usesCustomizationCardLayout(section) {
|
|
387
|
-
return section === AICustomizationManagementSection.Agents || section === AICustomizationManagementSection.Skills || section === AICustomizationManagementSection.Instructions || section === AICustomizationManagementSection.Hooks || section === AICustomizationManagementSection.Prompts;
|
|
388
|
-
}
|
|
389
|
-
function getAlwaysVisibleCustomizationGroupKeys(section, isFiltering) {
|
|
390
|
-
return usesCustomizationCardLayout(section) && !isFiltering ? [PromptsStorage.local, PromptsStorage.user] : [];
|
|
391
|
-
}
|
|
392
|
-
function getTargetedCreateActionLabel(label, compactLabel) {
|
|
393
|
-
return compactLabel ?? label.replace(/^\$\([^)]+\)\s*/, "");
|
|
394
|
-
}
|
|
395
|
-
function getCountAnnouncement(section, count, isFiltering) {
|
|
396
|
-
switch (section) {
|
|
397
|
-
case AICustomizationManagementSection.Agents:
|
|
398
|
-
if (isFiltering) {
|
|
399
|
-
if (count === 0) {
|
|
400
|
-
return localize(6377, "No agents found");
|
|
401
|
-
}
|
|
402
|
-
if (count === 1) {
|
|
403
|
-
return localize(6378, "1 agent found");
|
|
404
|
-
}
|
|
405
|
-
return localize(6379, "{0} agents found", count);
|
|
406
|
-
}
|
|
407
|
-
if (count === 0) {
|
|
408
|
-
return localize(6380, "No agents");
|
|
409
|
-
}
|
|
410
|
-
if (count === 1) {
|
|
411
|
-
return localize(6381, "1 agent");
|
|
412
|
-
}
|
|
413
|
-
return localize(6382, "{0} agents", count);
|
|
414
|
-
case AICustomizationManagementSection.Skills:
|
|
415
|
-
if (isFiltering) {
|
|
416
|
-
if (count === 0) {
|
|
417
|
-
return localize(6383, "No skills found");
|
|
418
|
-
}
|
|
419
|
-
if (count === 1) {
|
|
420
|
-
return localize(6384, "1 skill found");
|
|
421
|
-
}
|
|
422
|
-
return localize(6385, "{0} skills found", count);
|
|
423
|
-
}
|
|
424
|
-
if (count === 0) {
|
|
425
|
-
return localize(6386, "No skills");
|
|
426
|
-
}
|
|
427
|
-
if (count === 1) {
|
|
428
|
-
return localize(6387, "1 skill");
|
|
429
|
-
}
|
|
430
|
-
return localize(6388, "{0} skills", count);
|
|
431
|
-
case AICustomizationManagementSection.Instructions:
|
|
432
|
-
if (isFiltering) {
|
|
433
|
-
if (count === 0) {
|
|
434
|
-
return localize(6389, "No instructions found");
|
|
435
|
-
}
|
|
436
|
-
if (count === 1) {
|
|
437
|
-
return localize(6390, "1 instruction file found");
|
|
438
|
-
}
|
|
439
|
-
return localize(6391, "{0} instruction files found", count);
|
|
440
|
-
}
|
|
441
|
-
if (count === 0) {
|
|
442
|
-
return localize(6392, "No instructions");
|
|
443
|
-
}
|
|
444
|
-
if (count === 1) {
|
|
445
|
-
return localize(6393, "1 instruction file");
|
|
446
|
-
}
|
|
447
|
-
return localize(6394, "{0} instruction files", count);
|
|
448
|
-
case AICustomizationManagementSection.Hooks:
|
|
449
|
-
if (isFiltering) {
|
|
450
|
-
if (count === 0) {
|
|
451
|
-
return localize(6395, "No hooks found");
|
|
452
|
-
}
|
|
453
|
-
if (count === 1) {
|
|
454
|
-
return localize(6396, "1 hook found");
|
|
455
|
-
}
|
|
456
|
-
return localize(6397, "{0} hooks found", count);
|
|
457
|
-
}
|
|
458
|
-
if (count === 0) {
|
|
459
|
-
return localize(6398, "No hooks");
|
|
460
|
-
}
|
|
461
|
-
if (count === 1) {
|
|
462
|
-
return localize(6399, "1 hook");
|
|
463
|
-
}
|
|
464
|
-
return localize(6400, "{0} hooks", count);
|
|
465
|
-
case AICustomizationManagementSection.Prompts:
|
|
466
|
-
default:
|
|
467
|
-
if (isFiltering) {
|
|
468
|
-
if (count === 0) {
|
|
469
|
-
return localize(6401, "No prompts found");
|
|
470
|
-
}
|
|
471
|
-
if (count === 1) {
|
|
472
|
-
return localize(6402, "1 prompt found");
|
|
473
|
-
}
|
|
474
|
-
return localize(6403, "{0} prompts found", count);
|
|
475
|
-
}
|
|
476
|
-
if (count === 0) {
|
|
477
|
-
return localize(6404, "No prompts");
|
|
478
|
-
}
|
|
479
|
-
if (count === 1) {
|
|
480
|
-
return localize(6405, "1 prompt");
|
|
481
|
-
}
|
|
482
|
-
return localize(6406, "{0} prompts", count);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
function getCollapsedCustomizationGroupKey(section, groupKey) {
|
|
486
|
-
return `${section}:${groupKey}`;
|
|
487
|
-
}
|
|
488
|
-
function getCustomizationItemStatusLabel(item) {
|
|
489
|
-
switch (item.status) {
|
|
490
|
-
case "loading":
|
|
491
|
-
return localize(6407, "Loading");
|
|
492
|
-
case "loaded":
|
|
493
|
-
return localize(6408, "Loaded");
|
|
494
|
-
case "degraded":
|
|
495
|
-
return localize(6409, "Needs attention");
|
|
496
|
-
case "error":
|
|
497
|
-
return localize(6410, "Error");
|
|
498
|
-
default:
|
|
499
|
-
return undefined;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
function getCustomizationItemAriaLabel(item) {
|
|
503
|
-
const displayName = item.displayName ?? formatDisplayName(item.name);
|
|
504
|
-
const secondaryText = getCustomizationSecondaryText(item.description, item.filename, item.promptType);
|
|
505
|
-
const statusLabel = getCustomizationItemStatusLabel(item);
|
|
506
|
-
const accessibleSecondaryText = [secondaryText, statusLabel, item.statusMessage].filter(Boolean).join(". ");
|
|
507
|
-
const nameAndDescription = accessibleSecondaryText ? ( localize(6411, "{0}. {1}", displayName, accessibleSecondaryText)) : displayName;
|
|
508
|
-
return item.disabled ? ( localize(6412, "{0}, disabled", nameAndDescription)) : nameAndDescription;
|
|
509
|
-
}
|
|
510
|
-
let AICustomizationListWidget = class AICustomizationListWidget extends Disposable {
|
|
511
|
-
constructor(
|
|
512
|
-
instantiationService,
|
|
513
|
-
promptsService,
|
|
514
|
-
contextViewService,
|
|
515
|
-
openerService,
|
|
516
|
-
contextMenuService,
|
|
517
|
-
menuService,
|
|
518
|
-
contextKeyService,
|
|
519
|
-
labelService,
|
|
520
|
-
workspaceService,
|
|
521
|
-
clipboardService,
|
|
522
|
-
hoverService,
|
|
523
|
-
fileService,
|
|
524
|
-
telemetryService,
|
|
525
|
-
harnessService,
|
|
526
|
-
commandService,
|
|
527
|
-
itemsModel,
|
|
528
|
-
agentPluginService
|
|
529
|
-
) {
|
|
530
|
-
super();
|
|
531
|
-
this.instantiationService = instantiationService;
|
|
532
|
-
this.promptsService = promptsService;
|
|
533
|
-
this.contextViewService = contextViewService;
|
|
534
|
-
this.openerService = openerService;
|
|
535
|
-
this.contextMenuService = contextMenuService;
|
|
536
|
-
this.menuService = menuService;
|
|
537
|
-
this.contextKeyService = contextKeyService;
|
|
538
|
-
this.labelService = labelService;
|
|
539
|
-
this.workspaceService = workspaceService;
|
|
540
|
-
this.clipboardService = clipboardService;
|
|
541
|
-
this.hoverService = hoverService;
|
|
542
|
-
this.fileService = fileService;
|
|
543
|
-
this.telemetryService = telemetryService;
|
|
544
|
-
this.harnessService = harnessService;
|
|
545
|
-
this.commandService = commandService;
|
|
546
|
-
this.itemsModel = itemsModel;
|
|
547
|
-
this.agentPluginService = agentPluginService;
|
|
548
|
-
this.cardSectionLists = [];
|
|
549
|
-
this.cardRowsByUri = ( new Map());
|
|
550
|
-
this.cardRowsById = ( new Map());
|
|
551
|
-
this.cardMenuButtonsById = ( new Map());
|
|
552
|
-
this.cardMenuOpen = false;
|
|
553
|
-
this.currentSection = AICustomizationManagementSection.Agents;
|
|
554
|
-
this.allItems = [];
|
|
555
|
-
this.displayEntries = [];
|
|
556
|
-
this.searchQuery = "";
|
|
557
|
-
this.sectionLoading = false;
|
|
558
|
-
this.collapsedGroups = ( new Set());
|
|
559
|
-
this._layoutDeferred = false;
|
|
560
|
-
this.revealLastItemScheduler = this._register(( new MutableDisposable()));
|
|
561
|
-
this.lastLayoutWidth = 0;
|
|
562
|
-
this.lastLayoutHeight = 0;
|
|
563
|
-
this.lastHeaderHeight = 0;
|
|
564
|
-
this.dropdownActionDisposables = this._register(( new DisposableStore()));
|
|
565
|
-
this.cardDisposables = this._register(( new DisposableStore()));
|
|
566
|
-
this.pendingCardSectionLayout = this._register(( new MutableDisposable()));
|
|
567
|
-
this.cardSectionScrollPositions = ( new Map());
|
|
568
|
-
this._sectionLoadId = 0;
|
|
569
|
-
this.delayedFilter = ( new Delayer(200));
|
|
570
|
-
this.currentSectionSubscription = this._register(( new MutableDisposable()));
|
|
571
|
-
this._onDidSelectItem = this._register(( new Emitter()));
|
|
572
|
-
this.onDidSelectItem = this._onDidSelectItem.event;
|
|
573
|
-
this._onDidChangeItemCount = this._register(( new Emitter()));
|
|
574
|
-
this.onDidChangeItemCount = this._onDidChangeItemCount.event;
|
|
575
|
-
this._onDidRequestCreate = this._register(( new Emitter()));
|
|
576
|
-
this.onDidRequestCreate = this._onDidRequestCreate.event;
|
|
577
|
-
this._onDidRequestCreateManual = this._register(( new Emitter()));
|
|
578
|
-
this.onDidRequestCreateManual = this._onDidRequestCreateManual.event;
|
|
579
|
-
this.element = $(".ai-customization-list-widget.plugin-list-widget");
|
|
580
|
-
this.create();
|
|
581
|
-
this._register(autorun(reader => {
|
|
582
|
-
this.workspaceService.activeProjectRoot.read(reader);
|
|
583
|
-
this.updateAddButton();
|
|
584
|
-
}));
|
|
585
|
-
this._register(autorun(reader => {
|
|
586
|
-
this.harnessService.activeHarness.read(reader);
|
|
587
|
-
this.harnessService.availableHarnesses.read(reader);
|
|
588
|
-
this.updateAddButton();
|
|
589
|
-
}));
|
|
590
|
-
}
|
|
591
|
-
create() {
|
|
592
|
-
this.sectionTitleHeader = append(this.element, $(".section-title-header"));
|
|
593
|
-
const titleRow = append(this.sectionTitleHeader, $(".section-title-row"));
|
|
594
|
-
this.sectionTitle = append(titleRow, $("h2.section-title"));
|
|
595
|
-
this.sectionTitleDescription = append(this.sectionTitleHeader, $("p.section-title-description"));
|
|
596
|
-
this.sectionTitleDescriptionText = append(this.sectionTitleDescription, $("span.section-title-description-text"));
|
|
597
|
-
this.sectionTitleDescription.appendChild(createTextNode(" "));
|
|
598
|
-
this.sectionLink = append(this.sectionTitleDescription, $("a.section-title-link"));
|
|
599
|
-
this._register(addDisposableListener(this.sectionLink, "click", e => {
|
|
600
|
-
e.preventDefault();
|
|
601
|
-
const href = this.sectionLink.href;
|
|
602
|
-
if (href) {
|
|
603
|
-
this.openerService.open(( URI.parse(href)));
|
|
604
|
-
}
|
|
605
|
-
}));
|
|
606
|
-
const targetWindow = getWindow(this.element);
|
|
607
|
-
const headerObserver = this._register(
|
|
608
|
-
new DisposableResizeObserver("AICustomizationListWidget.sectionTitleHeader", () => {
|
|
609
|
-
if (this.lastLayoutWidth <= 0 || this.lastLayoutHeight <= 0) {
|
|
610
|
-
return;
|
|
611
|
-
}
|
|
612
|
-
const headerHeight = this.sectionTitleHeader.offsetHeight;
|
|
613
|
-
if (headerHeight === this.lastHeaderHeight) {
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
this.layout(this.lastLayoutHeight, this.lastLayoutWidth);
|
|
617
|
-
}, targetWindow)
|
|
618
|
-
);
|
|
619
|
-
this._register(headerObserver.observe(this.sectionTitleHeader));
|
|
620
|
-
this.searchAndButtonContainer = append(this.element, $(".list-search-and-button-container"));
|
|
621
|
-
this.searchContainer = append(this.searchAndButtonContainer, $(".list-search-container"));
|
|
622
|
-
this.searchInput = this._register(( new InputBox(this.searchContainer, this.contextViewService, {
|
|
623
|
-
placeholder: ( localize(6413, "Type to search...")),
|
|
624
|
-
inputBoxStyles: defaultInputBoxStyles
|
|
625
|
-
})));
|
|
626
|
-
this._register(this.searchInput.onDidChange(() => {
|
|
627
|
-
this.searchQuery = this.searchInput.value;
|
|
628
|
-
this.delayedFilter.trigger(() => {
|
|
629
|
-
const matchCount = this.filterItems();
|
|
630
|
-
this.announceItemCount(matchCount);
|
|
631
|
-
if (this.searchQuery.trim()) {
|
|
632
|
-
this.telemetryService.publicLog2("chatCustomizationEditor.search", {
|
|
633
|
-
section: this.currentSection,
|
|
634
|
-
resultCount: matchCount
|
|
635
|
-
});
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
}));
|
|
639
|
-
this.addButtonContainer = append(this.searchAndButtonContainer, $(".list-add-button-container"));
|
|
640
|
-
this.addButtonSimple = this._register(( new Button(this.addButtonContainer, {
|
|
641
|
-
...defaultButtonStyles
|
|
642
|
-
})));
|
|
643
|
-
this.addButtonSimple.element.classList.add("list-add-button");
|
|
644
|
-
this._register(this.addButtonSimple.onDidClick(() => this.executePrimaryCreateAction()));
|
|
645
|
-
this.addButton = this._register(( new ButtonWithDropdown(this.addButtonContainer, {
|
|
646
|
-
...defaultButtonStyles,
|
|
647
|
-
contextMenuProvider: this.contextMenuService,
|
|
648
|
-
addPrimaryActionToDropdown: false,
|
|
649
|
-
actions: {
|
|
650
|
-
getActions: () => this.getDropdownActions()
|
|
651
|
-
}
|
|
652
|
-
})));
|
|
653
|
-
this.addButton.element.classList.add("list-add-button");
|
|
654
|
-
this._register(this.addButton.onDidClick(() => this.executePrimaryCreateAction()));
|
|
655
|
-
this.cardContainer = append(this.element, $(".plugin-card-container.customization-card-container"));
|
|
656
|
-
this.cardScrollable = this._register(( new DomScrollableElement(this.cardContainer, {
|
|
657
|
-
horizontal: ScrollbarVisibility.Hidden,
|
|
658
|
-
vertical: ScrollbarVisibility.Auto,
|
|
659
|
-
useShadows: false
|
|
660
|
-
})));
|
|
661
|
-
this._register(
|
|
662
|
-
addDisposableListener(this.cardContainer, EventType.SCROLL, () => {
|
|
663
|
-
this.cardScrollable.setScrollPosition({
|
|
664
|
-
scrollTop: this.cardContainer.scrollTop
|
|
665
|
-
});
|
|
666
|
-
})
|
|
667
|
-
);
|
|
668
|
-
this.cardScrollableNode = this.cardScrollable.getDomNode();
|
|
669
|
-
this.cardScrollableNode.classList.add("plugin-card-scrollable");
|
|
670
|
-
this.cardScrollableNode.style.display = "none";
|
|
671
|
-
this.element.appendChild(this.cardScrollableNode);
|
|
672
|
-
const cardResizeObserver = this._register(new DisposableResizeObserver(
|
|
673
|
-
"AICustomizationListWidget.cardScrollable",
|
|
674
|
-
() => this.scheduleCardSectionLayout()
|
|
675
|
-
));
|
|
676
|
-
this._register(cardResizeObserver.observe(this.cardScrollableNode));
|
|
677
|
-
this.listContainer = append(this.element, $(".list-container"));
|
|
678
|
-
this.emptyStateContainer = append(this.element, $(".list-empty-state"));
|
|
679
|
-
const emptyStateHeader = append(this.emptyStateContainer, $(".empty-state-header"));
|
|
680
|
-
this.emptyStateText = append(emptyStateHeader, $(".empty-state-text"));
|
|
681
|
-
this.emptyStateSubtext = append(this.emptyStateContainer, $(".empty-state-subtext"));
|
|
682
|
-
this.emptyStateContainer.style.display = "none";
|
|
683
|
-
const itemRenderer = this.instantiationService.createInstance(
|
|
684
|
-
AICustomizationItemRenderer,
|
|
685
|
-
(item, anchor) => this.showCardItemActions(item, anchor)
|
|
686
|
-
);
|
|
687
|
-
this.list = this._register(this.instantiationService.createInstance(
|
|
688
|
-
WorkbenchList,
|
|
689
|
-
"AICustomizationManagementList",
|
|
690
|
-
this.listContainer,
|
|
691
|
-
( new AICustomizationListDelegate()),
|
|
692
|
-
[( new GroupHeaderRenderer(this.hoverService)), itemRenderer],
|
|
693
|
-
{
|
|
694
|
-
identityProvider: {
|
|
695
|
-
getId: entry => entry.type === "group-header" ? entry.id : entry.item.id,
|
|
696
|
-
getGroupId: entry => entry.type === "group-header" ? NotSelectableGroupId : 0
|
|
697
|
-
},
|
|
698
|
-
accessibilityProvider: {
|
|
699
|
-
getAriaLabel: entry => {
|
|
700
|
-
if (entry.type === "group-header") {
|
|
701
|
-
return localize(
|
|
702
|
-
6414,
|
|
703
|
-
"{0}, {1} items, {2}",
|
|
704
|
-
entry.label,
|
|
705
|
-
entry.count,
|
|
706
|
-
entry.collapsed ? ( localize(6415, "collapsed")) : ( localize(6416, "expanded"))
|
|
707
|
-
);
|
|
708
|
-
}
|
|
709
|
-
const label = getCustomizationItemAriaLabel(entry.item);
|
|
710
|
-
if (!hasReadableCustomizationContent(entry.item.uri)) {
|
|
711
|
-
return localize(6417, "{0}, source content unavailable", label);
|
|
712
|
-
}
|
|
713
|
-
return label;
|
|
714
|
-
},
|
|
715
|
-
getWidgetAriaLabel: () => ( localize(6418, "Agent Customizations"))
|
|
716
|
-
},
|
|
717
|
-
keyboardNavigationLabelProvider: {
|
|
718
|
-
getKeyboardNavigationLabel: entry => entry.type === "group-header" ? entry.label : entry.item.name
|
|
719
|
-
},
|
|
720
|
-
multipleSelectionSupport: false,
|
|
721
|
-
openOnSingleClick: true
|
|
722
|
-
}
|
|
723
|
-
));
|
|
724
|
-
this._register(this.list.onDidOpen(e => {
|
|
725
|
-
if (e.element) {
|
|
726
|
-
if (e.element.type === "group-header") {
|
|
727
|
-
this.toggleGroup(e.element);
|
|
728
|
-
} else {
|
|
729
|
-
if (hasReadableCustomizationContent(e.element.item.uri)) {
|
|
730
|
-
this._onDidSelectItem.fire(e.element.item);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
}));
|
|
735
|
-
this._register(this.list.onDidChangeFocus(e => {
|
|
736
|
-
itemRenderer.setFocusedIndex(e.indexes.length ? e.indexes[0] : -1);
|
|
737
|
-
}));
|
|
738
|
-
this._register(this.list.onDidFocus(() => {
|
|
739
|
-
if (this.list.getFocus().length === 0 && this.displayEntries.length > 0) {
|
|
740
|
-
const firstItemIndex = this.displayEntries.findIndex(e => e.type !== "group-header");
|
|
741
|
-
if (firstItemIndex >= 0) {
|
|
742
|
-
this.list.setFocus([firstItemIndex]);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}));
|
|
746
|
-
this._register(this.list.onContextMenu(e => {
|
|
747
|
-
if (!this.usesCardLayout()) {
|
|
748
|
-
this.onContextMenu(e);
|
|
749
|
-
}
|
|
750
|
-
}));
|
|
751
|
-
this._register(this.fileService.onDidFilesChange(e => {
|
|
752
|
-
if (e.gotDeleted()) {
|
|
753
|
-
this.refresh();
|
|
754
|
-
}
|
|
755
|
-
}));
|
|
756
|
-
this.updateSectionHeader();
|
|
757
|
-
this.updateAddButton();
|
|
758
|
-
}
|
|
759
|
-
onContextMenu(e) {
|
|
760
|
-
if (!e.element || e.element.type !== "file-item") {
|
|
761
|
-
return;
|
|
762
|
-
}
|
|
763
|
-
const item = e.element.item;
|
|
764
|
-
const context = {
|
|
765
|
-
uri: ( item.uri.toString()),
|
|
766
|
-
name: item.name,
|
|
767
|
-
promptType: item.promptType,
|
|
768
|
-
source: item.source,
|
|
769
|
-
pluginUri: item.pluginUri?.toString(),
|
|
770
|
-
itemId: item.id
|
|
771
|
-
};
|
|
772
|
-
const overlayPairs = [
|
|
773
|
-
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, item.promptType],
|
|
774
|
-
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( item.uri.toString())],
|
|
775
|
-
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, item.disabled]
|
|
776
|
-
];
|
|
777
|
-
if (item.source) {
|
|
778
|
-
overlayPairs.push([AI_CUSTOMIZATION_ITEM_STORAGE_KEY, item.source]);
|
|
779
|
-
}
|
|
780
|
-
if (item.pluginUri) {
|
|
781
|
-
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( item.pluginUri.toString())]);
|
|
782
|
-
}
|
|
783
|
-
const overlay = this.contextKeyService.createOverlay(overlayPairs);
|
|
784
|
-
const actions = this.menuService.getMenuActions(getAICustomizationManagementItemMenuId(item.uri), overlay, {
|
|
785
|
-
arg: context,
|
|
786
|
-
shouldForwardArgs: true
|
|
787
|
-
});
|
|
788
|
-
const {
|
|
789
|
-
secondary
|
|
790
|
-
} = getContextMenuActions(actions, "inline");
|
|
791
|
-
const copyActions = item.isBuiltin || !hasReadableCustomizationContent(item.uri) ? [] : [( new Separator()), ( new Action("copyFullPath", ( localize(6419, "Copy Full Path")), undefined, true, async () => {
|
|
792
|
-
await this.clipboardService.writeText(item.uri.fsPath);
|
|
793
|
-
})), ( new Action("copyRelativePath", ( localize(6420, "Copy Relative Path")), undefined, true, async () => {
|
|
794
|
-
const basePath = this.workspaceService.getActiveProjectRoot();
|
|
795
|
-
if (basePath && item.uri.fsPath.startsWith(basePath.fsPath)) {
|
|
796
|
-
const relative = item.uri.fsPath.substring(basePath.fsPath.length + 1);
|
|
797
|
-
await this.clipboardService.writeText(relative);
|
|
798
|
-
} else {
|
|
799
|
-
const relativePath = this.labelService.getUriLabel(item.uri, {
|
|
800
|
-
relative: true
|
|
801
|
-
});
|
|
802
|
-
await this.clipboardService.writeText(relativePath);
|
|
803
|
-
}
|
|
804
|
-
}))];
|
|
805
|
-
this.contextMenuService.showContextMenu({
|
|
806
|
-
getAnchor: () => e.anchor,
|
|
807
|
-
getActions: () => [...secondary, ...copyActions]
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
showCardItemActions(item, anchor) {
|
|
811
|
-
this.cardMenuOpen = true;
|
|
812
|
-
this.lastCardFocusItemId = item.id;
|
|
813
|
-
const disposables = ( new DisposableStore());
|
|
814
|
-
const context = {
|
|
815
|
-
uri: ( item.uri.toString()),
|
|
816
|
-
name: item.name,
|
|
817
|
-
promptType: item.promptType,
|
|
818
|
-
source: item.source,
|
|
819
|
-
pluginUri: item.pluginUri?.toString(),
|
|
820
|
-
itemId: item.id
|
|
821
|
-
};
|
|
822
|
-
const menu = disposables.add(this.createCardItemMenu(item));
|
|
823
|
-
const groups = menu.getActions({
|
|
824
|
-
arg: context,
|
|
825
|
-
shouldForwardArgs: true
|
|
826
|
-
});
|
|
827
|
-
const actions = [];
|
|
828
|
-
const addedActionIds = ( new Set());
|
|
829
|
-
for (const [, groupActions] of groups) {
|
|
830
|
-
const uniqueGroupActions = groupActions.filter(action => {
|
|
831
|
-
if (( addedActionIds.has(action.id))) {
|
|
832
|
-
return false;
|
|
833
|
-
}
|
|
834
|
-
addedActionIds.add(action.id);
|
|
835
|
-
return true;
|
|
836
|
-
});
|
|
837
|
-
if (uniqueGroupActions.length === 0) {
|
|
838
|
-
continue;
|
|
839
|
-
}
|
|
840
|
-
if (actions.length > 0) {
|
|
841
|
-
actions.push(( new Separator()));
|
|
842
|
-
}
|
|
843
|
-
actions.push(...uniqueGroupActions);
|
|
844
|
-
}
|
|
845
|
-
if (!item.isBuiltin && hasReadableCustomizationContent(item.uri)) {
|
|
846
|
-
if (actions.length > 0) {
|
|
847
|
-
actions.push(( new Separator()));
|
|
848
|
-
}
|
|
849
|
-
actions.push(disposables.add(( new Action("copyRelativePath", ( localize(6420, "Copy Relative Path")), undefined, true, async () => {
|
|
850
|
-
const basePath = this.workspaceService.getActiveProjectRoot();
|
|
851
|
-
const relativePath = basePath && item.uri.fsPath.startsWith(basePath.fsPath) ? item.uri.fsPath.substring(basePath.fsPath.length + 1) : this.labelService.getUriLabel(item.uri, {
|
|
852
|
-
relative: true
|
|
853
|
-
});
|
|
854
|
-
await this.clipboardService.writeText(relativePath);
|
|
855
|
-
}))));
|
|
856
|
-
}
|
|
857
|
-
if (actions.length === 0) {
|
|
858
|
-
this.cardMenuOpen = false;
|
|
859
|
-
disposables.dispose();
|
|
860
|
-
return;
|
|
861
|
-
}
|
|
862
|
-
this.contextMenuService.showContextMenu({
|
|
863
|
-
getAnchor: () => anchor,
|
|
864
|
-
getActions: () => actions,
|
|
865
|
-
onHide: () => {
|
|
866
|
-
this.cardMenuOpen = false;
|
|
867
|
-
if (!this.focusCardSectionItem(item.id)) {
|
|
868
|
-
(this.cardMenuButtonsById.get(item.id) ?? this.cardRowsById.get(item.id) ?? this.firstCardFocusElement)?.focus();
|
|
869
|
-
}
|
|
870
|
-
disposables.dispose();
|
|
871
|
-
}
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
createCardItemMenu(item) {
|
|
875
|
-
const overlayPairs = [
|
|
876
|
-
[AI_CUSTOMIZATION_ITEM_TYPE_KEY, item.promptType],
|
|
877
|
-
[AI_CUSTOMIZATION_ITEM_URI_KEY, ( item.uri.toString())],
|
|
878
|
-
[AI_CUSTOMIZATION_ITEM_DISABLED_KEY, item.disabled],
|
|
879
|
-
[AI_CUSTOMIZATION_ITEM_STORAGE_KEY, item.source]
|
|
880
|
-
];
|
|
881
|
-
if (item.pluginUri) {
|
|
882
|
-
overlayPairs.push([AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, ( item.pluginUri.toString())]);
|
|
883
|
-
}
|
|
884
|
-
const overlay = this.contextKeyService.createOverlay(overlayPairs);
|
|
885
|
-
return this.menuService.createMenu(getAICustomizationManagementItemMenuId(item.uri), overlay);
|
|
886
|
-
}
|
|
887
|
-
hasCardItemActions(item) {
|
|
888
|
-
if (hasReadableCustomizationContent(item.uri)) {
|
|
889
|
-
return true;
|
|
890
|
-
}
|
|
891
|
-
const menu = this.createCardItemMenu(item);
|
|
892
|
-
try {
|
|
893
|
-
return ( menu.getActions().some(([, actions]) => actions.length > 0));
|
|
894
|
-
} finally {
|
|
895
|
-
menu.dispose();
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
async setSection(section) {
|
|
899
|
-
const loadId = ++this._sectionLoadId;
|
|
900
|
-
this.currentSection = section;
|
|
901
|
-
this.element.classList.toggle("plugin-list-widget", this.usesCardLayout());
|
|
902
|
-
this.updateSectionHeader();
|
|
903
|
-
const modelSection = toItemsModelSection(section);
|
|
904
|
-
if (!modelSection) {
|
|
905
|
-
this.sectionLoading = false;
|
|
906
|
-
this.currentSectionSubscription.clear();
|
|
907
|
-
this.allItems = [];
|
|
908
|
-
const matchCount = this.filterItems();
|
|
909
|
-
this._onDidChangeItemCount.fire(0);
|
|
910
|
-
this.updateAddButton();
|
|
911
|
-
this.announceItemCount(matchCount);
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
const observable = this.itemsModel.getItems(modelSection);
|
|
915
|
-
this.sectionLoading = true;
|
|
916
|
-
this.currentSectionSubscription.value = autorun(reader => {
|
|
917
|
-
const items = observable.read(reader);
|
|
918
|
-
this.allItems = items;
|
|
919
|
-
this.filterItems();
|
|
920
|
-
this._onDidChangeItemCount.fire(items.length);
|
|
921
|
-
});
|
|
922
|
-
this.updateAddButton();
|
|
923
|
-
await this.itemsModel.whenSectionLoaded(modelSection);
|
|
924
|
-
if (loadId === this._sectionLoadId) {
|
|
925
|
-
this.sectionLoading = false;
|
|
926
|
-
this.filterItems();
|
|
927
|
-
this.announceItemCount(this.applySearchFilter(this.allItems).length);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
updateSectionHeader() {
|
|
931
|
-
let title;
|
|
932
|
-
let description;
|
|
933
|
-
let docsUrl;
|
|
934
|
-
let learnMoreLabel;
|
|
935
|
-
switch (this.currentSection) {
|
|
936
|
-
case AICustomizationManagementSection.Agents:
|
|
937
|
-
title = ( localize(6421, "Agents"));
|
|
938
|
-
description = ( localize(
|
|
939
|
-
6422,
|
|
940
|
-
"Configure the AI to adopt different personas tailored to specific development tasks. Each agent has its own instructions, tools, and behavior."
|
|
941
|
-
));
|
|
942
|
-
docsUrl = "https://code.visualstudio.com/docs/agent-customization/custom-agents?referrer=in-product";
|
|
943
|
-
learnMoreLabel = ( localize(6423, "Learn more about custom agents"));
|
|
944
|
-
break;
|
|
945
|
-
case AICustomizationManagementSection.Skills:
|
|
946
|
-
title = ( localize(6424, "Skills"));
|
|
947
|
-
description = ( localize(
|
|
948
|
-
6425,
|
|
949
|
-
"Folders of instructions, scripts, and resources that Copilot loads when relevant to perform specialized tasks."
|
|
950
|
-
));
|
|
951
|
-
docsUrl = "https://code.visualstudio.com/docs/agent-customization/agent-skills?referrer=in-product";
|
|
952
|
-
learnMoreLabel = ( localize(6426, "Learn more about agent skills"));
|
|
953
|
-
break;
|
|
954
|
-
case AICustomizationManagementSection.Instructions:
|
|
955
|
-
title = ( localize(6427, "Instructions"));
|
|
956
|
-
description = ( localize(
|
|
957
|
-
6428,
|
|
958
|
-
"Define common guidelines and rules that automatically influence how AI generates code and handles development tasks."
|
|
959
|
-
));
|
|
960
|
-
docsUrl = "https://code.visualstudio.com/docs/agent-customization/custom-instructions?referrer=in-product";
|
|
961
|
-
learnMoreLabel = ( localize(6429, "Learn more about custom instructions"));
|
|
962
|
-
break;
|
|
963
|
-
case AICustomizationManagementSection.Hooks:
|
|
964
|
-
title = ( localize(6430, "Hooks"));
|
|
965
|
-
description = ( localize(6431, "Prompts executed at specific points during an agentic lifecycle."));
|
|
966
|
-
docsUrl = "https://code.visualstudio.com/docs/agent-customization/hooks?referrer=in-product";
|
|
967
|
-
learnMoreLabel = ( localize(6432, "Learn more about hooks"));
|
|
968
|
-
break;
|
|
969
|
-
case AICustomizationManagementSection.Prompts:
|
|
970
|
-
default:
|
|
971
|
-
title = ( localize(6433, "Prompts"));
|
|
972
|
-
description = ( localize(
|
|
973
|
-
6434,
|
|
974
|
-
"Reusable prompts for common development tasks like generating code, performing reviews, or scaffolding components."
|
|
975
|
-
));
|
|
976
|
-
docsUrl = "https://code.visualstudio.com/docs/agent-customization/prompt-files?referrer=in-product";
|
|
977
|
-
learnMoreLabel = ( localize(6435, "Learn more about prompt files"));
|
|
978
|
-
break;
|
|
979
|
-
}
|
|
980
|
-
this.sectionTitle.textContent = title;
|
|
981
|
-
this.sectionTitleDescriptionText.textContent = description;
|
|
982
|
-
this.sectionLink.textContent = learnMoreLabel;
|
|
983
|
-
this.sectionLink.href = docsUrl;
|
|
984
|
-
}
|
|
985
|
-
updateAddButton() {
|
|
986
|
-
if (this.usesCardLayout()) {
|
|
987
|
-
this.addButton.element.style.display = "none";
|
|
988
|
-
this.addButtonSimple.element.style.display = "none";
|
|
989
|
-
if (this.allItems.length > 0 || !this.searchQuery.trim()) {
|
|
990
|
-
this.filterItems();
|
|
991
|
-
}
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
const actions = this.buildCreateActions();
|
|
995
|
-
const [primary, ...dropdown] = actions;
|
|
996
|
-
const hasDropdown = dropdown.length > 0;
|
|
997
|
-
this.addButton.element.style.display = hasDropdown ? "" : "none";
|
|
998
|
-
this.addButtonSimple.element.style.display = hasDropdown ? "none" : "";
|
|
999
|
-
if (!primary) {
|
|
1000
|
-
this.addButtonSimple.element.style.display = "none";
|
|
1001
|
-
this.addButton.element.style.display = "none";
|
|
1002
|
-
return;
|
|
1003
|
-
}
|
|
1004
|
-
if (hasDropdown) {
|
|
1005
|
-
this.addButton.label = primary.label;
|
|
1006
|
-
this.addButton.enabled = primary.enabled;
|
|
1007
|
-
this.addButton.primaryButton.setTitle(primary.tooltip ?? "");
|
|
1008
|
-
this.addButton.dropdownButton.setTitle("");
|
|
1009
|
-
} else {
|
|
1010
|
-
this.addButtonSimple.label = primary.label;
|
|
1011
|
-
this.addButtonSimple.enabled = primary.enabled;
|
|
1012
|
-
this.addButtonSimple.setTitle(primary.tooltip ?? "");
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
buildCreateActions() {
|
|
1016
|
-
const typeLabel = this.getTypeLabel();
|
|
1017
|
-
const promptType = sectionToPromptType(this.currentSection);
|
|
1018
|
-
const descriptor = this.harnessService.getActiveDescriptor();
|
|
1019
|
-
const override = descriptor.sectionOverrides?.get(this.currentSection);
|
|
1020
|
-
const hasWorkspace = this.hasActiveWorkspace();
|
|
1021
|
-
if (override?.commandId) {
|
|
1022
|
-
return [{
|
|
1023
|
-
label: override.label ?? ( localize(6436, "New {0}", typeLabel)),
|
|
1024
|
-
enabled: true,
|
|
1025
|
-
run: () => {
|
|
1026
|
-
this.commandService.executeCommand(override.commandId);
|
|
1027
|
-
}
|
|
1028
|
-
}];
|
|
1029
|
-
}
|
|
1030
|
-
const menuActions = this.menuService.getMenuActions(AICustomizationManagementCreateMenuId, this.contextKeyService, {
|
|
1031
|
-
shouldForwardArgs: true
|
|
1032
|
-
});
|
|
1033
|
-
const extensionCreateActions = [];
|
|
1034
|
-
for (const [, group] of menuActions) {
|
|
1035
|
-
for (const menuItem of group) {
|
|
1036
|
-
if (menuItem instanceof MenuItemAction) {
|
|
1037
|
-
extensionCreateActions.push({
|
|
1038
|
-
label: typeof menuItem.item.title === "string" ? menuItem.item.title : menuItem.item.title.value,
|
|
1039
|
-
enabled: menuItem.enabled,
|
|
1040
|
-
run: () => {
|
|
1041
|
-
menuItem.run();
|
|
1042
|
-
}
|
|
1043
|
-
});
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
if (extensionCreateActions.length > 0) {
|
|
1048
|
-
return extensionCreateActions;
|
|
1049
|
-
}
|
|
1050
|
-
const createTypeLabel = override?.typeLabel ?? typeLabel;
|
|
1051
|
-
const actions = [];
|
|
1052
|
-
const addedTargets = ( new Set());
|
|
1053
|
-
if (override?.rootFile && hasWorkspace) {
|
|
1054
|
-
actions.push({
|
|
1055
|
-
label: override.label ?? ( localize(6436, "New {0}", typeLabel)),
|
|
1056
|
-
enabled: true,
|
|
1057
|
-
target: "workspace",
|
|
1058
|
-
run: () => {
|
|
1059
|
-
this._onDidRequestCreateManual.fire({
|
|
1060
|
-
type: promptType,
|
|
1061
|
-
target: "workspace-root"
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
});
|
|
1065
|
-
addedTargets.add("workspace-root");
|
|
1066
|
-
}
|
|
1067
|
-
if (promptType === PromptsType.hook) {
|
|
1068
|
-
if (!this.workspaceService.isSessionsWindow && !descriptor.hideGenerateButton) {
|
|
1069
|
-
actions.push({
|
|
1070
|
-
label: ( localize(6437, "Generate with AI")),
|
|
1071
|
-
tooltip: ( localize(6438, "Generate {0} with AI", typeLabel)),
|
|
1072
|
-
enabled: true,
|
|
1073
|
-
kind: "generate",
|
|
1074
|
-
run: () => {
|
|
1075
|
-
this._onDidRequestCreate.fire(promptType);
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
if (hasWorkspace) {
|
|
1080
|
-
actions.push({
|
|
1081
|
-
label: ( localize(6439, "New Hook")),
|
|
1082
|
-
compactLabel: ( localize(6439, "New Hook")),
|
|
1083
|
-
enabled: true,
|
|
1084
|
-
target: "workspace",
|
|
1085
|
-
run: () => {
|
|
1086
|
-
this._onDidRequestCreateManual.fire({
|
|
1087
|
-
type: promptType,
|
|
1088
|
-
target: "local"
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
actions.push({
|
|
1094
|
-
label: ( localize(6439, "New Hook")),
|
|
1095
|
-
compactLabel: ( localize(6439, "New Hook")),
|
|
1096
|
-
enabled: true,
|
|
1097
|
-
target: "user",
|
|
1098
|
-
run: () => {
|
|
1099
|
-
this._onDidRequestCreateManual.fire({
|
|
1100
|
-
type: promptType,
|
|
1101
|
-
target: "user"
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
});
|
|
1105
|
-
return actions;
|
|
1106
|
-
}
|
|
1107
|
-
if (!override?.rootFile) {
|
|
1108
|
-
if (!this.workspaceService.isSessionsWindow && !descriptor.hideGenerateButton) {
|
|
1109
|
-
actions.push({
|
|
1110
|
-
label: ( localize(6437, "Generate with AI")),
|
|
1111
|
-
tooltip: ( localize(6438, "Generate {0} with AI", typeLabel)),
|
|
1112
|
-
enabled: true,
|
|
1113
|
-
kind: "generate",
|
|
1114
|
-
run: () => {
|
|
1115
|
-
this._onDidRequestCreate.fire(promptType);
|
|
1116
|
-
}
|
|
1117
|
-
});
|
|
1118
|
-
} else if (hasWorkspace) {
|
|
1119
|
-
actions.push({
|
|
1120
|
-
label: ( localize(6440, "New {0} (Workspace)", createTypeLabel)),
|
|
1121
|
-
compactLabel: ( localize(6436, "New {0}", createTypeLabel)),
|
|
1122
|
-
enabled: true,
|
|
1123
|
-
target: "workspace",
|
|
1124
|
-
run: () => {
|
|
1125
|
-
this._onDidRequestCreateManual.fire({
|
|
1126
|
-
type: promptType,
|
|
1127
|
-
target: "local"
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
});
|
|
1131
|
-
addedTargets.add("workspace");
|
|
1132
|
-
} else {
|
|
1133
|
-
actions.push({
|
|
1134
|
-
label: ( localize(6441, "New {0} (User)", createTypeLabel)),
|
|
1135
|
-
compactLabel: ( localize(6436, "New {0}", createTypeLabel)),
|
|
1136
|
-
enabled: true,
|
|
1137
|
-
target: "user",
|
|
1138
|
-
run: () => {
|
|
1139
|
-
this._onDidRequestCreateManual.fire({
|
|
1140
|
-
type: promptType,
|
|
1141
|
-
target: "user"
|
|
1142
|
-
});
|
|
1143
|
-
}
|
|
1144
|
-
});
|
|
1145
|
-
addedTargets.add("user");
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
if (hasWorkspace && !( addedTargets.has("workspace"))) {
|
|
1149
|
-
actions.push({
|
|
1150
|
-
label: ( localize(6440, "New {0} (Workspace)", createTypeLabel)),
|
|
1151
|
-
compactLabel: ( localize(6436, "New {0}", createTypeLabel)),
|
|
1152
|
-
enabled: true,
|
|
1153
|
-
target: "workspace",
|
|
1154
|
-
run: () => {
|
|
1155
|
-
this._onDidRequestCreateManual.fire({
|
|
1156
|
-
type: promptType,
|
|
1157
|
-
target: "local"
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
if (!( addedTargets.has("user"))) {
|
|
1163
|
-
actions.push({
|
|
1164
|
-
label: ( localize(6441, "New {0} (User)", createTypeLabel)),
|
|
1165
|
-
compactLabel: ( localize(6436, "New {0}", createTypeLabel)),
|
|
1166
|
-
enabled: true,
|
|
1167
|
-
target: "user",
|
|
1168
|
-
run: () => {
|
|
1169
|
-
this._onDidRequestCreateManual.fire({
|
|
1170
|
-
type: promptType,
|
|
1171
|
-
target: "user"
|
|
1172
|
-
});
|
|
1173
|
-
}
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
if (hasWorkspace && override?.rootFileShortcuts && !( addedTargets.has("workspace-root"))) {
|
|
1177
|
-
for (const fileName of override.rootFileShortcuts) {
|
|
1178
|
-
actions.push({
|
|
1179
|
-
label: ( localize(6442, "New {0}", fileName)),
|
|
1180
|
-
enabled: true,
|
|
1181
|
-
target: "workspace",
|
|
1182
|
-
run: () => {
|
|
1183
|
-
this._onDidRequestCreateManual.fire({
|
|
1184
|
-
type: promptType,
|
|
1185
|
-
target: "workspace-root",
|
|
1186
|
-
rootFileName: fileName
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return actions;
|
|
1193
|
-
}
|
|
1194
|
-
getDropdownActions() {
|
|
1195
|
-
this.dropdownActionDisposables.clear();
|
|
1196
|
-
const allActions = this.buildCreateActions();
|
|
1197
|
-
return ( allActions.slice(1).map((a, i) => this.dropdownActionDisposables.add(( new Action(`create_${i}`, a.label, undefined, a.enabled, () => a.run())))));
|
|
1198
|
-
}
|
|
1199
|
-
hasActiveWorkspace() {
|
|
1200
|
-
return !!this.workspaceService.getActiveProjectRoot();
|
|
1201
|
-
}
|
|
1202
|
-
executePrimaryCreateAction() {
|
|
1203
|
-
const actions = this.buildCreateActions();
|
|
1204
|
-
if (actions.length > 0 && actions[0].enabled) {
|
|
1205
|
-
actions[0].run();
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
getTypeLabel() {
|
|
1209
|
-
switch (this.currentSection) {
|
|
1210
|
-
case AICustomizationManagementSection.Agents:
|
|
1211
|
-
return localize(6443, "Agent");
|
|
1212
|
-
case AICustomizationManagementSection.Skills:
|
|
1213
|
-
return localize(6444, "Skill");
|
|
1214
|
-
case AICustomizationManagementSection.Instructions:
|
|
1215
|
-
return localize(6445, "Instruction");
|
|
1216
|
-
case AICustomizationManagementSection.Hooks:
|
|
1217
|
-
return localize(6446, "Hook");
|
|
1218
|
-
case AICustomizationManagementSection.Prompts:
|
|
1219
|
-
default:
|
|
1220
|
-
return localize(6447, "Prompt");
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
announceItemCount(count) {
|
|
1224
|
-
const isFiltering = this.searchQuery.trim().length > 0;
|
|
1225
|
-
status(getCountAnnouncement(this.currentSection, count, isFiltering));
|
|
1226
|
-
}
|
|
1227
|
-
refresh() {
|
|
1228
|
-
if (this._store.isDisposed) {
|
|
1229
|
-
return;
|
|
1230
|
-
}
|
|
1231
|
-
this.applyItemsFromModel();
|
|
1232
|
-
this.updateAddButton();
|
|
1233
|
-
}
|
|
1234
|
-
applyItemsFromModel() {
|
|
1235
|
-
const section = toItemsModelSection(this.currentSection);
|
|
1236
|
-
this.allItems = section ? this.itemsModel.getItems(section).get() : [];
|
|
1237
|
-
this.filterItems();
|
|
1238
|
-
this._onDidChangeItemCount.fire(this.allItems.length);
|
|
1239
|
-
}
|
|
1240
|
-
computeItemCountForSection(section) {
|
|
1241
|
-
const modelSection = toItemsModelSection(section);
|
|
1242
|
-
return modelSection ? this.itemsModel.getCount(modelSection).get() : 0;
|
|
1243
|
-
}
|
|
1244
|
-
applySearchFilter(items) {
|
|
1245
|
-
if (!this.searchQuery.trim()) {
|
|
1246
|
-
return ( items.map(item => ({
|
|
1247
|
-
...item,
|
|
1248
|
-
nameMatches: undefined,
|
|
1249
|
-
descriptionMatches: undefined
|
|
1250
|
-
})));
|
|
1251
|
-
}
|
|
1252
|
-
const query = this.searchQuery.toLowerCase();
|
|
1253
|
-
const matched = [];
|
|
1254
|
-
for (const item of items) {
|
|
1255
|
-
const displayName = item.displayName ?? formatDisplayName(item.name);
|
|
1256
|
-
const nameMatches = matchesContiguousSubString(query, displayName);
|
|
1257
|
-
const descriptionMatches = item.description ? matchesContiguousSubString(query, item.description) : null;
|
|
1258
|
-
const filenameMatches = matchesContiguousSubString(query, item.filename);
|
|
1259
|
-
const badgeMatches = item.badge ? matchesContiguousSubString(query, item.badge) : null;
|
|
1260
|
-
if (nameMatches || descriptionMatches || filenameMatches || badgeMatches) {
|
|
1261
|
-
matched.push({
|
|
1262
|
-
...item,
|
|
1263
|
-
nameMatches: nameMatches || undefined,
|
|
1264
|
-
descriptionMatches: descriptionMatches || undefined
|
|
1265
|
-
});
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
return matched;
|
|
1269
|
-
}
|
|
1270
|
-
buildGroupedEntries(groups) {
|
|
1271
|
-
for (const group of groups) {
|
|
1272
|
-
group.items.sort((a, b) => a.name.localeCompare(b.name));
|
|
1273
|
-
}
|
|
1274
|
-
this.displayEntries = [];
|
|
1275
|
-
let isFirstGroup = true;
|
|
1276
|
-
for (const group of groups) {
|
|
1277
|
-
if (group.items.length === 0) {
|
|
1278
|
-
continue;
|
|
1279
|
-
}
|
|
1280
|
-
const collapsed = !this.usesCardLayout() && ( this.collapsedGroups.has(this.getCollapsedGroupKey(group.groupKey)));
|
|
1281
|
-
this.displayEntries.push({
|
|
1282
|
-
type: "group-header",
|
|
1283
|
-
id: `group-${group.groupKey}`,
|
|
1284
|
-
groupKey: group.groupKey,
|
|
1285
|
-
label: group.label,
|
|
1286
|
-
icon: group.icon,
|
|
1287
|
-
count: group.items.length,
|
|
1288
|
-
isFirst: isFirstGroup,
|
|
1289
|
-
description: group.description,
|
|
1290
|
-
collapsed
|
|
1291
|
-
});
|
|
1292
|
-
isFirstGroup = false;
|
|
1293
|
-
if (!collapsed) {
|
|
1294
|
-
for (const item of group.items) {
|
|
1295
|
-
this.displayEntries.push({
|
|
1296
|
-
type: "file-item",
|
|
1297
|
-
item
|
|
1298
|
-
});
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
commitDisplayEntries() {
|
|
1304
|
-
this.list.splice(0, this.list.length, this.displayEntries);
|
|
1305
|
-
this.updateEmptyState();
|
|
1306
|
-
}
|
|
1307
|
-
groupMatchedItems(matchedItems) {
|
|
1308
|
-
const groups = [{
|
|
1309
|
-
groupKey: PromptsStorage.local,
|
|
1310
|
-
label: ( localize(6448, "Workspace")),
|
|
1311
|
-
icon: workspaceIcon,
|
|
1312
|
-
description: ( localize(
|
|
1313
|
-
6449,
|
|
1314
|
-
"Customizations stored as files in your project folder and shared with your team via version control."
|
|
1315
|
-
)),
|
|
1316
|
-
items: []
|
|
1317
|
-
}, {
|
|
1318
|
-
groupKey: PromptsStorage.user,
|
|
1319
|
-
label: ( localize(6450, "User")),
|
|
1320
|
-
icon: userIcon,
|
|
1321
|
-
description: ( localize(
|
|
1322
|
-
6451,
|
|
1323
|
-
"Customizations stored locally on your machine in a central location. Private to you and available across all projects."
|
|
1324
|
-
)),
|
|
1325
|
-
items: []
|
|
1326
|
-
}, {
|
|
1327
|
-
groupKey: PromptsStorage.plugin,
|
|
1328
|
-
label: ( localize(6452, "Plugins")),
|
|
1329
|
-
icon: pluginIcon,
|
|
1330
|
-
description: ( localize(6453, "Read-only customizations provided by installed plugins.")),
|
|
1331
|
-
items: []
|
|
1332
|
-
}, {
|
|
1333
|
-
groupKey: PromptsStorage.extension,
|
|
1334
|
-
label: ( localize(6454, "Extensions")),
|
|
1335
|
-
icon: extensionIcon,
|
|
1336
|
-
description: ( localize(6455, "Read-only customizations provided by installed extensions.")),
|
|
1337
|
-
items: []
|
|
1338
|
-
}, {
|
|
1339
|
-
groupKey: PromptsStorage.builtIn,
|
|
1340
|
-
label: ( localize(6456, "Built-in")),
|
|
1341
|
-
icon: builtinIcon,
|
|
1342
|
-
description: ( localize(6457, "Built-in customizations shipped with the application.")),
|
|
1343
|
-
items: []
|
|
1344
|
-
}];
|
|
1345
|
-
for (const item of matchedItems) {
|
|
1346
|
-
const key = this.currentSection === AICustomizationManagementSection.Instructions ? item.source : item.groupKey ?? item.source ?? AICustomizationSources.local;
|
|
1347
|
-
let group = groups.find(g => g.groupKey === key);
|
|
1348
|
-
if (!group) {
|
|
1349
|
-
let label;
|
|
1350
|
-
let description = "";
|
|
1351
|
-
switch (key) {
|
|
1352
|
-
case "remote-host":
|
|
1353
|
-
label = ( localize(6458, "Remote"));
|
|
1354
|
-
if (this.currentSection === AICustomizationManagementSection.Skills) {
|
|
1355
|
-
description = ( localize(
|
|
1356
|
-
6459,
|
|
1357
|
-
"Skills available from {0}, the active remote agent environment.",
|
|
1358
|
-
this.harnessService.getActiveDescriptor().label
|
|
1359
|
-
));
|
|
1360
|
-
}
|
|
1361
|
-
break;
|
|
1362
|
-
case "remote-client":
|
|
1363
|
-
label = ( localize(6460, "Local"));
|
|
1364
|
-
if (this.currentSection === AICustomizationManagementSection.Skills) {
|
|
1365
|
-
description = ( localize(
|
|
1366
|
-
6461,
|
|
1367
|
-
"Skills stored on your local machine and synced to {0}, the active remote agent environment.",
|
|
1368
|
-
this.harnessService.getActiveDescriptor().label
|
|
1369
|
-
));
|
|
1370
|
-
}
|
|
1371
|
-
break;
|
|
1372
|
-
default:
|
|
1373
|
-
label = formatDisplayName(key);
|
|
1374
|
-
}
|
|
1375
|
-
group = {
|
|
1376
|
-
groupKey: key,
|
|
1377
|
-
label,
|
|
1378
|
-
icon: Codicon.folder,
|
|
1379
|
-
description,
|
|
1380
|
-
items: []
|
|
1381
|
-
};
|
|
1382
|
-
const builtinIdx = groups.findIndex(g => g.groupKey === PromptsStorage.builtIn);
|
|
1383
|
-
if (builtinIdx >= 0) {
|
|
1384
|
-
groups.splice(builtinIdx, 0, group);
|
|
1385
|
-
} else {
|
|
1386
|
-
groups.push(group);
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
group.items.push(item);
|
|
1390
|
-
}
|
|
1391
|
-
this.buildGroupedEntries(groups);
|
|
1392
|
-
if (this.usesCardLayout()) {
|
|
1393
|
-
this.renderCardGroups(groups);
|
|
1394
|
-
} else {
|
|
1395
|
-
this.commitDisplayEntries();
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
usesCardLayout() {
|
|
1399
|
-
return usesCustomizationCardLayout(this.currentSection);
|
|
1400
|
-
}
|
|
1401
|
-
renderCardGroups(groups) {
|
|
1402
|
-
const activeElement = getActiveElement();
|
|
1403
|
-
const shouldRestoreFocus = this.cardMenuOpen || !!activeElement && this.cardContainer.contains(activeElement);
|
|
1404
|
-
const focusItemId = this.lastCardFocusItemId;
|
|
1405
|
-
const isFiltering = !!this.searchQuery.trim();
|
|
1406
|
-
const usesTargetedCreateActions = this.usesTargetedCreateActions();
|
|
1407
|
-
const createGroupKey = isFiltering || usesTargetedCreateActions ? undefined : this.getCreateActionGroupKey();
|
|
1408
|
-
const alwaysVisibleGroupKeys = ( new Set(getAlwaysVisibleCustomizationGroupKeys(this.currentSection, isFiltering)));
|
|
1409
|
-
const visibleGroups = groups.filter(group => group.items.length > 0 || ( alwaysVisibleGroupKeys.has(group.groupKey)) || group.groupKey === createGroupKey || this.sectionLoading && !isFiltering);
|
|
1410
|
-
if (visibleGroups.length === 0) {
|
|
1411
|
-
this.captureCardSectionScrollPositions();
|
|
1412
|
-
this.cardDisposables.clear();
|
|
1413
|
-
this.cardSectionLists = [];
|
|
1414
|
-
this.cardRowsByUri.clear();
|
|
1415
|
-
this.cardRowsById.clear();
|
|
1416
|
-
this.cardMenuButtonsById.clear();
|
|
1417
|
-
this.firstCardFocusElement = undefined;
|
|
1418
|
-
this.cardSectionLayoutContainer = undefined;
|
|
1419
|
-
clearNode(this.cardContainer);
|
|
1420
|
-
this.cardScrollableNode.style.display = "none";
|
|
1421
|
-
this.updateEmptyState();
|
|
1422
|
-
return;
|
|
1423
|
-
}
|
|
1424
|
-
if (createGroupKey) {
|
|
1425
|
-
const createGroupIndex = visibleGroups.findIndex(group => group.groupKey === createGroupKey);
|
|
1426
|
-
if (createGroupIndex > 0) {
|
|
1427
|
-
visibleGroups.unshift(...visibleGroups.splice(createGroupIndex, 1));
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
this.captureCardSectionScrollPositions();
|
|
1431
|
-
this.cardDisposables.clear();
|
|
1432
|
-
this.cardSectionLists = [];
|
|
1433
|
-
this.cardRowsByUri.clear();
|
|
1434
|
-
this.cardRowsById.clear();
|
|
1435
|
-
this.cardMenuButtonsById.clear();
|
|
1436
|
-
this.firstCardFocusElement = undefined;
|
|
1437
|
-
this.cardSectionLayoutContainer = undefined;
|
|
1438
|
-
clearNode(this.cardContainer);
|
|
1439
|
-
this.listContainer.style.display = "none";
|
|
1440
|
-
this.emptyStateContainer.style.display = "none";
|
|
1441
|
-
this.cardScrollableNode.style.display = "";
|
|
1442
|
-
const content = append(this.cardContainer, $(
|
|
1443
|
-
".plugin-card-scroll.plugin-card-scroll-content.customization-card-scroll.distributed-section-layout"
|
|
1444
|
-
));
|
|
1445
|
-
this.cardSectionLayoutContainer = content;
|
|
1446
|
-
const contentResizeObserver = this.cardDisposables.add(new DisposableResizeObserver(
|
|
1447
|
-
"AICustomizationListWidget.cardScrollContent",
|
|
1448
|
-
() => this.scheduleCardSectionLayout()
|
|
1449
|
-
));
|
|
1450
|
-
this.cardDisposables.add(contentResizeObserver.observe(content));
|
|
1451
|
-
for (const group of visibleGroups) {
|
|
1452
|
-
const collapsedGroupKey = this.getCollapsedGroupKey(group.groupKey);
|
|
1453
|
-
const section = append(content, $(".plugin-card-section.customization-card-section"));
|
|
1454
|
-
const header = append(section, $(".plugin-card-section-header"));
|
|
1455
|
-
const text = append(header, $(".plugin-card-section-text"));
|
|
1456
|
-
const headingRow = append(text, $(".plugin-card-section-heading-row"));
|
|
1457
|
-
const heading = append(headingRow, $("h3.plugin-card-section-title"));
|
|
1458
|
-
heading.textContent = group.label;
|
|
1459
|
-
const count = append(headingRow, $(".plugin-card-section-count"));
|
|
1460
|
-
count.textContent = String(group.items.length);
|
|
1461
|
-
if (group.description) {
|
|
1462
|
-
const description = append(text, $(".plugin-card-section-description"));
|
|
1463
|
-
description.textContent = group.description;
|
|
1464
|
-
}
|
|
1465
|
-
if (!isFiltering && usesTargetedCreateActions && (group.groupKey === PromptsStorage.local || group.groupKey === PromptsStorage.user)) {
|
|
1466
|
-
this.renderTargetedCardCreateActions(header, group.groupKey);
|
|
1467
|
-
} else if (group.groupKey === createGroupKey) {
|
|
1468
|
-
this.renderCardCreateActions(header);
|
|
1469
|
-
}
|
|
1470
|
-
const inventory = append(section, $(
|
|
1471
|
-
".plugin-card-grid.plugin-inventory-list.customization-inventory-list.virtualized-section-list"
|
|
1472
|
-
));
|
|
1473
|
-
setupCollapsibleSection(headingRow, inventory, group.label, this.cardDisposables, ( this.collapsedGroups.has(collapsedGroupKey)), collapsed => {
|
|
1474
|
-
if (collapsed) {
|
|
1475
|
-
this.collapsedGroups.add(collapsedGroupKey);
|
|
1476
|
-
} else {
|
|
1477
|
-
this.collapsedGroups.delete(collapsedGroupKey);
|
|
1478
|
-
}
|
|
1479
|
-
this.layoutCardSectionLists();
|
|
1480
|
-
this.cardScrollable.scanDomNode();
|
|
1481
|
-
this.scheduleCardSectionLayout();
|
|
1482
|
-
});
|
|
1483
|
-
if (group.items.length === 0) {
|
|
1484
|
-
if (this.sectionLoading) {
|
|
1485
|
-
renderVirtualizedSectionLoadingPlaceholder(inventory, ( localize(6462, "Loading customizations...")), ITEM_HEIGHT);
|
|
1486
|
-
} else {
|
|
1487
|
-
const empty = append(inventory, $(".plugin-inventory-empty"));
|
|
1488
|
-
empty.textContent = this.getEmptyGroupMessage(group.groupKey);
|
|
1489
|
-
}
|
|
1490
|
-
continue;
|
|
1491
|
-
}
|
|
1492
|
-
this.createCustomizationSectionList(inventory, group.groupKey, group.label, group.items);
|
|
1493
|
-
}
|
|
1494
|
-
this.layoutCardSectionLists();
|
|
1495
|
-
this.cardScrollable.scanDomNode();
|
|
1496
|
-
this.scheduleCardSectionLayout();
|
|
1497
|
-
if (shouldRestoreFocus) {
|
|
1498
|
-
getWindow(this.element).requestAnimationFrame(() => {
|
|
1499
|
-
if (!focusItemId || !this.focusCardSectionItem(focusItemId)) {
|
|
1500
|
-
this.firstCardFocusElement?.focus();
|
|
1501
|
-
}
|
|
1502
|
-
});
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
createCustomizationSectionList(container, groupKey, label, items) {
|
|
1506
|
-
const key = `${this.currentSection}:${groupKey}`;
|
|
1507
|
-
container.style.height = `${ITEM_HEIGHT}px`;
|
|
1508
|
-
const itemRenderer = this.instantiationService.createInstance(
|
|
1509
|
-
AICustomizationItemRenderer,
|
|
1510
|
-
(item, anchor) => this.showCardItemActions(item, anchor)
|
|
1511
|
-
);
|
|
1512
|
-
const list = this.cardDisposables.add(this.instantiationService.createInstance(
|
|
1513
|
-
WorkbenchList,
|
|
1514
|
-
`AICustomizationManagementList.${label}`,
|
|
1515
|
-
container,
|
|
1516
|
-
( new AICustomizationListDelegate()),
|
|
1517
|
-
[itemRenderer],
|
|
1518
|
-
{
|
|
1519
|
-
identityProvider: {
|
|
1520
|
-
getId: entry => entry.item.id
|
|
1521
|
-
},
|
|
1522
|
-
accessibilityProvider: {
|
|
1523
|
-
getAriaLabel: entry => getCustomizationItemAriaLabel(entry.item),
|
|
1524
|
-
getWidgetAriaLabel: () => label,
|
|
1525
|
-
getSetSize: (_entry, _index, listLength) => listLength,
|
|
1526
|
-
getPosInSet: (_entry, index) => index + 1
|
|
1527
|
-
},
|
|
1528
|
-
keyboardNavigationLabelProvider: {
|
|
1529
|
-
getKeyboardNavigationLabel: entry => entry.item.name
|
|
1530
|
-
},
|
|
1531
|
-
multipleSelectionSupport: false,
|
|
1532
|
-
openOnSingleClick: true
|
|
1533
|
-
}
|
|
1534
|
-
));
|
|
1535
|
-
list.splice(0, 0, ( items.map(item => ({
|
|
1536
|
-
type: "file-item",
|
|
1537
|
-
item
|
|
1538
|
-
}))));
|
|
1539
|
-
list.scrollTop = this.cardSectionScrollPositions.get(key) ?? 0;
|
|
1540
|
-
this.cardDisposables.add(list.onDidOpen(event => {
|
|
1541
|
-
if (event.element) {
|
|
1542
|
-
this._onDidSelectItem.fire(event.element.item);
|
|
1543
|
-
}
|
|
1544
|
-
}));
|
|
1545
|
-
this.cardDisposables.add(list.onDidChangeFocus(event => {
|
|
1546
|
-
itemRenderer.setFocusedIndex(event.indexes.length ? event.indexes[0] : -1);
|
|
1547
|
-
if (event.elements.length > 0) {
|
|
1548
|
-
this.lastCardFocusItemId = event.elements[0].item.id;
|
|
1549
|
-
}
|
|
1550
|
-
}));
|
|
1551
|
-
this.cardDisposables.add(list.onDidFocus(() => {
|
|
1552
|
-
if (list.getFocus().length === 0 && items.length > 0) {
|
|
1553
|
-
list.setFocus([0]);
|
|
1554
|
-
}
|
|
1555
|
-
}));
|
|
1556
|
-
this.cardDisposables.add(list.onContextMenu(event => this.onContextMenu(event)));
|
|
1557
|
-
this.cardSectionLists.push({
|
|
1558
|
-
list,
|
|
1559
|
-
items,
|
|
1560
|
-
container,
|
|
1561
|
-
key
|
|
1562
|
-
});
|
|
1563
|
-
}
|
|
1564
|
-
captureCardSectionScrollPositions() {
|
|
1565
|
-
for (const section of this.cardSectionLists) {
|
|
1566
|
-
this.cardSectionScrollPositions.set(section.key, section.list.scrollTop);
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
layoutCardSectionLists() {
|
|
1570
|
-
const content = this.cardSectionLayoutContainer;
|
|
1571
|
-
if (!content) {
|
|
1572
|
-
return;
|
|
1573
|
-
}
|
|
1574
|
-
const heights = layoutVirtualizedSections(content, ( this.cardSectionLists.map(section => ({
|
|
1575
|
-
container: section.container,
|
|
1576
|
-
contentHeight: section.items.length * ITEM_HEIGHT,
|
|
1577
|
-
minimumHeight: getVirtualizedSectionMinimumHeight(section.items, () => ITEM_HEIGHT)
|
|
1578
|
-
}))));
|
|
1579
|
-
for (let index = 0; index < this.cardSectionLists.length; index++) {
|
|
1580
|
-
const section = this.cardSectionLists[index];
|
|
1581
|
-
const height = heights[index];
|
|
1582
|
-
layoutVirtualizedSectionList(
|
|
1583
|
-
section.list,
|
|
1584
|
-
section.container,
|
|
1585
|
-
height,
|
|
1586
|
-
section.container.clientWidth || undefined
|
|
1587
|
-
);
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
scheduleCardSectionLayout() {
|
|
1591
|
-
const targetWindow = getWindow(this.element);
|
|
1592
|
-
this.pendingCardSectionLayout.value = scheduleAtNextAnimationFrame(targetWindow, () => {
|
|
1593
|
-
this.layoutCardSectionLists();
|
|
1594
|
-
this.cardScrollable.scanDomNode();
|
|
1595
|
-
});
|
|
1596
|
-
}
|
|
1597
|
-
focusCardSectionItem(itemId) {
|
|
1598
|
-
for (const section of this.cardSectionLists) {
|
|
1599
|
-
const index = section.items.findIndex(item => item.id === itemId);
|
|
1600
|
-
if (index >= 0) {
|
|
1601
|
-
section.list.reveal(index);
|
|
1602
|
-
section.list.setFocus([index]);
|
|
1603
|
-
section.list.domFocus();
|
|
1604
|
-
return true;
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
return false;
|
|
1608
|
-
}
|
|
1609
|
-
usesTargetedCreateActions() {
|
|
1610
|
-
return this.currentSection === AICustomizationManagementSection.Agents || this.currentSection === AICustomizationManagementSection.Skills || this.currentSection === AICustomizationManagementSection.Instructions || this.currentSection === AICustomizationManagementSection.Hooks || this.currentSection === AICustomizationManagementSection.Prompts;
|
|
1611
|
-
}
|
|
1612
|
-
getCreateActionGroupKey() {
|
|
1613
|
-
if (this.buildCreateActions().length === 0) {
|
|
1614
|
-
return undefined;
|
|
1615
|
-
}
|
|
1616
|
-
return this.hasActiveWorkspace() ? PromptsStorage.local : PromptsStorage.user;
|
|
1617
|
-
}
|
|
1618
|
-
renderTargetedCardCreateActions(header, groupKey) {
|
|
1619
|
-
const target = groupKey === PromptsStorage.local ? "workspace" : "user";
|
|
1620
|
-
const hasWorkspace = this.hasActiveWorkspace();
|
|
1621
|
-
const actions = this.buildCreateActions().filter(
|
|
1622
|
-
action => action.target === target || action.target === undefined && (target === "workspace" ? hasWorkspace : !hasWorkspace)
|
|
1623
|
-
);
|
|
1624
|
-
const primary = actions.find(action => action.target === target) ?? actions[0];
|
|
1625
|
-
if (!primary) {
|
|
1626
|
-
return;
|
|
1627
|
-
}
|
|
1628
|
-
const container = append(header, $(".plugin-card-section-actions"));
|
|
1629
|
-
const label = this.formatTargetedCreateActionLabel(primary);
|
|
1630
|
-
const button = this.cardDisposables.add(( new Button(container, {
|
|
1631
|
-
...defaultButtonStyles,
|
|
1632
|
-
secondary: true,
|
|
1633
|
-
title: primary.tooltip ?? label,
|
|
1634
|
-
ariaLabel: primary.tooltip ?? label
|
|
1635
|
-
})));
|
|
1636
|
-
button.element.classList.add("customization-create-action");
|
|
1637
|
-
button.label = label;
|
|
1638
|
-
button.enabled = primary.enabled;
|
|
1639
|
-
this.firstCardFocusElement ??= button.element;
|
|
1640
|
-
this.cardDisposables.add(button.onDidClick(() => primary.run()));
|
|
1641
|
-
const generateAction = actions.find(action => action.kind === "generate");
|
|
1642
|
-
if (generateAction && generateAction !== primary) {
|
|
1643
|
-
const generateButton = this.cardDisposables.add(( new Button(container, {
|
|
1644
|
-
...defaultButtonStyles,
|
|
1645
|
-
secondary: true,
|
|
1646
|
-
title: generateAction.tooltip ?? generateAction.label,
|
|
1647
|
-
ariaLabel: generateAction.tooltip ?? generateAction.label
|
|
1648
|
-
})));
|
|
1649
|
-
generateButton.element.classList.add("customization-generate-action");
|
|
1650
|
-
generateButton.label = generateAction.label;
|
|
1651
|
-
generateButton.enabled = generateAction.enabled;
|
|
1652
|
-
this.cardDisposables.add(generateButton.onDidClick(() => generateAction.run()));
|
|
1653
|
-
}
|
|
1654
|
-
const secondaryActions = actions.filter(action => action !== primary && action !== generateAction);
|
|
1655
|
-
if (secondaryActions.length > 0) {
|
|
1656
|
-
const moreLabel = ( localize(
|
|
1657
|
-
6463,
|
|
1658
|
-
"More creation actions for {0}",
|
|
1659
|
-
groupKey === PromptsStorage.local ? ( localize(6464, "Workspace")) : ( localize(6465, "User"))
|
|
1660
|
-
));
|
|
1661
|
-
const more = this.cardDisposables.add(( new Button(container, {
|
|
1662
|
-
...getButtonStyles({
|
|
1663
|
-
buttonSecondaryBackground: undefined,
|
|
1664
|
-
buttonSecondaryBorder: undefined
|
|
1665
|
-
}),
|
|
1666
|
-
secondary: true,
|
|
1667
|
-
supportIcons: true,
|
|
1668
|
-
title: moreLabel,
|
|
1669
|
-
ariaLabel: moreLabel
|
|
1670
|
-
})));
|
|
1671
|
-
more.element.classList.add("plugin-card-icon-button", "customization-create-more-action");
|
|
1672
|
-
more.label = `$(${Codicon.ellipsis.id})`;
|
|
1673
|
-
this.cardDisposables.add(
|
|
1674
|
-
more.onDidClick(() => this.showCreateActionsMenu(secondaryActions, more.element))
|
|
1675
|
-
);
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
formatTargetedCreateActionLabel(action) {
|
|
1679
|
-
return getTargetedCreateActionLabel(action.label, action.compactLabel);
|
|
1680
|
-
}
|
|
1681
|
-
showCreateActionsMenu(createActions, anchor) {
|
|
1682
|
-
const disposables = ( new DisposableStore());
|
|
1683
|
-
const actions = ( createActions.map((action, index) => disposables.add(( new Action(
|
|
1684
|
-
`customization.create.${index}`,
|
|
1685
|
-
action.label.replace(/^\$\([^)]+\)\s*/, ""),
|
|
1686
|
-
undefined,
|
|
1687
|
-
action.enabled,
|
|
1688
|
-
() => action.run()
|
|
1689
|
-
)))));
|
|
1690
|
-
this.contextMenuService.showContextMenu({
|
|
1691
|
-
getAnchor: () => anchor,
|
|
1692
|
-
getActions: () => actions,
|
|
1693
|
-
onHide: () => disposables.dispose()
|
|
1694
|
-
});
|
|
1695
|
-
}
|
|
1696
|
-
getEmptyGroupMessage(groupKey) {
|
|
1697
|
-
const workspace = groupKey === PromptsStorage.local;
|
|
1698
|
-
switch (this.currentSection) {
|
|
1699
|
-
case AICustomizationManagementSection.Agents:
|
|
1700
|
-
return workspace ? ( localize(6466, "No workspace agents yet.")) : ( localize(6467, "No user agents yet."));
|
|
1701
|
-
case AICustomizationManagementSection.Skills:
|
|
1702
|
-
return workspace ? ( localize(6468, "No workspace skills yet.")) : ( localize(6469, "No user skills yet."));
|
|
1703
|
-
case AICustomizationManagementSection.Instructions:
|
|
1704
|
-
return workspace ? ( localize(6470, "No workspace instructions yet.")) : ( localize(6471, "No user instructions yet."));
|
|
1705
|
-
case AICustomizationManagementSection.Hooks:
|
|
1706
|
-
return workspace ? ( localize(6472, "No workspace hooks yet.")) : ( localize(6473, "No user hooks yet."));
|
|
1707
|
-
case AICustomizationManagementSection.Prompts:
|
|
1708
|
-
return workspace ? ( localize(6474, "No workspace prompts yet.")) : ( localize(6475, "No user prompts yet."));
|
|
1709
|
-
default:
|
|
1710
|
-
return localize(6476, "No customizations are available.");
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
renderCardCreateActions(header) {
|
|
1714
|
-
const actions = this.buildCreateActions();
|
|
1715
|
-
const [primary, ...dropdown] = actions;
|
|
1716
|
-
if (!primary) {
|
|
1717
|
-
return;
|
|
1718
|
-
}
|
|
1719
|
-
const container = append(header, $(".plugin-card-section-actions"));
|
|
1720
|
-
const accessibleLabel = primary.tooltip ?? primary.label.replace(/\$\([^)]+\)\s*/g, "");
|
|
1721
|
-
if (dropdown.length > 0) {
|
|
1722
|
-
const button = this.cardDisposables.add(( new ButtonWithDropdown(container, {
|
|
1723
|
-
...defaultButtonStyles,
|
|
1724
|
-
secondary: true,
|
|
1725
|
-
contextMenuProvider: this.contextMenuService,
|
|
1726
|
-
addPrimaryActionToDropdown: false,
|
|
1727
|
-
actions: {
|
|
1728
|
-
getActions: () => this.getDropdownActions()
|
|
1729
|
-
},
|
|
1730
|
-
title: accessibleLabel,
|
|
1731
|
-
ariaLabel: accessibleLabel
|
|
1732
|
-
})));
|
|
1733
|
-
button.element.classList.add("customization-create-action");
|
|
1734
|
-
button.label = primary.label;
|
|
1735
|
-
button.enabled = primary.enabled;
|
|
1736
|
-
this.firstCardFocusElement ??= button.element;
|
|
1737
|
-
this.cardDisposables.add(button.onDidClick(() => this.executePrimaryCreateAction()));
|
|
1738
|
-
return;
|
|
1739
|
-
}
|
|
1740
|
-
const button = this.cardDisposables.add(( new Button(container, {
|
|
1741
|
-
...defaultButtonStyles,
|
|
1742
|
-
secondary: true,
|
|
1743
|
-
title: accessibleLabel,
|
|
1744
|
-
ariaLabel: accessibleLabel
|
|
1745
|
-
})));
|
|
1746
|
-
button.element.classList.add("customization-create-action");
|
|
1747
|
-
button.label = primary.label;
|
|
1748
|
-
button.enabled = primary.enabled;
|
|
1749
|
-
this.firstCardFocusElement ??= button.element;
|
|
1750
|
-
this.cardDisposables.add(button.onDidClick(() => this.executePrimaryCreateAction()));
|
|
1751
|
-
}
|
|
1752
|
-
appendCustomizationCardRow(parent, item, groupLabel, cardList) {
|
|
1753
|
-
const row = append(parent, $(".plugin-list-item.plugin-home-row.customization-home-row"));
|
|
1754
|
-
row.classList.toggle("disabled", item.disabled);
|
|
1755
|
-
const displayName = item.displayName ?? formatDisplayName(item.name);
|
|
1756
|
-
const secondaryText = getCustomizationSecondaryText(item.description, item.filename, item.promptType);
|
|
1757
|
-
const statusLabel = getCustomizationItemStatusLabel(item);
|
|
1758
|
-
const accessibleSecondaryText = [secondaryText, statusLabel].filter(Boolean).join(". ");
|
|
1759
|
-
const accessibleLabel = item.disabled ? ( localize(
|
|
1760
|
-
6477,
|
|
1761
|
-
"{0}. {1}. Disabled",
|
|
1762
|
-
displayName,
|
|
1763
|
-
accessibleSecondaryText || groupLabel
|
|
1764
|
-
)) : ( localize(6478, "{0}. {1}", displayName, accessibleSecondaryText || groupLabel));
|
|
1765
|
-
const primary = createCustomizationCardPrimaryAction(row, accessibleLabel, "customization-row-primary");
|
|
1766
|
-
const hasReadableContent = hasReadableCustomizationContent(item.uri);
|
|
1767
|
-
if (!hasReadableContent) {
|
|
1768
|
-
primary.setAttribute("aria-disabled", "true");
|
|
1769
|
-
}
|
|
1770
|
-
this.firstCardFocusElement ??= primary;
|
|
1771
|
-
if (!( this.cardRowsByUri.has(( item.uri.toString())))) {
|
|
1772
|
-
this.cardRowsByUri.set(( item.uri.toString()), primary);
|
|
1773
|
-
}
|
|
1774
|
-
this.cardRowsById.set(item.id, primary);
|
|
1775
|
-
this.cardDisposables.add(addDisposableListener(primary, "focus", () => {
|
|
1776
|
-
this.lastCardFocusItemId = item.id;
|
|
1777
|
-
}));
|
|
1778
|
-
if (hasReadableContent) {
|
|
1779
|
-
this.cardDisposables.add(
|
|
1780
|
-
addDisposableListener(primary, "click", () => this._onDidSelectItem.fire(item))
|
|
1781
|
-
);
|
|
1782
|
-
}
|
|
1783
|
-
const hasItemActions = this.hasCardItemActions(item);
|
|
1784
|
-
if (hasItemActions) {
|
|
1785
|
-
this.cardDisposables.add(addDisposableListener(row, "contextmenu", event => {
|
|
1786
|
-
event.preventDefault();
|
|
1787
|
-
this.showCardItemActions(item, row);
|
|
1788
|
-
}));
|
|
1789
|
-
}
|
|
1790
|
-
this.cardDisposables.add(this.hoverService.setupDelayedHover(row, () => ({
|
|
1791
|
-
content: `${displayName}\n${this.labelService.getUriLabel(item.uri, {
|
|
1792
|
-
relative: item.source === AICustomizationSources.local
|
|
1793
|
-
})}`,
|
|
1794
|
-
appearance: {
|
|
1795
|
-
compact: true,
|
|
1796
|
-
skipFadeInAnimation: true
|
|
1797
|
-
}
|
|
1798
|
-
})));
|
|
1799
|
-
const details = append(primary, $(".plugin-list-item-details"));
|
|
1800
|
-
const nameRow = append(details, $(".plugin-list-item-name-row"));
|
|
1801
|
-
const name = append(nameRow, $(".plugin-list-item-name"));
|
|
1802
|
-
name.textContent = displayName;
|
|
1803
|
-
if (item.badge && item.promptType !== PromptsType.instructions) {
|
|
1804
|
-
const badge = append(nameRow, $(".inline-badge.item-badge"));
|
|
1805
|
-
badge.textContent = item.badge;
|
|
1806
|
-
badge.title = item.badgeTooltip ?? item.badge;
|
|
1807
|
-
}
|
|
1808
|
-
const description = append(details, $(".plugin-list-item-description"));
|
|
1809
|
-
description.textContent = secondaryText ?? ( localize(6479, "No description provided."));
|
|
1810
|
-
const actionElements = [];
|
|
1811
|
-
if (hasItemActions) {
|
|
1812
|
-
const actionContainer = append(row, $(".plugin-list-item-action"));
|
|
1813
|
-
this.cardDisposables.add(
|
|
1814
|
-
addDisposableGenericMouseDownListener(actionContainer, e => e.stopPropagation())
|
|
1815
|
-
);
|
|
1816
|
-
this.cardDisposables.add(
|
|
1817
|
-
addDisposableListener(actionContainer, "click", e => e.stopPropagation())
|
|
1818
|
-
);
|
|
1819
|
-
const more = this.cardDisposables.add(( new Button(actionContainer, {
|
|
1820
|
-
...getButtonStyles({
|
|
1821
|
-
buttonSecondaryBackground: undefined,
|
|
1822
|
-
buttonSecondaryBorder: undefined
|
|
1823
|
-
}),
|
|
1824
|
-
secondary: true,
|
|
1825
|
-
supportIcons: true,
|
|
1826
|
-
ariaLabel: ( localize(6376, "More actions for {0}", displayName))
|
|
1827
|
-
})));
|
|
1828
|
-
more.element.classList.add("plugin-card-icon-button");
|
|
1829
|
-
more.label = `$(${Codicon.ellipsis.id})`;
|
|
1830
|
-
this.cardMenuButtonsById.set(item.id, more.element);
|
|
1831
|
-
this.cardDisposables.add(addDisposableListener(more.element, "focus", () => {
|
|
1832
|
-
this.lastCardFocusItemId = item.id;
|
|
1833
|
-
}));
|
|
1834
|
-
this.cardDisposables.add(more.onDidClick(() => this.showCardItemActions(item, more.element)));
|
|
1835
|
-
actionElements.push(more.element);
|
|
1836
|
-
}
|
|
1837
|
-
cardList.addItem({
|
|
1838
|
-
row,
|
|
1839
|
-
primaryAction: primary,
|
|
1840
|
-
label: displayName,
|
|
1841
|
-
actions: actionElements,
|
|
1842
|
-
contextMenuAction: actionElements[0]
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
filterItems() {
|
|
1846
|
-
const matchedItems = this.applySearchFilter(this.allItems);
|
|
1847
|
-
this.groupMatchedItems(matchedItems);
|
|
1848
|
-
return matchedItems.length;
|
|
1849
|
-
}
|
|
1850
|
-
toggleGroup(entry) {
|
|
1851
|
-
const collapsedGroupKey = this.getCollapsedGroupKey(entry.groupKey);
|
|
1852
|
-
if (( this.collapsedGroups.has(collapsedGroupKey))) {
|
|
1853
|
-
this.collapsedGroups.delete(collapsedGroupKey);
|
|
1854
|
-
} else {
|
|
1855
|
-
this.collapsedGroups.add(collapsedGroupKey);
|
|
1856
|
-
}
|
|
1857
|
-
this.filterItems();
|
|
1858
|
-
}
|
|
1859
|
-
getCollapsedGroupKey(groupKey) {
|
|
1860
|
-
return getCollapsedCustomizationGroupKey(this.currentSection, groupKey);
|
|
1861
|
-
}
|
|
1862
|
-
updateEmptyState() {
|
|
1863
|
-
const hasItems = this.displayEntries.length > 0;
|
|
1864
|
-
if (!hasItems) {
|
|
1865
|
-
this.cardScrollableNode.style.display = "none";
|
|
1866
|
-
this.emptyStateContainer.style.display = "flex";
|
|
1867
|
-
this.listContainer.style.display = "none";
|
|
1868
|
-
if (this.searchQuery.trim()) {
|
|
1869
|
-
this.emptyStateText.textContent = ( localize(6480, "No items match '{0}'", this.searchQuery));
|
|
1870
|
-
this.emptyStateSubtext.textContent = ( localize(6481, "Try a different search term"));
|
|
1871
|
-
} else {
|
|
1872
|
-
const emptyInfo = this.getEmptyStateInfo();
|
|
1873
|
-
this.emptyStateText.textContent = emptyInfo.title;
|
|
1874
|
-
this.emptyStateSubtext.textContent = emptyInfo.description;
|
|
1875
|
-
}
|
|
1876
|
-
} else {
|
|
1877
|
-
this.emptyStateContainer.style.display = "none";
|
|
1878
|
-
this.listContainer.style.display = this.usesCardLayout() ? "none" : "";
|
|
1879
|
-
this.cardScrollableNode.style.display = this.usesCardLayout() ? "" : "none";
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
getEmptyStateInfo() {
|
|
1883
|
-
switch (this.currentSection) {
|
|
1884
|
-
case AICustomizationManagementSection.Agents:
|
|
1885
|
-
return {
|
|
1886
|
-
title: ( localize(6482, "No agents yet")),
|
|
1887
|
-
description: ( localize(6483, "Create your first custom agent to get started"))
|
|
1888
|
-
};
|
|
1889
|
-
case AICustomizationManagementSection.Skills:
|
|
1890
|
-
return {
|
|
1891
|
-
title: ( localize(6484, "No skills yet")),
|
|
1892
|
-
description: ( localize(6485, "Create your first skill to extend agent capabilities"))
|
|
1893
|
-
};
|
|
1894
|
-
case AICustomizationManagementSection.Instructions:
|
|
1895
|
-
return {
|
|
1896
|
-
title: ( localize(6486, "No instructions yet")),
|
|
1897
|
-
description: ( localize(6487, "Add instructions to teach Copilot about your codebase"))
|
|
1898
|
-
};
|
|
1899
|
-
case AICustomizationManagementSection.Hooks:
|
|
1900
|
-
return {
|
|
1901
|
-
title: ( localize(6488, "No hooks yet")),
|
|
1902
|
-
description: ( localize(6489, "Create hooks to execute commands at agent lifecycle events"))
|
|
1903
|
-
};
|
|
1904
|
-
case AICustomizationManagementSection.Prompts:
|
|
1905
|
-
default:
|
|
1906
|
-
return {
|
|
1907
|
-
title: ( localize(6490, "No prompts yet")),
|
|
1908
|
-
description: ( localize(6491, "Create reusable prompts for common tasks"))
|
|
1909
|
-
};
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
setSearchQuery(query) {
|
|
1913
|
-
this.searchInput.value = query;
|
|
1914
|
-
}
|
|
1915
|
-
clearSearch() {
|
|
1916
|
-
this.searchInput.value = "";
|
|
1917
|
-
}
|
|
1918
|
-
focusSearch() {
|
|
1919
|
-
this.searchInput.focus();
|
|
1920
|
-
}
|
|
1921
|
-
focusList() {
|
|
1922
|
-
if (this.usesCardLayout()) {
|
|
1923
|
-
if (!this.firstCardFocusElement) {
|
|
1924
|
-
const firstSection = this.cardSectionLists[0];
|
|
1925
|
-
if (firstSection?.items.length) {
|
|
1926
|
-
firstSection.list.setFocus([0]);
|
|
1927
|
-
firstSection.list.domFocus();
|
|
1928
|
-
}
|
|
1929
|
-
} else {
|
|
1930
|
-
this.firstCardFocusElement.focus();
|
|
1931
|
-
}
|
|
1932
|
-
return;
|
|
1933
|
-
}
|
|
1934
|
-
this.list.domFocus();
|
|
1935
|
-
if (this.displayEntries.length > 0) {
|
|
1936
|
-
this.list.setFocus([0]);
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
revealLastItem() {
|
|
1940
|
-
if (this.usesCardLayout()) {
|
|
1941
|
-
const reveal = () => {
|
|
1942
|
-
const section = this.cardSectionLists.at(-1);
|
|
1943
|
-
if (section?.items.length) {
|
|
1944
|
-
section.list.reveal(section.items.length - 1);
|
|
1945
|
-
}
|
|
1946
|
-
this.cardScrollable.scanDomNode();
|
|
1947
|
-
this.cardScrollable.setScrollPosition({
|
|
1948
|
-
scrollTop: this.cardContainer.scrollHeight
|
|
1949
|
-
});
|
|
1950
|
-
};
|
|
1951
|
-
reveal();
|
|
1952
|
-
this.revealLastItemScheduler.value = scheduleAtNextAnimationFrame(getWindow(this.element), reveal);
|
|
1953
|
-
return;
|
|
1954
|
-
}
|
|
1955
|
-
if (this.displayEntries.length > 0) {
|
|
1956
|
-
this.list.reveal(this.displayEntries.length - 1);
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
revealAndSelectFirstItemByUri(uris) {
|
|
1960
|
-
if (this.usesCardLayout()) {
|
|
1961
|
-
for (const section of this.cardSectionLists) {
|
|
1962
|
-
const index = section.items.findIndex(item => ( uris.some(uri => isEqual(item.uri, uri))));
|
|
1963
|
-
if (index >= 0) {
|
|
1964
|
-
section.list.reveal(index);
|
|
1965
|
-
section.list.setFocus([index]);
|
|
1966
|
-
section.list.setSelection([index]);
|
|
1967
|
-
section.list.domFocus();
|
|
1968
|
-
return true;
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
return false;
|
|
1972
|
-
}
|
|
1973
|
-
const entryIndex = this.displayEntries.findIndex(entry => {
|
|
1974
|
-
return entry.type === "file-item" && ( uris.some(uri => isEqual(entry.item.uri, uri)));
|
|
1975
|
-
});
|
|
1976
|
-
if (entryIndex < 0) {
|
|
1977
|
-
return false;
|
|
1978
|
-
}
|
|
1979
|
-
this.list.reveal(entryIndex);
|
|
1980
|
-
this.list.setFocus([entryIndex]);
|
|
1981
|
-
this.list.setSelection([entryIndex]);
|
|
1982
|
-
this.list.domFocus();
|
|
1983
|
-
return true;
|
|
1984
|
-
}
|
|
1985
|
-
layout(height, width) {
|
|
1986
|
-
this.lastLayoutHeight = height;
|
|
1987
|
-
this.lastLayoutWidth = width;
|
|
1988
|
-
if (this.element.parentElement?.style.display === "none") {
|
|
1989
|
-
return;
|
|
1990
|
-
}
|
|
1991
|
-
this.element.classList.toggle("narrow-layout", width < 500);
|
|
1992
|
-
this.element.classList.toggle("wide-layout", width >= 600);
|
|
1993
|
-
this.element.style.height = "";
|
|
1994
|
-
this.searchInput.layout();
|
|
1995
|
-
const searchBarHeight = this.searchAndButtonContainer.offsetHeight;
|
|
1996
|
-
if (searchBarHeight === 0 && !this._layoutDeferred) {
|
|
1997
|
-
this._layoutDeferred = true;
|
|
1998
|
-
getWindow(this.element).requestAnimationFrame(() => {
|
|
1999
|
-
try {
|
|
2000
|
-
this.layout(height, width);
|
|
2001
|
-
} finally {
|
|
2002
|
-
this._layoutDeferred = false;
|
|
2003
|
-
}
|
|
2004
|
-
});
|
|
2005
|
-
return;
|
|
2006
|
-
}
|
|
2007
|
-
const headerHeight = this.sectionTitleHeader.offsetHeight;
|
|
2008
|
-
this.lastHeaderHeight = headerHeight;
|
|
2009
|
-
const availableHeight = this.element.clientHeight || height;
|
|
2010
|
-
const listHeight = Math.max(0, availableHeight - searchBarHeight - headerHeight);
|
|
2011
|
-
this.cardScrollableNode.style.height = `${listHeight}px`;
|
|
2012
|
-
this.listContainer.style.height = `${listHeight}px`;
|
|
2013
|
-
if (this.usesCardLayout()) {
|
|
2014
|
-
this.layoutCardSectionLists();
|
|
2015
|
-
this.cardScrollable.scanDomNode();
|
|
2016
|
-
this.scheduleCardSectionLayout();
|
|
2017
|
-
} else {
|
|
2018
|
-
this.list.layout(listHeight, width);
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
get itemCount() {
|
|
2022
|
-
return this.allItems.length;
|
|
2023
|
-
}
|
|
2024
|
-
async generateDebugReport() {
|
|
2025
|
-
if (this._store.isDisposed) {
|
|
2026
|
-
return "";
|
|
2027
|
-
}
|
|
2028
|
-
return generateCustomizationDebugReport(this.currentSection, this.promptsService, this.workspaceService, {
|
|
2029
|
-
allItems: this.allItems,
|
|
2030
|
-
displayEntries: this.displayEntries
|
|
2031
|
-
}, this.itemsModel.getActiveItemSource(), this.harnessService, this.agentPluginService);
|
|
2032
|
-
}
|
|
2033
|
-
};
|
|
2034
|
-
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));
|
|
2035
|
-
|
|
2036
|
-
export { AICustomizationListWidget, formatDisplayName, getAlwaysVisibleCustomizationGroupKeys, getCollapsedCustomizationGroupKey, getCountAnnouncement, getCustomizationItemAriaLabel, getCustomizationItemStatusLabel, getTargetedCreateActionLabel, usesCustomizationCardLayout };
|