@codingame/monaco-vscode-chat-service-override 34.1.3 → 35.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 +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 +1426 -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,125 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
+
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
5
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { IMicCaptureService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.service";
|
|
7
|
+
/**
|
|
8
|
+
* Per-PTT-press diagnostic emitted after `pttUp` once the diagnostic
|
|
9
|
+
* window closes. Logged + sent to backend so we can correlate frontend
|
|
10
|
+
* audio bookkeeping with backend ASR results via `turnId`.
|
|
11
|
+
*
|
|
12
|
+
* Drain model: after `pttUp` the service keeps streaming audio chunks
|
|
13
|
+
* for a fixed "drain window" (~500ms by default). The drain ends as
|
|
14
|
+
* soon as it has shipped enough samples to cover the window (or a
|
|
15
|
+
* fallback timer trips if `onaudioprocess` stops firing). Only AFTER
|
|
16
|
+
* the drain has closed does `_onPttEnd` fire. The diagnostic window is
|
|
17
|
+
* intentionally LONGER than the drain window so any audio still
|
|
18
|
+
* produced after drain end (within the diagnostic window) is counted
|
|
19
|
+
* as `postReleaseCallbacks` -- a direct signal that the drain window
|
|
20
|
+
* is too short for this device/load and the fix needs to extend it.
|
|
21
|
+
*
|
|
22
|
+
* Field interpretation:
|
|
23
|
+
* - `drainChunks` / `drainSamples` => audio captured during the drain
|
|
24
|
+
* window and shipped to the backend. Non-zero in normal operation.
|
|
25
|
+
* - `postReleaseCallbacks > 0` => the WebAudio pipeline produced more
|
|
26
|
+
* audio AFTER the drain window closed but before the diagnostic
|
|
27
|
+
* window. This audio was DROPPED; if it happens often the drain
|
|
28
|
+
* window needs to grow.
|
|
29
|
+
* - `drainSkippedBy*` > 0 => the drain was muted or AEC-suppressed.
|
|
30
|
+
* Tail audio for that press was lost; investigate the mute / AEC
|
|
31
|
+
* suppression path rather than the drain window.
|
|
32
|
+
* - `pttUpWithoutCapture` => pttUp arrived while mic was not capturing.
|
|
33
|
+
* - `releasedDuringAcquire` => user released while mic was still being
|
|
34
|
+
* acquired; no audio was ever recorded for this press.
|
|
35
|
+
*/
|
|
36
|
+
export interface IPttDiagnostic {
|
|
37
|
+
readonly turnId: string;
|
|
38
|
+
readonly msHeld: number;
|
|
39
|
+
readonly chunksSent: number;
|
|
40
|
+
readonly samplesSent: number;
|
|
41
|
+
readonly drainFired: boolean;
|
|
42
|
+
readonly drainChunks: number;
|
|
43
|
+
readonly drainSamples: number;
|
|
44
|
+
readonly drainWindowMs: number;
|
|
45
|
+
readonly drainSkippedByMute: number;
|
|
46
|
+
readonly drainSkippedBySuppression: number;
|
|
47
|
+
readonly postReleaseCallbacks: number;
|
|
48
|
+
readonly postReleaseSamples: number;
|
|
49
|
+
readonly postReleaseSkippedByMute: number;
|
|
50
|
+
readonly postReleaseSkippedBySuppression: number;
|
|
51
|
+
readonly postReleaseWindowMs: number;
|
|
52
|
+
readonly releasedDuringAcquire: boolean;
|
|
53
|
+
readonly pttUpWithoutCapture: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare class MicCaptureService extends Disposable implements IMicCaptureService {
|
|
56
|
+
private readonly storageService;
|
|
57
|
+
private readonly notificationService;
|
|
58
|
+
private readonly logService;
|
|
59
|
+
readonly _serviceBrand: undefined;
|
|
60
|
+
constructor(storageService: IStorageService, notificationService: INotificationService, logService: ILogService);
|
|
61
|
+
private _window;
|
|
62
|
+
private _micStream;
|
|
63
|
+
private _micCtx;
|
|
64
|
+
private _scriptNode;
|
|
65
|
+
private _analyserNode;
|
|
66
|
+
private _isCapturing;
|
|
67
|
+
private _pttHeld;
|
|
68
|
+
private _pttStreaming;
|
|
69
|
+
private _isMuted;
|
|
70
|
+
private _suppressUntilTs;
|
|
71
|
+
private _pttAcquiring;
|
|
72
|
+
private _pttReleasedDuringAcquire;
|
|
73
|
+
private static readonly _PTT_DRAIN_WINDOW_MS;
|
|
74
|
+
private _pttDrainTargetSamples;
|
|
75
|
+
private _pttDrainSamplesSent;
|
|
76
|
+
private _pttDrainFallbackTimer;
|
|
77
|
+
private static readonly _DIAG_POST_RELEASE_WINDOW_MS;
|
|
78
|
+
private _diagTurnId;
|
|
79
|
+
private _diagPttDownTs;
|
|
80
|
+
private _diagPttUpTs;
|
|
81
|
+
private _diagChunksSent;
|
|
82
|
+
private _diagSamplesSent;
|
|
83
|
+
private _diagDrainFired;
|
|
84
|
+
private _diagDrainChunks;
|
|
85
|
+
private _diagDrainSamples;
|
|
86
|
+
private _diagDrainSkippedByMute;
|
|
87
|
+
private _diagDrainSkippedBySuppression;
|
|
88
|
+
private _diagPostReleaseCallbacks;
|
|
89
|
+
private _diagPostReleaseSamples;
|
|
90
|
+
private _diagPostReleaseSkippedByMute;
|
|
91
|
+
private _diagPostReleaseSkippedBySuppression;
|
|
92
|
+
private _diagReleasedDuringAcquire;
|
|
93
|
+
private _diagPttUpWithoutCapture;
|
|
94
|
+
private _diagFireTimer;
|
|
95
|
+
private readonly _onPttStart;
|
|
96
|
+
readonly onPttStart: Event<void>;
|
|
97
|
+
private readonly _onPttAudioChunk;
|
|
98
|
+
readonly onPttAudioChunk: Event<string>;
|
|
99
|
+
private readonly _onPttEnd;
|
|
100
|
+
readonly onPttEnd: Event<void>;
|
|
101
|
+
private readonly _onPttDiagnostic;
|
|
102
|
+
readonly onPttDiagnostic: Event<IPttDiagnostic>;
|
|
103
|
+
get isCapturing(): boolean;
|
|
104
|
+
get analyserNode(): AnalyserNode | undefined;
|
|
105
|
+
get isMuted(): boolean;
|
|
106
|
+
set isMuted(value: boolean);
|
|
107
|
+
suppressUntil(timestamp: number): void;
|
|
108
|
+
prepare(window: Window & typeof globalThis): void;
|
|
109
|
+
pttDown(turnId: string): Promise<void>;
|
|
110
|
+
pttUp(): void;
|
|
111
|
+
startCapture(window: Window & typeof globalThis): Promise<void>;
|
|
112
|
+
private _notifyMicPermissionDenied;
|
|
113
|
+
stopCapture(): void;
|
|
114
|
+
dispose(): void;
|
|
115
|
+
/**
|
|
116
|
+
* End the post-release drain phase: stop accepting more audio for
|
|
117
|
+
* this turn and fire `_onPttEnd`. Idempotent. Safe to call when no
|
|
118
|
+
* drain is in progress.
|
|
119
|
+
*/
|
|
120
|
+
private _finishDrain;
|
|
121
|
+
private _resetDiagnosticCounters;
|
|
122
|
+
private _scheduleDiagnosticFire;
|
|
123
|
+
private _flushPendingDiagnostic;
|
|
124
|
+
private _emitDiagnostic;
|
|
125
|
+
}
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
6
|
+
import { StorageScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
7
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
9
|
+
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
10
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
|
+
import { AgentsVoiceStorageKeys } from '../../../agentsVoice/common/agentsVoice.js';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
+
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
15
|
+
|
|
16
|
+
var MicCaptureService_1;
|
|
17
|
+
let MicCaptureService = class MicCaptureService extends Disposable {
|
|
18
|
+
static {
|
|
19
|
+
MicCaptureService_1 = this;
|
|
20
|
+
}
|
|
21
|
+
constructor(storageService, notificationService, logService) {
|
|
22
|
+
super();
|
|
23
|
+
this.storageService = storageService;
|
|
24
|
+
this.notificationService = notificationService;
|
|
25
|
+
this.logService = logService;
|
|
26
|
+
this._micStream = null;
|
|
27
|
+
this._isCapturing = false;
|
|
28
|
+
this._pttHeld = false;
|
|
29
|
+
this._pttStreaming = false;
|
|
30
|
+
this._isMuted = false;
|
|
31
|
+
this._suppressUntilTs = 0;
|
|
32
|
+
this._pttAcquiring = false;
|
|
33
|
+
this._pttReleasedDuringAcquire = false;
|
|
34
|
+
this._pttDrainTargetSamples = 0;
|
|
35
|
+
this._pttDrainSamplesSent = 0;
|
|
36
|
+
this._diagTurnId = "";
|
|
37
|
+
this._diagPttDownTs = 0;
|
|
38
|
+
this._diagPttUpTs = 0;
|
|
39
|
+
this._diagChunksSent = 0;
|
|
40
|
+
this._diagSamplesSent = 0;
|
|
41
|
+
this._diagDrainFired = false;
|
|
42
|
+
this._diagDrainChunks = 0;
|
|
43
|
+
this._diagDrainSamples = 0;
|
|
44
|
+
this._diagDrainSkippedByMute = 0;
|
|
45
|
+
this._diagDrainSkippedBySuppression = 0;
|
|
46
|
+
this._diagPostReleaseCallbacks = 0;
|
|
47
|
+
this._diagPostReleaseSamples = 0;
|
|
48
|
+
this._diagPostReleaseSkippedByMute = 0;
|
|
49
|
+
this._diagPostReleaseSkippedBySuppression = 0;
|
|
50
|
+
this._diagReleasedDuringAcquire = false;
|
|
51
|
+
this._diagPttUpWithoutCapture = false;
|
|
52
|
+
this._onPttStart = this._register(( new Emitter()));
|
|
53
|
+
this.onPttStart = this._onPttStart.event;
|
|
54
|
+
this._onPttAudioChunk = this._register(( new Emitter()));
|
|
55
|
+
this.onPttAudioChunk = this._onPttAudioChunk.event;
|
|
56
|
+
this._onPttEnd = this._register(( new Emitter()));
|
|
57
|
+
this.onPttEnd = this._onPttEnd.event;
|
|
58
|
+
this._onPttDiagnostic = this._register(( new Emitter()));
|
|
59
|
+
this.onPttDiagnostic = this._onPttDiagnostic.event;
|
|
60
|
+
}
|
|
61
|
+
static {
|
|
62
|
+
this._PTT_DRAIN_WINDOW_MS = 500;
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
this._DIAG_POST_RELEASE_WINDOW_MS = 1000;
|
|
66
|
+
}
|
|
67
|
+
get isCapturing() {
|
|
68
|
+
return this._isCapturing;
|
|
69
|
+
}
|
|
70
|
+
get analyserNode() {
|
|
71
|
+
return this._analyserNode;
|
|
72
|
+
}
|
|
73
|
+
get isMuted() {
|
|
74
|
+
return this._isMuted;
|
|
75
|
+
}
|
|
76
|
+
set isMuted(value) {
|
|
77
|
+
this._isMuted = value;
|
|
78
|
+
}
|
|
79
|
+
suppressUntil(timestamp) {
|
|
80
|
+
this._suppressUntilTs = timestamp;
|
|
81
|
+
}
|
|
82
|
+
prepare(window) {
|
|
83
|
+
this._window = window;
|
|
84
|
+
}
|
|
85
|
+
async pttDown(turnId) {
|
|
86
|
+
if (this._pttHeld) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this._finishDrain();
|
|
90
|
+
this._flushPendingDiagnostic();
|
|
91
|
+
this._resetDiagnosticCounters(turnId);
|
|
92
|
+
this._pttHeld = true;
|
|
93
|
+
this._pttStreaming = true;
|
|
94
|
+
this._pttReleasedDuringAcquire = false;
|
|
95
|
+
this._isMuted = false;
|
|
96
|
+
if (this._isCapturing) {
|
|
97
|
+
this._onPttStart.fire();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (!this._window) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (this._pttAcquiring) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this._pttAcquiring = true;
|
|
107
|
+
try {
|
|
108
|
+
await this.startCapture(this._window);
|
|
109
|
+
} catch (err) {
|
|
110
|
+
this._pttHeld = false;
|
|
111
|
+
this._pttStreaming = false;
|
|
112
|
+
this._pttAcquiring = false;
|
|
113
|
+
this._pttReleasedDuringAcquire = false;
|
|
114
|
+
throw err;
|
|
115
|
+
}
|
|
116
|
+
this._pttAcquiring = false;
|
|
117
|
+
this._onPttStart.fire();
|
|
118
|
+
if (this._pttReleasedDuringAcquire) {
|
|
119
|
+
this._pttReleasedDuringAcquire = false;
|
|
120
|
+
this._pttStreaming = false;
|
|
121
|
+
this._diagReleasedDuringAcquire = true;
|
|
122
|
+
this._onPttEnd.fire();
|
|
123
|
+
this.stopCapture();
|
|
124
|
+
this._scheduleDiagnosticFire();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
pttUp() {
|
|
128
|
+
if (!this._pttHeld) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (this._pttAcquiring) {
|
|
132
|
+
this._pttReleasedDuringAcquire = true;
|
|
133
|
+
this._diagReleasedDuringAcquire = true;
|
|
134
|
+
this._diagPttUpTs = Date.now();
|
|
135
|
+
this._scheduleDiagnosticFire();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!this._isCapturing) {
|
|
139
|
+
this._pttHeld = false;
|
|
140
|
+
this._pttStreaming = false;
|
|
141
|
+
this._diagPttUpWithoutCapture = true;
|
|
142
|
+
this._diagPttUpTs = Date.now();
|
|
143
|
+
this._scheduleDiagnosticFire();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this._pttHeld = false;
|
|
147
|
+
this._diagPttUpTs = Date.now();
|
|
148
|
+
const sampleRate = this._micCtx?.sampleRate ?? 16000;
|
|
149
|
+
this._pttDrainTargetSamples = Math.ceil(sampleRate * MicCaptureService_1._PTT_DRAIN_WINDOW_MS / 1000);
|
|
150
|
+
this._pttDrainSamplesSent = 0;
|
|
151
|
+
this._pttDrainFallbackTimer = setTimeout(() => {
|
|
152
|
+
this._pttDrainFallbackTimer = undefined;
|
|
153
|
+
this._finishDrain();
|
|
154
|
+
}, MicCaptureService_1._PTT_DRAIN_WINDOW_MS + 250);
|
|
155
|
+
this._scheduleDiagnosticFire();
|
|
156
|
+
}
|
|
157
|
+
async startCapture(window) {
|
|
158
|
+
this._window = window;
|
|
159
|
+
if (this._isCapturing) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const deviceId = this.storageService.get(AgentsVoiceStorageKeys.MicrophoneDevice, StorageScope.APPLICATION);
|
|
163
|
+
const audioConstraints = {
|
|
164
|
+
channelCount: 1,
|
|
165
|
+
sampleRate: 16000,
|
|
166
|
+
echoCancellation: true,
|
|
167
|
+
noiseSuppression: true
|
|
168
|
+
};
|
|
169
|
+
if (deviceId) {
|
|
170
|
+
audioConstraints.deviceId = {
|
|
171
|
+
exact: deviceId
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
let micStream;
|
|
175
|
+
try {
|
|
176
|
+
micStream = await window.navigator.mediaDevices.getUserMedia({
|
|
177
|
+
audio: audioConstraints
|
|
178
|
+
});
|
|
179
|
+
} catch (err) {
|
|
180
|
+
const isDeviceError = deviceId && err instanceof DOMException && (err.name === "OverconstrainedError" || err.name === "NotFoundError");
|
|
181
|
+
if (isDeviceError) {
|
|
182
|
+
this.logService.warn(
|
|
183
|
+
`[mic] Preferred device ${deviceId.slice(0, 8)}… unavailable, falling back to default`
|
|
184
|
+
);
|
|
185
|
+
delete audioConstraints.deviceId;
|
|
186
|
+
try {
|
|
187
|
+
micStream = await window.navigator.mediaDevices.getUserMedia({
|
|
188
|
+
audio: audioConstraints
|
|
189
|
+
});
|
|
190
|
+
} catch (retryErr) {
|
|
191
|
+
this._notifyMicPermissionDenied(retryErr);
|
|
192
|
+
throw retryErr;
|
|
193
|
+
}
|
|
194
|
+
} else {
|
|
195
|
+
this._notifyMicPermissionDenied(err);
|
|
196
|
+
throw err;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
this._micStream = micStream;
|
|
200
|
+
if (!this._micCtx) {
|
|
201
|
+
this._micCtx = new window.AudioContext({
|
|
202
|
+
sampleRate: 16000
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
const ctx = this._micCtx;
|
|
206
|
+
const source = ctx.createMediaStreamSource(micStream);
|
|
207
|
+
const analyser = ctx.createAnalyser();
|
|
208
|
+
analyser.fftSize = 256;
|
|
209
|
+
source.connect(analyser);
|
|
210
|
+
this._analyserNode = analyser;
|
|
211
|
+
const processor = ctx.createScriptProcessor(2048, 1, 1);
|
|
212
|
+
this._scriptNode = processor;
|
|
213
|
+
processor.onaudioprocess = e => {
|
|
214
|
+
const nowTs = Date.now();
|
|
215
|
+
const ptUpTs = this._diagPttUpTs;
|
|
216
|
+
const isDrainCallback = this._pttStreaming && !this._pttHeld;
|
|
217
|
+
const inDiagWindow = ptUpTs > 0 && !this._pttHeld && nowTs <= ptUpTs + MicCaptureService_1._DIAG_POST_RELEASE_WINDOW_MS;
|
|
218
|
+
const isPostReleaseCallback = !this._pttStreaming && inDiagWindow;
|
|
219
|
+
if (this._isMuted) {
|
|
220
|
+
if (isDrainCallback) {
|
|
221
|
+
this._diagDrainSkippedByMute++;
|
|
222
|
+
}
|
|
223
|
+
if (isPostReleaseCallback) {
|
|
224
|
+
this._diagPostReleaseSkippedByMute++;
|
|
225
|
+
}
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (nowTs < this._suppressUntilTs) {
|
|
229
|
+
if (isDrainCallback) {
|
|
230
|
+
this._diagDrainSkippedBySuppression++;
|
|
231
|
+
}
|
|
232
|
+
if (isPostReleaseCallback) {
|
|
233
|
+
this._diagPostReleaseSkippedBySuppression++;
|
|
234
|
+
}
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (!this._pttStreaming) {
|
|
238
|
+
if (isPostReleaseCallback) {
|
|
239
|
+
this._diagPostReleaseCallbacks++;
|
|
240
|
+
this._diagPostReleaseSamples += e.inputBuffer.length;
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const channelData = e.inputBuffer.getChannelData(0);
|
|
245
|
+
const samples = ( new Float32Array(channelData));
|
|
246
|
+
const b64 = encodeRawPcm16Base64(samples, this._window);
|
|
247
|
+
this._diagChunksSent++;
|
|
248
|
+
this._diagSamplesSent += samples.length;
|
|
249
|
+
if (isDrainCallback) {
|
|
250
|
+
this._diagDrainFired = true;
|
|
251
|
+
this._diagDrainChunks++;
|
|
252
|
+
this._diagDrainSamples += samples.length;
|
|
253
|
+
this._pttDrainSamplesSent += samples.length;
|
|
254
|
+
}
|
|
255
|
+
this._onPttAudioChunk.fire(b64);
|
|
256
|
+
if (isDrainCallback && this._pttDrainSamplesSent >= this._pttDrainTargetSamples) {
|
|
257
|
+
this._finishDrain();
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
source.connect(processor);
|
|
261
|
+
processor.connect(ctx.destination);
|
|
262
|
+
this._isCapturing = true;
|
|
263
|
+
}
|
|
264
|
+
_notifyMicPermissionDenied(err) {
|
|
265
|
+
if (err instanceof DOMException && err.name === "NotAllowedError") {
|
|
266
|
+
this.notificationService.notify({
|
|
267
|
+
severity: Severity.Error,
|
|
268
|
+
message: ( localize(
|
|
269
|
+
7762,
|
|
270
|
+
"Microphone access was denied. Grant microphone permission in your system settings to use Voice Mode."
|
|
271
|
+
))
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
stopCapture() {
|
|
276
|
+
if (this._pttDrainFallbackTimer) {
|
|
277
|
+
clearTimeout(this._pttDrainFallbackTimer);
|
|
278
|
+
this._pttDrainFallbackTimer = undefined;
|
|
279
|
+
}
|
|
280
|
+
this._pttDrainTargetSamples = 0;
|
|
281
|
+
this._pttDrainSamplesSent = 0;
|
|
282
|
+
if (this._scriptNode) {
|
|
283
|
+
this._scriptNode.disconnect();
|
|
284
|
+
this._scriptNode = undefined;
|
|
285
|
+
}
|
|
286
|
+
this._analyserNode = undefined;
|
|
287
|
+
this._micCtx?.close();
|
|
288
|
+
this._micCtx = undefined;
|
|
289
|
+
if (this._micStream) {
|
|
290
|
+
this._micStream.getTracks().forEach(t => t.stop());
|
|
291
|
+
this._micStream = null;
|
|
292
|
+
}
|
|
293
|
+
this._isCapturing = false;
|
|
294
|
+
this._pttHeld = false;
|
|
295
|
+
this._pttStreaming = false;
|
|
296
|
+
this._pttReleasedDuringAcquire = false;
|
|
297
|
+
}
|
|
298
|
+
dispose() {
|
|
299
|
+
if (this._diagFireTimer) {
|
|
300
|
+
clearTimeout(this._diagFireTimer);
|
|
301
|
+
this._diagFireTimer = undefined;
|
|
302
|
+
}
|
|
303
|
+
if (this._pttDrainFallbackTimer) {
|
|
304
|
+
clearTimeout(this._pttDrainFallbackTimer);
|
|
305
|
+
this._pttDrainFallbackTimer = undefined;
|
|
306
|
+
}
|
|
307
|
+
this.stopCapture();
|
|
308
|
+
super.dispose();
|
|
309
|
+
}
|
|
310
|
+
_finishDrain() {
|
|
311
|
+
if (this._pttDrainFallbackTimer) {
|
|
312
|
+
clearTimeout(this._pttDrainFallbackTimer);
|
|
313
|
+
this._pttDrainFallbackTimer = undefined;
|
|
314
|
+
}
|
|
315
|
+
this._pttDrainTargetSamples = 0;
|
|
316
|
+
this._pttDrainSamplesSent = 0;
|
|
317
|
+
if (this._pttStreaming && !this._pttHeld) {
|
|
318
|
+
this._pttStreaming = false;
|
|
319
|
+
this._onPttEnd.fire();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
_resetDiagnosticCounters(turnId) {
|
|
323
|
+
this._diagTurnId = turnId;
|
|
324
|
+
this._diagPttDownTs = Date.now();
|
|
325
|
+
this._diagPttUpTs = 0;
|
|
326
|
+
this._diagChunksSent = 0;
|
|
327
|
+
this._diagSamplesSent = 0;
|
|
328
|
+
this._diagDrainFired = false;
|
|
329
|
+
this._diagDrainChunks = 0;
|
|
330
|
+
this._diagDrainSamples = 0;
|
|
331
|
+
this._diagDrainSkippedByMute = 0;
|
|
332
|
+
this._diagDrainSkippedBySuppression = 0;
|
|
333
|
+
this._diagPostReleaseCallbacks = 0;
|
|
334
|
+
this._diagPostReleaseSamples = 0;
|
|
335
|
+
this._diagPostReleaseSkippedByMute = 0;
|
|
336
|
+
this._diagPostReleaseSkippedBySuppression = 0;
|
|
337
|
+
this._diagReleasedDuringAcquire = false;
|
|
338
|
+
this._diagPttUpWithoutCapture = false;
|
|
339
|
+
}
|
|
340
|
+
_scheduleDiagnosticFire() {
|
|
341
|
+
if (this._diagFireTimer) {
|
|
342
|
+
clearTimeout(this._diagFireTimer);
|
|
343
|
+
this._diagFireTimer = undefined;
|
|
344
|
+
}
|
|
345
|
+
this._diagFireTimer = setTimeout(() => {
|
|
346
|
+
this._diagFireTimer = undefined;
|
|
347
|
+
this._emitDiagnostic();
|
|
348
|
+
}, MicCaptureService_1._DIAG_POST_RELEASE_WINDOW_MS);
|
|
349
|
+
}
|
|
350
|
+
_flushPendingDiagnostic() {
|
|
351
|
+
if (this._diagFireTimer) {
|
|
352
|
+
clearTimeout(this._diagFireTimer);
|
|
353
|
+
this._diagFireTimer = undefined;
|
|
354
|
+
this._emitDiagnostic();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
_emitDiagnostic() {
|
|
358
|
+
if (!this._diagTurnId && this._diagPttDownTs === 0) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
const msHeld = this._diagPttUpTs > 0 ? this._diagPttUpTs - this._diagPttDownTs : 0;
|
|
362
|
+
this._onPttDiagnostic.fire({
|
|
363
|
+
turnId: this._diagTurnId,
|
|
364
|
+
msHeld,
|
|
365
|
+
chunksSent: this._diagChunksSent,
|
|
366
|
+
samplesSent: this._diagSamplesSent,
|
|
367
|
+
drainFired: this._diagDrainFired,
|
|
368
|
+
drainChunks: this._diagDrainChunks,
|
|
369
|
+
drainSamples: this._diagDrainSamples,
|
|
370
|
+
drainWindowMs: MicCaptureService_1._PTT_DRAIN_WINDOW_MS,
|
|
371
|
+
drainSkippedByMute: this._diagDrainSkippedByMute,
|
|
372
|
+
drainSkippedBySuppression: this._diagDrainSkippedBySuppression,
|
|
373
|
+
postReleaseCallbacks: this._diagPostReleaseCallbacks,
|
|
374
|
+
postReleaseSamples: this._diagPostReleaseSamples,
|
|
375
|
+
postReleaseSkippedByMute: this._diagPostReleaseSkippedByMute,
|
|
376
|
+
postReleaseSkippedBySuppression: this._diagPostReleaseSkippedBySuppression,
|
|
377
|
+
postReleaseWindowMs: MicCaptureService_1._DIAG_POST_RELEASE_WINDOW_MS,
|
|
378
|
+
releasedDuringAcquire: this._diagReleasedDuringAcquire,
|
|
379
|
+
pttUpWithoutCapture: this._diagPttUpWithoutCapture
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
MicCaptureService = MicCaptureService_1 = ( __decorate([( __param(0, IStorageService)), ( __param(1, INotificationService)), ( __param(2, ILogService))], MicCaptureService));
|
|
384
|
+
function encodeRawPcm16Base64(samples, win) {
|
|
385
|
+
const buf = ( new ArrayBuffer(samples.length * 2));
|
|
386
|
+
const view = ( new DataView(buf));
|
|
387
|
+
for (let i = 0; i < samples.length; i++) {
|
|
388
|
+
const s = Math.max(-1, Math.min(1, samples[i]));
|
|
389
|
+
view.setInt16(i * 2, s < 0 ? s * 0x8000 : s * 0x7FFF, true);
|
|
390
|
+
}
|
|
391
|
+
const bytes = ( new Uint8Array(buf));
|
|
392
|
+
let binaryStr = "";
|
|
393
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
394
|
+
binaryStr += String.fromCharCode(bytes[i]);
|
|
395
|
+
}
|
|
396
|
+
return win.btoa(binaryStr);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export { MicCaptureService };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { ITtsPlaybackService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.service";
|
|
5
|
+
export declare class TtsPlaybackService extends Disposable implements ITtsPlaybackService {
|
|
6
|
+
private readonly logService;
|
|
7
|
+
readonly _serviceBrand: undefined;
|
|
8
|
+
constructor(logService: ILogService);
|
|
9
|
+
private _window;
|
|
10
|
+
private _playbackCtx;
|
|
11
|
+
private _playbackTurn;
|
|
12
|
+
private _playbackGen;
|
|
13
|
+
private _analyserNode;
|
|
14
|
+
private _isPlaying;
|
|
15
|
+
private _lastPlayedSamples;
|
|
16
|
+
private readonly _onPlaybackStarted;
|
|
17
|
+
readonly onPlaybackStarted: Event<void>;
|
|
18
|
+
private readonly _onPlaybackStopped;
|
|
19
|
+
readonly onPlaybackStopped: Event<void>;
|
|
20
|
+
get isPlaying(): boolean;
|
|
21
|
+
get analyserNode(): AnalyserNode | undefined;
|
|
22
|
+
getLastPlayedSamples(): Float32Array | null;
|
|
23
|
+
ensureContext(window: Window & typeof globalThis): AudioContext;
|
|
24
|
+
playAudioChunk(audio: string, isFinal: boolean, window: Window & typeof globalThis): void;
|
|
25
|
+
stopPlayback(): void;
|
|
26
|
+
/** Close the AudioContext entirely (for full teardown). */
|
|
27
|
+
closeContext(): void;
|
|
28
|
+
private _ensurePlayTurn;
|
|
29
|
+
private _writeToPlayBuffer;
|
|
30
|
+
private _startPlayback;
|
|
31
|
+
private _schedulePlayStop;
|
|
32
|
+
private _captureSamples;
|
|
33
|
+
dispose(): void;
|
|
34
|
+
}
|