@codingame/monaco-vscode-chat-service-override 28.4.0 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
4
|
import * as agenttitlebarstatuswidget from './media/agenttitlebarstatuswidget.css';
|
|
5
|
-
import { getWindow, isHTMLElement, reset,
|
|
5
|
+
import { getWindow, isHTMLElement, reset, addDisposableListener, EventType, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
7
7
|
import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
8
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
@@ -20,16 +20,11 @@ import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/wo
|
|
|
20
20
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
21
21
|
import { BaseActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
22
22
|
import { SubmenuAction, Separator, toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
23
|
-
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
24
23
|
import { WorkbenchState } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
25
24
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
26
|
-
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
27
25
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
28
26
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
29
|
-
import { Verbosity } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
30
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
31
27
|
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
32
|
-
import { openSession } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener';
|
|
33
28
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
34
29
|
import { MenuId, MenuItemAction, SubmenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
35
30
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
@@ -44,6 +39,7 @@ import { IActionViewItemService } from '@codingame/monaco-vscode-api/vscode/vs/p
|
|
|
44
39
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
45
40
|
import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
46
41
|
import { LayoutSettings } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
42
|
+
import { WindowTitle } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/titlebar/windowTitle';
|
|
47
43
|
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
48
44
|
import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
|
|
49
45
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
@@ -56,10 +52,31 @@ const TOGGLE_CHAT_ACTION_ID = "workbench.action.chat.toggle";
|
|
|
56
52
|
const CHAT_SETUP_ACTION_ID = "workbench.action.chat.triggerSetup";
|
|
57
53
|
const OPEN_CHAT_QUOTA_EXCEEDED_DIALOG = "workbench.action.chat.openQuotaExceededDialog";
|
|
58
54
|
const QUICK_OPEN_ACTION_ID = "workbench.action.quickOpenWithModes";
|
|
55
|
+
const SCM_ACTIVE_REPOSITORY_NAME_CONTEXT_KEY = "scmActiveRepositoryName";
|
|
56
|
+
const SCM_ACTIVE_REPOSITORY_BRANCH_NAME_CONTEXT_KEY = "scmActiveRepositoryBranchName";
|
|
59
57
|
const FILTER_STORAGE_KEY = "agentSessions.filterExcludes.agentsessionsviewerfiltersubmenu";
|
|
60
58
|
const PREVIOUS_FILTER_STORAGE_KEY = "agentSessions.filterExcludes.previousUserFilter";
|
|
61
|
-
|
|
62
|
-
const
|
|
59
|
+
function shouldForceHiddenAgentStatus(configurationService) {
|
|
60
|
+
const aiFeaturesDisabled = configurationService.getValue(ChatConfiguration.AIDisabled) === true;
|
|
61
|
+
const aiCustomizationsDisabled = configurationService.getValue("disableAICustomizations") === true || configurationService.getValue("workbench.disableAICustomizations") === true || configurationService.getValue(ChatConfiguration.ChatCustomizationMenuEnabled) === false;
|
|
62
|
+
return aiFeaturesDisabled && aiCustomizationsDisabled;
|
|
63
|
+
}
|
|
64
|
+
function getAgentStatusSettingMode(configurationService) {
|
|
65
|
+
if (shouldForceHiddenAgentStatus(configurationService)) {
|
|
66
|
+
return "hidden";
|
|
67
|
+
}
|
|
68
|
+
const value = configurationService.getValue(ChatConfiguration.AgentStatusEnabled);
|
|
69
|
+
if (value === false || value === "hidden") {
|
|
70
|
+
return "hidden";
|
|
71
|
+
}
|
|
72
|
+
if (value === "badge") {
|
|
73
|
+
return "badge";
|
|
74
|
+
}
|
|
75
|
+
if (value === true || value === undefined || value === "compact") {
|
|
76
|
+
return "compact";
|
|
77
|
+
}
|
|
78
|
+
return "compact";
|
|
79
|
+
}
|
|
63
80
|
let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActionViewItem {
|
|
64
81
|
constructor(
|
|
65
82
|
action,
|
|
@@ -70,9 +87,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
70
87
|
commandService,
|
|
71
88
|
keybindingService,
|
|
72
89
|
agentSessionsService,
|
|
73
|
-
labelService,
|
|
74
90
|
workspaceContextService,
|
|
75
|
-
environmentService,
|
|
76
91
|
editorGroupsService,
|
|
77
92
|
editorService,
|
|
78
93
|
menuService,
|
|
@@ -90,9 +105,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
90
105
|
this.commandService = commandService;
|
|
91
106
|
this.keybindingService = keybindingService;
|
|
92
107
|
this.agentSessionsService = agentSessionsService;
|
|
93
|
-
this.labelService = labelService;
|
|
94
108
|
this.workspaceContextService = workspaceContextService;
|
|
95
|
-
this.environmentService = environmentService;
|
|
96
109
|
this.editorGroupsService = editorGroupsService;
|
|
97
110
|
this.editorService = editorService;
|
|
98
111
|
this.menuService = menuService;
|
|
@@ -104,6 +117,8 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
104
117
|
this.telemetryService = telemetryService;
|
|
105
118
|
this._dynamicDisposables = this._register(( new DisposableStore()));
|
|
106
119
|
this._isRendering = false;
|
|
120
|
+
this._rovingElements = [];
|
|
121
|
+
this._rovingIndex = 0;
|
|
107
122
|
this._badgeFilterAppliedByThisWindow = null;
|
|
108
123
|
this._commandCenterMenu = this._register(
|
|
109
124
|
this.menuService.createMenu(MenuId.CommandCenterCenter, this.contextKeyService)
|
|
@@ -111,6 +126,14 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
111
126
|
this._chatTitleBarMenu = this._register(
|
|
112
127
|
this.menuService.createMenu(MenuId.ChatTitleBarMenu, this.contextKeyService)
|
|
113
128
|
);
|
|
129
|
+
this._windowTitle = this._register(this.instantiationService.createInstance(WindowTitle, mainWindow));
|
|
130
|
+
this._windowTitle.registerVariables([{
|
|
131
|
+
name: "activeRepositoryName",
|
|
132
|
+
contextKey: SCM_ACTIVE_REPOSITORY_NAME_CONTEXT_KEY
|
|
133
|
+
}, {
|
|
134
|
+
name: "activeRepositoryBranchName",
|
|
135
|
+
contextKey: SCM_ACTIVE_REPOSITORY_BRANCH_NAME_CONTEXT_KEY
|
|
136
|
+
}]);
|
|
114
137
|
this._register(this.agentTitleBarStatusService.onDidChangeMode(() => {
|
|
115
138
|
this._render();
|
|
116
139
|
}));
|
|
@@ -120,6 +143,9 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
120
143
|
this._register(this.agentSessionsService.model.onDidChangeSessions(() => {
|
|
121
144
|
this._render();
|
|
122
145
|
}));
|
|
146
|
+
this._register(this._windowTitle.onDidChange(() => {
|
|
147
|
+
this._render();
|
|
148
|
+
}));
|
|
123
149
|
this._register(this.editorService.onDidActiveEditorChange(() => {
|
|
124
150
|
this._render();
|
|
125
151
|
}));
|
|
@@ -145,7 +171,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
145
171
|
this._render();
|
|
146
172
|
}));
|
|
147
173
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
148
|
-
if (e.affectsConfiguration(ChatConfiguration.
|
|
174
|
+
if (e.affectsConfiguration(ChatConfiguration.AgentStatusEnabled) || e.affectsConfiguration(ChatConfiguration.UnifiedAgentsBar) || e.affectsConfiguration(ChatConfiguration.ChatViewSessionsEnabled) || e.affectsConfiguration(ChatConfiguration.AIDisabled) || e.affectsConfiguration(ChatConfiguration.ChatCustomizationMenuEnabled) || e.affectsConfiguration("disableAICustomizations") || e.affectsConfiguration("workbench.disableAICustomizations")) {
|
|
149
175
|
this._lastRenderState = undefined;
|
|
150
176
|
this._render();
|
|
151
177
|
}
|
|
@@ -170,12 +196,14 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
170
196
|
super.render(container);
|
|
171
197
|
this._container = container;
|
|
172
198
|
container.classList.add("agent-status-container");
|
|
199
|
+
container.setAttribute("role", "toolbar");
|
|
200
|
+
container.setAttribute("aria-label", ( localize(5207, "Agent Status")));
|
|
173
201
|
container.tabIndex = -1;
|
|
174
202
|
this._render();
|
|
175
203
|
}
|
|
176
204
|
setFocusable(_focusable) {}
|
|
177
205
|
focus() {
|
|
178
|
-
this.
|
|
206
|
+
this._rovingElements[this._rovingIndex]?.focus();
|
|
179
207
|
}
|
|
180
208
|
blur() {
|
|
181
209
|
if (!this._container) {
|
|
@@ -211,10 +239,11 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
211
239
|
const label = this._getLabel();
|
|
212
240
|
const {
|
|
213
241
|
isFilteredToUnread,
|
|
214
|
-
isFilteredToInProgress
|
|
242
|
+
isFilteredToInProgress,
|
|
243
|
+
isFilteredToNeedsInput
|
|
215
244
|
} = this._getCurrentFilterState();
|
|
245
|
+
const statusMode = getAgentStatusSettingMode(this.configurationService);
|
|
216
246
|
const unifiedAgentsBarEnabled = this.configurationService.getValue(ChatConfiguration.UnifiedAgentsBar) === true;
|
|
217
|
-
const agentStatusEnabled = this.configurationService.getValue(ChatConfiguration.AgentStatusEnabled) === true;
|
|
218
247
|
const viewSessionsEnabled = this.configurationService.getValue(ChatConfiguration.ChatViewSessionsEnabled) !== false;
|
|
219
248
|
const stateKey = JSON.stringify({
|
|
220
249
|
mode,
|
|
@@ -226,8 +255,9 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
226
255
|
label,
|
|
227
256
|
isFilteredToUnread,
|
|
228
257
|
isFilteredToInProgress,
|
|
258
|
+
isFilteredToNeedsInput,
|
|
259
|
+
statusMode,
|
|
229
260
|
unifiedAgentsBarEnabled,
|
|
230
|
-
agentStatusEnabled,
|
|
231
261
|
viewSessionsEnabled
|
|
232
262
|
});
|
|
233
263
|
if (this._lastRenderState === stateKey) {
|
|
@@ -236,20 +266,70 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
236
266
|
this._lastRenderState = stateKey;
|
|
237
267
|
reset(this._container);
|
|
238
268
|
this._dynamicDisposables.clear();
|
|
239
|
-
this.
|
|
269
|
+
this._rovingElements = [];
|
|
240
270
|
if (this.agentTitleBarStatusService.mode === AgentStatusMode.Session) {
|
|
241
271
|
this._renderSessionMode(this._dynamicDisposables);
|
|
242
272
|
} else if (this.agentTitleBarStatusService.mode === AgentStatusMode.SessionReady) {
|
|
243
273
|
this._renderSessionReadyMode(this._dynamicDisposables);
|
|
244
|
-
} else if (
|
|
274
|
+
} else if (statusMode === "compact") {
|
|
245
275
|
this._renderChatInputMode(this._dynamicDisposables);
|
|
246
|
-
} else if (
|
|
247
|
-
this.
|
|
276
|
+
} else if (statusMode === "badge") {
|
|
277
|
+
this._renderStatusBadge(
|
|
278
|
+
this._dynamicDisposables,
|
|
279
|
+
activeSessions,
|
|
280
|
+
unreadSessions,
|
|
281
|
+
attentionNeededSessions
|
|
282
|
+
);
|
|
248
283
|
}
|
|
284
|
+
this._setupRovingTabIndex(this._dynamicDisposables);
|
|
249
285
|
} finally {
|
|
250
286
|
this._isRendering = false;
|
|
251
287
|
}
|
|
252
288
|
}
|
|
289
|
+
_setupRovingTabIndex(disposables) {
|
|
290
|
+
if (!this._container || this._rovingElements.length === 0) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (this._rovingIndex >= this._rovingElements.length) {
|
|
294
|
+
this._rovingIndex = 0;
|
|
295
|
+
}
|
|
296
|
+
for (let i = 0; i < this._rovingElements.length; i++) {
|
|
297
|
+
this._rovingElements[i].tabIndex = i === this._rovingIndex ? 0 : -1;
|
|
298
|
+
}
|
|
299
|
+
disposables.add(addDisposableListener(this._container, EventType.KEY_DOWN, e => {
|
|
300
|
+
const index = this._rovingElements.findIndex(el => el === e.target || el.contains(e.target));
|
|
301
|
+
if (index === -1) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const nextIndex = this._getNextRovingIndex(index, e.key);
|
|
305
|
+
if (nextIndex !== undefined && nextIndex !== index) {
|
|
306
|
+
e.preventDefault();
|
|
307
|
+
e.stopPropagation();
|
|
308
|
+
this._moveRovingFocus(index, nextIndex);
|
|
309
|
+
}
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
312
|
+
_moveRovingFocus(currentIndex, nextIndex) {
|
|
313
|
+
this._rovingElements[currentIndex].tabIndex = -1;
|
|
314
|
+
this._rovingElements[nextIndex].tabIndex = 0;
|
|
315
|
+
this._rovingElements[nextIndex].focus();
|
|
316
|
+
this._rovingIndex = nextIndex;
|
|
317
|
+
}
|
|
318
|
+
_getNextRovingIndex(currentIndex, key) {
|
|
319
|
+
const len = this._rovingElements.length;
|
|
320
|
+
switch (key) {
|
|
321
|
+
case "ArrowRight":
|
|
322
|
+
return (currentIndex + 1) % len;
|
|
323
|
+
case "ArrowLeft":
|
|
324
|
+
return (currentIndex - 1 + len) % len;
|
|
325
|
+
case "Home":
|
|
326
|
+
return 0;
|
|
327
|
+
case "End":
|
|
328
|
+
return len - 1;
|
|
329
|
+
default:
|
|
330
|
+
return undefined;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
253
333
|
_getSessionStats() {
|
|
254
334
|
const sessions = this.agentSessionsService.model.sessions;
|
|
255
335
|
const currentFilter = this._getStoredFilter();
|
|
@@ -279,16 +359,14 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
279
359
|
attentionNeededSessions,
|
|
280
360
|
hasAttentionNeeded
|
|
281
361
|
} = this._getSessionStats();
|
|
282
|
-
this._renderCommandCenterToolbar(disposables);
|
|
283
362
|
const pill = $("div.agent-status-pill.chat-input-mode");
|
|
284
363
|
if (hasAttentionNeeded) {
|
|
285
364
|
pill.classList.add("needs-attention");
|
|
286
365
|
}
|
|
287
|
-
pill.setAttribute("role", "button");
|
|
288
|
-
pill.setAttribute("aria-label", ( localize(5164, "Open Quick Access")));
|
|
289
|
-
pill.tabIndex = 0;
|
|
290
|
-
this._firstFocusableElement = pill;
|
|
291
366
|
this._container.appendChild(pill);
|
|
367
|
+
this._renderCommandCenterToolbar(disposables, pill);
|
|
368
|
+
const isCompactMode = true;
|
|
369
|
+
pill.classList.toggle("compact-mode", isCompactMode);
|
|
292
370
|
const leftIcon = $("span.agent-status-left-icon");
|
|
293
371
|
if (hasAttentionNeeded) {
|
|
294
372
|
const reportIcon = renderIcon(Codicon.report);
|
|
@@ -299,61 +377,59 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
299
377
|
} else {
|
|
300
378
|
reset(leftIcon, renderIcon(Codicon.searchSparkle));
|
|
301
379
|
}
|
|
302
|
-
|
|
380
|
+
const inputArea = $("div.agent-status-input-area");
|
|
381
|
+
inputArea.setAttribute("role", "button");
|
|
382
|
+
inputArea.setAttribute("aria-label", ( localize(5208, "Open Quick Access")));
|
|
383
|
+
inputArea.tabIndex = 0;
|
|
384
|
+
this._rovingElements.push(inputArea);
|
|
385
|
+
pill.appendChild(inputArea);
|
|
303
386
|
const label = $("span.agent-status-label");
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
progress: progressText
|
|
307
|
-
} = this._getSessionNeedingAttention(attentionNeededSessions);
|
|
308
|
-
this._displayedSession = attentionSession;
|
|
309
|
-
const defaultLabel = progressText ?? this._getLabel();
|
|
310
|
-
if (progressText) {
|
|
311
|
-
label.classList.add("has-progress");
|
|
312
|
-
}
|
|
313
|
-
const hoverLabel = ( localize(5165, "Ask anything or describe what to build"));
|
|
387
|
+
this._getSessionNeedingAttention(attentionNeededSessions);
|
|
388
|
+
const defaultLabel = this._getLabel() ;
|
|
314
389
|
label.textContent = defaultLabel;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
sendIcon.classList.add("hidden");
|
|
319
|
-
pill.appendChild(sendIcon);
|
|
320
|
-
if (!progressText) {
|
|
321
|
-
disposables.add(addDisposableListener(pill, EventType.MOUSE_ENTER, () => {
|
|
390
|
+
inputArea.appendChild(label);
|
|
391
|
+
{
|
|
392
|
+
disposables.add(addDisposableListener(inputArea, EventType.MOUSE_ENTER, () => {
|
|
322
393
|
reset(leftIcon, renderIcon(Codicon.searchSparkle));
|
|
323
394
|
leftIcon.classList.remove("has-attention");
|
|
324
|
-
label.textContent = hoverLabel;
|
|
325
395
|
label.classList.remove("has-progress");
|
|
326
|
-
sendIcon.classList.remove("hidden");
|
|
327
396
|
}));
|
|
328
|
-
disposables.add(addDisposableListener(
|
|
397
|
+
disposables.add(addDisposableListener(inputArea, EventType.MOUSE_LEAVE, () => {
|
|
329
398
|
reset(leftIcon, renderIcon(Codicon.searchSparkle));
|
|
330
|
-
label.textContent = defaultLabel;
|
|
331
|
-
sendIcon.classList.add("hidden");
|
|
332
399
|
}));
|
|
333
400
|
}
|
|
334
401
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
335
|
-
disposables.add(this.hoverService.setupManagedHover(hoverDelegate,
|
|
336
|
-
if (this._displayedSession) {
|
|
337
|
-
return localize(5166, "Open session: {0}", this._displayedSession.label);
|
|
338
|
-
}
|
|
402
|
+
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, inputArea, () => {
|
|
339
403
|
const kbForTooltip = this.keybindingService.lookupKeybinding(UNIFIED_QUICK_ACCESS_ACTION_ID)?.getLabel();
|
|
340
|
-
return kbForTooltip ? ( localize(
|
|
404
|
+
return kbForTooltip ? ( localize(5209, "Open Quick Access ({0})", kbForTooltip)) : ( localize(5210, "Open Quick Access"));
|
|
341
405
|
}));
|
|
342
|
-
disposables.add(addDisposableListener(
|
|
406
|
+
disposables.add(addDisposableListener(inputArea, EventType.CLICK, e => {
|
|
343
407
|
e.preventDefault();
|
|
344
408
|
e.stopPropagation();
|
|
345
|
-
this.
|
|
409
|
+
this.telemetryService.publicLog2("agentStatusWidget.click", {
|
|
410
|
+
source: "pill",
|
|
411
|
+
action: "quickAccess"
|
|
412
|
+
});
|
|
413
|
+
const useUnifiedQuickAccess = this.configurationService.getValue(ChatConfiguration.UnifiedAgentsBar) === true;
|
|
414
|
+
this.commandService.executeCommand(
|
|
415
|
+
useUnifiedQuickAccess ? UNIFIED_QUICK_ACCESS_ACTION_ID : QUICK_OPEN_ACTION_ID
|
|
416
|
+
);
|
|
346
417
|
}));
|
|
347
|
-
disposables.add(addDisposableListener(
|
|
418
|
+
disposables.add(addDisposableListener(inputArea, EventType.KEY_DOWN, e => {
|
|
348
419
|
if (e.key === "Enter" || e.key === " ") {
|
|
349
420
|
e.preventDefault();
|
|
350
421
|
e.stopPropagation();
|
|
351
|
-
this.
|
|
422
|
+
this.telemetryService.publicLog2("agentStatusWidget.click", {
|
|
423
|
+
source: "pill",
|
|
424
|
+
action: "quickAccess"
|
|
425
|
+
});
|
|
426
|
+
const useUnifiedQuickAccess = this.configurationService.getValue(ChatConfiguration.UnifiedAgentsBar) === true;
|
|
427
|
+
this.commandService.executeCommand(
|
|
428
|
+
useUnifiedQuickAccess ? UNIFIED_QUICK_ACCESS_ACTION_ID : QUICK_OPEN_ACTION_ID
|
|
429
|
+
);
|
|
352
430
|
}
|
|
353
431
|
}));
|
|
354
|
-
|
|
355
|
-
this._renderStatusBadge(disposables, activeSessions, unreadSessions, attentionNeededSessions);
|
|
356
|
-
}
|
|
432
|
+
this._renderStatusBadge(disposables, activeSessions, unreadSessions, attentionNeededSessions, pill);
|
|
357
433
|
}
|
|
358
434
|
_renderSessionMode(disposables) {
|
|
359
435
|
if (!this._container) {
|
|
@@ -370,13 +446,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
370
446
|
this._renderSearchButton(disposables, pill);
|
|
371
447
|
const titleLabel = $("span.agent-status-title");
|
|
372
448
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
373
|
-
titleLabel.textContent = sessionInfo?.title ?? ( localize(
|
|
449
|
+
titleLabel.textContent = sessionInfo?.title ?? ( localize(5211, "Agent Session Projection"));
|
|
374
450
|
pill.appendChild(titleLabel);
|
|
375
451
|
this._renderEscapeButton(disposables, pill);
|
|
376
452
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
377
453
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, pill, () => {
|
|
378
454
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
379
|
-
return sessionInfo ? ( localize(
|
|
455
|
+
return sessionInfo ? ( localize(5212, "Agent Session Projection: {0}", sessionInfo.title)) : ( localize(5211, "Agent Session Projection"));
|
|
380
456
|
}));
|
|
381
457
|
const exitHandler = e => {
|
|
382
458
|
e.preventDefault();
|
|
@@ -385,9 +461,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
385
461
|
};
|
|
386
462
|
disposables.add(addDisposableListener(pill, EventType.CLICK, exitHandler));
|
|
387
463
|
disposables.add(addDisposableListener(pill, EventType.MOUSE_DOWN, exitHandler));
|
|
388
|
-
|
|
389
|
-
this._renderStatusBadge(disposables, activeSessions, unreadSessions, attentionNeededSessions);
|
|
390
|
-
}
|
|
464
|
+
this._renderStatusBadge(disposables, activeSessions, unreadSessions, attentionNeededSessions);
|
|
391
465
|
}
|
|
392
466
|
_renderSessionReadyMode(disposables) {
|
|
393
467
|
if (!this._container) {
|
|
@@ -402,13 +476,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
402
476
|
this._container.appendChild(pill);
|
|
403
477
|
const titleLabel = $("span.agent-status-title");
|
|
404
478
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
405
|
-
titleLabel.textContent = sessionInfo?.title ?? ( localize(
|
|
479
|
+
titleLabel.textContent = sessionInfo?.title ?? ( localize(5213, "Review Changes"));
|
|
406
480
|
pill.appendChild(titleLabel);
|
|
407
481
|
this._renderEnterButton(disposables, pill);
|
|
408
482
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
409
483
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, pill, () => {
|
|
410
484
|
const sessionInfo = this.agentTitleBarStatusService.sessionInfo;
|
|
411
|
-
return sessionInfo ? ( localize(
|
|
485
|
+
return sessionInfo ? ( localize(5214, "Review changes from: {0}", sessionInfo.title)) : ( localize(5215, "Review agent session changes"));
|
|
412
486
|
}));
|
|
413
487
|
const enterHandler = e => {
|
|
414
488
|
e.preventDefault();
|
|
@@ -423,23 +497,11 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
423
497
|
};
|
|
424
498
|
disposables.add(addDisposableListener(pill, EventType.CLICK, enterHandler));
|
|
425
499
|
disposables.add(addDisposableListener(pill, EventType.MOUSE_DOWN, enterHandler));
|
|
426
|
-
if (this.configurationService.getValue(ChatConfiguration.AgentStatusEnabled) === true) {
|
|
427
|
-
this._renderStatusBadge(disposables, activeSessions, unreadSessions, attentionNeededSessions);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
_renderBadgeOnlyMode(disposables) {
|
|
431
|
-
if (!this._container) {
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
const {
|
|
435
|
-
activeSessions,
|
|
436
|
-
unreadSessions,
|
|
437
|
-
attentionNeededSessions
|
|
438
|
-
} = this._getSessionStats();
|
|
439
500
|
this._renderStatusBadge(disposables, activeSessions, unreadSessions, attentionNeededSessions);
|
|
440
501
|
}
|
|
441
|
-
_renderCommandCenterToolbar(disposables) {
|
|
442
|
-
|
|
502
|
+
_renderCommandCenterToolbar(disposables, parent) {
|
|
503
|
+
const container = parent ?? this._container;
|
|
504
|
+
if (!container) {
|
|
443
505
|
return;
|
|
444
506
|
}
|
|
445
507
|
const allActions = [];
|
|
@@ -462,7 +524,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
462
524
|
}
|
|
463
525
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
464
526
|
const toolbarContainer = $("div.agent-status-command-center-toolbar");
|
|
465
|
-
|
|
527
|
+
container.appendChild(toolbarContainer);
|
|
466
528
|
const toolbar = this.instantiationService.createInstance(WorkbenchToolBar, toolbarContainer, {
|
|
467
529
|
hiddenItemStrategy: HiddenItemStrategy.NoHide,
|
|
468
530
|
telemetrySource: "agentStatusCommandCenter",
|
|
@@ -475,9 +537,14 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
475
537
|
});
|
|
476
538
|
disposables.add(toolbar);
|
|
477
539
|
toolbar.setActions(allActions);
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
540
|
+
if (parent) {
|
|
541
|
+
const separator = $("span.agent-status-line-separator");
|
|
542
|
+
container.appendChild(separator);
|
|
543
|
+
} else {
|
|
544
|
+
const separator = renderIcon(Codicon.circleSmallFilled);
|
|
545
|
+
separator.classList.add("agent-status-separator");
|
|
546
|
+
container.appendChild(separator);
|
|
547
|
+
}
|
|
481
548
|
}
|
|
482
549
|
_renderSearchButton(disposables, parent) {
|
|
483
550
|
const container = parent ?? this._container;
|
|
@@ -487,15 +554,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
487
554
|
const searchButton = $("span.agent-status-search");
|
|
488
555
|
reset(searchButton, renderIcon(Codicon.searchSparkle));
|
|
489
556
|
searchButton.setAttribute("role", "button");
|
|
490
|
-
searchButton.setAttribute("aria-label", ( localize(
|
|
557
|
+
searchButton.setAttribute("aria-label", ( localize(5216, "Open Quick Open")));
|
|
491
558
|
searchButton.tabIndex = 0;
|
|
492
|
-
|
|
493
|
-
this._firstFocusableElement = searchButton;
|
|
494
|
-
}
|
|
559
|
+
this._rovingElements.push(searchButton);
|
|
495
560
|
container.appendChild(searchButton);
|
|
496
561
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
497
562
|
const searchKb = this.keybindingService.lookupKeybinding(QUICK_OPEN_ACTION_ID)?.getLabel();
|
|
498
|
-
const searchTooltip = searchKb ? ( localize(
|
|
563
|
+
const searchTooltip = searchKb ? ( localize(5217, "Go to File ({0})", searchKb)) : ( localize(5218, "Go to File"));
|
|
499
564
|
disposables.add(
|
|
500
565
|
this.hoverService.setupManagedHover(hoverDelegate, searchButton, searchTooltip)
|
|
501
566
|
);
|
|
@@ -512,22 +577,29 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
512
577
|
}
|
|
513
578
|
}));
|
|
514
579
|
}
|
|
515
|
-
_renderStatusBadge(
|
|
580
|
+
_renderStatusBadge(
|
|
581
|
+
disposables,
|
|
582
|
+
activeSessions,
|
|
583
|
+
unreadSessions,
|
|
584
|
+
attentionNeededSessions,
|
|
585
|
+
inlineContainer
|
|
586
|
+
) {
|
|
516
587
|
if (!this._container) {
|
|
517
588
|
return;
|
|
518
589
|
}
|
|
519
590
|
const hasActiveSessions = activeSessions.length > 0;
|
|
520
591
|
const hasUnreadSessions = unreadSessions.length > 0;
|
|
521
592
|
const hasAttentionNeeded = attentionNeededSessions.length > 0;
|
|
522
|
-
this._clearFilterIfCategoryEmpty(hasUnreadSessions, hasActiveSessions);
|
|
523
|
-
|
|
524
|
-
|
|
593
|
+
this._clearFilterIfCategoryEmpty(hasUnreadSessions, hasActiveSessions, hasAttentionNeeded);
|
|
594
|
+
let badge;
|
|
595
|
+
if (inlineContainer) {
|
|
596
|
+
badge = inlineContainer;
|
|
597
|
+
} else {
|
|
598
|
+
badge = $("div.agent-status-badge");
|
|
599
|
+
this._container.appendChild(badge);
|
|
600
|
+
}
|
|
525
601
|
const sparkleContainer = $("span.agent-status-badge-section.sparkle");
|
|
526
602
|
sparkleContainer.tabIndex = 0;
|
|
527
|
-
if (!this._firstFocusableElement) {
|
|
528
|
-
this._firstFocusableElement = sparkleContainer;
|
|
529
|
-
}
|
|
530
|
-
badge.appendChild(sparkleContainer);
|
|
531
603
|
const menuActions = Separator.join(...( this._chatTitleBarMenu.getActions({
|
|
532
604
|
shouldForwardArgs: true
|
|
533
605
|
}).map(([, actions]) => actions)));
|
|
@@ -537,17 +609,17 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
537
609
|
const anonymous = this.chatEntitlementService.anonymous;
|
|
538
610
|
const free = this.chatEntitlementService.entitlement === ChatEntitlement.Free;
|
|
539
611
|
let primaryActionId = TOGGLE_CHAT_ACTION_ID;
|
|
540
|
-
let primaryActionTitle = ( localize(
|
|
612
|
+
let primaryActionTitle = ( localize(5219, "Toggle Chat"));
|
|
541
613
|
let primaryActionIcon = Codicon.chatSparkle;
|
|
542
614
|
if (chatSentiment.installed && !chatSentiment.disabled) {
|
|
543
615
|
if (signedOut && !anonymous) {
|
|
544
616
|
primaryActionId = CHAT_SETUP_ACTION_ID;
|
|
545
|
-
primaryActionTitle = ( localize(
|
|
617
|
+
primaryActionTitle = ( localize(5220, "Sign in to use AI features..."));
|
|
546
618
|
primaryActionIcon = Codicon.chatSparkleError;
|
|
547
619
|
} else if (chatQuotaExceeded && free) {
|
|
548
620
|
primaryActionId = OPEN_CHAT_QUOTA_EXCEEDED_DIALOG;
|
|
549
621
|
primaryActionTitle = ( localize(
|
|
550
|
-
|
|
622
|
+
5221,
|
|
551
623
|
"GitHub Copilot Free plan chat messages quota reached. Click for details."
|
|
552
624
|
));
|
|
553
625
|
primaryActionIcon = Codicon.chatSparkleWarning;
|
|
@@ -560,7 +632,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
560
632
|
}, undefined, undefined, undefined, undefined);
|
|
561
633
|
const dropdownAction = toAction({
|
|
562
634
|
id: "agentStatus.sparkle.dropdown",
|
|
563
|
-
label: ( localize(
|
|
635
|
+
label: ( localize(5222, "More Actions")),
|
|
564
636
|
run() {}
|
|
565
637
|
});
|
|
566
638
|
const sparkleDropdown = this.instantiationService.createInstance(
|
|
@@ -575,6 +647,20 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
575
647
|
);
|
|
576
648
|
sparkleDropdown.render(sparkleContainer);
|
|
577
649
|
disposables.add(sparkleDropdown);
|
|
650
|
+
disposables.add(addDisposableListener(sparkleContainer, EventType.KEY_DOWN, e => {
|
|
651
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Home" || e.key === "End") {
|
|
652
|
+
const idx = this._rovingElements.indexOf(sparkleContainer);
|
|
653
|
+
if (idx === -1) {
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
const nextIndex = this._getNextRovingIndex(idx, e.key);
|
|
657
|
+
if (nextIndex !== undefined && nextIndex !== idx) {
|
|
658
|
+
e.preventDefault();
|
|
659
|
+
e.stopImmediatePropagation();
|
|
660
|
+
this._moveRovingFocus(idx, nextIndex);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}, true ));
|
|
578
664
|
disposables.add(addDisposableListener(sparkleContainer, EventType.KEY_DOWN, e => {
|
|
579
665
|
if (e.key === "Enter" || e.key === " ") {
|
|
580
666
|
e.preventDefault();
|
|
@@ -588,11 +674,18 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
588
674
|
}));
|
|
589
675
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
590
676
|
const viewSessionsEnabled = this.configurationService.getValue(ChatConfiguration.ChatViewSessionsEnabled) !== false;
|
|
677
|
+
const reverseOrder = !!inlineContainer;
|
|
678
|
+
if (!reverseOrder) {
|
|
679
|
+
badge.appendChild(sparkleContainer);
|
|
680
|
+
}
|
|
681
|
+
let unreadSection;
|
|
682
|
+
let activeSection;
|
|
683
|
+
let needsInputSection;
|
|
591
684
|
if (viewSessionsEnabled && hasUnreadSessions && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY) {
|
|
592
685
|
const {
|
|
593
686
|
isFilteredToUnread
|
|
594
687
|
} = this._getCurrentFilterState();
|
|
595
|
-
|
|
688
|
+
unreadSection = $("span.agent-status-badge-section.unread");
|
|
596
689
|
if (isFilteredToUnread) {
|
|
597
690
|
unreadSection.classList.add("filtered");
|
|
598
691
|
}
|
|
@@ -604,7 +697,6 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
604
697
|
const unreadCount = $("span.agent-status-text");
|
|
605
698
|
unreadCount.textContent = String(unreadSessions.length);
|
|
606
699
|
unreadSection.appendChild(unreadCount);
|
|
607
|
-
badge.appendChild(unreadSection);
|
|
608
700
|
disposables.add(addDisposableListener(unreadSection, EventType.CLICK, e => {
|
|
609
701
|
e.preventDefault();
|
|
610
702
|
e.stopPropagation();
|
|
@@ -617,36 +709,61 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
617
709
|
this._openSessionsWithFilter("unread");
|
|
618
710
|
}
|
|
619
711
|
}));
|
|
620
|
-
const unreadTooltip = unreadSessions.length === 1 ? ( localize(
|
|
712
|
+
const unreadTooltip = unreadSessions.length === 1 ? ( localize(5223, "{0} unread session", unreadSessions.length)) : ( localize(5224, "{0} unread sessions", unreadSessions.length));
|
|
621
713
|
disposables.add(
|
|
622
714
|
this.hoverService.setupManagedHover(hoverDelegate, unreadSection, unreadTooltip)
|
|
623
715
|
);
|
|
624
716
|
}
|
|
625
|
-
if (viewSessionsEnabled &&
|
|
717
|
+
if (viewSessionsEnabled && hasAttentionNeeded) {
|
|
626
718
|
const {
|
|
627
|
-
|
|
719
|
+
isFilteredToNeedsInput
|
|
628
720
|
} = this._getCurrentFilterState();
|
|
629
|
-
|
|
630
|
-
if (
|
|
631
|
-
|
|
721
|
+
needsInputSection = $("span.agent-status-badge-section.active.needs-input");
|
|
722
|
+
if (isFilteredToNeedsInput) {
|
|
723
|
+
needsInputSection.classList.add("filtered");
|
|
632
724
|
}
|
|
725
|
+
needsInputSection.setAttribute("role", "button");
|
|
726
|
+
needsInputSection.tabIndex = 0;
|
|
727
|
+
const needsInputIcon = $("span.agent-status-icon");
|
|
728
|
+
reset(needsInputIcon, renderIcon(Codicon.report));
|
|
729
|
+
needsInputSection.appendChild(needsInputIcon);
|
|
730
|
+
const needsInputCount = $("span.agent-status-text");
|
|
731
|
+
needsInputCount.textContent = String(attentionNeededSessions.length);
|
|
732
|
+
needsInputSection.appendChild(needsInputCount);
|
|
733
|
+
disposables.add(addDisposableListener(needsInputSection, EventType.CLICK, e => {
|
|
734
|
+
e.preventDefault();
|
|
735
|
+
e.stopPropagation();
|
|
736
|
+
this._openSessionsWithFilter("needsInput");
|
|
737
|
+
}));
|
|
738
|
+
disposables.add(addDisposableListener(needsInputSection, EventType.KEY_DOWN, e => {
|
|
739
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
740
|
+
e.preventDefault();
|
|
741
|
+
e.stopPropagation();
|
|
742
|
+
this._openSessionsWithFilter("needsInput");
|
|
743
|
+
}
|
|
744
|
+
}));
|
|
745
|
+
const needsInputTooltip = attentionNeededSessions.length === 1 ? ( localize(5225, "{0} session needs input", attentionNeededSessions.length)) : ( localize(5226, "{0} sessions need input", attentionNeededSessions.length));
|
|
746
|
+
disposables.add(
|
|
747
|
+
this.hoverService.setupManagedHover(hoverDelegate, needsInputSection, needsInputTooltip)
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
const inProgressOnly = activeSessions.filter(s => s.status !== ChatSessionStatus.NeedsInput);
|
|
751
|
+
if (viewSessionsEnabled && inProgressOnly.length > 0) {
|
|
752
|
+
const {
|
|
753
|
+
isFilteredToInProgress
|
|
754
|
+
} = this._getCurrentFilterState();
|
|
755
|
+
activeSection = $("span.agent-status-badge-section.active");
|
|
633
756
|
if (isFilteredToInProgress) {
|
|
634
757
|
activeSection.classList.add("filtered");
|
|
635
758
|
}
|
|
636
759
|
activeSection.setAttribute("role", "button");
|
|
637
760
|
activeSection.tabIndex = 0;
|
|
638
761
|
const statusIcon = $("span.agent-status-icon");
|
|
639
|
-
reset(
|
|
640
|
-
statusIcon,
|
|
641
|
-
renderIcon(hasAttentionNeeded ? Codicon.report : Codicon.sessionInProgress)
|
|
642
|
-
);
|
|
762
|
+
reset(statusIcon, renderIcon(Codicon.sessionInProgress));
|
|
643
763
|
activeSection.appendChild(statusIcon);
|
|
644
764
|
const statusCount = $("span.agent-status-text");
|
|
645
|
-
statusCount.textContent = String(
|
|
646
|
-
hasAttentionNeeded ? attentionNeededSessions.length : activeSessions.length
|
|
647
|
-
);
|
|
765
|
+
statusCount.textContent = String(inProgressOnly.length);
|
|
648
766
|
activeSection.appendChild(statusCount);
|
|
649
|
-
badge.appendChild(activeSection);
|
|
650
767
|
disposables.add(addDisposableListener(activeSection, EventType.CLICK, e => {
|
|
651
768
|
e.preventDefault();
|
|
652
769
|
e.stopPropagation();
|
|
@@ -659,17 +776,49 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
659
776
|
this._openSessionsWithFilter("inProgress");
|
|
660
777
|
}
|
|
661
778
|
}));
|
|
662
|
-
const activeTooltip =
|
|
779
|
+
const activeTooltip = inProgressOnly.length === 1 ? ( localize(5227, "{0} session in progress", inProgressOnly.length)) : ( localize(5228, "{0} sessions in progress", inProgressOnly.length));
|
|
663
780
|
disposables.add(
|
|
664
781
|
this.hoverService.setupManagedHover(hoverDelegate, activeSection, activeTooltip)
|
|
665
782
|
);
|
|
666
783
|
}
|
|
784
|
+
if (reverseOrder) {
|
|
785
|
+
if (needsInputSection) {
|
|
786
|
+
badge.appendChild(needsInputSection);
|
|
787
|
+
this._rovingElements.push(needsInputSection);
|
|
788
|
+
}
|
|
789
|
+
if (activeSection) {
|
|
790
|
+
badge.appendChild(activeSection);
|
|
791
|
+
this._rovingElements.push(activeSection);
|
|
792
|
+
}
|
|
793
|
+
if (unreadSection) {
|
|
794
|
+
badge.appendChild(unreadSection);
|
|
795
|
+
this._rovingElements.push(unreadSection);
|
|
796
|
+
}
|
|
797
|
+
badge.appendChild(sparkleContainer);
|
|
798
|
+
this._rovingElements.push(sparkleContainer);
|
|
799
|
+
} else {
|
|
800
|
+
this._rovingElements.push(sparkleContainer);
|
|
801
|
+
if (unreadSection) {
|
|
802
|
+
badge.appendChild(unreadSection);
|
|
803
|
+
this._rovingElements.push(unreadSection);
|
|
804
|
+
}
|
|
805
|
+
if (activeSection) {
|
|
806
|
+
badge.appendChild(activeSection);
|
|
807
|
+
this._rovingElements.push(activeSection);
|
|
808
|
+
}
|
|
809
|
+
if (needsInputSection) {
|
|
810
|
+
badge.appendChild(needsInputSection);
|
|
811
|
+
this._rovingElements.push(needsInputSection);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
667
814
|
}
|
|
668
|
-
_clearFilterIfCategoryEmpty(hasUnreadSessions, hasActiveSessions) {
|
|
815
|
+
_clearFilterIfCategoryEmpty(hasUnreadSessions, hasActiveSessions, hasAttentionNeeded) {
|
|
669
816
|
if (this._badgeFilterAppliedByThisWindow === "unread" && !hasUnreadSessions) {
|
|
670
817
|
this._restoreUserFilter();
|
|
671
818
|
} else if (this._badgeFilterAppliedByThisWindow === "inProgress" && !hasActiveSessions) {
|
|
672
819
|
this._restoreUserFilter();
|
|
820
|
+
} else if (this._badgeFilterAppliedByThisWindow === "needsInput" && !hasAttentionNeeded) {
|
|
821
|
+
this._restoreUserFilter();
|
|
673
822
|
}
|
|
674
823
|
}
|
|
675
824
|
_getCurrentFilterState() {
|
|
@@ -677,14 +826,17 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
677
826
|
if (!filter) {
|
|
678
827
|
return {
|
|
679
828
|
isFilteredToUnread: false,
|
|
680
|
-
isFilteredToInProgress: false
|
|
829
|
+
isFilteredToInProgress: false,
|
|
830
|
+
isFilteredToNeedsInput: false
|
|
681
831
|
};
|
|
682
832
|
}
|
|
683
833
|
const isFilteredToUnread = filter.read === true && filter.states.length === 0;
|
|
684
|
-
const isFilteredToInProgress = filter.states?.length ===
|
|
834
|
+
const isFilteredToInProgress = filter.states?.length === 3 && filter.states.includes(ChatSessionStatus.NeedsInput) && filter.read === false;
|
|
835
|
+
const isFilteredToNeedsInput = filter.states?.length === 3 && filter.states.includes(ChatSessionStatus.InProgress) && filter.read === false;
|
|
685
836
|
return {
|
|
686
837
|
isFilteredToUnread,
|
|
687
|
-
isFilteredToInProgress
|
|
838
|
+
isFilteredToInProgress,
|
|
839
|
+
isFilteredToNeedsInput
|
|
688
840
|
};
|
|
689
841
|
}
|
|
690
842
|
_getStoredFilter() {
|
|
@@ -717,9 +869,10 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
717
869
|
_saveUserFilter() {
|
|
718
870
|
const {
|
|
719
871
|
isFilteredToUnread,
|
|
720
|
-
isFilteredToInProgress
|
|
872
|
+
isFilteredToInProgress,
|
|
873
|
+
isFilteredToNeedsInput
|
|
721
874
|
} = this._getCurrentFilterState();
|
|
722
|
-
if (isFilteredToUnread || isFilteredToInProgress) {
|
|
875
|
+
if (isFilteredToUnread || isFilteredToInProgress || isFilteredToNeedsInput) {
|
|
723
876
|
return;
|
|
724
877
|
}
|
|
725
878
|
const currentFilter = this._getStoredFilter();
|
|
@@ -750,41 +903,51 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
750
903
|
_openSessionsWithFilter(filterType) {
|
|
751
904
|
const {
|
|
752
905
|
isFilteredToUnread,
|
|
753
|
-
isFilteredToInProgress
|
|
906
|
+
isFilteredToInProgress,
|
|
907
|
+
isFilteredToNeedsInput
|
|
754
908
|
} = this._getCurrentFilterState();
|
|
755
909
|
const currentFilter = this._getStoredFilter();
|
|
756
910
|
const preservedProviders = currentFilter?.providers ?? [];
|
|
757
|
-
const isToggleOff = (filterType === "unread" && isFilteredToUnread) || (filterType === "inProgress" && isFilteredToInProgress);
|
|
911
|
+
const isToggleOff = (filterType === "unread" && isFilteredToUnread) || (filterType === "inProgress" && isFilteredToInProgress) || (filterType === "needsInput" && isFilteredToNeedsInput);
|
|
758
912
|
this.telemetryService.publicLog2("agentStatusWidget.click", {
|
|
759
913
|
source: filterType,
|
|
760
914
|
action: isToggleOff ? "clearFilter" : "applyFilter"
|
|
761
915
|
});
|
|
762
|
-
if (
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
916
|
+
if (isToggleOff) {
|
|
917
|
+
this._restoreUserFilter();
|
|
918
|
+
} else {
|
|
919
|
+
this._saveUserFilter();
|
|
920
|
+
if (filterType === "unread") {
|
|
767
921
|
this._storeFilter({
|
|
768
922
|
providers: preservedProviders,
|
|
769
923
|
states: [],
|
|
770
924
|
archived: true,
|
|
771
925
|
read: true
|
|
772
926
|
});
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
927
|
+
} else if (filterType === "inProgress") {
|
|
928
|
+
this._storeFilter({
|
|
929
|
+
providers: preservedProviders,
|
|
930
|
+
states: [
|
|
931
|
+
ChatSessionStatus.Completed,
|
|
932
|
+
ChatSessionStatus.Failed,
|
|
933
|
+
ChatSessionStatus.NeedsInput
|
|
934
|
+
],
|
|
935
|
+
archived: true,
|
|
936
|
+
read: false
|
|
937
|
+
});
|
|
778
938
|
} else {
|
|
779
|
-
this._saveUserFilter();
|
|
780
939
|
this._storeFilter({
|
|
781
940
|
providers: preservedProviders,
|
|
782
|
-
states: [
|
|
941
|
+
states: [
|
|
942
|
+
ChatSessionStatus.Completed,
|
|
943
|
+
ChatSessionStatus.Failed,
|
|
944
|
+
ChatSessionStatus.InProgress
|
|
945
|
+
],
|
|
783
946
|
archived: true,
|
|
784
947
|
read: false
|
|
785
948
|
});
|
|
786
|
-
this._badgeFilterAppliedByThisWindow = "inProgress";
|
|
787
949
|
}
|
|
950
|
+
this._badgeFilterAppliedByThisWindow = filterType;
|
|
788
951
|
}
|
|
789
952
|
this.commandService.executeCommand(FocusAgentSessionsAction.id);
|
|
790
953
|
}
|
|
@@ -792,12 +955,13 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
792
955
|
const escButton = $("span.agent-status-esc-button");
|
|
793
956
|
escButton.textContent = "Esc";
|
|
794
957
|
escButton.setAttribute("role", "button");
|
|
795
|
-
escButton.setAttribute("aria-label", ( localize(
|
|
958
|
+
escButton.setAttribute("aria-label", ( localize(5229, "Exit Agent Session Projection")));
|
|
796
959
|
escButton.tabIndex = 0;
|
|
960
|
+
this._rovingElements.push(escButton);
|
|
797
961
|
parent.appendChild(escButton);
|
|
798
962
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
799
963
|
disposables.add(
|
|
800
|
-
this.hoverService.setupManagedHover(hoverDelegate, escButton, ( localize(
|
|
964
|
+
this.hoverService.setupManagedHover(hoverDelegate, escButton, ( localize(5230, "Exit Agent Session Projection (Escape)")))
|
|
801
965
|
);
|
|
802
966
|
disposables.add(addDisposableListener(escButton, EventType.MOUSE_DOWN, e => {
|
|
803
967
|
e.preventDefault();
|
|
@@ -820,16 +984,14 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
820
984
|
_renderEnterButton(disposables, parent) {
|
|
821
985
|
const enterButton = $("span.agent-status-enter-button");
|
|
822
986
|
const keybinding = this.keybindingService.lookupKeybinding(EnterAgentSessionProjectionAction.ID);
|
|
823
|
-
enterButton.textContent = keybinding?.getLabel() ?? ( localize(
|
|
987
|
+
enterButton.textContent = keybinding?.getLabel() ?? ( localize(5231, "Review"));
|
|
824
988
|
enterButton.setAttribute("role", "button");
|
|
825
|
-
enterButton.setAttribute("aria-label", ( localize(
|
|
989
|
+
enterButton.setAttribute("aria-label", ( localize(5232, "Enter Agent Session Projection")));
|
|
826
990
|
enterButton.tabIndex = 0;
|
|
827
|
-
|
|
828
|
-
this._firstFocusableElement = enterButton;
|
|
829
|
-
}
|
|
991
|
+
this._rovingElements.push(enterButton);
|
|
830
992
|
parent.appendChild(enterButton);
|
|
831
993
|
const hoverDelegate = getDefaultHoverDelegate("mouse");
|
|
832
|
-
const hoverText = keybinding ? ( localize(
|
|
994
|
+
const hoverText = keybinding ? ( localize(5233, "Review Changes ({0})", keybinding.getLabel())) : ( localize(5234, "Review Changes"));
|
|
833
995
|
disposables.add(this.hoverService.setupManagedHover(hoverDelegate, enterButton, hoverText));
|
|
834
996
|
const enterProjection = e => {
|
|
835
997
|
e.preventDefault();
|
|
@@ -850,21 +1012,6 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
850
1012
|
}
|
|
851
1013
|
}));
|
|
852
1014
|
}
|
|
853
|
-
_handlePillClick() {
|
|
854
|
-
if (this._displayedSession) {
|
|
855
|
-
this.telemetryService.publicLog2("agentStatusWidget.click", {
|
|
856
|
-
source: "pill",
|
|
857
|
-
action: "openSession"
|
|
858
|
-
});
|
|
859
|
-
this.instantiationService.invokeFunction(openSession, this._displayedSession);
|
|
860
|
-
} else {
|
|
861
|
-
this.telemetryService.publicLog2("agentStatusWidget.click", {
|
|
862
|
-
source: "pill",
|
|
863
|
-
action: "quickAccess"
|
|
864
|
-
});
|
|
865
|
-
this.commandService.executeCommand(UNIFIED_QUICK_ACCESS_ACTION_ID);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
1015
|
_getSessionNeedingAttention(attentionNeededSessions) {
|
|
869
1016
|
if (attentionNeededSessions.length === 0) {
|
|
870
1017
|
return {
|
|
@@ -894,47 +1041,36 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
|
|
|
894
1041
|
const {
|
|
895
1042
|
prefix,
|
|
896
1043
|
suffix
|
|
897
|
-
} = this.
|
|
898
|
-
let label = this.
|
|
899
|
-
if (this.
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
label = `${dirty}${activeEditor.getTitle(Verbosity.SHORT)}`;
|
|
904
|
-
}
|
|
1044
|
+
} = this._windowTitle.getTitleDecorations();
|
|
1045
|
+
let label = this._windowTitle.workspaceName;
|
|
1046
|
+
if (this._windowTitle.isCustomTitleFormat()) {
|
|
1047
|
+
label = this._windowTitle.getWindowTitle();
|
|
1048
|
+
} else if (!label && this.editorGroupsService.partOptions.showTabs === "none") {
|
|
1049
|
+
label = this._windowTitle.fileName ?? "";
|
|
905
1050
|
}
|
|
906
1051
|
if (!label) {
|
|
907
|
-
label = ( localize(
|
|
1052
|
+
label = ( localize(5235, "Search"));
|
|
908
1053
|
}
|
|
909
1054
|
if (prefix) {
|
|
910
|
-
label = ( localize(
|
|
1055
|
+
label = ( localize(5236, "{0} {1}", prefix, label));
|
|
911
1056
|
}
|
|
912
1057
|
if (suffix) {
|
|
913
|
-
label = ( localize(
|
|
1058
|
+
label = ( localize(5237, "{0} {1}", label, suffix));
|
|
914
1059
|
}
|
|
915
1060
|
return label.replaceAll(/\r\n|\r|\n/g, "⏎");
|
|
916
1061
|
}
|
|
917
|
-
_getTitleDecorations() {
|
|
918
|
-
let prefix;
|
|
919
|
-
const suffix = undefined;
|
|
920
|
-
if (this.environmentService.remoteAuthority) {
|
|
921
|
-
prefix = this.labelService.getHostLabel(Schemas.vscodeRemote, this.environmentService.remoteAuthority);
|
|
922
|
-
}
|
|
923
|
-
if (this.environmentService.isExtensionDevelopment) {
|
|
924
|
-
prefix = !prefix ? NLS_EXTENSION_HOST : `${NLS_EXTENSION_HOST} - ${prefix}`;
|
|
925
|
-
}
|
|
926
|
-
return {
|
|
927
|
-
prefix,
|
|
928
|
-
suffix
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
1062
|
};
|
|
932
|
-
AgentTitleBarStatusWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IAgentTitleBarStatusService)), ( __param(4, IHoverService)), ( __param(5, ICommandService)), ( __param(6, IKeybindingService)), ( __param(7, IAgentSessionsService)), ( __param(8,
|
|
1063
|
+
AgentTitleBarStatusWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IAgentTitleBarStatusService)), ( __param(4, IHoverService)), ( __param(5, ICommandService)), ( __param(6, IKeybindingService)), ( __param(7, IAgentSessionsService)), ( __param(8, IWorkspaceContextService)), ( __param(9, IEditorGroupsService)), ( __param(10, IEditorService)), ( __param(11, IMenuService)), ( __param(12, IContextKeyService)), ( __param(13, IStorageService)), ( __param(14, IConfigurationService)), ( __param(15, IChatEntitlementService)), ( __param(16, IChatWidgetService)), ( __param(17, ITelemetryService))], AgentTitleBarStatusWidget));
|
|
933
1064
|
let AgentTitleBarStatusRendering = class AgentTitleBarStatusRendering extends Disposable {
|
|
934
1065
|
static {
|
|
935
1066
|
this.ID = "workbench.contrib.agentStatus.rendering";
|
|
936
1067
|
}
|
|
937
|
-
constructor(
|
|
1068
|
+
constructor(
|
|
1069
|
+
actionViewItemService,
|
|
1070
|
+
instantiationService,
|
|
1071
|
+
configurationService,
|
|
1072
|
+
contextKeyService
|
|
1073
|
+
) {
|
|
938
1074
|
super();
|
|
939
1075
|
this._register(actionViewItemService.register(
|
|
940
1076
|
MenuId.CommandCenter,
|
|
@@ -947,21 +1083,30 @@ let AgentTitleBarStatusRendering = class AgentTitleBarStatusRendering extends Di
|
|
|
947
1083
|
},
|
|
948
1084
|
undefined
|
|
949
1085
|
));
|
|
1086
|
+
const chatEnabledKey = contextKeyService.getContextKeyValue("chatIsEnabled");
|
|
1087
|
+
let chatEnabled = !!chatEnabledKey;
|
|
950
1088
|
const updateClass = () => {
|
|
951
1089
|
const commandCenterEnabled = configurationService.getValue(LayoutSettings.COMMAND_CENTER) === true;
|
|
952
|
-
const
|
|
953
|
-
const
|
|
1090
|
+
const statusMode = getAgentStatusSettingMode(configurationService);
|
|
1091
|
+
const enabled = commandCenterEnabled && chatEnabled && statusMode !== "hidden";
|
|
1092
|
+
const enhanced = enabled && statusMode === "compact";
|
|
954
1093
|
mainWindow.document.body.classList.toggle("agent-status-enabled", enabled);
|
|
955
1094
|
mainWindow.document.body.classList.toggle("unified-agents-bar", enhanced);
|
|
956
1095
|
};
|
|
957
1096
|
updateClass();
|
|
958
1097
|
this._register(configurationService.onDidChangeConfiguration(e => {
|
|
959
|
-
if (e.affectsConfiguration(ChatConfiguration.AgentStatusEnabled) || e.affectsConfiguration(ChatConfiguration.
|
|
1098
|
+
if (e.affectsConfiguration(ChatConfiguration.AgentStatusEnabled) || e.affectsConfiguration(LayoutSettings.COMMAND_CENTER) || e.affectsConfiguration(ChatConfiguration.AIDisabled) || e.affectsConfiguration(ChatConfiguration.ChatCustomizationMenuEnabled) || e.affectsConfiguration("disableAICustomizations") || e.affectsConfiguration("workbench.disableAICustomizations")) {
|
|
1099
|
+
updateClass();
|
|
1100
|
+
}
|
|
1101
|
+
}));
|
|
1102
|
+
this._register(contextKeyService.onDidChangeContext(e => {
|
|
1103
|
+
if (e.affectsSome(( new Set(["chatIsEnabled"])))) {
|
|
1104
|
+
chatEnabled = !!contextKeyService.getContextKeyValue("chatIsEnabled");
|
|
960
1105
|
updateClass();
|
|
961
1106
|
}
|
|
962
1107
|
}));
|
|
963
1108
|
}
|
|
964
1109
|
};
|
|
965
|
-
AgentTitleBarStatusRendering = ( __decorate([( __param(0, IActionViewItemService)), ( __param(1, IInstantiationService)), ( __param(2, IConfigurationService))], AgentTitleBarStatusRendering));
|
|
1110
|
+
AgentTitleBarStatusRendering = ( __decorate([( __param(0, IActionViewItemService)), ( __param(1, IInstantiationService)), ( __param(2, IConfigurationService)), ( __param(3, IContextKeyService))], AgentTitleBarStatusRendering));
|
|
966
1111
|
|
|
967
1112
|
export { AgentTitleBarStatusRendering, AgentTitleBarStatusWidget };
|