@codingame/monaco-vscode-chat-service-override 34.1.3 → 35.0.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/index.js +38 -0
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +40 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +27 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +91 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +20 -4
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +148 -15
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +9 -1
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +57 -3
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +10 -14
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +29 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +109 -2
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +207 -21
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +362 -37
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +698 -91
- package/vscode/src/vs/platform/agentHost/common/agentService.js +46 -3
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +1 -0
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.js +26 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +17 -17
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +96 -12
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +226 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.d.ts +18 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +89 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +10 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +400 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +129 -446
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +35 -25
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +7 -1
- package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.d.ts +4 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +1 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +0 -6
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +5 -18
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +52 -3
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +212 -34
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +3 -4
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +11 -10
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +13 -6
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +6 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +399 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +85 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +177 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +898 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +204 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +338 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +57 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +98 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +149 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +116 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +226 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +138 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +25 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +108 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +63 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +322 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +15 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.js +26 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +132 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +237 -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 +32 -16
- 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 +71 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +19 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +14 -5
- 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 +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +66 -52
- 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 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +128 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +58 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +15 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +64 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +45 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +25 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +143 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +7 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +163 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +26 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +106 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +44 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
- 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/localAgentDisabledInputTipContribution.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +11 -5
- 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 +9 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +107 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +46 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +19 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +244 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +47 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +772 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +24 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +421 -201
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +1424 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +107 -127
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +331 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +898 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +581 -336
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +567 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +168 -84
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +183 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +897 -251
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.d.ts +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +720 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +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 +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +354 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
- 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 +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +55 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +192 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +37 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +40 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +230 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +35 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +26 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +56 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +109 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +38 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +175 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +32 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +183 -84
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +20 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- 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/promptToolSetsCodeLensProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +40 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +169 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +399 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +321 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +2117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +367 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +16 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +68 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +11 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- 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.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +320 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +80 -4
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +226 -88
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -18
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +78 -136
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +1 -17
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +16 -5
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +24 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +113 -10
- 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 +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +227 -152
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +98 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +7 -6
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +11 -12
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +7 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +32 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +37 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +71 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +29 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +7 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -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 +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +10 -8
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +26 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +416 -252
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +25 -8
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +8 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +0 -82
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -47
- /package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.js +0 -0
|
@@ -0,0 +1,898 @@
|
|
|
1
|
+
|
|
2
|
+
import { $, addDisposableListener, getWindow, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
4
|
+
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { AGENTS_VOICE_WINDOW_DEFAULT_WIDTH, AGENTS_VOICE_WINDOW_DEFAULT_HEIGHT } from '../common/agentsVoice.js';
|
|
7
|
+
import { createHeader } from './components/headerComponent.js';
|
|
8
|
+
import { createStatusRows } from './components/statusRowsComponent.js';
|
|
9
|
+
import { createTranscript } from './components/transcriptComponent.js';
|
|
10
|
+
import { createSessionList } from './components/sessionListComponent.js';
|
|
11
|
+
import { createFeedbackDialog } from './components/feedbackDialog.js';
|
|
12
|
+
import { createOnboarding } from './components/onboardingComponent.js';
|
|
13
|
+
import { createVoiceBar } from './components/voiceBarComponent.js';
|
|
14
|
+
import { FONT_SIZE, addKeyboardActivation } from './components/tokens.js';
|
|
15
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
16
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
17
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
18
|
+
|
|
19
|
+
const DEFAULT_OPTIONS = {
|
|
20
|
+
width: AGENTS_VOICE_WINDOW_DEFAULT_WIDTH,
|
|
21
|
+
draggable: true,
|
|
22
|
+
showClose: true,
|
|
23
|
+
showExpandChevron: true,
|
|
24
|
+
showStatusText: false,
|
|
25
|
+
showStatusCounters: true,
|
|
26
|
+
showCopilotIcon: false,
|
|
27
|
+
centerConnectButton: false,
|
|
28
|
+
title: "",
|
|
29
|
+
subtitle: "",
|
|
30
|
+
focusable: false,
|
|
31
|
+
showOnboarding: false,
|
|
32
|
+
reshowOnboardingOnDisconnect: false,
|
|
33
|
+
defaultExpanded: false,
|
|
34
|
+
inputBoxLayout: false
|
|
35
|
+
};
|
|
36
|
+
class AgentsVoiceWidget extends Disposable {
|
|
37
|
+
constructor(container, callbacks, options = {}) {
|
|
38
|
+
super();
|
|
39
|
+
this.container = container;
|
|
40
|
+
this.callbacks = callbacks;
|
|
41
|
+
this._isConnected = observableValue(this, false);
|
|
42
|
+
this._isConnecting = observableValue(this, false);
|
|
43
|
+
this._isReconnecting = observableValue(this, false);
|
|
44
|
+
this._voiceState = observableValue(this, "idle");
|
|
45
|
+
this._expanded = observableValue(this, false);
|
|
46
|
+
this._workingCount = observableValue(this, 0);
|
|
47
|
+
this._needsInputCount = observableValue(this, 0);
|
|
48
|
+
this._doneCount = observableValue(this, 0);
|
|
49
|
+
this._pendingToolConfirmations = observableValue(this, []);
|
|
50
|
+
this._speakingSession = observableValue(this, undefined);
|
|
51
|
+
this._speakingSessionLabel = observableValue(this, undefined);
|
|
52
|
+
this._sessions = observableValue(this, []);
|
|
53
|
+
this._sessionGroups = observableValue(this, undefined);
|
|
54
|
+
this._selectedTargetSession = observableValue(this, undefined);
|
|
55
|
+
this._transcriptTurns = observableValue(this, []);
|
|
56
|
+
this._pttKeyLabel = observableValue(this, undefined);
|
|
57
|
+
this._statusText = observableValue(this, "");
|
|
58
|
+
this._popoutAvailable = observableValue(this, true);
|
|
59
|
+
this._feedbackDialogState = observableValue(this, null);
|
|
60
|
+
this._showOnboarding = observableValue(this, false);
|
|
61
|
+
this._onboardingPendingConnect = observableValue(this, false);
|
|
62
|
+
this._shouldShowExpanded = derived(this, reader => this._expanded.read(reader));
|
|
63
|
+
this._headerComponent = createHeader();
|
|
64
|
+
this._onboardingComponent = createOnboarding();
|
|
65
|
+
this._feedbackDialogComponent = createFeedbackDialog();
|
|
66
|
+
this._voiceBarComponent = createVoiceBar();
|
|
67
|
+
this._transcriptComponent = this._register(createTranscript());
|
|
68
|
+
this._inputBoxTranscriptComponent = this._register(createTranscript());
|
|
69
|
+
this._statusRowsComponent = createStatusRows();
|
|
70
|
+
this._sessionListComponent = createSessionList();
|
|
71
|
+
this._options = {
|
|
72
|
+
...DEFAULT_OPTIONS,
|
|
73
|
+
...options
|
|
74
|
+
};
|
|
75
|
+
this._showOnboarding.set(this._options.showOnboarding, undefined);
|
|
76
|
+
this._expanded.set(this._options.defaultExpanded, undefined);
|
|
77
|
+
const opts = this._options;
|
|
78
|
+
const widthStyle = opts.width === "auto" ? "width:100%;position:relative;" : `position:absolute;top:0;left:0;width:${opts.width}px;${opts.inputBoxLayout ? "" : `min-height:${AGENTS_VOICE_WINDOW_DEFAULT_HEIGHT}px;`}`;
|
|
79
|
+
this._rootDiv = $("div");
|
|
80
|
+
this._rootDiv.style.cssText = `${widthStyle}display:flex;flex-direction:column;user-select:none;font-family:inherit;font-size:${FONT_SIZE.base};color:var(--vscode-foreground);box-sizing:border-box;margin:0;${opts.inputBoxLayout && opts.draggable ? "-webkit-app-region:drag;" : ""}`;
|
|
81
|
+
this._glowDiv = $("div");
|
|
82
|
+
this._glowDiv.style.cssText = "position:absolute;top:0;left:0;right:0;height:50px;pointer-events:none;z-index:0;";
|
|
83
|
+
this._titleRow = $("div");
|
|
84
|
+
this._titleRow.style.cssText = "display:flex;align-items:baseline;gap:6px;padding:8px 14px 0;overflow:hidden;white-space:nowrap;position:relative;z-index:1;";
|
|
85
|
+
if (opts.title) {
|
|
86
|
+
const titleSpan = $("span");
|
|
87
|
+
titleSpan.style.cssText = `font-size:${FONT_SIZE.micro};font-weight:700;color:var(--vscode-sideBarSectionHeader-foreground, var(--vscode-foreground));text-transform:uppercase;letter-spacing:0.5px;flex-shrink:0;user-select:none;`;
|
|
88
|
+
titleSpan.textContent = opts.title;
|
|
89
|
+
this._titleRow.append(titleSpan);
|
|
90
|
+
if (opts.subtitle) {
|
|
91
|
+
const subtitleSpan = $("span");
|
|
92
|
+
subtitleSpan.style.cssText = `font-size:${FONT_SIZE.micro};font-weight:400;color:var(--vscode-descriptionForeground);overflow:hidden;text-overflow:ellipsis;`;
|
|
93
|
+
subtitleSpan.textContent = opts.subtitle;
|
|
94
|
+
this._titleRow.append(subtitleSpan);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
this._contentDiv = $("div");
|
|
98
|
+
this._contentDiv.style.cssText = "display:flex;flex-direction:column;flex:1;padding:8px 14px 2px;position:relative;z-index:1;";
|
|
99
|
+
this._statusTextDiv = $("div");
|
|
100
|
+
this._statusTextDiv.style.cssText = `text-align:center;font-size:${FONT_SIZE.body};font-weight:500;color:var(--vscode-foreground);padding:2px 0;`;
|
|
101
|
+
this._sessionListWrapper = $("div");
|
|
102
|
+
this._sessionListWrapper.style.cssText = "display:flex;flex-direction:column;-webkit-app-region:no-drag;overflow:hidden;";
|
|
103
|
+
this._sessionListWrapper.append(this._sessionListComponent.element);
|
|
104
|
+
this._expandSpacer = $("div");
|
|
105
|
+
this._expandSpacer.style.cssText = "flex:1;";
|
|
106
|
+
this._chevronWrapper = $("div");
|
|
107
|
+
this._chevronWrapper.role = "button";
|
|
108
|
+
this._chevronWrapper.tabIndex = 0;
|
|
109
|
+
this._chevronWrapper.style.cssText = "display:flex;justify-content:center;cursor:pointer;-webkit-app-region:no-drag;";
|
|
110
|
+
this._chevronIcon = $("span.codicon");
|
|
111
|
+
this._chevronIcon.style.cssText = `font-size:${FONT_SIZE.iconSm};color:var(--vscode-descriptionForeground);`;
|
|
112
|
+
this._register(addDisposableListener(this._chevronIcon, "mouseenter", () => {
|
|
113
|
+
this._chevronIcon.style.color = "var(--vscode-foreground)";
|
|
114
|
+
}));
|
|
115
|
+
this._register(addDisposableListener(this._chevronIcon, "mouseleave", () => {
|
|
116
|
+
this._chevronIcon.style.color = "var(--vscode-descriptionForeground)";
|
|
117
|
+
}));
|
|
118
|
+
this._chevronWrapper.append(this._chevronIcon);
|
|
119
|
+
this._register(addDisposableListener(this._chevronWrapper, "click", e => {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
if (this.callbacks.showSessionsPicker) {
|
|
123
|
+
this.callbacks.showSessionsPicker();
|
|
124
|
+
} else {
|
|
125
|
+
this._expanded.set(!this._expanded.get(), undefined);
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
this._register(addDisposableListener(this._chevronWrapper, "keydown", e => {
|
|
129
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
this._chevronWrapper.click();
|
|
132
|
+
}
|
|
133
|
+
}));
|
|
134
|
+
if (opts.inputBoxLayout) {
|
|
135
|
+
const styleEl = $("style");
|
|
136
|
+
styleEl.textContent = `
|
|
137
|
+
@property --voice-processing-angle { syntax: '<angle>'; inherits: false; initial-value: 135deg; }
|
|
138
|
+
@keyframes voice-processing-spin { from { --voice-processing-angle: 135deg; } to { --voice-processing-angle: 495deg; } }
|
|
139
|
+
@keyframes agents-voice-input-icon-pulse {
|
|
140
|
+
0%, 100% { box-shadow: 0 0 4px rgba(var(--agents-voice-input-icon-rgb, 88,166,255), 0.45); }
|
|
141
|
+
50% { box-shadow: 0 0 10px rgba(var(--agents-voice-input-icon-rgb, 88,166,255), 0.75); }
|
|
142
|
+
}
|
|
143
|
+
.monaco-workbench.monaco-enable-motion .agents-voice-mode-button.agents-voice-mode-active {
|
|
144
|
+
animation: agents-voice-input-icon-pulse 1.4s ease-in-out infinite;
|
|
145
|
+
}
|
|
146
|
+
.processing { overflow: visible !important; }
|
|
147
|
+
.processing::before {
|
|
148
|
+
content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
|
|
149
|
+
background: conic-gradient(from var(--voice-processing-angle),
|
|
150
|
+
transparent 0deg, rgba(88,166,255,0.9) 20deg, rgba(88,166,255,1) 30deg,
|
|
151
|
+
rgba(88,166,255,0.6) 50deg, transparent 90deg, transparent 360deg);
|
|
152
|
+
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
153
|
+
mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
154
|
+
-webkit-mask-composite: xor; mask-composite: exclude;
|
|
155
|
+
animation: voice-processing-spin 3s linear infinite;
|
|
156
|
+
pointer-events: none; z-index: 2;
|
|
157
|
+
}
|
|
158
|
+
.processing::after {
|
|
159
|
+
content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 2px;
|
|
160
|
+
background: conic-gradient(from var(--voice-processing-angle),
|
|
161
|
+
transparent 0deg, rgba(88,166,255,0.5) 25deg, rgba(88,166,255,0.3) 50deg, transparent 90deg, transparent 360deg);
|
|
162
|
+
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
163
|
+
mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
164
|
+
-webkit-mask-composite: xor; mask-composite: exclude;
|
|
165
|
+
filter: blur(1.5px); animation: voice-processing-spin 3s linear infinite;
|
|
166
|
+
pointer-events: none; z-index: 1;
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
getWindow(this.container).document.head.append(styleEl);
|
|
170
|
+
this._inputBoxContainer = $("div");
|
|
171
|
+
this._inputBoxContainer.style.cssText = "box-sizing:border-box;background-color:var(--vscode-input-background);border:1px solid var(--vscode-input-border, transparent);border-radius:var(--vscode-cornerRadius-large, 8px);padding:10px 12px;width:100%;position:relative;min-height:32px;display:flex;align-items:center;-webkit-app-region:no-drag;";
|
|
172
|
+
this._inputBoxPlaceholder = $("span");
|
|
173
|
+
this._inputBoxPlaceholder.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-input-placeholderForeground, var(--vscode-descriptionForeground));user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;`;
|
|
174
|
+
this._inputBoxTranscriptComponent.element.style.width = "100%";
|
|
175
|
+
this._inputBoxTranscriptComponent.element.style.display = "none";
|
|
176
|
+
this._inputBoxContainer.append(this._inputBoxPlaceholder, this._inputBoxTranscriptComponent.element);
|
|
177
|
+
this._inputBoxToolbar = $("div");
|
|
178
|
+
this._inputBoxToolbar.style.cssText = "display:flex;align-items:center;gap:8px;padding:6px 4px 2px;-webkit-app-region:no-drag;";
|
|
179
|
+
const toolbarBtn = (className, ariaLabel, title) => {
|
|
180
|
+
const el = $(`span.codicon.${className}`);
|
|
181
|
+
el.role = "button";
|
|
182
|
+
el.tabIndex = 0;
|
|
183
|
+
el.ariaLabel = ariaLabel;
|
|
184
|
+
el.title = title;
|
|
185
|
+
el.style.cssText = `font-size:${FONT_SIZE.iconSm};color:var(--vscode-descriptionForeground);cursor:pointer;-webkit-app-region:no-drag;padding:2px;`;
|
|
186
|
+
this._register(addDisposableListener(el, "mouseenter", () => {
|
|
187
|
+
el.style.color = "var(--vscode-foreground)";
|
|
188
|
+
}));
|
|
189
|
+
this._register(addDisposableListener(el, "mouseleave", () => {
|
|
190
|
+
el.style.color = "var(--vscode-descriptionForeground)";
|
|
191
|
+
}));
|
|
192
|
+
addKeyboardActivation(el);
|
|
193
|
+
return el;
|
|
194
|
+
};
|
|
195
|
+
this._inputBoxMicBtn = $("span.codicon.codicon-voice-mode.agents-voice-mode-button");
|
|
196
|
+
this._inputBoxMicBtn.role = "button";
|
|
197
|
+
this._inputBoxMicBtn.tabIndex = 0;
|
|
198
|
+
this._inputBoxMicBtn.ariaLabel = ( localize(4789, "Push to talk (Space)"));
|
|
199
|
+
this._inputBoxMicBtn.title = ( localize(4789, "Push to talk (Space)"));
|
|
200
|
+
this._inputBoxMicBtn.style.cssText = `font-size:${FONT_SIZE.iconMd};cursor:pointer;-webkit-app-region:no-drag;border-radius:4px;padding:2px;`;
|
|
201
|
+
this._inputBoxConnIndicator = toolbarBtn("codicon-debug-connected", ( localize(4790, "Disconnect")), ( localize(4790, "Disconnect")));
|
|
202
|
+
this._inputBoxGearBtn = toolbarBtn("codicon-gear", ( localize(4791, "Configure keybinding")), ( localize(4791, "Configure keybinding")));
|
|
203
|
+
this._inputBoxFeedbackBtn = toolbarBtn("codicon-feedback", ( localize(4792, "Send feedback")), ( localize(4792, "Send feedback")));
|
|
204
|
+
this._inputBoxSessionsBtn = toolbarBtn("codicon-list-tree", ( localize(4793, "Sessions")), ( localize(4793, "Sessions")));
|
|
205
|
+
this._register(addDisposableListener(this._inputBoxSessionsBtn, "click", e => {
|
|
206
|
+
e.preventDefault();
|
|
207
|
+
e.stopPropagation();
|
|
208
|
+
this._expanded.set(!this._expanded.get(), undefined);
|
|
209
|
+
}));
|
|
210
|
+
this._inputBoxCloseBtn = toolbarBtn("codicon-chrome-minimize", ( localize(4794, "Minimize")), ( localize(4794, "Minimize")));
|
|
211
|
+
const toolbarSpacer = $("span");
|
|
212
|
+
toolbarSpacer.style.flex = "1";
|
|
213
|
+
this._inputBoxToolbar.append(
|
|
214
|
+
this._inputBoxMicBtn,
|
|
215
|
+
this._inputBoxConnIndicator,
|
|
216
|
+
this._inputBoxGearBtn,
|
|
217
|
+
toolbarSpacer,
|
|
218
|
+
this._inputBoxFeedbackBtn,
|
|
219
|
+
this._inputBoxSessionsBtn,
|
|
220
|
+
this._inputBoxCloseBtn
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
if (opts.inputBoxLayout) {
|
|
224
|
+
this._contentDiv.append(
|
|
225
|
+
this._onboardingComponent.element,
|
|
226
|
+
this._feedbackDialogComponent.element,
|
|
227
|
+
this._inputBoxToolbar,
|
|
228
|
+
this._transcriptComponent.element,
|
|
229
|
+
this._sessionListWrapper,
|
|
230
|
+
this._statusRowsComponent.element,
|
|
231
|
+
this._inputBoxContainer
|
|
232
|
+
);
|
|
233
|
+
} else {
|
|
234
|
+
this._contentDiv.append(
|
|
235
|
+
this._onboardingComponent.element,
|
|
236
|
+
this._headerComponent.element,
|
|
237
|
+
this._voiceBarComponent.element,
|
|
238
|
+
this._feedbackDialogComponent.element,
|
|
239
|
+
this._statusTextDiv,
|
|
240
|
+
this._transcriptComponent.element,
|
|
241
|
+
this._statusRowsComponent.element,
|
|
242
|
+
this._sessionListWrapper,
|
|
243
|
+
this._expandSpacer,
|
|
244
|
+
this._chevronWrapper
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
this._rootDiv.append(this._glowDiv, this._titleRow, this._contentDiv);
|
|
248
|
+
this.container.append(this._rootDiv);
|
|
249
|
+
if (this._options.focusable) {
|
|
250
|
+
this.container.tabIndex = 0;
|
|
251
|
+
const win = getWindow(this.container);
|
|
252
|
+
let pttKeyCode;
|
|
253
|
+
let lastKeyDownCode;
|
|
254
|
+
const onDocKeydown = e => {
|
|
255
|
+
lastKeyDownCode = e.code;
|
|
256
|
+
};
|
|
257
|
+
win.document.addEventListener("keydown", onDocKeydown, true);
|
|
258
|
+
this._register(
|
|
259
|
+
toDisposable(() => win.document.removeEventListener("keydown", onDocKeydown, true))
|
|
260
|
+
);
|
|
261
|
+
this._register(addDisposableListener(this.container, "keydown", e => {
|
|
262
|
+
if (!_isTextInput(e.target) && pttKeyCode && e.code === pttKeyCode) {
|
|
263
|
+
e.preventDefault();
|
|
264
|
+
}
|
|
265
|
+
}));
|
|
266
|
+
this._register(addDisposableListener(this.container, "keyup", e => {
|
|
267
|
+
if (!_isTextInput(e.target) && pttKeyCode && e.code === pttKeyCode) {
|
|
268
|
+
e.preventDefault();
|
|
269
|
+
pttKeyCode = undefined;
|
|
270
|
+
this.callbacks.pttUp();
|
|
271
|
+
}
|
|
272
|
+
}));
|
|
273
|
+
const origPttDown = this.callbacks.pttDown;
|
|
274
|
+
this.callbacks.pttDown = () => {
|
|
275
|
+
pttKeyCode = lastKeyDownCode;
|
|
276
|
+
origPttDown.call(this.callbacks);
|
|
277
|
+
};
|
|
278
|
+
const onDocPointerUp = () => this.callbacks.pttUp();
|
|
279
|
+
win.document.addEventListener("pointerup", onDocPointerUp);
|
|
280
|
+
this._register(
|
|
281
|
+
toDisposable(() => win.document.removeEventListener("pointerup", onDocPointerUp))
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
const pttChannel = ( new BroadcastChannel("vscode-ptt"));
|
|
285
|
+
pttChannel.onmessage = e => {
|
|
286
|
+
if (e.data === "down") {
|
|
287
|
+
this.callbacks.pttDown();
|
|
288
|
+
}
|
|
289
|
+
if (e.data === "up") {
|
|
290
|
+
this.callbacks.pttUp();
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
this._register(toDisposable(() => pttChannel.close()));
|
|
294
|
+
const renderDisposable = autorun(reader => {
|
|
295
|
+
this._updateDOM(reader);
|
|
296
|
+
getWindow(this.container).requestAnimationFrame(() => {
|
|
297
|
+
this.callbacks.onResize();
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
this._register(renderDisposable);
|
|
301
|
+
this._register(toDisposable(() => clearNode(this.container)));
|
|
302
|
+
let sawConnecting = false;
|
|
303
|
+
let failureCheckPending = false;
|
|
304
|
+
let disposed = false;
|
|
305
|
+
const onboardingConnectDisposable = autorun(reader => {
|
|
306
|
+
if (!this._onboardingPendingConnect.read(reader)) {
|
|
307
|
+
sawConnecting = false;
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (this._isConnected.read(reader)) {
|
|
311
|
+
this._onboardingPendingConnect.set(false, undefined);
|
|
312
|
+
sawConnecting = false;
|
|
313
|
+
this._showOnboarding.set(false, undefined);
|
|
314
|
+
this.callbacks.onOnboardingCompleted?.();
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (this._isConnecting.read(reader)) {
|
|
318
|
+
sawConnecting = true;
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (sawConnecting && !failureCheckPending) {
|
|
322
|
+
failureCheckPending = true;
|
|
323
|
+
queueMicrotask(() => {
|
|
324
|
+
failureCheckPending = false;
|
|
325
|
+
if (disposed) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (this._onboardingPendingConnect.read(undefined) && !this._isConnected.read(undefined) && !this._isConnecting.read(undefined)) {
|
|
329
|
+
this._onboardingPendingConnect.set(false, undefined);
|
|
330
|
+
sawConnecting = false;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
this._register(toDisposable(() => {
|
|
336
|
+
disposed = true;
|
|
337
|
+
}));
|
|
338
|
+
this._register(onboardingConnectDisposable);
|
|
339
|
+
if (this._options.reshowOnboardingOnDisconnect) {
|
|
340
|
+
const reshowDisposable = autorun(reader => {
|
|
341
|
+
const connected = this._isConnected.read(reader);
|
|
342
|
+
const connecting = this._isConnecting.read(reader);
|
|
343
|
+
const reconnecting = this._isReconnecting.read(reader);
|
|
344
|
+
const pendingConnect = this._onboardingPendingConnect.read(reader);
|
|
345
|
+
if (!connected && !connecting && !reconnecting && !pendingConnect) {
|
|
346
|
+
if (!this._showOnboarding.read(reader)) {
|
|
347
|
+
this._showOnboarding.set(true, undefined);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
this._register(reshowDisposable);
|
|
352
|
+
}
|
|
353
|
+
this._startWaveformAnimation();
|
|
354
|
+
this._register(toDisposable(() => this._stopWaveformAnimation()));
|
|
355
|
+
}
|
|
356
|
+
_updateDOM(reader) {
|
|
357
|
+
if (this._options.inputBoxLayout) {
|
|
358
|
+
this._updateDOMInputBoxLayout(reader);
|
|
359
|
+
} else {
|
|
360
|
+
this._updateDOMClassicLayout(reader);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
_updateDOMInputBoxLayout(reader) {
|
|
364
|
+
const onboarding = this._showOnboarding.read(reader);
|
|
365
|
+
const voiceState = this._voiceState.read(reader);
|
|
366
|
+
const isConnected = this._isConnected.read(reader);
|
|
367
|
+
const isConnecting = this._isConnecting.read(reader);
|
|
368
|
+
const isReconnecting = this._isReconnecting.read(reader);
|
|
369
|
+
const showConnected = isConnected || isReconnecting;
|
|
370
|
+
const opts = this._options;
|
|
371
|
+
const showExpanded = this._shouldShowExpanded.read(reader) && opts.showExpandChevron;
|
|
372
|
+
const baseWidth = typeof opts.width === "number" ? opts.width : AGENTS_VOICE_WINDOW_DEFAULT_WIDTH;
|
|
373
|
+
this._rootDiv.style.width = `${baseWidth}px`;
|
|
374
|
+
this._titleRow.style.display = (onboarding || !opts.title) ? "none" : "flex";
|
|
375
|
+
if (onboarding) {
|
|
376
|
+
this._onboardingComponent.element.style.display = "";
|
|
377
|
+
this._feedbackDialogComponent.element.style.display = "none";
|
|
378
|
+
this._inputBoxContainer.style.display = "none";
|
|
379
|
+
this._transcriptComponent.element.style.display = "none";
|
|
380
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
381
|
+
this._sessionListWrapper.style.display = "none";
|
|
382
|
+
this._inputBoxToolbar.style.display = "none";
|
|
383
|
+
this._onboardingComponent.update({
|
|
384
|
+
pttKeyLabel: this._pttKeyLabel.read(reader),
|
|
385
|
+
isConnecting: this._onboardingPendingConnect.read(reader) || isConnecting,
|
|
386
|
+
onGetStarted: e => {
|
|
387
|
+
e.preventDefault();
|
|
388
|
+
e.stopPropagation();
|
|
389
|
+
this._dismissOnboarding(true);
|
|
390
|
+
},
|
|
391
|
+
onOpenPttKeySettings: e => {
|
|
392
|
+
e.preventDefault();
|
|
393
|
+
e.stopPropagation();
|
|
394
|
+
this.callbacks.openPttKeySettings();
|
|
395
|
+
},
|
|
396
|
+
onOpenPopout: this.callbacks.openPopout ? e => {
|
|
397
|
+
e.preventDefault();
|
|
398
|
+
e.stopPropagation();
|
|
399
|
+
this.callbacks.openPopout?.();
|
|
400
|
+
} : undefined
|
|
401
|
+
});
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
this._onboardingComponent.element.style.display = "none";
|
|
405
|
+
const feedbackState = this._feedbackDialogState.read(reader);
|
|
406
|
+
if (feedbackState) {
|
|
407
|
+
this._feedbackDialogComponent.element.style.display = "";
|
|
408
|
+
this._feedbackDialogComponent.update({
|
|
409
|
+
onSubmit: text => this._submitFeedback(text),
|
|
410
|
+
onCancel: () => {
|
|
411
|
+
this._feedbackDialogState.set(null, undefined);
|
|
412
|
+
}
|
|
413
|
+
}, feedbackState);
|
|
414
|
+
this._inputBoxContainer.style.display = "none";
|
|
415
|
+
this._transcriptComponent.element.style.display = "none";
|
|
416
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
417
|
+
this._sessionListWrapper.style.display = "none";
|
|
418
|
+
this._inputBoxToolbar.style.display = "none";
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
this._feedbackDialogComponent.element.style.display = "none";
|
|
422
|
+
this._inputBoxContainer.style.display = "flex";
|
|
423
|
+
const transcriptTurns = this._transcriptTurns.read(reader);
|
|
424
|
+
const hasTranscript = ( transcriptTurns.some(t => t.text.length > 0 || (t.speaker === "user" && t.isPartial)));
|
|
425
|
+
if (!showConnected || (voiceState !== "listening" && voiceState !== "speaking")) {
|
|
426
|
+
this._inputBoxContainer.style.borderColor = "var(--vscode-input-border, transparent)";
|
|
427
|
+
this._inputBoxContainer.style.boxShadow = "none";
|
|
428
|
+
}
|
|
429
|
+
this._inputBoxContainer.classList.toggle("processing", voiceState === "processing");
|
|
430
|
+
if (hasTranscript) {
|
|
431
|
+
if (showExpanded) {
|
|
432
|
+
this._transcriptComponent.element.style.display = "";
|
|
433
|
+
this._transcriptComponent.element.style.padding = "8px 12px";
|
|
434
|
+
this._transcriptComponent.element.style.borderBottom = "1px solid var(--vscode-widget-border, var(--vscode-input-border, transparent))";
|
|
435
|
+
this._transcriptComponent.update({
|
|
436
|
+
turns: transcriptTurns,
|
|
437
|
+
chatStyle: true
|
|
438
|
+
});
|
|
439
|
+
this._inputBoxPlaceholder.style.display = "none";
|
|
440
|
+
this._inputBoxTranscriptComponent.element.style.display = "none";
|
|
441
|
+
} else {
|
|
442
|
+
this._inputBoxPlaceholder.style.display = "none";
|
|
443
|
+
this._transcriptComponent.element.style.display = "none";
|
|
444
|
+
this._transcriptComponent.element.style.padding = "";
|
|
445
|
+
this._transcriptComponent.element.style.borderBottom = "";
|
|
446
|
+
this._inputBoxTranscriptComponent.element.style.display = "";
|
|
447
|
+
this._inputBoxTranscriptComponent.update({
|
|
448
|
+
turns: transcriptTurns,
|
|
449
|
+
chatStyle: true,
|
|
450
|
+
scrollToTop: true
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
} else {
|
|
454
|
+
this._inputBoxPlaceholder.style.display = "";
|
|
455
|
+
this._inputBoxTranscriptComponent.element.style.display = "none";
|
|
456
|
+
this._transcriptComponent.element.style.display = "none";
|
|
457
|
+
const keyLabel = this._pttKeyLabel.read(reader);
|
|
458
|
+
if (showConnected) {
|
|
459
|
+
this._inputBoxPlaceholder.textContent = ( localize(4795, "Listening"));
|
|
460
|
+
} else if (keyLabel) {
|
|
461
|
+
this._inputBoxPlaceholder.textContent = ( localize(4796, "Hold {0} to talk", keyLabel));
|
|
462
|
+
} else {
|
|
463
|
+
this._inputBoxPlaceholder.textContent = ( localize(4797, "Click voice mode to talk"));
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (!showExpanded) {
|
|
467
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
468
|
+
this._sessionListWrapper.style.display = "none";
|
|
469
|
+
} else {
|
|
470
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
471
|
+
this._sessionListWrapper.style.display = "";
|
|
472
|
+
this._sessionListWrapper.style.maxHeight = "200px";
|
|
473
|
+
this._sessionListWrapper.style.overflowY = "auto";
|
|
474
|
+
this._sessionListWrapper.style.scrollbarWidth = "none";
|
|
475
|
+
this._sessionListComponent.update({
|
|
476
|
+
sessions: this._sessions.read(reader),
|
|
477
|
+
groups: this._sessionGroups.read(reader),
|
|
478
|
+
selectedTarget: this._selectedTargetSession.read(reader),
|
|
479
|
+
onOpenSession: r => this.callbacks.openSession(r),
|
|
480
|
+
onStopSession: r => this.callbacks.stopSession(r),
|
|
481
|
+
onCancelSession: r => this.callbacks.cancelSession(r),
|
|
482
|
+
onSelectTarget: r => {
|
|
483
|
+
this._selectedTargetSession.set(r, undefined);
|
|
484
|
+
this.callbacks.selectTargetSession(r);
|
|
485
|
+
},
|
|
486
|
+
onNewSession: () => this.callbacks.newSessionAsTarget()
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
this._inputBoxToolbar.style.display = "flex";
|
|
490
|
+
this._inputBoxMicBtn.style.display = "";
|
|
491
|
+
const keyLabel = this._pttKeyLabel.read(reader);
|
|
492
|
+
const micTooltip = keyLabel ? ( localize(4798, "Push to talk ({0})", keyLabel)) : ( localize(4799, "Push to talk"));
|
|
493
|
+
this._inputBoxMicBtn.title = micTooltip;
|
|
494
|
+
this._inputBoxMicBtn.ariaLabel = micTooltip;
|
|
495
|
+
const micColor = voiceState === "error" ? "var(--vscode-editorError-foreground)" : voiceState === "listening" ? "var(--vscode-editorInfo-foreground)" : voiceState === "speaking" ? "var(--vscode-agentsVoice-speakingForeground)" : "var(--vscode-descriptionForeground)";
|
|
496
|
+
this._inputBoxMicBtn.style.color = micColor;
|
|
497
|
+
const micIsActive = voiceState === "listening" || voiceState === "speaking";
|
|
498
|
+
this._inputBoxMicBtn.classList.toggle("agents-voice-mode-active", micIsActive);
|
|
499
|
+
this._inputBoxMicBtn.style.setProperty(
|
|
500
|
+
"--agents-voice-input-icon-rgb",
|
|
501
|
+
voiceState === "speaking" ? "163,113,247" : "88,166,255"
|
|
502
|
+
);
|
|
503
|
+
this._inputBoxMicBtn.style.borderRadius = "50%";
|
|
504
|
+
if (!micIsActive) {
|
|
505
|
+
this._inputBoxMicBtn.style.boxShadow = "none";
|
|
506
|
+
}
|
|
507
|
+
this._inputBoxMicBtn.onmousedown = e => {
|
|
508
|
+
e.preventDefault();
|
|
509
|
+
this.callbacks.pttDown();
|
|
510
|
+
};
|
|
511
|
+
this._inputBoxMicBtn.onmouseup = () => {
|
|
512
|
+
this.callbacks.pttUp();
|
|
513
|
+
};
|
|
514
|
+
this._inputBoxConnIndicator.style.display = showConnected ? "" : "none";
|
|
515
|
+
this._inputBoxConnIndicator.onclick = e => {
|
|
516
|
+
e.preventDefault();
|
|
517
|
+
e.stopPropagation();
|
|
518
|
+
this.callbacks.disconnect();
|
|
519
|
+
};
|
|
520
|
+
this._inputBoxGearBtn.style.display = "";
|
|
521
|
+
this._inputBoxGearBtn.onclick = e => {
|
|
522
|
+
e.preventDefault();
|
|
523
|
+
e.stopPropagation();
|
|
524
|
+
this.callbacks.openPttKeySettings();
|
|
525
|
+
};
|
|
526
|
+
this._inputBoxFeedbackBtn.onclick = e => {
|
|
527
|
+
e.preventDefault();
|
|
528
|
+
e.stopPropagation();
|
|
529
|
+
this._toggleFeedbackDialog();
|
|
530
|
+
};
|
|
531
|
+
this._inputBoxSessionsBtn.style.display = "";
|
|
532
|
+
this._inputBoxSessionsBtn.className = `codicon codicon-${showExpanded ? "chevron-up" : "list-tree"}`;
|
|
533
|
+
this._inputBoxSessionsBtn.title = showExpanded ? ( localize(4800, "Collapse sessions")) : ( localize(4793, "Sessions"));
|
|
534
|
+
this._inputBoxCloseBtn.style.display = opts.showClose ? "" : "none";
|
|
535
|
+
this._inputBoxCloseBtn.onclick = e => {
|
|
536
|
+
e.preventDefault();
|
|
537
|
+
e.stopPropagation();
|
|
538
|
+
this.callbacks.closeWindow();
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
_updateDOMClassicLayout(reader) {
|
|
542
|
+
const onboarding = this._showOnboarding.read(reader);
|
|
543
|
+
const voiceState = this._voiceState.read(reader);
|
|
544
|
+
const opts = this._options;
|
|
545
|
+
const showExpanded = this._shouldShowExpanded.read(reader) && opts.showExpandChevron;
|
|
546
|
+
this._titleRow.style.display = (onboarding || !opts.title) ? "none" : "flex";
|
|
547
|
+
if (onboarding) {
|
|
548
|
+
this._onboardingComponent.element.style.display = "";
|
|
549
|
+
this._headerComponent.element.style.display = "none";
|
|
550
|
+
this._voiceBarComponent.element.style.display = "none";
|
|
551
|
+
this._feedbackDialogComponent.element.style.display = "none";
|
|
552
|
+
this._statusTextDiv.style.display = "none";
|
|
553
|
+
this._transcriptComponent.element.style.display = "none";
|
|
554
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
555
|
+
this._sessionListWrapper.style.display = "none";
|
|
556
|
+
this._expandSpacer.style.display = "none";
|
|
557
|
+
this._chevronWrapper.style.display = "none";
|
|
558
|
+
this._onboardingComponent.update({
|
|
559
|
+
pttKeyLabel: this._pttKeyLabel.read(reader),
|
|
560
|
+
isConnecting: this._onboardingPendingConnect.read(reader) || this._isConnecting.read(reader),
|
|
561
|
+
onGetStarted: e => {
|
|
562
|
+
e.preventDefault();
|
|
563
|
+
e.stopPropagation();
|
|
564
|
+
this._dismissOnboarding(true);
|
|
565
|
+
},
|
|
566
|
+
onOpenPttKeySettings: e => {
|
|
567
|
+
e.preventDefault();
|
|
568
|
+
e.stopPropagation();
|
|
569
|
+
this.callbacks.openPttKeySettings();
|
|
570
|
+
},
|
|
571
|
+
onOpenPopout: this.callbacks.openPopout ? e => {
|
|
572
|
+
e.preventDefault();
|
|
573
|
+
e.stopPropagation();
|
|
574
|
+
this.callbacks.openPopout?.();
|
|
575
|
+
} : undefined
|
|
576
|
+
});
|
|
577
|
+
} else {
|
|
578
|
+
this._onboardingComponent.element.style.display = "none";
|
|
579
|
+
this._headerComponent.element.style.display = "";
|
|
580
|
+
const feedbackState = this._feedbackDialogState.read(reader);
|
|
581
|
+
this._headerComponent.update({
|
|
582
|
+
copilotIconSrc: this.callbacks.copilotIconSrc,
|
|
583
|
+
showCopilotIcon: opts.showCopilotIcon,
|
|
584
|
+
isConnected: this._isConnected.read(reader),
|
|
585
|
+
isConnecting: this._isConnecting.read(reader),
|
|
586
|
+
isReconnecting: this._isReconnecting.read(reader),
|
|
587
|
+
voiceState,
|
|
588
|
+
draggable: opts.draggable,
|
|
589
|
+
showClose: opts.showClose,
|
|
590
|
+
showPopout: !!this.callbacks.openPopout && this._popoutAvailable.read(reader),
|
|
591
|
+
hideDisconnect: this.callbacks.hideDisconnect,
|
|
592
|
+
centerConnectButton: opts.centerConnectButton,
|
|
593
|
+
onMicDown: e => {
|
|
594
|
+
e.preventDefault();
|
|
595
|
+
this.callbacks.pttDown();
|
|
596
|
+
},
|
|
597
|
+
onMicUp: () => {
|
|
598
|
+
this.callbacks.pttUp();
|
|
599
|
+
},
|
|
600
|
+
onConnectClick: e => {
|
|
601
|
+
e.preventDefault();
|
|
602
|
+
e.stopPropagation();
|
|
603
|
+
if (this._isConnecting.get()) {
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
if (this._isConnected.get()) {
|
|
607
|
+
this.callbacks.disconnect();
|
|
608
|
+
} else {
|
|
609
|
+
this.callbacks.connect();
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
onDisconnectClick: e => {
|
|
613
|
+
e.preventDefault();
|
|
614
|
+
e.stopPropagation();
|
|
615
|
+
this.callbacks.disconnect();
|
|
616
|
+
},
|
|
617
|
+
onCloseClick: e => {
|
|
618
|
+
e.preventDefault();
|
|
619
|
+
e.stopPropagation();
|
|
620
|
+
this.callbacks.closeWindow();
|
|
621
|
+
},
|
|
622
|
+
onToggleClick: e => {
|
|
623
|
+
e.preventDefault();
|
|
624
|
+
e.stopPropagation();
|
|
625
|
+
this._expanded.set(!this._expanded.get(), undefined);
|
|
626
|
+
},
|
|
627
|
+
onPttKeyClick: e => {
|
|
628
|
+
e.preventDefault();
|
|
629
|
+
e.stopPropagation();
|
|
630
|
+
this.callbacks.openPttKeySettings();
|
|
631
|
+
},
|
|
632
|
+
onPopoutClick: e => {
|
|
633
|
+
e.preventDefault();
|
|
634
|
+
e.stopPropagation();
|
|
635
|
+
this.callbacks.openPopout?.();
|
|
636
|
+
},
|
|
637
|
+
onFeedbackClick: e => {
|
|
638
|
+
e.preventDefault();
|
|
639
|
+
e.stopPropagation();
|
|
640
|
+
this._toggleFeedbackDialog();
|
|
641
|
+
},
|
|
642
|
+
pttKeyLabel: this._pttKeyLabel.read(reader),
|
|
643
|
+
expanded: showExpanded
|
|
644
|
+
});
|
|
645
|
+
if (feedbackState) {
|
|
646
|
+
this._voiceBarComponent.element.style.display = "none";
|
|
647
|
+
this._feedbackDialogComponent.element.style.display = "";
|
|
648
|
+
this._feedbackDialogComponent.update({
|
|
649
|
+
onSubmit: text => this._submitFeedback(text),
|
|
650
|
+
onCancel: () => {
|
|
651
|
+
this._feedbackDialogState.set(null, undefined);
|
|
652
|
+
}
|
|
653
|
+
}, feedbackState);
|
|
654
|
+
this._statusTextDiv.style.display = "none";
|
|
655
|
+
this._transcriptComponent.element.style.display = "none";
|
|
656
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
657
|
+
this._sessionListWrapper.style.display = "none";
|
|
658
|
+
this._expandSpacer.style.display = "none";
|
|
659
|
+
this._chevronWrapper.style.display = "none";
|
|
660
|
+
} else {
|
|
661
|
+
this._feedbackDialogComponent.element.style.display = "none";
|
|
662
|
+
this._voiceBarComponent.update({
|
|
663
|
+
voiceState,
|
|
664
|
+
speakingSessionLabel: this._speakingSessionLabel.read(reader),
|
|
665
|
+
speakingSession: this._speakingSession.read(reader),
|
|
666
|
+
onStopSpeech: () => this.callbacks.stopPlayback()
|
|
667
|
+
});
|
|
668
|
+
const statusText = this._statusText.read(reader);
|
|
669
|
+
const isError = voiceState === "error";
|
|
670
|
+
if ((opts.showStatusText || isError) && statusText) {
|
|
671
|
+
this._statusTextDiv.style.display = "";
|
|
672
|
+
this._statusTextDiv.textContent = statusText;
|
|
673
|
+
this._statusTextDiv.style.color = isError ? "var(--vscode-editorError-foreground)" : "var(--vscode-foreground)";
|
|
674
|
+
} else {
|
|
675
|
+
this._statusTextDiv.style.display = "none";
|
|
676
|
+
}
|
|
677
|
+
this._transcriptComponent.update({
|
|
678
|
+
turns: this._transcriptTurns.read(reader)
|
|
679
|
+
});
|
|
680
|
+
if (!showExpanded) {
|
|
681
|
+
this._statusRowsComponent.element.style.display = "";
|
|
682
|
+
this._statusRowsComponent.update({
|
|
683
|
+
workingCount: this._workingCount.read(reader),
|
|
684
|
+
needsInputCount: this._needsInputCount.read(reader),
|
|
685
|
+
doneCount: this._doneCount.read(reader),
|
|
686
|
+
showCounters: opts.showStatusCounters,
|
|
687
|
+
speakingSessionLabel: this._speakingSessionLabel.read(reader),
|
|
688
|
+
speakingSessionResource: this._speakingSession.read(reader),
|
|
689
|
+
pendingToolConfirmations: this._pendingToolConfirmations.read(reader),
|
|
690
|
+
onOpenSession: r => this.callbacks.openSession(r)
|
|
691
|
+
});
|
|
692
|
+
this._sessionListWrapper.style.display = "none";
|
|
693
|
+
} else {
|
|
694
|
+
this._statusRowsComponent.element.style.display = "none";
|
|
695
|
+
this._sessionListWrapper.style.display = "";
|
|
696
|
+
this._sessionListComponent.update({
|
|
697
|
+
sessions: this._sessions.read(reader),
|
|
698
|
+
groups: this._sessionGroups.read(reader),
|
|
699
|
+
selectedTarget: this._selectedTargetSession.read(reader),
|
|
700
|
+
onOpenSession: r => this.callbacks.openSession(r),
|
|
701
|
+
onStopSession: r => this.callbacks.stopSession(r),
|
|
702
|
+
onCancelSession: r => this.callbacks.cancelSession(r),
|
|
703
|
+
onSelectTarget: r => {
|
|
704
|
+
this._selectedTargetSession.set(r, undefined);
|
|
705
|
+
this.callbacks.selectTargetSession(r);
|
|
706
|
+
},
|
|
707
|
+
onNewSession: () => this.callbacks.newSessionAsTarget()
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
this._expandSpacer.style.display = "";
|
|
711
|
+
this._chevronWrapper.style.display = opts.showExpandChevron ? "flex" : "none";
|
|
712
|
+
this._chevronWrapper.title = showExpanded ? "Collapse sessions" : "Expand sessions";
|
|
713
|
+
this._chevronIcon.className = `codicon codicon-${showExpanded ? "chevron-up" : "chevron-down"}`;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
setConnected(connected) {
|
|
718
|
+
this._isConnected.set(connected, undefined);
|
|
719
|
+
}
|
|
720
|
+
setConnecting(connecting) {
|
|
721
|
+
this._isConnecting.set(connecting, undefined);
|
|
722
|
+
}
|
|
723
|
+
setReconnecting(reconnecting) {
|
|
724
|
+
this._isReconnecting.set(reconnecting, undefined);
|
|
725
|
+
}
|
|
726
|
+
setVoiceState(state) {
|
|
727
|
+
this._voiceState.set(state, undefined);
|
|
728
|
+
}
|
|
729
|
+
setStatusCounts(working, needsInput, done) {
|
|
730
|
+
this._workingCount.set(working, undefined);
|
|
731
|
+
this._needsInputCount.set(needsInput, undefined);
|
|
732
|
+
this._doneCount.set(done, undefined);
|
|
733
|
+
}
|
|
734
|
+
setPendingToolConfirmations(confirmations) {
|
|
735
|
+
this._pendingToolConfirmations.set(confirmations, undefined);
|
|
736
|
+
}
|
|
737
|
+
setSpeakingSession(session, label) {
|
|
738
|
+
this._speakingSession.set(session, undefined);
|
|
739
|
+
this._speakingSessionLabel.set(label, undefined);
|
|
740
|
+
}
|
|
741
|
+
setSessions(sessions) {
|
|
742
|
+
this._sessions.set(sessions, undefined);
|
|
743
|
+
}
|
|
744
|
+
setSelectedTargetSession(resource) {
|
|
745
|
+
this._selectedTargetSession.set(resource, undefined);
|
|
746
|
+
}
|
|
747
|
+
setSessionGroups(groups) {
|
|
748
|
+
this._sessionGroups.set(groups, undefined);
|
|
749
|
+
}
|
|
750
|
+
setPttKeyLabel(label) {
|
|
751
|
+
this._pttKeyLabel.set(label, undefined);
|
|
752
|
+
}
|
|
753
|
+
setTranscriptTurns(turns) {
|
|
754
|
+
this._transcriptTurns.set(turns, undefined);
|
|
755
|
+
}
|
|
756
|
+
setStatusText(text) {
|
|
757
|
+
this._statusText.set(text, undefined);
|
|
758
|
+
}
|
|
759
|
+
setPopoutAvailable(available) {
|
|
760
|
+
this._popoutAvailable.set(available, undefined);
|
|
761
|
+
}
|
|
762
|
+
_toggleFeedbackDialog() {
|
|
763
|
+
if (this._feedbackDialogState.get()) {
|
|
764
|
+
this._feedbackDialogState.set(null, undefined);
|
|
765
|
+
} else {
|
|
766
|
+
this._showOnboarding.set(false, undefined);
|
|
767
|
+
this._feedbackDialogState.set({
|
|
768
|
+
isSubmitting: false,
|
|
769
|
+
submitted: false
|
|
770
|
+
}, undefined);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
_dismissOnboarding(connect = false) {
|
|
774
|
+
if (connect) {
|
|
775
|
+
if (this._isConnected.get()) {
|
|
776
|
+
this._showOnboarding.set(false, undefined);
|
|
777
|
+
this.callbacks.onOnboardingCompleted?.();
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
if (!this._isConnecting.get() && !this._onboardingPendingConnect.get()) {
|
|
781
|
+
this._onboardingPendingConnect.set(true, undefined);
|
|
782
|
+
this.callbacks.connect();
|
|
783
|
+
}
|
|
784
|
+
} else {
|
|
785
|
+
this._showOnboarding.set(false, undefined);
|
|
786
|
+
this.callbacks.onOnboardingCompleted?.();
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
dismissOnboarding() {
|
|
790
|
+
this._onboardingPendingConnect.set(false, undefined);
|
|
791
|
+
if (this._showOnboarding.get()) {
|
|
792
|
+
this._showOnboarding.set(false, undefined);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
_submitFeedback(text) {
|
|
796
|
+
this._feedbackDialogState.set({
|
|
797
|
+
isSubmitting: true,
|
|
798
|
+
submitted: false
|
|
799
|
+
}, undefined);
|
|
800
|
+
this.callbacks.submitFeedback(text).then(result => {
|
|
801
|
+
if (result.ok) {
|
|
802
|
+
this._feedbackDialogState.set({
|
|
803
|
+
isSubmitting: false,
|
|
804
|
+
submitted: true
|
|
805
|
+
}, undefined);
|
|
806
|
+
setTimeout(() => {
|
|
807
|
+
this._feedbackDialogState.set(null, undefined);
|
|
808
|
+
}, 3000);
|
|
809
|
+
} else {
|
|
810
|
+
this._feedbackDialogState.set({
|
|
811
|
+
isSubmitting: false,
|
|
812
|
+
submitted: false,
|
|
813
|
+
error: result.error ?? ( localize(4801, "Failed to submit"))
|
|
814
|
+
}, undefined);
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
_startWaveformAnimation() {
|
|
819
|
+
if (this._animationFrameId !== undefined) {
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
const animate = () => {
|
|
823
|
+
this._animationFrameId = getWindow(this.container).requestAnimationFrame(animate);
|
|
824
|
+
const onboarding = this._showOnboarding.get();
|
|
825
|
+
const voiceState = this._voiceState.get();
|
|
826
|
+
const glowActive = onboarding || voiceState === "speaking" || voiceState === "listening";
|
|
827
|
+
if (!glowActive) {
|
|
828
|
+
this._glowDiv.style.display = "none";
|
|
829
|
+
if (this._inputBoxContainer) {
|
|
830
|
+
this._inputBoxContainer.style.borderColor = "var(--vscode-input-border, transparent)";
|
|
831
|
+
this._inputBoxContainer.style.boxShadow = "none";
|
|
832
|
+
}
|
|
833
|
+
if (this._inputBoxMicBtn) {
|
|
834
|
+
this._inputBoxMicBtn.style.boxShadow = "none";
|
|
835
|
+
}
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
const analyser = this.callbacks.getAnalyserNode();
|
|
839
|
+
let intensity;
|
|
840
|
+
if (onboarding) {
|
|
841
|
+
intensity = 0.6;
|
|
842
|
+
} else if (!analyser) {
|
|
843
|
+
intensity = 0.3;
|
|
844
|
+
} else {
|
|
845
|
+
const dataArray = ( new Uint8Array(analyser.frequencyBinCount));
|
|
846
|
+
analyser.getByteFrequencyData(dataArray);
|
|
847
|
+
let sum = 0;
|
|
848
|
+
for (let i = 0; i < dataArray.length; i++) {
|
|
849
|
+
sum += dataArray[i];
|
|
850
|
+
}
|
|
851
|
+
intensity = Math.min(1, (sum / dataArray.length) / 80);
|
|
852
|
+
}
|
|
853
|
+
if (this._inputBoxContainer) {
|
|
854
|
+
const r = (voiceState === "speaking") ? "163,113,247" : "88,166,255";
|
|
855
|
+
const borderAlpha = 0.4 + intensity * 0.5;
|
|
856
|
+
const shadowSpread = 4 + intensity * 12;
|
|
857
|
+
const shadowAlpha = 0.15 + intensity * 0.35;
|
|
858
|
+
this._inputBoxContainer.style.borderColor = `rgba(${r},${borderAlpha})`;
|
|
859
|
+
this._inputBoxContainer.style.boxShadow = `0 0 ${shadowSpread}px rgba(${r},${shadowAlpha}), inset 0 0 ${shadowSpread * 0.4}px rgba(${r},${shadowAlpha * 0.3})`;
|
|
860
|
+
}
|
|
861
|
+
if (this._inputBoxMicBtn) {
|
|
862
|
+
const iconGlowActive = voiceState === "listening" || voiceState === "speaking";
|
|
863
|
+
if (iconGlowActive) {
|
|
864
|
+
const r = voiceState === "speaking" ? "163,113,247" : "88,166,255";
|
|
865
|
+
const shadowSpread = 3 + intensity * 8;
|
|
866
|
+
const shadowAlpha = 0.2 + intensity * 0.45;
|
|
867
|
+
this._inputBoxMicBtn.style.boxShadow = `0 0 ${shadowSpread}px rgba(${r},${shadowAlpha})`;
|
|
868
|
+
} else {
|
|
869
|
+
this._inputBoxMicBtn.style.boxShadow = "none";
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
this._glowDiv.style.display = "";
|
|
873
|
+
const baseOpacity = 0.15 + intensity * 0.4;
|
|
874
|
+
const r = (onboarding || voiceState === "speaking") ? "163,113,247" : "88,166,255";
|
|
875
|
+
this._glowDiv.style.background = `radial-gradient(ellipse 40% 70% at 50% 0%, rgba(${r},${baseOpacity}) 0%, transparent 100%), radial-gradient(ellipse 70% 100% at 50% 0%, rgba(${r},${baseOpacity * 0.4}) 0%, transparent 100%)`;
|
|
876
|
+
};
|
|
877
|
+
this._animationFrameId = getWindow(this.container).requestAnimationFrame(animate);
|
|
878
|
+
}
|
|
879
|
+
_stopWaveformAnimation() {
|
|
880
|
+
if (this._animationFrameId !== undefined) {
|
|
881
|
+
getWindow(this.container).cancelAnimationFrame(this._animationFrameId);
|
|
882
|
+
this._animationFrameId = undefined;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
function _isTextInput(target) {
|
|
887
|
+
if (!target || typeof target.tagName !== "string") {
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
const el = target;
|
|
891
|
+
const tag = el.tagName;
|
|
892
|
+
if (tag === "TEXTAREA" || tag === "INPUT") {
|
|
893
|
+
return true;
|
|
894
|
+
}
|
|
895
|
+
return el.isContentEditable === true;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
export { AgentsVoiceWidget };
|