@codingame/monaco-vscode-chat-service-override 37.6.0 → 38.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/common.js +64 -2
- package/index.js +3 -3
- package/package.json +5 -5
- package/session.js +5 -1
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +13 -2
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +164 -12
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +4 -2
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +8 -2
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +34 -4
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +345 -48
- package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.d.ts +135 -0
- package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.js +510 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +4 -1
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +12 -2
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +2 -11
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +14 -27
- package/vscode/src/vs/platform/agentHost/common/agentHostOperatingSystem.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostOperatingSystem.js +43 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +158 -73
- package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.js +26 -0
- package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.d.ts +273 -0
- package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.js +61 -0
- package/vscode/src/vs/platform/agentHost/common/codexAccountPlan.d.ts +3 -0
- package/vscode/src/vs/platform/agentHost/common/codexAccountPlan.js +30 -0
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +8 -8
- package/vscode/src/vs/platform/agentHost/common/meta/agentHostChatInputState.d.ts +2 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.d.ts +7 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.js +17 -0
- package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.js +48 -0
- package/vscode/src/vs/platform/agentHost/common/meta/{agentCustomizationMeta.js → vscode/agentCustomizationMeta.js} +2 -2
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentHostChatInputState.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentHostChatInputState.js +16 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelConfigurationMeta.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelConfigurationMeta.js +20 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.js +11 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.js +141 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.js +25 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentSandboxDiagnostics.d.ts +5 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentSandboxDiagnostics.js +11 -0
- package/vscode/src/vs/platform/agentHost/common/meta/{clientPluginCustomizationMeta.d.ts → vscode/clientPluginCustomizationMeta.d.ts} +10 -0
- package/vscode/src/vs/platform/agentHost/common/meta/{clientPluginCustomizationMeta.js → vscode/clientPluginCustomizationMeta.js} +7 -1
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +35 -24
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +85 -20
- package/vscode/src/vs/platform/agentHost/common/sessionDataService.d.ts +440 -0
- package/vscode/src/vs/platform/agentHost/common/sessionDataService.js +11 -0
- package/vscode/src/vs/platform/agentHost/common/sessionDataService.service.d.ts +104 -0
- package/vscode/src/vs/platform/agentHost/common/taskEventReplay.d.ts +48 -0
- package/vscode/src/vs/platform/agentHost/common/taskEventReplay.js +238 -0
- package/vscode/src/vs/platform/agentHost/common/titleGenerationConfiguration.d.ts +35 -0
- package/vscode/src/vs/platform/agentHost/common/titleGenerationConfiguration.js +49 -0
- package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.d.ts +9 -0
- package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.js +13 -0
- package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.d.ts +102 -0
- package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.js +260 -0
- package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.d.ts +102 -0
- package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.js +115 -0
- package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.d.ts +46 -0
- package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.js +92 -0
- package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.d.ts +22 -0
- package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.js +158 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +12 -5
- package/vscode/src/vs/platform/otel/common/chatUserInteraction.d.ts +20 -0
- package/vscode/src/vs/platform/otel/common/chatUserInteraction.js +45 -0
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +1 -4
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +0 -9
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +1 -4
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -15
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +1 -1
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +6 -24
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +51 -109
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +1 -1
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +1 -1
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.js +7 -7
- package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffView.js +8 -8
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +1 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +11 -10
- package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.js +2 -2
- package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.js +6 -6
- package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.js +460 -94
- package/vscode/src/vs/sessions/contrib/chat/browser/chatBackgroundTint.d.ts +35 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/chatBackgroundTint.js +652 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +9 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.d.ts +11 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.js +118 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.js +4 -4
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionOnboardingTargets.d.ts +7 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionOnboardingTargets.js +36 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionPickerTryout.d.ts +26 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionPickerTryout.js +145 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.d.ts +1 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.js +24 -6
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.js +94 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptCustomTaskWidget.js +21 -21
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.d.ts +0 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.js +28 -29
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.d.ts +7 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.js +501 -107
- package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.js +5 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/workbenchSessionTaskRunner.d.ts +3 -3
- package/vscode/src/vs/sessions/contrib/chat/browser/workbenchSessionTaskRunner.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.d.ts +8 -1
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.js +214 -17
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.js +16 -9
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.js +7 -6
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/mobile/mobileChatPhoneInputPresenter.js +226 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openAgentHostStateFileAction.js +1 -1
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.d.ts +11 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.js +122 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.js +695 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.d.ts +4 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.js +39 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +39 -22
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.d.ts +1 -19
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +42 -158
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +87 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +176 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +422 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +2444 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.d.ts +91 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.js +620 -0
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.d.ts +5 -4
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.js +21 -12
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +2 -11
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +46 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +321 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +104 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +345 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.d.ts +14 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.js +20 -3
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.d.ts +7 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.js +8 -12
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.d.ts +8 -4
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.js +88 -84
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.js +74 -20
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/hostFilter.css +34 -19
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/hostPickerSheet.css +35 -3
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.d.ts +37 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +305 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.d.ts +4 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.js +75 -20
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.d.ts +1 -80
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.js +19 -548
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.d.ts +4 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +218 -122
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.d.ts +5 -4
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.js +43 -8
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.js +1 -1
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/media/sessionWorktreeCleanupEditor.css +223 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionStorageCleanupConfiguration.d.ts +2 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionStorageCleanupConfiguration.js +16 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.js +49 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.d.ts +66 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.js +458 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditorInput.d.ts +13 -0
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditorInput.js +35 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/customizationMcpServerCount.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/customizationMcpServerCount.js +37 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.js +4 -4
- package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.d.ts +1 -1
- package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.js +5 -1
- package/vscode/src/vs/sessions/skills/create-draft-pr/SKILL.md +1 -1
- package/vscode/src/vs/sessions/skills/create-pr/SKILL.md +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +56 -31
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +21 -21
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +14 -14
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +30 -29
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +44 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatBackgroundShellOutputAccessibleView.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatBackgroundShellOutputAccessibleView.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +85 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatTerminalOutputAccessibleView.js +33 -1
- 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 +318 -103
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +60 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +41 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +49 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +15 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +24 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +44 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +22 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +180 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +82 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +32 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +37 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +53 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputState.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputState.js +144 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +88 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.js +642 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFirstResponseTelemetry.d.ts +118 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFirstResponseTelemetry.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +49 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +21 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.js +415 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +124 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +116 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRemoteByokNotification.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRemoteByokNotification.js +134 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +14 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +286 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotifications.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotifications.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +52 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +1030 -349
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +20 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +722 -114
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +88 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +16 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +87 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +12 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +191 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +27 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuation.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuation.contribution.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationGuide.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationGuide.js +415 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationPresenter.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationPresenter.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +122 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +22 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +74 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +89 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +50 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.d.ts +81 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +213 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +136 -100
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationUrlHandler.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationUrlHandler.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.d.ts +139 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.js +944 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplace.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplace.contribution.js +119 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.js +1485 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallationAssociation.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallationAssociation.js +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.js +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +19 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +6 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +87 -263
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationsTelemetryService.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationsTelemetryService.js +217 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.js +605 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +377 -184
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +753 -617
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +118 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +124 -124
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
- 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/chatDebugEnablement.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +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 +35 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +47 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +29 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +6 -3
- 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.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +11 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +24 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +16 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +12 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +52 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +17 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatNetworkConfiguration.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatNetworkConfiguration.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +52 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +71 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +104 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +84 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetColorsWidget.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetColorsWidget.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.js +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +52 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +65 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.js +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +5 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +93 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +54 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +51 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.js +230 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/codexStatusEntry.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/codexStatusEntry.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +30 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatUserInteractionOTel.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatUserInteractionOTel.js +88 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +7 -7
- 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/editorChatUsage.contribution.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/editorChatUsage.contribution.js +121 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatHarnessSwitchFeedbackSurveyService.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatHarnessSwitchFeedbackSurveyService.js +192 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.js +11 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +232 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/modelPickerTryout.contribution.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/modelPickerTryout.contribution.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +11 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +13 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +250 -92
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +39 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +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/promptTimeline/promptTimeline.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.js +561 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.d.ts +133 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.js +1176 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.js +220 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.js +184 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.js +162 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.js +129 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.d.ts +166 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.js +838 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.js +604 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +251 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.d.ts +289 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.js +497 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +277 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.js +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +178 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.js +398 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.js +296 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +96 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthentication.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthentication.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +559 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.js +26 -0
- package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostCustomizationHarness.d.ts +1 -1
- package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostCustomizationHarness.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +45 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatUpdateRequiredView.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatUpdateRequiredView.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +39 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +68 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +16 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/all_/_.png.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-insiders-96.png +0 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-insiders-96.spritesheet.png +0 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-stable-96.png +0 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-stable-96.spritesheet.png +0 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +15 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +122 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +46 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +18 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +406 -193
- package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/onboarding/modelPickerTryout.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/onboarding/modelPickerTryout.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/onboarding/newSessionPickerTryout.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/onboarding/newSessionPickerTryout.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +455 -237
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +25 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
- 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 +11 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +156 -155
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.js +225 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +65 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +46 -24
- package/vscode/src/vs/workbench/contrib/github/browser/githubCommitResolver.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/github/browser/githubCommitResolver.js +92 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +22 -15
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
- 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/inlineChatEditReviewSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.js +1 -1
- 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/onboarding/browser/onboarding.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/onboarding/browser/spotlight/spotlightStep.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.js +1 -1
- 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 +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +3 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -5
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +79 -82
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +3 -3
- 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.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +103 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +8 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +16 -60
- package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +3 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.js +1 -1
- package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuation.d.ts +31 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuation.js +86 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuationService.d.ts +76 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuationService.js +409 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +14 -2
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +56 -7
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +0 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +0 -19
- package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.d.ts +0 -24
- package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.js +0 -13
- package/vscode/src/vs/platform/agentHost/common/agentModelPricing.js +0 -53
- package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.d.ts +0 -53
- package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.js +0 -45
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +0 -108
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +0 -15
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.d.ts +0 -31
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.js +0 -150
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.contribution.js +0 -37
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.d.ts +0 -26
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.js +0 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +0 -241
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.d.ts +0 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +0 -746
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +0 -164
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +0 -485
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.d.ts +0 -137
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +0 -714
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentOpenChat.css +0 -379
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +0 -219
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +0 -222
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +0 -16
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +0 -39
- /package/vscode/src/vs/platform/agentHost/common/meta/{agentChatSurfaceMeta.d.ts → vscode/agentChatSurfaceMeta.d.ts} +0 -0
- /package/vscode/src/vs/platform/agentHost/common/meta/{agentChatSurfaceMeta.js → vscode/agentChatSurfaceMeta.js} +0 -0
- /package/vscode/src/vs/platform/agentHost/common/meta/{agentCustomizationMeta.d.ts → vscode/agentCustomizationMeta.d.ts} +0 -0
- /package/vscode/src/vs/platform/agentHost/common/meta/{agentEphemeralSessionMeta.d.ts → vscode/agentEphemeralSessionMeta.d.ts} +0 -0
- /package/vscode/src/vs/platform/agentHost/common/meta/{agentEphemeralSessionMeta.js → vscode/agentEphemeralSessionMeta.js} +0 -0
- /package/vscode/src/vs/platform/agentHost/common/{agentModelPricing.d.ts → meta/vscode/agentModelPricing.d.ts} +0 -0
- /package/vscode/src/vs/sessions/contrib/providers/{copilotChatSessions/browser/mobilePermissionPicker.contribution.d.ts → agentHost/browser/mobile/mobileChatPhoneInputPresenter.d.ts} +0 -0
- /package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostLogForwarder.d.ts +0 -0
- /package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostLogForwarder.js +0 -0
|
@@ -3,12 +3,11 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { raceCancellationError, DeferredPromise, raceTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
4
|
import { CancellationTokenSource, CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
5
|
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
6
|
-
import {
|
|
7
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
-
import {
|
|
9
|
-
import { MarkdownString, createMarkdownCommandLink } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
|
+
import { ErrorNoTelemetry, onUnexpectedError, isCancellationError, BugIndicatingError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
7
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
10
9
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
11
|
-
import { Disposable,
|
|
10
|
+
import { Disposable, DisposableResourceMap, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
12
11
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
13
12
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
14
13
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
@@ -31,10 +30,15 @@ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
31
30
|
import { isVirtualWorkspace } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/virtualWorkspace';
|
|
32
31
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
33
32
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
33
|
+
import { requiresCopilotAgentHost } from '@codingame/monaco-vscode-api/vscode/vs/platform/policy/common/copilotManagedSettings';
|
|
34
|
+
import { IManagedSettingsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/policy/common/copilotManagedSettings.service';
|
|
35
|
+
import { whenAccountPolicySettled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/policies/common/accountPolicyService';
|
|
36
|
+
import { IAccountPolicyGateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/policies/common/accountPolicyService.service';
|
|
34
37
|
import { IChatDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service';
|
|
35
38
|
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
36
39
|
import { awaitStatsForSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
37
40
|
import { clearChatMarks, markChat, ChatPerfMark } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatPerf';
|
|
41
|
+
import { CloudSandboxSessionTrace } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/cloudSandboxSessionTrace';
|
|
38
42
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
|
|
39
43
|
import { chatEditingSessionIsReady } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
40
44
|
import { logChangesToStateModel, normalizeSerializableChatData, ChatModel, getRestoredChatRequestSource, ChatRequestModel, ChatRequestRemovalReason, updateRanges, toChatHistoryContent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
@@ -42,15 +46,16 @@ import { ChatModelStore } from '../model/chatModelStore.js';
|
|
|
42
46
|
import { ChatRequestTextPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, getPromptText, chatSubcommandLeader, chatAgentLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
43
47
|
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
|
|
44
48
|
import { ChatPendingRequestChangeEventName, ChatRequestQueueKind, ChatMcpServersStarting, ChatStopCancellationNoopEventName, ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
45
|
-
import { ChatServiceTelemetry, ChatRequestTelemetry } from '
|
|
46
|
-
import {
|
|
49
|
+
import { ChatServiceTelemetry, getChatSessionTelemetryIds, ChatRequestTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry';
|
|
50
|
+
import { IAgentHostConnectionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService.service';
|
|
51
|
+
import { isAgentHostTarget, getChatSessionHistoryContent, localChatSessionType, isTerminalCommandPrompt } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
47
52
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
48
53
|
import { ChatSessionStore } from '../model/chatSessionStore.js';
|
|
49
54
|
import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service';
|
|
50
55
|
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service';
|
|
51
|
-
import { LocalChatSessionUri, getChatSessionType,
|
|
56
|
+
import { LocalChatSessionUri, getChatSessionType, isUntitledChatSession, chatSessionResourceToId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
52
57
|
import { isExplicitFileOrImageVariableEntry, IChatRequestVariableEntry, ChatRequestVariableSet, isPromptTextVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
53
|
-
import { ChatAgentLocation, ChatModeKind,
|
|
58
|
+
import { ChatConfiguration, ChatAgentLocation, isLocalChatSessionSubjectToManagedPolicy, ChatModeKind, getCopilotHarnessIntroductionMode, managedPolicyRequiresAgentHostMessage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
54
59
|
import { ChatMessageRole } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
55
60
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
56
61
|
import { ModelSelectionReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/modelSelection';
|
|
@@ -61,16 +66,14 @@ import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbenc
|
|
|
61
66
|
import { AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING, TROUBLESHOOT_COMMAND_NAME, COPILOT_SKILL_URI_SCHEME, TROUBLESHOOT_SKILL_PATH } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
62
67
|
import { mergeHooks } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
63
68
|
import { ComputeAutomaticInstructions } from '../promptSyntax/computeAutomaticInstructions.js';
|
|
64
|
-
import { CustomizationMigrationHintTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService';
|
|
65
69
|
import { findLast } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arraysFind';
|
|
66
70
|
import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
67
|
-
import {
|
|
71
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
68
72
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
69
73
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
70
74
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
71
75
|
|
|
72
76
|
const serializedChatKey = "interactive.sessions";
|
|
73
|
-
const customizationMigrationHintShownStateKey = "customizationMigrationHintShown";
|
|
74
77
|
function hasDraftInput(model) {
|
|
75
78
|
const state = model.inputModel.state.get();
|
|
76
79
|
if (!state) {
|
|
@@ -156,17 +159,6 @@ let ChatService = class ChatService extends Disposable {
|
|
|
156
159
|
waitForModelDisposals() {
|
|
157
160
|
return this._sessionModels.waitForModelDisposals();
|
|
158
161
|
}
|
|
159
|
-
registerCustomizationMigrationHintProvider(provider) {
|
|
160
|
-
if (this._customizationMigrationHintProvider) {
|
|
161
|
-
throw ( new BugIndicatingError("A customization migration hint provider is already registered"));
|
|
162
|
-
}
|
|
163
|
-
this._customizationMigrationHintProvider = provider;
|
|
164
|
-
return toDisposable(() => {
|
|
165
|
-
if (this._customizationMigrationHintProvider === provider) {
|
|
166
|
-
this._customizationMigrationHintProvider = undefined;
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
162
|
get isEmptyWindow() {
|
|
171
163
|
const workspace = this.workspaceContextService.getWorkspace();
|
|
172
164
|
return !workspace.configuration && workspace.folders.length === 0;
|
|
@@ -187,7 +179,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
187
179
|
promptsService,
|
|
188
180
|
chatEntitlementService,
|
|
189
181
|
languageModelsService,
|
|
190
|
-
chatDebugService
|
|
182
|
+
chatDebugService,
|
|
183
|
+
managedSettingsService,
|
|
184
|
+
accountPolicyGateService,
|
|
185
|
+
agentHostConnectionsService
|
|
191
186
|
) {
|
|
192
187
|
super();
|
|
193
188
|
this.storageService = storageService;
|
|
@@ -206,6 +201,8 @@ let ChatService = class ChatService extends Disposable {
|
|
|
206
201
|
this.chatEntitlementService = chatEntitlementService;
|
|
207
202
|
this.languageModelsService = languageModelsService;
|
|
208
203
|
this.chatDebugService = chatDebugService;
|
|
204
|
+
this.accountPolicyGateService = accountPolicyGateService;
|
|
205
|
+
this.agentHostConnectionsService = agentHostConnectionsService;
|
|
209
206
|
this._pendingRequests = this._register(( new DisposableResourceMap()));
|
|
210
207
|
this._queuedRequestDeferreds = ( new Map());
|
|
211
208
|
this._syntheticPendingRequests = ( new WeakSet());
|
|
@@ -213,6 +210,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
213
210
|
this._saveModelsEnabled = true;
|
|
214
211
|
this._onDidSubmitRequest = this._register(( new Emitter()));
|
|
215
212
|
this.onDidSubmitRequest = this._onDidSubmitRequest.event;
|
|
213
|
+
this._onDidAcceptRequest = this._register(( new Emitter()));
|
|
214
|
+
this.onDidAcceptRequest = this._onDidAcceptRequest.event;
|
|
215
|
+
this._modelsWithAcceptedRequests = ( new WeakSet());
|
|
216
|
+
this._serverManagedQueueModels = ( new WeakSet());
|
|
216
217
|
this._onDidPerformUserAction = this._register(( new Emitter()));
|
|
217
218
|
this.onDidPerformUserAction = this._onDidPerformUserAction.event;
|
|
218
219
|
this._onDidReceiveQuestionCarouselAnswer = this._register(( new Emitter()));
|
|
@@ -220,6 +221,18 @@ let ChatService = class ChatService extends Disposable {
|
|
|
220
221
|
this._onDidDisposeSession = this._register(( new Emitter()));
|
|
221
222
|
this.onDidDisposeSession = this._onDidDisposeSession.event;
|
|
222
223
|
this._sessionFollowupCancelTokens = this._register(( new DisposableResourceMap()));
|
|
224
|
+
this.policyInitialized = false;
|
|
225
|
+
this.managedPolicy = observableFromEvent(
|
|
226
|
+
this,
|
|
227
|
+
Event.any(managedSettingsService.onDidChangeManagedSettings, Event.filter(
|
|
228
|
+
configurationService.onDidChangeConfiguration,
|
|
229
|
+
event => event.affectsConfiguration(ChatConfiguration.TemporaryDefaultToLocalHarness)
|
|
230
|
+
)),
|
|
231
|
+
() => requiresCopilotAgentHost(managedSettingsService, configurationService)
|
|
232
|
+
);
|
|
233
|
+
void whenAccountPolicySettled(this.accountPolicyGateService).then(() => {
|
|
234
|
+
this.policyInitialized = true;
|
|
235
|
+
}, error => this.logService.error(error));
|
|
223
236
|
this._sessionModels = this._register(instantiationService.createInstance(ChatModelStore, {
|
|
224
237
|
createModel: props => this._startSession(props),
|
|
225
238
|
willDisposeModel: async model => {
|
|
@@ -264,7 +277,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
264
277
|
this.chatSessionService.clearMaterializedSessionResource(model.sessionResource);
|
|
265
278
|
this._onDidDisposeSession.fire({
|
|
266
279
|
sessionResources: [model.sessionResource],
|
|
267
|
-
reason: "
|
|
280
|
+
reason: "disposed"
|
|
268
281
|
});
|
|
269
282
|
}));
|
|
270
283
|
this._chatServiceTelemetry = this.instantiationService.createInstance(ChatServiceTelemetry);
|
|
@@ -494,8 +507,16 @@ let ChatService = class ChatService extends Disposable {
|
|
|
494
507
|
disableBackgroundKeepAlive,
|
|
495
508
|
inputState,
|
|
496
509
|
isReadOnly,
|
|
510
|
+
isInputBlocked,
|
|
511
|
+
historyStatus,
|
|
512
|
+
backgroundShellCount,
|
|
513
|
+
canvasContext,
|
|
497
514
|
sessionTypeSelectionReason
|
|
498
515
|
} = props;
|
|
516
|
+
const blocked = derived(
|
|
517
|
+
this,
|
|
518
|
+
reader => (isLocalChatSessionSubjectToManagedPolicy(sessionResource, location) && this.managedPolicy.read(reader)) || (isInputBlocked?.read(reader) ?? false)
|
|
519
|
+
);
|
|
499
520
|
const model = this.instantiationService.createInstance(ChatModel, initialData, {
|
|
500
521
|
initialLocation: location,
|
|
501
522
|
canUseTools,
|
|
@@ -503,17 +524,29 @@ let ChatService = class ChatService extends Disposable {
|
|
|
503
524
|
disableBackgroundKeepAlive,
|
|
504
525
|
inputState,
|
|
505
526
|
isReadOnly,
|
|
527
|
+
isInputBlocked: blocked,
|
|
528
|
+
historyStatus,
|
|
529
|
+
backgroundShellCount,
|
|
530
|
+
canvasContext,
|
|
506
531
|
sessionTypeSelectionReason
|
|
507
532
|
});
|
|
533
|
+
if (this._hasAgentHostContribution(sessionResource)) {
|
|
534
|
+
this._serverManagedQueueModels.add(model);
|
|
535
|
+
}
|
|
508
536
|
if (location === ChatAgentLocation.Chat) {
|
|
509
537
|
model.startEditingSession(true, transferEditingSession);
|
|
510
538
|
}
|
|
511
|
-
this.initializeSession(model);
|
|
539
|
+
this.initializeSession(model).catch(e => this.logService.error(e));
|
|
512
540
|
return model;
|
|
513
541
|
}
|
|
514
|
-
initializeSession(model) {
|
|
542
|
+
async initializeSession(model) {
|
|
515
543
|
this.trace("initializeSession", `Initialize session ${model.sessionResource}`);
|
|
516
|
-
|
|
544
|
+
if (isLocalChatSessionSubjectToManagedPolicy(model.sessionResource, model.initialLocation) && !this.policyInitialized) {
|
|
545
|
+
await whenAccountPolicySettled(this.accountPolicyGateService);
|
|
546
|
+
}
|
|
547
|
+
if (!isLocalChatSessionSubjectToManagedPolicy(model.sessionResource, model.initialLocation) || !this.managedPolicy.get()) {
|
|
548
|
+
await this.activateDefaultAgent(model.initialLocation);
|
|
549
|
+
}
|
|
517
550
|
}
|
|
518
551
|
async activateDefaultAgent(location) {
|
|
519
552
|
await this.extensionService.whenInstalledExtensionsRegistered();
|
|
@@ -598,11 +631,13 @@ let ChatService = class ChatService extends Disposable {
|
|
|
598
631
|
}
|
|
599
632
|
}
|
|
600
633
|
async loadRemoteSession(sessionResource, location, token, debugOwner, sessionTypeSelectionReason) {
|
|
634
|
+
const loadWatch = StopWatch.create(false);
|
|
601
635
|
this.trace("loadRemoteSession", `start ${( sessionResource.toString())}`);
|
|
602
636
|
{
|
|
603
637
|
const existingRef = this.acquireExistingSession(sessionResource, debugOwner);
|
|
604
638
|
if (existingRef) {
|
|
605
639
|
this.trace("loadRemoteSession", `reused existing model for ${( sessionResource.toString())}`);
|
|
640
|
+
CloudSandboxSessionTrace.get(existingRef.object)?.record("modelReused");
|
|
606
641
|
return existingRef;
|
|
607
642
|
}
|
|
608
643
|
}
|
|
@@ -613,6 +648,8 @@ let ChatService = class ChatService extends Disposable {
|
|
|
613
648
|
return undefined;
|
|
614
649
|
}
|
|
615
650
|
const providedSession = await this.chatSessionService.getOrCreateChatSession(sessionResource, token);
|
|
651
|
+
const modelStartedAt = loadWatch.elapsed();
|
|
652
|
+
const loadTrace = CloudSandboxSessionTrace.get(providedSession);
|
|
616
653
|
this.trace("loadRemoteSession", `session content resolved for ${( sessionResource.toString())} with ${providedSession.history.length} history item(s)`);
|
|
617
654
|
{
|
|
618
655
|
const existingRef = this.acquireExistingSession(sessionResource, debugOwner);
|
|
@@ -696,6 +733,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
696
733
|
transferEditingSession: providedSession.transferredState?.editingSession,
|
|
697
734
|
inputState,
|
|
698
735
|
isReadOnly: providedSession.isReadOnly,
|
|
736
|
+
isInputBlocked: providedSession.isInputBlocked,
|
|
737
|
+
historyStatus: providedSession.historyStatus,
|
|
738
|
+
backgroundShellCount: providedSession.backgroundShellCount,
|
|
739
|
+
canvasContext: providedSession.canvasContext,
|
|
699
740
|
sessionTypeSelectionReason
|
|
700
741
|
}, debugOwner ?? "ChatService#loadRemoteSession");
|
|
701
742
|
if (modelId && !historySelectedModel) {
|
|
@@ -720,6 +761,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
720
761
|
modelRef.object.setCustomTitle(providedSession.title);
|
|
721
762
|
}
|
|
722
763
|
const model = modelRef.object;
|
|
764
|
+
loadTrace?.associate(model);
|
|
723
765
|
const disposables = ( new DisposableStore());
|
|
724
766
|
disposables.add(modelRef.object.onDidDispose(() => {
|
|
725
767
|
disposables.dispose();
|
|
@@ -768,53 +810,172 @@ let ChatService = class ChatService extends Disposable {
|
|
|
768
810
|
}
|
|
769
811
|
lastResponseCompletedAt = undefined;
|
|
770
812
|
};
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
const agent = message.participant ?
|
|
778
|
-
this.chatAgentService.getAgent(message.participant) : this.chatAgentService.getAgent(chatSessionType);
|
|
779
|
-
const parsedRequest = parseAgentHostHistoryPrompt(requestText, agent);
|
|
780
|
-
const modeInfo = message.modeInstructions ? {
|
|
781
|
-
kind: ChatModeKind.Agent,
|
|
782
|
-
isBuiltin: message.modeInstructions.isBuiltin ?? false,
|
|
783
|
-
modeInstructions: message.modeInstructions,
|
|
784
|
-
telemetryModeId: "custom",
|
|
785
|
-
applyCodeBlockSuggestionId: undefined
|
|
786
|
-
} : undefined;
|
|
787
|
-
lastRequest = model.addRequest(parsedRequest, message.variableData ?? {
|
|
788
|
-
variables: []
|
|
789
|
-
}, 0,
|
|
790
|
-
modeInfo, agent, undefined,
|
|
791
|
-
undefined,
|
|
792
|
-
undefined,
|
|
793
|
-
undefined,
|
|
794
|
-
false,
|
|
795
|
-
message.modelId, undefined, message.id, message.isSystemInitiated, message.systemInitiatedLabel, undefined,
|
|
796
|
-
message.isTerminalRequest, message.timestamp ?? null, message.isHidden, message.origin, message.isRequestHidden, getRestoredChatRequestSource(message, requestText));
|
|
797
|
-
} else {
|
|
798
|
-
if (lastRequest) {
|
|
799
|
-
for (const part of message.parts) {
|
|
800
|
-
model.acceptResponseProgress(lastRequest, part);
|
|
813
|
+
const applyHistory = (history, insertion, requestId) => {
|
|
814
|
+
const applied = [];
|
|
815
|
+
for (const message of history) {
|
|
816
|
+
if (message.type === "request") {
|
|
817
|
+
if (lastRequest) {
|
|
818
|
+
completeLastResponse();
|
|
801
819
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
820
|
+
const requestText = message.prompt;
|
|
821
|
+
const agent = message.participant ?
|
|
822
|
+
this.chatAgentService.getAgent(message.participant) : this.chatAgentService.getAgent(chatSessionType);
|
|
823
|
+
const parsedRequest = parseAgentHostHistoryPrompt(requestText, agent);
|
|
824
|
+
const modeInfo = message.modeInstructions ? {
|
|
825
|
+
kind: ChatModeKind.Agent,
|
|
826
|
+
isBuiltin: message.modeInstructions.isBuiltin ?? false,
|
|
827
|
+
modeInstructions: message.modeInstructions,
|
|
828
|
+
telemetryModeId: "custom",
|
|
829
|
+
applyCodeBlockSuggestionId: undefined
|
|
830
|
+
} : undefined;
|
|
831
|
+
lastRequest = model.addRequest(parsedRequest, message.variableData ?? {
|
|
832
|
+
variables: []
|
|
833
|
+
}, 0,
|
|
834
|
+
modeInfo, agent, undefined,
|
|
835
|
+
undefined,
|
|
836
|
+
undefined,
|
|
837
|
+
undefined,
|
|
838
|
+
false,
|
|
839
|
+
message.modelId, undefined, message.id ?? requestId, message.isSystemInitiated, message.systemInitiatedLabel, undefined,
|
|
840
|
+
message.isTerminalRequest, message.timestamp ?? null, message.isHidden, message.origin, message.isRequestHidden, getRestoredChatRequestSource(message, requestText), message.modelConfiguration, message.metadata, insertion);
|
|
841
|
+
applied.push(lastRequest);
|
|
842
|
+
} else {
|
|
843
|
+
if (lastRequest) {
|
|
844
|
+
for (const part of message.parts) {
|
|
845
|
+
model.acceptResponseProgress(lastRequest, part);
|
|
846
|
+
}
|
|
847
|
+
if (lastRequest.response && (message.details || message.errorDetails)) {
|
|
848
|
+
lastRequest.response.setResult({
|
|
849
|
+
...(message.details ? {
|
|
850
|
+
details: message.details
|
|
851
|
+
} : {}),
|
|
852
|
+
...(message.errorDetails ? {
|
|
853
|
+
errorDetails: message.errorDetails
|
|
854
|
+
} : {})
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
if (lastRequest.response && typeof message.elapsedMs === "number") {
|
|
858
|
+
lastRequest.response.setElapsedMs(message.elapsedMs);
|
|
859
|
+
}
|
|
860
|
+
lastResponseCompletedAt = message.completedAt;
|
|
811
861
|
}
|
|
812
|
-
|
|
813
|
-
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
return applied;
|
|
865
|
+
};
|
|
866
|
+
const initialRequests = applyHistory(providedSession.history);
|
|
867
|
+
if (providedSession.onDidChangeHistory) {
|
|
868
|
+
const groupHistory = history => {
|
|
869
|
+
const turns = [];
|
|
870
|
+
for (const item of history) {
|
|
871
|
+
if (item.type === "request") {
|
|
872
|
+
turns.push({
|
|
873
|
+
request: item,
|
|
874
|
+
items: [item],
|
|
875
|
+
id: item.id
|
|
876
|
+
});
|
|
877
|
+
} else {
|
|
878
|
+
turns.at(-1)?.items.push(item);
|
|
814
879
|
}
|
|
815
|
-
lastResponseCompletedAt = message.completedAt;
|
|
816
880
|
}
|
|
881
|
+
return turns;
|
|
882
|
+
};
|
|
883
|
+
let lastTurns = groupHistory(providedSession.history);
|
|
884
|
+
for (const [index, turn] of lastTurns.entries()) {
|
|
885
|
+
turn.id = initialRequests[index].id;
|
|
817
886
|
}
|
|
887
|
+
let pendingHistory;
|
|
888
|
+
const localRequestIds = ( new Set());
|
|
889
|
+
const refreshHistory = () => {
|
|
890
|
+
const history = pendingHistory;
|
|
891
|
+
if (!history || model.hasActiveRequest.get()) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
pendingHistory = undefined;
|
|
895
|
+
const requests = model.getRequests();
|
|
896
|
+
const turns = groupHistory(history);
|
|
897
|
+
if (turns.length === lastTurns.length && turns.every((turn, index) => equals(turn.items, lastTurns[index].items))) {
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
const previousAnonymous = lastTurns.filter(turn => turn.request.id === undefined);
|
|
901
|
+
const incomingAnonymous = turns.filter(turn => turn.request.id === undefined);
|
|
902
|
+
for (const turn of incomingAnonymous) {
|
|
903
|
+
const matches = previousAnonymous.filter(previous => equals(turn.request, previous.request));
|
|
904
|
+
if (matches.length === 1 && !( incomingAnonymous.some(other => other !== turn && equals(other.request, turn.request)))) {
|
|
905
|
+
turn.id = matches[0].id;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
const previousTurns = ( new Map(lastTurns.map(turn => [turn.id, turn])));
|
|
909
|
+
const incomingIds = ( new Set(turns.map(turn => turn.id)));
|
|
910
|
+
for (const request of requests) {
|
|
911
|
+
if (!( previousTurns.has(request.id))) {
|
|
912
|
+
localRequestIds.add(request.id);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
for (const request of [...requests]) {
|
|
916
|
+
if (( previousTurns.has(request.id)) && !( incomingIds.has(request.id)) && !( localRequestIds.has(request.id))) {
|
|
917
|
+
model.removeRequest(request.id);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
lastRequest = undefined;
|
|
921
|
+
lastResponseCompletedAt = undefined;
|
|
922
|
+
const requestsById = ( new Map(model.getRequests().map(request => [request.id, request])));
|
|
923
|
+
for (const [turnIndex, turn] of turns.entries()) {
|
|
924
|
+
if (turn.id !== undefined && ( localRequestIds.has(turn.id))) {
|
|
925
|
+
continue;
|
|
926
|
+
}
|
|
927
|
+
const currentRequests = model.getRequests();
|
|
928
|
+
const existing = turn.id === undefined ? undefined : requestsById.get(turn.id);
|
|
929
|
+
const previous = previousTurns.get(turn.id);
|
|
930
|
+
if (equals(turn.items, previous?.items)) {
|
|
931
|
+
continue;
|
|
932
|
+
}
|
|
933
|
+
if (providedSession.preserveHistoryItemIdentity && previous && equals(
|
|
934
|
+
getChatSessionHistoryContent(turn.items),
|
|
935
|
+
getChatSessionHistoryContent(previous.items)
|
|
936
|
+
)) {
|
|
937
|
+
if (existing) {
|
|
938
|
+
model.updateRequestModelId(existing, turn.request.modelId);
|
|
939
|
+
const responses = turn.items.filter(item => item.type === "response");
|
|
940
|
+
const details = responses.findLast(item => item.details || item.errorDetails)?.details;
|
|
941
|
+
const metadata = responses.flatMap(item => item.parts).filter(part => part.kind === "usage" || part.kind === "autoModeResolution");
|
|
942
|
+
existing.response?.updateHistoryMetadata(details, metadata);
|
|
943
|
+
}
|
|
944
|
+
continue;
|
|
945
|
+
}
|
|
946
|
+
let insertionIndex = existing ? currentRequests.indexOf(existing) : currentRequests.length;
|
|
947
|
+
if (!existing) {
|
|
948
|
+
for (const following of turns.slice(turnIndex + 1)) {
|
|
949
|
+
const nextRequest = following.id === undefined ? undefined : requestsById.get(following.id);
|
|
950
|
+
if (nextRequest) {
|
|
951
|
+
insertionIndex = currentRequests.indexOf(nextRequest);
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
const [request] = applyHistory(turn.items, {
|
|
957
|
+
index: insertionIndex,
|
|
958
|
+
replace: !!existing
|
|
959
|
+
}, turn.id);
|
|
960
|
+
turn.id = request.id;
|
|
961
|
+
requestsById.set(request.id, request);
|
|
962
|
+
}
|
|
963
|
+
completeLastResponse();
|
|
964
|
+
lastTurns = turns;
|
|
965
|
+
};
|
|
966
|
+
disposables.add(providedSession.onDidChangeHistory(history => {
|
|
967
|
+
pendingHistory = history;
|
|
968
|
+
refreshHistory();
|
|
969
|
+
}));
|
|
970
|
+
disposables.add(autorun(reader => {
|
|
971
|
+
if (!model.hasActiveRequest.read(reader) && pendingHistory) {
|
|
972
|
+
queueMicrotask(() => {
|
|
973
|
+
if (!disposables.isDisposed) {
|
|
974
|
+
refreshHistory();
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
}));
|
|
818
979
|
}
|
|
819
980
|
this.trace("loadRemoteSession", `history applied to model for ${( sessionResource.toString())}: ${model.getRequests().length} request(s)`);
|
|
820
981
|
const hasProgressStreaming = providedSession.progressObs && providedSession.interruptActiveResponseCallback;
|
|
@@ -838,7 +999,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
838
999
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
839
1000
|
action: "add",
|
|
840
1001
|
source: "remoteSession",
|
|
841
|
-
|
|
1002
|
+
...getChatSessionTelemetryIds(model.sessionResource, this.agentHostConnectionsService)
|
|
842
1003
|
});
|
|
843
1004
|
cancellationListener.value = createCancellationListener(cancellableRequest.cancellationTokenSource.token);
|
|
844
1005
|
};
|
|
@@ -855,7 +1016,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
855
1016
|
{
|
|
856
1017
|
id,
|
|
857
1018
|
prompt,
|
|
1019
|
+
metadata,
|
|
858
1020
|
variableData,
|
|
1021
|
+
modelId,
|
|
1022
|
+
modelConfiguration,
|
|
859
1023
|
timestamp,
|
|
860
1024
|
isSystemInitiated,
|
|
861
1025
|
requestSource,
|
|
@@ -892,10 +1056,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
892
1056
|
undefined,
|
|
893
1057
|
undefined,
|
|
894
1058
|
undefined,
|
|
895
|
-
undefined,
|
|
896
|
-
undefined,
|
|
1059
|
+
modelId, undefined,
|
|
897
1060
|
id, isSystemInitiated, systemInitiatedLabel, undefined,
|
|
898
|
-
isTerminalRequest, timestamp, isHidden, origin, isRequestHidden, requestSource);
|
|
1061
|
+
isTerminalRequest, timestamp, isHidden, origin, isRequestHidden, requestSource, modelConfiguration, metadata);
|
|
899
1062
|
lastProgressLength = 0;
|
|
900
1063
|
ensureCancellationTracking();
|
|
901
1064
|
}));
|
|
@@ -960,21 +1123,31 @@ let ChatService = class ChatService extends Disposable {
|
|
|
960
1123
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
961
1124
|
action: "notCancelable",
|
|
962
1125
|
source: "remoteSession",
|
|
963
|
-
|
|
1126
|
+
...getChatSessionTelemetryIds(model.sessionResource, this.agentHostConnectionsService)
|
|
964
1127
|
});
|
|
965
1128
|
if (lastRequest && model.editingSession) {
|
|
966
1129
|
await chatEditingSessionIsReady(model.editingSession);
|
|
967
1130
|
completeLastResponse();
|
|
968
1131
|
}
|
|
969
1132
|
}
|
|
1133
|
+
if (loadTrace) {
|
|
1134
|
+
const modelReadyAt = loadWatch.elapsed();
|
|
1135
|
+
loadTrace.record("modelReady", {
|
|
1136
|
+
loadRemoteSessionMs: modelReadyAt,
|
|
1137
|
+
modelBuildMs: modelReadyAt - modelStartedAt
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
970
1140
|
return modelRef;
|
|
971
1141
|
}
|
|
972
1142
|
async resendRequest(request, options, preserveRequestId = false) {
|
|
1143
|
+
if (isLocalChatSessionSubjectToManagedPolicy(request.session.sessionResource, request.session.initialLocation) && !this.policyInitialized) {
|
|
1144
|
+
await whenAccountPolicySettled(this.accountPolicyGateService);
|
|
1145
|
+
}
|
|
973
1146
|
const model = this._sessionModels.get(request.session.sessionResource);
|
|
974
1147
|
if (!model && model !== request.session) {
|
|
975
1148
|
throw ( new Error(`Unknown session: ${request.session.sessionResource}`));
|
|
976
1149
|
}
|
|
977
|
-
if (model.isReadOnly.get()) {
|
|
1150
|
+
if (model.isReadOnly.get() || model.isInputBlocked.get()) {
|
|
978
1151
|
return;
|
|
979
1152
|
}
|
|
980
1153
|
const cts = this._pendingRequests.get(request.session.sessionResource);
|
|
@@ -1000,6 +1173,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1000
1173
|
}
|
|
1001
1174
|
const resendOptions = {
|
|
1002
1175
|
...options,
|
|
1176
|
+
metadata: options?.metadata ?? request.agentHostMetadata,
|
|
1003
1177
|
locationData: request.locationData,
|
|
1004
1178
|
attachedContext: request.attachedContext
|
|
1005
1179
|
};
|
|
@@ -1016,7 +1190,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1016
1190
|
preserveRequestId ? request.id : undefined
|
|
1017
1191
|
).responseCompletePromise;
|
|
1018
1192
|
}
|
|
1019
|
-
queuePendingRequest(model, sessionResource, request, options) {
|
|
1193
|
+
queuePendingRequest(model, sessionResource, request, options, transferredMode) {
|
|
1020
1194
|
const location = options.location ?? model.initialLocation;
|
|
1021
1195
|
const parsedRequest = this.parseChatRequest(sessionResource, request, location, options);
|
|
1022
1196
|
const requestModel = ( new ChatRequestModel({
|
|
@@ -1030,12 +1204,19 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1030
1204
|
locationData: options.locationData,
|
|
1031
1205
|
attachedContext: options.attachedContext,
|
|
1032
1206
|
modelId: options.userSelectedModelId,
|
|
1207
|
+
modelConfiguration: options.userSelectedModelConfiguration,
|
|
1033
1208
|
userSelectedTools: options.userSelectedTools?.get(),
|
|
1034
1209
|
isSystemInitiated: options.isSystemInitiated,
|
|
1035
1210
|
isHiddenFromTranscript: options.hideFromTranscript,
|
|
1036
1211
|
systemInitiatedLabel: options.systemInitiatedLabel,
|
|
1037
|
-
terminalExecutionId: options.terminalExecutionId
|
|
1212
|
+
terminalExecutionId: options.terminalExecutionId,
|
|
1213
|
+
agentHostMetadata: options.metadata
|
|
1038
1214
|
}));
|
|
1215
|
+
if (transferredMode) {
|
|
1216
|
+
model.inputModel.setState({
|
|
1217
|
+
mode: transferredMode
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1039
1220
|
const deferred = ( new DeferredPromise());
|
|
1040
1221
|
this._queuedRequestDeferreds.set(requestModel.id, deferred);
|
|
1041
1222
|
model.addPendingRequest(requestModel, options.queue ?? ChatRequestQueueKind.Queued, {
|
|
@@ -1052,6 +1233,29 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1052
1233
|
};
|
|
1053
1234
|
}
|
|
1054
1235
|
async sendRequest(sessionResource, request, options) {
|
|
1236
|
+
const {
|
|
1237
|
+
onDidCreateResponse,
|
|
1238
|
+
...requestOptions
|
|
1239
|
+
} = options ?? {};
|
|
1240
|
+
const result = await this.sendRequestInternal(
|
|
1241
|
+
sessionResource,
|
|
1242
|
+
request,
|
|
1243
|
+
onDidCreateResponse ? requestOptions : options,
|
|
1244
|
+
true
|
|
1245
|
+
);
|
|
1246
|
+
if (onDidCreateResponse) {
|
|
1247
|
+
const response = result.kind === "sent" ? result.data.responseCreatedPromise : Promise.resolve(undefined);
|
|
1248
|
+
void response.then(response => onDidCreateResponse(response, result.kind)).catch(onUnexpectedError);
|
|
1249
|
+
}
|
|
1250
|
+
return result;
|
|
1251
|
+
}
|
|
1252
|
+
async sendRequestInternal(sessionResource, request, options, isSubmission) {
|
|
1253
|
+
if (isLocalChatSessionSubjectToManagedPolicy(
|
|
1254
|
+
sessionResource,
|
|
1255
|
+
this._sessionModels.get(sessionResource)?.initialLocation ?? ChatAgentLocation.Chat
|
|
1256
|
+
) && !this.policyInitialized) {
|
|
1257
|
+
await whenAccountPolicySettled(this.accountPolicyGateService);
|
|
1258
|
+
}
|
|
1055
1259
|
this.trace("sendRequest", `sessionResource: ${( sessionResource.toString())}, message: ${request.substring(0, 20)}${request.length > 20 ? "[...]" : ""}}`);
|
|
1056
1260
|
const hasExplicitFileOrImageAttachment = ( [...(options?.attachedContext ?? []), ...(options?.resolvedVariables ?? [])].some(isExplicitFileOrImageVariableEntry));
|
|
1057
1261
|
if (!request.trim() && !hasExplicitFileOrImageAttachment && !options?.slashCommand && !options?.agentId && !options?.agentIdSilent) {
|
|
@@ -1062,8 +1266,16 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1062
1266
|
};
|
|
1063
1267
|
}
|
|
1064
1268
|
let newSessionResource;
|
|
1269
|
+
let transferredMode;
|
|
1270
|
+
const submittedModeKind = options?.modeInfo?.kind;
|
|
1271
|
+
const submittedModeId = options?.modeInfo?.isBuiltin ? submittedModeKind : options?.modeInfo?.modeInstructions?.uri?.toString();
|
|
1272
|
+
const submittedMode = submittedModeId && submittedModeKind ? {
|
|
1273
|
+
id: submittedModeId,
|
|
1274
|
+
kind: submittedModeKind
|
|
1275
|
+
} : undefined;
|
|
1065
1276
|
const materializedReal = this.chatSessionService.getMaterializedSessionResource(sessionResource);
|
|
1066
1277
|
if (materializedReal) {
|
|
1278
|
+
transferredMode = submittedMode ?? this._sessionModels.get(sessionResource)?.inputModel.state.get()?.mode;
|
|
1067
1279
|
sessionResource = materializedReal;
|
|
1068
1280
|
newSessionResource = materializedReal;
|
|
1069
1281
|
}
|
|
@@ -1071,33 +1283,48 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1071
1283
|
if (!model) {
|
|
1072
1284
|
throw ( new Error(`Unknown session: ${sessionResource}`));
|
|
1073
1285
|
}
|
|
1074
|
-
if (model.isReadOnly.get()) {
|
|
1286
|
+
if (model.isReadOnly.get() || model.isInputBlocked.get()) {
|
|
1075
1287
|
return {
|
|
1076
1288
|
kind: "rejected",
|
|
1077
|
-
reason: "Session is read-only",
|
|
1289
|
+
reason: model.isInputBlocked.get() ? "Session input is blocked" : "Session is read-only",
|
|
1078
1290
|
...(newSessionResource ? {
|
|
1079
1291
|
newSessionResource
|
|
1080
1292
|
} : {})
|
|
1081
1293
|
};
|
|
1082
1294
|
}
|
|
1295
|
+
const isEligibleRequest = request => !request.isSystemInitiated && !request.isHiddenFromTranscript;
|
|
1296
|
+
const startsNewSession = !( model.getRequests().some(isEligibleRequest)) && !( model.getPendingRequests().some(pending => isEligibleRequest(pending.request)));
|
|
1083
1297
|
if (!model.hasRequests && isUntitledChatSession(sessionResource) && getChatSessionType(sessionResource) !== localChatSessionType) {
|
|
1298
|
+
const untitledMode = model.inputModel.state.get()?.mode;
|
|
1084
1299
|
const materialized = await this._materializeUntitledSession(sessionResource, request, options, model);
|
|
1085
1300
|
if (materialized) {
|
|
1086
1301
|
model = materialized.model;
|
|
1087
1302
|
sessionResource = materialized.sessionResource;
|
|
1088
1303
|
newSessionResource = materialized.newSessionResource;
|
|
1304
|
+
transferredMode = submittedMode ?? untitledMode;
|
|
1089
1305
|
}
|
|
1090
1306
|
}
|
|
1091
|
-
if (model.isReadOnly.get()) {
|
|
1307
|
+
if (model.isReadOnly.get() || model.isInputBlocked.get()) {
|
|
1092
1308
|
return {
|
|
1093
1309
|
kind: "rejected",
|
|
1094
|
-
reason: "Session is read-only",
|
|
1310
|
+
reason: model.isInputBlocked.get() ? "Session input is blocked" : "Session is read-only",
|
|
1095
1311
|
newSessionResource
|
|
1096
1312
|
};
|
|
1097
1313
|
}
|
|
1098
1314
|
const hasPendingRequest = ( this._pendingRequests.has(sessionResource));
|
|
1315
|
+
const isNewSession = startsNewSession && !( this._modelsWithAcceptedRequests.has(model));
|
|
1316
|
+
const notifyAccepted = () => {
|
|
1317
|
+
if (isSubmission && !options?.isSystemInitiated && !options?.hideFromTranscript) {
|
|
1318
|
+
this._modelsWithAcceptedRequests.add(model);
|
|
1319
|
+
this._onDidAcceptRequest.fire({
|
|
1320
|
+
chatSessionResource: sessionResource,
|
|
1321
|
+
isNewSession
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1099
1325
|
if (options?.queue) {
|
|
1100
|
-
const queued = this.queuePendingRequest(model, sessionResource, request, options);
|
|
1326
|
+
const queued = this.queuePendingRequest(model, sessionResource, request, options, transferredMode);
|
|
1327
|
+
notifyAccepted();
|
|
1101
1328
|
if (!options.pauseQueue) {
|
|
1102
1329
|
this.processPendingRequests(sessionResource);
|
|
1103
1330
|
}
|
|
@@ -1134,7 +1361,12 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1134
1361
|
const silentAgent = options?.agentIdSilent ? this.chatAgentService.getAgent(options.agentIdSilent) : undefined;
|
|
1135
1362
|
const agent = silentAgent ?? parsedRequest.parts.find(r => r instanceof ChatRequestAgentPart)?.agent ?? defaultAgent;
|
|
1136
1363
|
const agentSlashCommandPart = parsedRequest.parts.find(r => r instanceof ChatRequestAgentSubcommandPart);
|
|
1137
|
-
|
|
1364
|
+
if (transferredMode) {
|
|
1365
|
+
model.inputModel.setState({
|
|
1366
|
+
mode: transferredMode
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
const result = {
|
|
1138
1370
|
kind: "sent",
|
|
1139
1371
|
newSessionResource,
|
|
1140
1372
|
data: {
|
|
@@ -1152,6 +1384,8 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1152
1384
|
slashCommand: agentSlashCommandPart?.command
|
|
1153
1385
|
}
|
|
1154
1386
|
};
|
|
1387
|
+
notifyAccepted();
|
|
1388
|
+
return result;
|
|
1155
1389
|
}
|
|
1156
1390
|
async _materializeUntitledSession(untitledResource, request, options, untitledModel) {
|
|
1157
1391
|
const inFlight = this._inFlightUntitledMaterializations.get(untitledResource);
|
|
@@ -1320,7 +1554,8 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1320
1554
|
isVirtualWorkspace: isVirtualWorkspace(this.workspaceContextService.getWorkspace()),
|
|
1321
1555
|
settingDefaultToCopilotHarness: this.configurationService.getValue(ChatConfiguration.DefaultToCopilotHarness) ?? false,
|
|
1322
1556
|
settingPreferCopilotHarness: this.configurationService.getValue(ChatConfiguration.EditorPreferCopilotHarness) ?? false,
|
|
1323
|
-
settingLocalAgentEnabled: this.configurationService.getValue(ChatConfiguration.EditorLocalAgentEnabled) ?? true
|
|
1557
|
+
settingLocalAgentEnabled: this.configurationService.getValue(ChatConfiguration.EditorLocalAgentEnabled) ?? true,
|
|
1558
|
+
settingCopilotHarnessIntroductionMode: getCopilotHarnessIntroductionMode(this.configurationService)
|
|
1324
1559
|
});
|
|
1325
1560
|
let gotProgress = false;
|
|
1326
1561
|
const requestType = commandPart ? "slashCommand" : "string";
|
|
@@ -1383,7 +1618,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1383
1618
|
model.acceptResponseProgress(request, {
|
|
1384
1619
|
kind: "markdownContent",
|
|
1385
1620
|
content: ( new MarkdownString(( localize(
|
|
1386
|
-
|
|
1621
|
+
14927,
|
|
1387
1622
|
"The `{0}` skill requires `{1}` to be enabled. After enabling, reload the window to apply. [Enable in Settings](command:workbench.action.openSettings?{2})",
|
|
1388
1623
|
TROUBLESHOOT_COMMAND_NAME,
|
|
1389
1624
|
AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING,
|
|
@@ -1430,37 +1665,6 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1430
1665
|
hasDisabledClaudeHooks
|
|
1431
1666
|
};
|
|
1432
1667
|
};
|
|
1433
|
-
const collectCustomizationMigrationHint = async () => {
|
|
1434
|
-
const sessionType = getChatSessionType(sessionResource);
|
|
1435
|
-
const hintMode = this.configurationService.getValue(ChatConfiguration.ChatCustomizationsMigrationHint);
|
|
1436
|
-
const hintAlreadyShown = model.inputModel.state.get()?.contrib[customizationMigrationHintShownStateKey] === true;
|
|
1437
|
-
const showOnce = hintMode === CustomizationMigrationHintMode.Once;
|
|
1438
|
-
if (!isAgentHostTarget(sessionType) || (!showOnce && hintMode !== CustomizationMigrationHintMode.Always) || this.storageService.getBoolean(
|
|
1439
|
-
getCustomizationMigrationHintDismissedStorageKey(sessionType),
|
|
1440
|
-
StorageScope.WORKSPACE
|
|
1441
|
-
) || (showOnce && hintAlreadyShown) || !this._customizationMigrationHintProvider) {
|
|
1442
|
-
return undefined;
|
|
1443
|
-
}
|
|
1444
|
-
try {
|
|
1445
|
-
const hint = await this._customizationMigrationHintProvider(sessionResource, token);
|
|
1446
|
-
if (hint && !token.isCancellationRequested) {
|
|
1447
|
-
for (const {
|
|
1448
|
-
type,
|
|
1449
|
-
count
|
|
1450
|
-
} of hint.counts) {
|
|
1451
|
-
this.telemetryService.publicLog2("chat.customizationMigrationAssessment", {
|
|
1452
|
-
category: type,
|
|
1453
|
-
count
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
return hint;
|
|
1457
|
-
}
|
|
1458
|
-
return undefined;
|
|
1459
|
-
} catch (error) {
|
|
1460
|
-
this.logService.warn("[ChatService] Failed to compute customization migration hint:", error);
|
|
1461
|
-
return undefined;
|
|
1462
|
-
}
|
|
1463
|
-
};
|
|
1464
1668
|
const collectInstructions = async () => {
|
|
1465
1669
|
const ctx = options?.instructionContext;
|
|
1466
1670
|
if (!ctx) {
|
|
@@ -1483,7 +1687,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1483
1687
|
const originalIds = ( new Set((options?.attachedContext ?? []).map(v => v.id)));
|
|
1484
1688
|
return variableSet.asArray().filter(v => !( originalIds.has(v.id)));
|
|
1485
1689
|
} catch (err) {
|
|
1486
|
-
|
|
1690
|
+
if (!isCancellationError(err)) {
|
|
1691
|
+
this.logService.error("[ChatService] Failed to collect instructions:", err);
|
|
1692
|
+
}
|
|
1487
1693
|
return [];
|
|
1488
1694
|
} finally {
|
|
1489
1695
|
markChat(sessionResource, ChatPerfMark.DidCollectInstructions);
|
|
@@ -1517,6 +1723,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1517
1723
|
const initVariableData = {
|
|
1518
1724
|
variables: []
|
|
1519
1725
|
};
|
|
1726
|
+
const modelConfiguration = options?.userSelectedModelConfiguration ?? (options?.userSelectedModelId ? this.languageModelsService.getModelConfiguration(options.userSelectedModelId) : undefined);
|
|
1520
1727
|
request = preservedRequest ?? model.addRequest(
|
|
1521
1728
|
parsedRequest,
|
|
1522
1729
|
initVariableData,
|
|
@@ -1536,14 +1743,17 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1536
1743
|
options?.terminalExecutionId,
|
|
1537
1744
|
isTerminalCommand,
|
|
1538
1745
|
undefined,
|
|
1539
|
-
options?.hideFromTranscript
|
|
1746
|
+
options?.hideFromTranscript,
|
|
1747
|
+
undefined,
|
|
1748
|
+
undefined,
|
|
1749
|
+
undefined,
|
|
1750
|
+
modelConfiguration,
|
|
1751
|
+
options?.metadata
|
|
1540
1752
|
);
|
|
1541
1753
|
preservedRequest?.response?.reopen();
|
|
1542
1754
|
const thisRequest = request;
|
|
1543
1755
|
completeResponseCreated();
|
|
1544
|
-
const [hooksResult, instructionEntries
|
|
1545
|
-
[collectHooks(), collectInstructions(), collectCustomizationMigrationHint()]
|
|
1546
|
-
);
|
|
1756
|
+
const [hooksResult, instructionEntries] = await Promise.all([collectHooks(), collectInstructions()]);
|
|
1547
1757
|
const collectedHooks = hooksResult.hooks;
|
|
1548
1758
|
const hasDisabledClaudeHooks = hooksResult.hasDisabledClaudeHooks;
|
|
1549
1759
|
const allContext = this.prepareContext(request.attachedContext);
|
|
@@ -1553,7 +1763,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1553
1763
|
const storedVariables = allContext.filter(v => !(isPromptTextVariableEntry(v) && v.automaticallyAdded));
|
|
1554
1764
|
model.updateRequest(request, {
|
|
1555
1765
|
variables: storedVariables
|
|
1556
|
-
});
|
|
1766
|
+
}, options?.metadata);
|
|
1557
1767
|
let variableData = {
|
|
1558
1768
|
variables: allContext
|
|
1559
1769
|
};
|
|
@@ -1563,7 +1773,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1563
1773
|
};
|
|
1564
1774
|
}
|
|
1565
1775
|
const promptTextResult = getPromptText(request.message);
|
|
1566
|
-
variableData = updateRanges(variableData, promptTextResult
|
|
1776
|
+
variableData = updateRanges(variableData, promptTextResult);
|
|
1567
1777
|
const message = promptTextResult.message;
|
|
1568
1778
|
const buildAgentRequest = (agent, command, enableCommandDetection, isParticipantDetected) => {
|
|
1569
1779
|
const agentRequest = {
|
|
@@ -1581,9 +1791,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1581
1791
|
acceptedConfirmationData: options?.acceptedConfirmationData,
|
|
1582
1792
|
rejectedConfirmationData: options?.rejectedConfirmationData,
|
|
1583
1793
|
agentHostSessionConfig: options?.agentHostSessionConfig,
|
|
1584
|
-
|
|
1794
|
+
agentHostMessageOrigin: options?.agentHostMessageOrigin,
|
|
1795
|
+
metadata: options?.metadata ?? thisRequest.agentHostMetadata,
|
|
1585
1796
|
userSelectedModelId: options?.userSelectedModelId,
|
|
1586
|
-
modelConfiguration
|
|
1797
|
+
modelConfiguration,
|
|
1587
1798
|
userSelectedTools: options?.userSelectedTools?.get(),
|
|
1588
1799
|
modeInstructions: options?.modeInfo?.modeInstructions,
|
|
1589
1800
|
permissionLevel: options?.modeInfo?.permissionLevel,
|
|
@@ -1641,55 +1852,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1641
1852
|
action: "add",
|
|
1642
1853
|
source: "sendRequestId",
|
|
1643
1854
|
requestId: pendingRequest.requestId,
|
|
1644
|
-
|
|
1855
|
+
...getChatSessionTelemetryIds(sessionResource, this.agentHostConnectionsService)
|
|
1645
1856
|
});
|
|
1646
1857
|
}
|
|
1647
1858
|
}
|
|
1648
|
-
const showCustomizationMigrationHint = hint => {
|
|
1649
|
-
const hintAlreadyShown = model.inputModel.state.get()?.contrib[customizationMigrationHintShownStateKey] === true;
|
|
1650
|
-
const hintMode = this.configurationService.getValue(ChatConfiguration.ChatCustomizationsMigrationHint);
|
|
1651
|
-
const showOnce = hintMode === CustomizationMigrationHintMode.Once;
|
|
1652
|
-
if (!hint || token.isCancellationRequested || (showOnce && hintAlreadyShown)) {
|
|
1653
|
-
return;
|
|
1654
|
-
}
|
|
1655
|
-
if (showOnce) {
|
|
1656
|
-
model.inputModel.setState({
|
|
1657
|
-
contrib: {
|
|
1658
|
-
...model.inputModel.state.get()?.contrib,
|
|
1659
|
-
[customizationMigrationHintShownStateKey]: true
|
|
1660
|
-
}
|
|
1661
|
-
});
|
|
1662
|
-
}
|
|
1663
|
-
const reviewArguments = hint.target === CustomizationMigrationHintTarget.FileMigrations ? [{
|
|
1664
|
-
migration: true
|
|
1665
|
-
}] : hint.target === CustomizationMigrationHintTarget.McpServers ? [{
|
|
1666
|
-
section: AICustomizationManagementSection.McpServers
|
|
1667
|
-
}] : undefined;
|
|
1668
|
-
const reviewLink = createMarkdownCommandLink({
|
|
1669
|
-
id: AICustomizationManagementCommands.OpenEditor,
|
|
1670
|
-
text: ( localize(12557, "Review customizations")),
|
|
1671
|
-
tooltip: ( localize(12558, "Open Chat Customizations")),
|
|
1672
|
-
arguments: reviewArguments
|
|
1673
|
-
});
|
|
1674
|
-
const dismissLink = createMarkdownCommandLink({
|
|
1675
|
-
id: AICustomizationManagementCommands.DismissMigrationHint,
|
|
1676
|
-
text: ( localize(12559, "Hide for this workspace")),
|
|
1677
|
-
tooltip: ( localize(12560, "Stop Showing Migration Hints for This Harness"))
|
|
1678
|
-
});
|
|
1679
|
-
progressCallback([{
|
|
1680
|
-
kind: "systemNotification",
|
|
1681
|
-
content: ( new MarkdownString(( localize(12561, "*{0} {1} | {2}*", hint.message, reviewLink, dismissLink)), {
|
|
1682
|
-
isTrusted: {
|
|
1683
|
-
enabledCommands: [
|
|
1684
|
-
AICustomizationManagementCommands.OpenEditor,
|
|
1685
|
-
AICustomizationManagementCommands.DismissMigrationHint
|
|
1686
|
-
]
|
|
1687
|
-
}
|
|
1688
|
-
})),
|
|
1689
|
-
icon: Codicon.info
|
|
1690
|
-
}]);
|
|
1691
|
-
};
|
|
1692
|
-
showCustomizationMigrationHint(customizationMigrationHint);
|
|
1693
1859
|
const disabledClaudeHooksDismissedKey = "chat.disabledClaudeHooks.notification";
|
|
1694
1860
|
if (hasDisabledClaudeHooks && !this.storageService.getBoolean(disabledClaudeHooksDismissedKey, StorageScope.WORKSPACE)) {
|
|
1695
1861
|
this.storageService.store(
|
|
@@ -1702,6 +1868,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1702
1868
|
kind: "disabledClaudeHooks"
|
|
1703
1869
|
}]);
|
|
1704
1870
|
}
|
|
1871
|
+
if (isLocalChatSessionSubjectToManagedPolicy(sessionResource, model.initialLocation) && this.managedPolicy.get()) {
|
|
1872
|
+
throw ( new ErrorNoTelemetry(managedPolicyRequiresAgentHostMessage()));
|
|
1873
|
+
}
|
|
1705
1874
|
if (model.canUseTools) {
|
|
1706
1875
|
const autostartResult = ( new ChatMcpServersStarting(this.mcpService.autostart(token)));
|
|
1707
1876
|
if (!autostartResult.isEmpty) {
|
|
@@ -1709,6 +1878,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1709
1878
|
await autostartResult.wait();
|
|
1710
1879
|
}
|
|
1711
1880
|
}
|
|
1881
|
+
if (isLocalChatSessionSubjectToManagedPolicy(sessionResource, model.initialLocation) && this.managedPolicy.get()) {
|
|
1882
|
+
throw ( new ErrorNoTelemetry(managedPolicyRequiresAgentHostMessage()));
|
|
1883
|
+
}
|
|
1712
1884
|
const agentResult = await this.chatAgentService.invokeAgent(agent.id, requestProps, progressCallback, history, token);
|
|
1713
1885
|
rawResult = agentResult;
|
|
1714
1886
|
agentOrCommandFollowups = this.chatAgentService.getFollowups(agent.id, requestProps, agentResult, history, followupsCancelToken);
|
|
@@ -1773,7 +1945,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1773
1945
|
);
|
|
1774
1946
|
rawResult = {
|
|
1775
1947
|
errorDetails: {
|
|
1776
|
-
message: ( localize(
|
|
1948
|
+
message: ( localize(14928, "Provider returned null response"))
|
|
1777
1949
|
}
|
|
1778
1950
|
};
|
|
1779
1951
|
}
|
|
@@ -1842,7 +2014,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1842
2014
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
1843
2015
|
action: "add",
|
|
1844
2016
|
source: "sendRequest",
|
|
1845
|
-
|
|
2017
|
+
...getChatSessionTelemetryIds(model.sessionResource, this.agentHostConnectionsService)
|
|
1846
2018
|
});
|
|
1847
2019
|
rawResponsePromise.finally(() => {
|
|
1848
2020
|
markChat(sessionResource, ChatPerfMark.RequestComplete);
|
|
@@ -1853,7 +2025,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1853
2025
|
action: "remove",
|
|
1854
2026
|
source: "sendRequestComplete",
|
|
1855
2027
|
requestId: cancellableRequest.requestId,
|
|
1856
|
-
|
|
2028
|
+
...getChatSessionTelemetryIds(model.sessionResource, this.agentHostConnectionsService)
|
|
1857
2029
|
});
|
|
1858
2030
|
}
|
|
1859
2031
|
if (shouldProcessPending) {
|
|
@@ -1880,9 +2052,22 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1880
2052
|
}
|
|
1881
2053
|
}
|
|
1882
2054
|
_isServerManagedQueue(sessionResource) {
|
|
2055
|
+
const model = this._sessionModels.get(sessionResource);
|
|
2056
|
+
if (this._hasAgentHostContribution(sessionResource)) {
|
|
2057
|
+
if (model) {
|
|
2058
|
+
this._serverManagedQueueModels.add(model);
|
|
2059
|
+
}
|
|
2060
|
+
return true;
|
|
2061
|
+
}
|
|
2062
|
+
return !!model && ( this._serverManagedQueueModels.has(model));
|
|
2063
|
+
}
|
|
2064
|
+
_hasAgentHostContribution(sessionResource) {
|
|
1883
2065
|
return this.chatSessionService.getChatSessionContribution(getChatSessionType(sessionResource))?.agentHostProviderId !== undefined;
|
|
1884
2066
|
}
|
|
1885
2067
|
processNextPendingRequest(model) {
|
|
2068
|
+
if (model.isInputBlocked.get()) {
|
|
2069
|
+
return;
|
|
2070
|
+
}
|
|
1886
2071
|
if (this._isServerManagedQueue(model.sessionResource)) {
|
|
1887
2072
|
return;
|
|
1888
2073
|
}
|
|
@@ -1905,6 +2090,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1905
2090
|
}
|
|
1906
2091
|
}
|
|
1907
2092
|
const firstRequest = allRequests[0];
|
|
2093
|
+
const isSystemInitiated = firstRequest.sendOptions.isSystemInitiated && allRequests.every(req => req.sendOptions.isSystemInitiated);
|
|
1908
2094
|
const terminalIds = ( new Set(
|
|
1909
2095
|
allRequests.map(req => req.sendOptions.terminalExecutionId).filter(id => !!id)
|
|
1910
2096
|
));
|
|
@@ -1917,6 +2103,8 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1917
2103
|
const mergedTerminalExecutionId = terminalIds.size === 1 ? [...terminalIds][0] : undefined;
|
|
1918
2104
|
const sendOptions = {
|
|
1919
2105
|
...firstRequest.sendOptions,
|
|
2106
|
+
isSystemInitiated,
|
|
2107
|
+
systemInitiatedLabel: isSystemInitiated ? firstRequest.sendOptions.systemInitiatedLabel : undefined,
|
|
1920
2108
|
terminalExecutionId: mergedTerminalExecutionId,
|
|
1921
2109
|
attachedContext: allRequests.flatMap(req => req.request.variableData.variables.slice())
|
|
1922
2110
|
};
|
|
@@ -2033,10 +2221,11 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2033
2221
|
agentId: request.response.agent?.id ?? "",
|
|
2034
2222
|
message: promptTextResult.message,
|
|
2035
2223
|
command: request.response.slashCommand?.name,
|
|
2036
|
-
variables: updateRanges(request.variableData, promptTextResult
|
|
2224
|
+
variables: updateRanges(request.variableData, promptTextResult),
|
|
2037
2225
|
location: ChatAgentLocation.Chat,
|
|
2038
2226
|
editedFileEvents: request.editedFileEvents,
|
|
2039
|
-
modeInstructions: request.modeInfo?.modeInstructions
|
|
2227
|
+
modeInstructions: request.modeInfo?.modeInstructions,
|
|
2228
|
+
isSystemInitiated: request.isSystemInitiated
|
|
2040
2229
|
};
|
|
2041
2230
|
history.push({
|
|
2042
2231
|
request: historyRequest,
|
|
@@ -2059,7 +2248,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2059
2248
|
action: "remove",
|
|
2060
2249
|
source: "removeRequest",
|
|
2061
2250
|
requestId,
|
|
2062
|
-
|
|
2251
|
+
...getChatSessionTelemetryIds(model.sessionResource, this.agentHostConnectionsService)
|
|
2063
2252
|
});
|
|
2064
2253
|
}
|
|
2065
2254
|
model.removeRequest(requestId);
|
|
@@ -2083,13 +2272,13 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2083
2272
|
action: "remove",
|
|
2084
2273
|
source: "adoptRequest",
|
|
2085
2274
|
requestId: request.id,
|
|
2086
|
-
|
|
2275
|
+
...getChatSessionTelemetryIds(oldOwner.sessionResource, this.agentHostConnectionsService)
|
|
2087
2276
|
});
|
|
2088
2277
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
2089
2278
|
action: "add",
|
|
2090
2279
|
source: "adoptRequest",
|
|
2091
2280
|
requestId: request.id,
|
|
2092
|
-
|
|
2281
|
+
...getChatSessionTelemetryIds(target.sessionResource, this.agentHostConnectionsService)
|
|
2093
2282
|
});
|
|
2094
2283
|
}
|
|
2095
2284
|
}
|
|
@@ -2146,13 +2335,16 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2146
2335
|
return;
|
|
2147
2336
|
}
|
|
2148
2337
|
const responseCompletePromise = pendingRequest.responseCompletePromise;
|
|
2338
|
+
const activeRequest = this._sessionModels.get(sessionResource)?.lastRequest;
|
|
2339
|
+
const requestId = pendingRequest.requestId ?? (activeRequest?.response?.isInProgress ? activeRequest.id : undefined);
|
|
2340
|
+
const sessionTelemetry = getChatSessionTelemetryIds(sessionResource, this.agentHostConnectionsService);
|
|
2149
2341
|
pendingRequest.cancel();
|
|
2150
2342
|
this._pendingRequests.deleteAndDispose(sessionResource);
|
|
2151
2343
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
2152
2344
|
action: "remove",
|
|
2153
2345
|
source: source ?? "cancelRequest",
|
|
2154
|
-
requestId
|
|
2155
|
-
|
|
2346
|
+
requestId,
|
|
2347
|
+
...sessionTelemetry
|
|
2156
2348
|
});
|
|
2157
2349
|
if (responseCompletePromise) {
|
|
2158
2350
|
await raceTimeout(responseCompletePromise, 1000);
|
|
@@ -2177,10 +2369,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2177
2369
|
this.removePendingRequest(originalResource, pending.request.id);
|
|
2178
2370
|
}
|
|
2179
2371
|
for (const pending of pendingRequests) {
|
|
2180
|
-
void this.
|
|
2372
|
+
void this.sendRequestInternal(targetResource, pending.request.message.text, {
|
|
2181
2373
|
...pending.sendOptions,
|
|
2182
2374
|
queue: pending.kind
|
|
2183
|
-
});
|
|
2375
|
+
}, false);
|
|
2184
2376
|
}
|
|
2185
2377
|
}
|
|
2186
2378
|
removePendingRequest(sessionResource, requestId) {
|
|
@@ -2220,7 +2412,13 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2220
2412
|
variables: []
|
|
2221
2413
|
};
|
|
2222
2414
|
const local = existingById.get(remote.id);
|
|
2223
|
-
|
|
2415
|
+
const modelId = remote.modelId ?? local?.request.modelId;
|
|
2416
|
+
const modelConfiguration = remote.modelId !== undefined ? remote.modelConfiguration : local?.request.modelConfiguration;
|
|
2417
|
+
const agentHostMessageOrigin = remote.agentHostMessageOrigin ?? local?.sendOptions.agentHostMessageOrigin;
|
|
2418
|
+
const metadata = remote.agentHostMessageOrigin !== undefined ? remote.metadata : remote.metadata ?? local?.sendOptions.metadata;
|
|
2419
|
+
const isSystemInitiated = remote.isSystemInitiated ?? local?.request.isSystemInitiated;
|
|
2420
|
+
const systemInitiatedLabel = remote.agentHostMessageOrigin !== undefined ? remote.systemInitiatedLabel : remote.systemInitiatedLabel ?? local?.request.systemInitiatedLabel;
|
|
2421
|
+
if (local && local.request.message.text === remote.message && equals(local.request.variableData, variableData) && local.request.modelId === modelId && equals(local.request.modelConfiguration, modelConfiguration) && local.request.isSystemInitiated === isSystemInitiated && local.request.systemInitiatedLabel === systemInitiatedLabel && equals(local.sendOptions.agentHostMessageOrigin, agentHostMessageOrigin) && equals(local.sendOptions.metadata, metadata)) {
|
|
2224
2422
|
return local.kind === remote.kind ? local : {
|
|
2225
2423
|
...local,
|
|
2226
2424
|
kind: remote.kind
|
|
@@ -2233,12 +2431,26 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2233
2431
|
variableData,
|
|
2234
2432
|
timestamp: remote.timestamp,
|
|
2235
2433
|
attachedContext: variableData.variables.slice(),
|
|
2236
|
-
restoredId: remote.id
|
|
2434
|
+
restoredId: remote.id,
|
|
2435
|
+
modelId,
|
|
2436
|
+
modelConfiguration,
|
|
2437
|
+
isSystemInitiated,
|
|
2438
|
+
systemInitiatedLabel
|
|
2237
2439
|
}));
|
|
2238
2440
|
return {
|
|
2239
2441
|
request: requestModel,
|
|
2240
2442
|
kind: remote.kind,
|
|
2241
|
-
sendOptions:
|
|
2443
|
+
sendOptions: {
|
|
2444
|
+
...local?.sendOptions,
|
|
2445
|
+
agentHostMessageOrigin,
|
|
2446
|
+
metadata,
|
|
2447
|
+
isSystemInitiated,
|
|
2448
|
+
systemInitiatedLabel,
|
|
2449
|
+
...(modelId !== undefined ? {
|
|
2450
|
+
userSelectedModelId: modelId,
|
|
2451
|
+
userSelectedModelConfiguration: modelConfiguration
|
|
2452
|
+
} : {})
|
|
2453
|
+
}
|
|
2242
2454
|
};
|
|
2243
2455
|
});
|
|
2244
2456
|
if (existing.length === reconciled.length && reconciled.every((request, index) => existing[index] === request)) {
|
|
@@ -2265,7 +2477,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2265
2477
|
}
|
|
2266
2478
|
async sendPendingRequestImmediately(sessionResource, requestId) {
|
|
2267
2479
|
const model = this._sessionModels.get(sessionResource);
|
|
2268
|
-
if (!model) {
|
|
2480
|
+
if (!model || model.isInputBlocked.get()) {
|
|
2269
2481
|
return;
|
|
2270
2482
|
}
|
|
2271
2483
|
const pendingRequests = model.getPendingRequests();
|
|
@@ -2278,6 +2490,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2278
2490
|
const attachedContext = target.request.variableData.variables.slice();
|
|
2279
2491
|
const sendOptions = {
|
|
2280
2492
|
...target.sendOptions,
|
|
2493
|
+
agentIdSilent: target.sendOptions.agentIdSilent ?? target.sendOptions.agentId ?? getChatSessionType(sessionResource),
|
|
2281
2494
|
queue: undefined,
|
|
2282
2495
|
attachedContext
|
|
2283
2496
|
};
|
|
@@ -2285,7 +2498,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2285
2498
|
await this.cancelCurrentRequestForSession(sessionResource, "queueRunNext");
|
|
2286
2499
|
let result;
|
|
2287
2500
|
try {
|
|
2288
|
-
result = await this.
|
|
2501
|
+
result = await this.sendRequestInternal(sessionResource, message, sendOptions, false);
|
|
2289
2502
|
} catch (err) {
|
|
2290
2503
|
this.logService.error("sendPendingRequestImmediately: re-send failed", err);
|
|
2291
2504
|
}
|
|
@@ -2294,11 +2507,11 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2294
2507
|
"sendPendingRequestImmediately",
|
|
2295
2508
|
`Re-send was not accepted (${result?.kind ?? "error"}); restoring pending message to the queue`
|
|
2296
2509
|
);
|
|
2297
|
-
await this.
|
|
2510
|
+
await this.sendRequestInternal(sessionResource, message, {
|
|
2298
2511
|
...sendOptions,
|
|
2299
2512
|
attachedContext,
|
|
2300
2513
|
queue: target.kind
|
|
2301
|
-
});
|
|
2514
|
+
}, false);
|
|
2302
2515
|
}
|
|
2303
2516
|
return;
|
|
2304
2517
|
}
|
|
@@ -2368,9 +2581,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2368
2581
|
return localSessionId;
|
|
2369
2582
|
}
|
|
2370
2583
|
};
|
|
2371
|
-
ChatService = ( __decorate([( __param(0, IStorageService)), ( __param(1, ILogService)), ( __param(2, ITelemetryService)), ( __param(3, IExtensionService)), ( __param(4, IInstantiationService)), ( __param(5, IWorkspaceContextService)), ( __param(6, IChatSlashCommandService)), ( __param(7, IChatAgentService)), ( __param(8, IConfigurationService)), ( __param(9, IChatTransferService)), ( __param(10, IChatSessionsService)), ( __param(11, IMcpService)), ( __param(12, IPromptsService)), ( __param(13, IChatEntitlementService)), ( __param(14, ILanguageModelsService)), ( __param(15, IChatDebugService))], ChatService));
|
|
2584
|
+
ChatService = ( __decorate([( __param(0, IStorageService)), ( __param(1, ILogService)), ( __param(2, ITelemetryService)), ( __param(3, IExtensionService)), ( __param(4, IInstantiationService)), ( __param(5, IWorkspaceContextService)), ( __param(6, IChatSlashCommandService)), ( __param(7, IChatAgentService)), ( __param(8, IConfigurationService)), ( __param(9, IChatTransferService)), ( __param(10, IChatSessionsService)), ( __param(11, IMcpService)), ( __param(12, IPromptsService)), ( __param(13, IChatEntitlementService)), ( __param(14, ILanguageModelsService)), ( __param(15, IChatDebugService)), ( __param(16, IManagedSettingsService)), ( __param(17, IAccountPolicyGateService)), ( __param(18, IAgentHostConnectionsService))], ChatService));
|
|
2372
2585
|
async function chatModelToChatDetail(model) {
|
|
2373
|
-
const title = model.title || ( localize(
|
|
2586
|
+
const title = model.title || ( localize(14929, "New Chat"));
|
|
2374
2587
|
return {
|
|
2375
2588
|
sessionResource: model.sessionResource,
|
|
2376
2589
|
title,
|