@codingame/monaco-vscode-chat-service-override 38.1.2 → 39.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 +46 -10
- package/index.js +5 -1
- package/package.json +6 -5
- package/session.js +9 -2
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostClientProxy.d.ts +37 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostClientProxy.js +120 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +7 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +52 -22
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +2 -1
- package/vscode/src/vs/platform/agentHost/browser/nullWslRemoteAgentHostService.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/nullWslRemoteAgentHostService.js +3 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +6 -6
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +78 -41
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +2 -1
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +5 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +1 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +11 -19
- package/vscode/src/vs/platform/agentHost/common/agentHostMcpOAuthMetadataService.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostMcpOAuthMetadataService.js +85 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostOperatingSystem.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +169 -106
- package/vscode/src/vs/platform/agentHost/common/agentModelCatalogStatus.d.ts +4 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelCatalogStatus.js +15 -0
- package/vscode/src/vs/platform/agentHost/common/agentSessionMessage.d.ts +22 -0
- package/vscode/src/vs/platform/agentHost/common/agentSessionMessage.js +17 -0
- package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.d.ts +23 -0
- package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.js +33 -2
- package/vscode/src/vs/platform/agentHost/common/chatMoveConfiguration.d.ts +14 -0
- package/vscode/src/vs/platform/agentHost/common/chatMoveConfiguration.js +23 -0
- package/vscode/src/vs/platform/agentHost/common/codexAccountPlan.js +1 -0
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.d.ts +3 -3
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +8 -8
- package/vscode/src/vs/platform/agentHost/common/dynamicAutoTiersConfiguration.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/dynamicAutoTiersConfiguration.js +22 -0
- package/vscode/src/vs/platform/agentHost/common/imageGenerationConfiguration.d.ts +52 -0
- package/vscode/src/vs/platform/agentHost/common/imageGenerationConfiguration.js +67 -0
- package/vscode/src/vs/platform/agentHost/common/logRedaction.d.ts +45 -0
- package/vscode/src/vs/platform/agentHost/common/logRedaction.js +82 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.d.ts +2 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCompletionAttachmentMeta.d.ts +121 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCompletionAttachmentMeta.js +88 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.js +8 -2
- 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 +5 -1
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/customizationDiscoveryMeta.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/customizationDiscoveryMeta.js +24 -0
- package/vscode/src/vs/platform/agentHost/common/permissionRules.d.ts +58 -0
- package/vscode/src/vs/platform/agentHost/common/permissionRules.js +109 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +4 -1
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +41 -26
- package/vscode/src/vs/platform/agentHost/common/sessionDataService.d.ts +114 -8
- package/vscode/src/vs/platform/agentHost/common/sessionDataService.service.d.ts +7 -0
- package/vscode/src/vs/platform/agentHost/common/terminalPermissionRules.d.ts +21 -0
- package/vscode/src/vs/platform/agentHost/common/terminalPermissionRules.js +57 -0
- package/vscode/src/vs/platform/agentHost/common/titleGenerationConfiguration.js +3 -3
- package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.d.ts +2 -1
- package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/workspacelessScratchDir.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/workspacelessScratchDir.js +11 -0
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.js +1 -1
- package/vscode/src/vs/platform/artifactIntegrations/common/artifactIntegrationRegistry.d.ts +28 -0
- package/vscode/src/vs/platform/artifactIntegrations/common/artifactIntegrationRegistry.js +170 -0
- package/vscode/src/vs/platform/github/common/content/content.d.ts +136 -0
- package/vscode/src/vs/platform/github/common/content/content.js +12 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
- package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveEntryToRegex.d.ts +4 -0
- package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveEntryToRegex.js +41 -0
- package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveRuleKeyForm.d.ts +10 -0
- package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveRuleKeyForm.js +16 -0
- package/vscode/src/vs/platform/terminal/common/autoApprove/suggestAutoApproveRules.d.ts +5 -0
- package/vscode/src/vs/platform/terminal/common/autoApprove/suggestAutoApproveRules.js +64 -0
- package/vscode/src/vs/platform/url/common/urlApprovalPatterns.d.ts +36 -0
- 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 +19 -7
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -46
- package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.js +2 -2
- package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.js +312 -127
- package/vscode/src/vs/sessions/contrib/chat/browser/chatBackgroundTint.js +2 -2
- package/vscode/src/vs/sessions/contrib/chat/browser/getThemeColorsTool.d.ts +21 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/getThemeColorsTool.js +138 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/modelPicker.d.ts +68 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/modelPicker.js +302 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.d.ts +3 -6
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.js +42 -9
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.js +4 -4
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionPickerTryout.js +1 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.d.ts +3 -2
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.js +29 -18
- package/vscode/src/vs/sessions/contrib/chat/browser/promptsService.d.ts +2 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/promptsService.js +11 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.js +91 -98
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptCustomTaskWidget.js +21 -21
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.js +5 -5
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.d.ts +2 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.js +511 -211
- package/vscode/src/vs/sessions/contrib/chat/browser/sharedChatInputComposer.contribution.d.ts +9 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sharedChatInputComposer.contribution.js +146 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sideChatOrchestration.d.ts +13 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sideChatOrchestration.js +14 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.d.ts +3 -8
- package/vscode/src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.js +10 -8
- package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionAutoEnablementTelemetry.d.ts +30 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionAutoEnablementTelemetry.js +178 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsAccessibilityHelp.js +61 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsWidget.d.ts +100 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsWidget.js +687 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/extensions.contribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/extensions.contribution.js +88 -0
- package/vscode/src/vs/sessions/contrib/extensions/browser/media/agentsWindowExtensions.css +182 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.d.ts +57 -6
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.js +94 -108
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostPolicyContinuationPresenter.d.ts +12 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostPolicyContinuationPresenter.js +48 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsShared.js +3 -1
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +7 -7
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.d.ts +107 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.js +447 -0
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/mobile/mobileChatPhoneInputPresenter.js +15 -10
- 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 +2 -1
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.js +92 -34
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.js +12 -5
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.js +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.js +1 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.js +15 -15
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.js +9 -9
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.js +5 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.d.ts +1 -0
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +39 -25
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.js +13 -13
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.js +13 -13
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +110 -145
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.js +2 -4
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.js +6 -2
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/media/sessionWorktreeCleanupEditor.css +118 -90
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.d.ts +1 -1
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.js +48 -13
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.d.ts +89 -10
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.js +1375 -182
- package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditorInput.js +1 -1
- package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.js +3 -3
- package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.d.ts +3 -1
- package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.js +30 -3
- package/vscode/src/vs/sessions/skills/all_/SKILL.md.js +4 -3
- package/vscode/src/vs/sessions/skills/generate-chat-background/SKILL.md +34 -0
- package/vscode/src/vs/sessions/skills/troubleshoot/SKILL.md +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatArtifactIntegrations.d.ts +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatArtifactIntegrations.js +484 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +7 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +1 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +4 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatPetJumpGameAccessibleView.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatPetJumpGameAccessibleView.js +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +30 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +23 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +513 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +133 -124
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +83 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +110 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +13 -13
- 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 +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- 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/agentHostCompletionAction.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.js +73 -0
- 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 +11 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +49 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +235 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +71 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputState.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatMoveEditors.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatMoveEditors.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +125 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.d.ts +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.js +493 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostEditReview.d.ts +187 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostEditReview.js +1000 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalModelSupport.d.ts +97 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalModelSupport.js +407 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpAppToolsService.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpAppToolsService.js +361 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.js +72 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionMirror.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionMirror.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuation.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuation.js +377 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuationEditor.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuationEditor.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyUnavailableSession.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyUnavailableSession.js +109 -0
- 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.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +24 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +87 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.d.ts +48 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.js +434 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotifications.js +18 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxPathGrant.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxPathGrant.js +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +134 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +1627 -491
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +60 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +572 -133
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +65 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +114 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +27 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +105 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +6 -4
- 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/agentHostSignedOutCompatibilityContribution.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutCompatibilityContribution.js +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +6 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSteeringMessageHandoff.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSteeringMessageHandoff.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +70 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.d.ts +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +96 -8
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationGuide.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModel.contribution.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelActions.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelActions.js +476 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelReadyNotification.d.ts +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelReadyNotification.js +422 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelSetupProgress.d.ts +108 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelSetupProgress.js +744 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +36 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +21 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +112 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +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.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +28 -26
- 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/agentSessionsConfiguration.js +40 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +115 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotExtensionsService.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotExtensionsService.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +39 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplace.contribution.js +28 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.js +159 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +23 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +20 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +281 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationsTelemetryService.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +390 -112
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerEnvironmentVariables.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerEnvironmentVariables.js +298 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/btwSlashCommand.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/btwSlashCommand.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +648 -652
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +74 -57
- 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/chatDebugEditor.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.d.ts +3 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +6 -5
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +60 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +88 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +43 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +13 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +18 -28
- 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 +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +20 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +21 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +15 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +35 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatNetworkConfiguration.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +54 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetColorsWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.d.ts +69 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.js +164 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +1 -1
- 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/chatSessionCommit.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionCommit.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +25 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChatProvider.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChatProvider.js +114 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +78 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/codexStatusEntry.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +22 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +52 -2
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatHarnessSwitchFeedbackSurveyService.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.d.ts +5 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +40 -220
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +81 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatInputSpotlightTour.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatInputSpotlightTour.js +248 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatOnboardingEligibility.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatOnboardingEligibility.js +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/modelPickerTryout.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +6 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +128 -118
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +39 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +20 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +26 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +216 -165
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +12 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +16 -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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +14 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +7 -4
- 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 +8 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +36 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +5 -2
- 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/cloudSandboxRepositoryPicker.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxRepositoryPicker.js +106 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +165 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +57 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +511 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +137 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthenticationResolver.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthenticationResolver.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +155 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostCustomizationHarness.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostCustomizationHarness.js +16 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +32 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +78 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -3
- 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.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.d.ts +47 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +139 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +89 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +18 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputSessionLinkProvider.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputSessionLinkProvider.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +134 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/media/chatEditor.css +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +172 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatOpenDiagnosticsService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatOpenDiagnosticsService.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +59 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +481 -271
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/remoteChatSessionRestorer.d.ts +148 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/remoteChatSessionRestorer.js +575 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.d.ts +13 -17
- package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatThinkingTitleService.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatThinkingTitleService.js +176 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatUtilityModelService.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatUtilityModelService.js +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/editing/chatSessionReviewPreferences.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/editing/chatSessionReviewPreferences.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +27 -6
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +21 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +26 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +80 -52
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +57 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +27 -15
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +27 -11
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +383 -51
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +211 -32
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptModelResolver.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptModelResolver.js +77 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptSkillResolver.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptSkillResolver.js +87 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptToolResolver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptToolResolver.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +26 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +816 -195
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.d.ts +10 -11
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.js +135 -95
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +1 -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 +1 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +13 -98
- 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/languageModelToolsContribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +70 -73
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +15 -19
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +122 -202
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css +19 -50
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +3 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/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/terminalChatService.d.ts +1 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -43
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +15 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +42 -96
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +5 -4
- 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 +22 -13
- 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/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 +3 -3
- 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.js +76 -75
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +4 -4
- package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +3 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +20 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +56 -14
- package/vscode/src/vs/workbench/services/agentHost/browser/localModelService.d.ts +52 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/localModelService.js +294 -0
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCustomizationMeta.d.ts +0 -27
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCustomizationMeta.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/clientPluginCustomizationMeta.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/clientPluginCustomizationMeta.js +0 -22
- package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.d.ts +0 -8
- package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.js +0 -8
- package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.d.ts +0 -23
- package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.js +0 -17
- package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.d.ts +0 -22
- package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.js +0 -158
- package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.d.ts +0 -15
- package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.js +0 -106
- package/vscode/src/vs/sessions/contrib/chat/browser/unifiedWorkspacePickerConfiguration.d.ts +0 -3
- package/vscode/src/vs/sessions/contrib/chat/browser/unifiedWorkspacePickerConfiguration.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +0 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +0 -441
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.js +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +0 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +0 -241
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +0 -141
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +0 -731
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +0 -313
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +0 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +0 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +0 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +0 -358
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.d.ts +0 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.js +0 -944
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.js +0 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.js +0 -605
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.js +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.d.ts +0 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +0 -261
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +0 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +0 -72
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +0 -36
- package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.d.ts +0 -47
- package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.js +0 -362
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { raceCancellationError, DeferredPromise, raceTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { isLocalAgentHostProviderDisabledByPolicy, affectsAgentHostProviderPreference } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService';
|
|
4
5
|
import { CancellationTokenSource, CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
6
|
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
6
|
-
import { ErrorNoTelemetry,
|
|
7
|
+
import { ErrorNoTelemetry, isCancellationError, BugIndicatingError, onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
7
8
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
9
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
9
10
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
10
|
-
import { Disposable, DisposableResourceMap, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import { Disposable, DisposableResourceMap, toDisposable, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
12
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
12
13
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
13
14
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
@@ -20,6 +21,7 @@ import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common
|
|
|
20
21
|
import { OffsetRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/offsetRange';
|
|
21
22
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
22
23
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
24
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
23
25
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
24
26
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
25
27
|
import { Progress } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
@@ -37,25 +39,27 @@ import { IAccountPolicyGateService } from '@codingame/monaco-vscode-api/vscode/v
|
|
|
37
39
|
import { IChatDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service';
|
|
38
40
|
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
39
41
|
import { awaitStatsForSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
42
|
+
import { IChatOpenDiagnosticsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatOpenDiagnosticsService.service';
|
|
40
43
|
import { clearChatMarks, markChat, ChatPerfMark } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatPerf';
|
|
41
44
|
import { CloudSandboxSessionTrace } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/cloudSandboxSessionTrace';
|
|
42
45
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
|
|
43
|
-
import {
|
|
44
|
-
import { logChangesToStateModel, normalizeSerializableChatData, ChatModel, getRestoredChatRequestSource, ChatRequestModel, ChatRequestRemovalReason, updateRanges, toChatHistoryContent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
46
|
+
import { logChangesToStateModel, normalizeSerializableChatData, ChatModel, ChatRequestRemovalReason, ChatRequestModel, updateRanges, toChatHistoryContent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
45
47
|
import { ChatModelStore } from '../model/chatModelStore.js';
|
|
46
48
|
import { ChatRequestTextPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, getPromptText, chatSubcommandLeader, chatAgentLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
47
49
|
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
|
|
48
50
|
import { ChatPendingRequestChangeEventName, ChatRequestQueueKind, ChatMcpServersStarting, ChatStopCancellationNoopEventName, ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
49
51
|
import { ChatServiceTelemetry, getChatSessionTelemetryIds, ChatRequestTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry';
|
|
52
|
+
import { RemoteChatSessionRestorer } from './remoteChatSessionRestorer.js';
|
|
50
53
|
import { IAgentHostConnectionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService.service';
|
|
51
|
-
import {
|
|
54
|
+
import { isCopilotAgentHostProvider } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostSessionType';
|
|
55
|
+
import { isAgentHostTarget, localChatSessionType, isTerminalCommandPrompt } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
52
56
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
53
57
|
import { ChatSessionStore } from '../model/chatSessionStore.js';
|
|
54
58
|
import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service';
|
|
55
59
|
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service';
|
|
56
60
|
import { LocalChatSessionUri, getChatSessionType, isUntitledChatSession, chatSessionResourceToId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
57
61
|
import { isExplicitFileOrImageVariableEntry, IChatRequestVariableEntry, ChatRequestVariableSet, isPromptTextVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
58
|
-
import { ChatConfiguration, ChatAgentLocation, isLocalChatSessionSubjectToManagedPolicy, ChatModeKind, getCopilotHarnessIntroductionMode, managedPolicyRequiresAgentHostMessage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
62
|
+
import { ChatConfiguration, ChatAgentLocation, CONTINUE_AGENT_HOST_CHAT_IN_COPILOT_ACTION_ID, isLocalChatSessionSubjectToManagedPolicy, ChatModeKind, getCopilotHarnessIntroductionMode, managedPolicyRequiresAgentHostMessage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
59
63
|
import { ChatMessageRole } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
60
64
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
61
65
|
import { ModelSelectionReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/modelSelection';
|
|
@@ -70,8 +74,8 @@ import { findLast } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arr
|
|
|
70
74
|
import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
71
75
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
72
76
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
73
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
74
77
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
78
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
75
79
|
|
|
76
80
|
const serializedChatKey = "interactive.sessions";
|
|
77
81
|
function hasDraftInput(model) {
|
|
@@ -146,6 +150,17 @@ function backfillTransferredModel(transferredState, historyModel) {
|
|
|
146
150
|
selectedModel: historyModel
|
|
147
151
|
};
|
|
148
152
|
}
|
|
153
|
+
function rekeyIntendedModel(intended, draftSessionType, realSessionType) {
|
|
154
|
+
const prefix = `${draftSessionType}:`;
|
|
155
|
+
if (!intended || draftSessionType === realSessionType || !intended.modelId.startsWith(prefix)) {
|
|
156
|
+
return intended;
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
...intended,
|
|
160
|
+
modelId: `${realSessionType}:${intended.modelId.substring(prefix.length)}`,
|
|
161
|
+
model: undefined
|
|
162
|
+
};
|
|
163
|
+
}
|
|
149
164
|
let ChatService = class ChatService extends Disposable {
|
|
150
165
|
get transferredSessionResource() {
|
|
151
166
|
return this._transferredSessionResource;
|
|
@@ -156,6 +171,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
156
171
|
setSaveModelsEnabled(enabled) {
|
|
157
172
|
this._saveModelsEnabled = enabled;
|
|
158
173
|
}
|
|
174
|
+
setRemoteHistoryScheduler(scheduler) {
|
|
175
|
+
this._remoteHistoryScheduler = scheduler;
|
|
176
|
+
}
|
|
159
177
|
waitForModelDisposals() {
|
|
160
178
|
return this._sessionModels.waitForModelDisposals();
|
|
161
179
|
}
|
|
@@ -182,7 +200,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
182
200
|
chatDebugService,
|
|
183
201
|
managedSettingsService,
|
|
184
202
|
accountPolicyGateService,
|
|
185
|
-
agentHostConnectionsService
|
|
203
|
+
agentHostConnectionsService,
|
|
204
|
+
commandService,
|
|
205
|
+
chatOpenDiagnosticsService
|
|
186
206
|
) {
|
|
187
207
|
super();
|
|
188
208
|
this.storageService = storageService;
|
|
@@ -203,10 +223,16 @@ let ChatService = class ChatService extends Disposable {
|
|
|
203
223
|
this.chatDebugService = chatDebugService;
|
|
204
224
|
this.accountPolicyGateService = accountPolicyGateService;
|
|
205
225
|
this.agentHostConnectionsService = agentHostConnectionsService;
|
|
226
|
+
this.commandService = commandService;
|
|
227
|
+
this.chatOpenDiagnosticsService = chatOpenDiagnosticsService;
|
|
206
228
|
this._pendingRequests = this._register(( new DisposableResourceMap()));
|
|
207
229
|
this._queuedRequestDeferreds = ( new Map());
|
|
208
230
|
this._syntheticPendingRequests = ( new WeakSet());
|
|
209
231
|
this._inFlightUntitledMaterializations = ( new ResourceMap());
|
|
232
|
+
this._remoteSessionLoads = ( new ResourceMap());
|
|
233
|
+
this._abandonedRemoteSessionLoads = ( new ResourceMap());
|
|
234
|
+
this._remoteSessionRestorers = ( new ResourceMap());
|
|
235
|
+
this._remoteSessionModelsPendingPublication = ( new ResourceMap());
|
|
210
236
|
this._saveModelsEnabled = true;
|
|
211
237
|
this._onDidSubmitRequest = this._register(( new Emitter()));
|
|
212
238
|
this.onDidSubmitRequest = this._onDidSubmitRequest.event;
|
|
@@ -233,8 +259,20 @@ let ChatService = class ChatService extends Disposable {
|
|
|
233
259
|
void whenAccountPolicySettled(this.accountPolicyGateService).then(() => {
|
|
234
260
|
this.policyInitialized = true;
|
|
235
261
|
}, error => this.logService.error(error));
|
|
262
|
+
this._register(toDisposable(() => {
|
|
263
|
+
for (const load of ( this._remoteSessionLoads.values())) {
|
|
264
|
+
load.cancellation.cancel();
|
|
265
|
+
}
|
|
266
|
+
}));
|
|
236
267
|
this._sessionModels = this._register(instantiationService.createInstance(ChatModelStore, {
|
|
237
|
-
createModel: props =>
|
|
268
|
+
createModel: props => {
|
|
269
|
+
const restoredModel = this._remoteSessionModelsPendingPublication.get(props.sessionResource);
|
|
270
|
+
if (restoredModel) {
|
|
271
|
+
this._remoteSessionModelsPendingPublication.delete(props.sessionResource);
|
|
272
|
+
return restoredModel;
|
|
273
|
+
}
|
|
274
|
+
return this._startSession(props);
|
|
275
|
+
},
|
|
238
276
|
willDisposeModel: async model => {
|
|
239
277
|
const localSessionId = LocalChatSessionUri.parseLocalSessionId(model.sessionResource);
|
|
240
278
|
if (localSessionId && this.shouldStoreSession(model)) {
|
|
@@ -506,13 +544,50 @@ let ChatService = class ChatService extends Disposable {
|
|
|
506
544
|
transferEditingSession,
|
|
507
545
|
disableBackgroundKeepAlive,
|
|
508
546
|
inputState,
|
|
509
|
-
isReadOnly,
|
|
510
547
|
isInputBlocked,
|
|
511
|
-
historyStatus,
|
|
512
548
|
backgroundShellCount,
|
|
513
549
|
canvasContext,
|
|
550
|
+
modelConfigurationState,
|
|
514
551
|
sessionTypeSelectionReason
|
|
515
552
|
} = props;
|
|
553
|
+
let {
|
|
554
|
+
isReadOnly,
|
|
555
|
+
historyStatus
|
|
556
|
+
} = props;
|
|
557
|
+
const policyStore = ( new DisposableStore());
|
|
558
|
+
const provider = sessionResource?.scheme === "agent-host-claude" ? "claude" : sessionResource?.scheme === "agent-host-codex" ? "codex" : undefined;
|
|
559
|
+
if (provider) {
|
|
560
|
+
const policyBlocked = observableValue(
|
|
561
|
+
"agentHostPolicyBlocked",
|
|
562
|
+
isLocalAgentHostProviderDisabledByPolicy(provider, this.configurationService)
|
|
563
|
+
);
|
|
564
|
+
const revoked = observableValue("agentHostPolicyRevoked", policyBlocked.get());
|
|
565
|
+
policyStore.add(this.configurationService.onDidChangeConfiguration(event => {
|
|
566
|
+
if (affectsAgentHostProviderPreference(event, true)) {
|
|
567
|
+
const blocked = isLocalAgentHostProviderDisabledByPolicy(provider, this.configurationService);
|
|
568
|
+
policyBlocked.set(blocked, undefined);
|
|
569
|
+
if (blocked) {
|
|
570
|
+
revoked.set(true, undefined);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}));
|
|
574
|
+
const providedReadOnly = isReadOnly;
|
|
575
|
+
const providedHistoryStatus = historyStatus;
|
|
576
|
+
isReadOnly = derived(
|
|
577
|
+
reader => revoked.read(reader) || (providedReadOnly?.read(reader) ?? false)
|
|
578
|
+
);
|
|
579
|
+
historyStatus = derived(reader => revoked.read(reader) ? {
|
|
580
|
+
kind: "history",
|
|
581
|
+
message: policyBlocked.read(reader) ? ( localize(
|
|
582
|
+
17561,
|
|
583
|
+
"Your organization has disabled this agent. This conversation is read-only. Continue in Copilot to copy the conversation and keep the original."
|
|
584
|
+
)) : ( localize(17562, "This agent is available again. This open chat is still read-only.")),
|
|
585
|
+
action: {
|
|
586
|
+
label: ( localize(17563, "Continue in Copilot")),
|
|
587
|
+
run: () => this.commandService.executeCommand(CONTINUE_AGENT_HOST_CHAT_IN_COPILOT_ACTION_ID, sessionResource)
|
|
588
|
+
}
|
|
589
|
+
} : providedHistoryStatus?.read(reader));
|
|
590
|
+
}
|
|
516
591
|
const blocked = derived(
|
|
517
592
|
this,
|
|
518
593
|
reader => (isLocalChatSessionSubjectToManagedPolicy(sessionResource, location) && this.managedPolicy.read(reader)) || (isInputBlocked?.read(reader) ?? false)
|
|
@@ -528,8 +603,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
528
603
|
historyStatus,
|
|
529
604
|
backgroundShellCount,
|
|
530
605
|
canvasContext,
|
|
606
|
+
modelConfigurationState,
|
|
531
607
|
sessionTypeSelectionReason
|
|
532
608
|
});
|
|
609
|
+
policyStore.add(model.onDidDispose(() => policyStore.dispose()));
|
|
533
610
|
if (this._hasAgentHostContribution(sessionResource)) {
|
|
534
611
|
this._serverManagedQueueModels.add(model);
|
|
535
612
|
}
|
|
@@ -624,15 +701,146 @@ let ChatService = class ChatService extends Disposable {
|
|
|
624
701
|
}, debugOwner ?? "ChatService#loadSessionFromData");
|
|
625
702
|
}
|
|
626
703
|
async acquireOrLoadSession(sessionResource, location, token, debugOwner, sessionTypeSelectionReason) {
|
|
704
|
+
this.chatOpenDiagnosticsService.setModelWasLoaded(sessionResource, !!this.getSession(sessionResource));
|
|
627
705
|
if (LocalChatSessionUri.isLocalSession(sessionResource)) {
|
|
628
706
|
return this.acquireOrRestoreLocalSession(sessionResource, debugOwner);
|
|
629
|
-
}
|
|
630
|
-
|
|
707
|
+
}
|
|
708
|
+
let load = this._remoteSessionLoads.get(sessionResource);
|
|
709
|
+
if (!load) {
|
|
710
|
+
const existingRef = this.acquireExistingSession(sessionResource, debugOwner);
|
|
711
|
+
if (existingRef) {
|
|
712
|
+
return existingRef;
|
|
713
|
+
}
|
|
714
|
+
const cancellation = ( new CancellationTokenSource());
|
|
715
|
+
const abandonedLoad = this._abandonedRemoteSessionLoads.get(sessionResource);
|
|
716
|
+
load = {
|
|
717
|
+
cancellation,
|
|
718
|
+
promise: abandonedLoad ? this.loadRemoteSessionAfter(
|
|
719
|
+
abandonedLoad,
|
|
720
|
+
sessionResource,
|
|
721
|
+
location,
|
|
722
|
+
cancellation.token,
|
|
723
|
+
debugOwner,
|
|
724
|
+
sessionTypeSelectionReason
|
|
725
|
+
) : this.loadRemoteSession(
|
|
726
|
+
sessionResource,
|
|
727
|
+
location,
|
|
728
|
+
cancellation.token,
|
|
729
|
+
debugOwner,
|
|
730
|
+
sessionTypeSelectionReason
|
|
731
|
+
),
|
|
732
|
+
activeConsumers: 0,
|
|
733
|
+
settled: false
|
|
734
|
+
};
|
|
735
|
+
this._remoteSessionLoads.set(sessionResource, load);
|
|
736
|
+
void this.monitorRemoteSessionLoad(sessionResource, load);
|
|
737
|
+
}
|
|
738
|
+
return this.acquireRemoteSessionLoad(sessionResource, load, token, debugOwner);
|
|
739
|
+
}
|
|
740
|
+
async monitorRemoteSessionLoad(sessionResource, load) {
|
|
741
|
+
try {
|
|
742
|
+
load.internalReference = await load.promise;
|
|
743
|
+
} catch (error) {
|
|
744
|
+
if (!isCancellationError(error)) {
|
|
745
|
+
this.logService.error(`ChatService#loadRemoteSession: failed to restore ${( sessionResource.toString())}`, error);
|
|
746
|
+
}
|
|
747
|
+
} finally {
|
|
748
|
+
load.settled = true;
|
|
749
|
+
if (load.activeConsumers === 0) {
|
|
750
|
+
this.releaseRemoteSessionInternalReference(load);
|
|
751
|
+
}
|
|
752
|
+
if (this._remoteSessionLoads.get(sessionResource) === load) {
|
|
753
|
+
this._remoteSessionLoads.delete(sessionResource);
|
|
754
|
+
}
|
|
755
|
+
if (this._abandonedRemoteSessionLoads.get(sessionResource) === load.promise) {
|
|
756
|
+
this._abandonedRemoteSessionLoads.delete(sessionResource);
|
|
757
|
+
}
|
|
758
|
+
load.cancellation.dispose();
|
|
631
759
|
}
|
|
632
760
|
}
|
|
761
|
+
async loadRemoteSessionAfter(
|
|
762
|
+
abandonedLoad,
|
|
763
|
+
sessionResource,
|
|
764
|
+
location,
|
|
765
|
+
token,
|
|
766
|
+
debugOwner,
|
|
767
|
+
sessionTypeSelectionReason
|
|
768
|
+
) {
|
|
769
|
+
await raceCancellationError(abandonedLoad.then(undefined, () => undefined), token);
|
|
770
|
+
return this.loadRemoteSession(sessionResource, location, token, debugOwner, sessionTypeSelectionReason);
|
|
771
|
+
}
|
|
772
|
+
abandonRemoteSessionLoad(sessionResource, load) {
|
|
773
|
+
if (this._remoteSessionLoads.get(sessionResource) === load) {
|
|
774
|
+
this._remoteSessionLoads.delete(sessionResource);
|
|
775
|
+
this._abandonedRemoteSessionLoads.set(sessionResource, load.promise);
|
|
776
|
+
}
|
|
777
|
+
load.cancellation.cancel();
|
|
778
|
+
}
|
|
779
|
+
releaseRemoteSessionInternalReference(load) {
|
|
780
|
+
load.internalReference?.dispose();
|
|
781
|
+
load.internalReference = undefined;
|
|
782
|
+
}
|
|
783
|
+
async acquireRemoteSessionLoad(sessionResource, load, token, debugOwner) {
|
|
784
|
+
load.activeConsumers++;
|
|
785
|
+
let released = false;
|
|
786
|
+
const release = () => {
|
|
787
|
+
if (released) {
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
released = true;
|
|
791
|
+
load.activeConsumers--;
|
|
792
|
+
if (load.activeConsumers === 0) {
|
|
793
|
+
if (load.settled) {
|
|
794
|
+
this.releaseRemoteSessionInternalReference(load);
|
|
795
|
+
} else {
|
|
796
|
+
queueMicrotask(() => {
|
|
797
|
+
if (load.activeConsumers === 0 && !load.settled) {
|
|
798
|
+
this.abandonRemoteSessionLoad(sessionResource, load);
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
const cancellationListener = token.onCancellationRequested(release);
|
|
805
|
+
try {
|
|
806
|
+
await raceCancellationError(load.promise, token);
|
|
807
|
+
load.settled = true;
|
|
808
|
+
const reference = this.acquireExistingSession(sessionResource, debugOwner);
|
|
809
|
+
if (reference) {
|
|
810
|
+
this.releaseRemoteSessionInternalReference(load);
|
|
811
|
+
}
|
|
812
|
+
return reference;
|
|
813
|
+
} finally {
|
|
814
|
+
cancellationListener.dispose();
|
|
815
|
+
release();
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
waitForRemoteSessionMutation(sessionResource) {
|
|
819
|
+
const load = this._remoteSessionLoads.get(sessionResource);
|
|
820
|
+
const loadPromise = load && !load.settled ? load.promise : undefined;
|
|
821
|
+
const firstRefresh = this._remoteSessionRestorers.get(sessionResource)?.historyRefresh;
|
|
822
|
+
if (!loadPromise && !firstRefresh) {
|
|
823
|
+
return undefined;
|
|
824
|
+
}
|
|
825
|
+
return (async () => {
|
|
826
|
+
if (loadPromise) {
|
|
827
|
+
await loadPromise;
|
|
828
|
+
}
|
|
829
|
+
let refresh = this._remoteSessionRestorers.get(sessionResource)?.historyRefresh ?? firstRefresh;
|
|
830
|
+
while (refresh) {
|
|
831
|
+
await refresh;
|
|
832
|
+
const nextRefresh = this._remoteSessionRestorers.get(sessionResource)?.historyRefresh;
|
|
833
|
+
if (nextRefresh === refresh) {
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
refresh = nextRefresh;
|
|
837
|
+
}
|
|
838
|
+
})();
|
|
839
|
+
}
|
|
633
840
|
async loadRemoteSession(sessionResource, location, token, debugOwner, sessionTypeSelectionReason) {
|
|
634
841
|
const loadWatch = StopWatch.create(false);
|
|
635
842
|
this.trace("loadRemoteSession", `start ${( sessionResource.toString())}`);
|
|
843
|
+
this.chatOpenDiagnosticsService.mark(sessionResource, "contentRequested");
|
|
636
844
|
{
|
|
637
845
|
const existingRef = this.acquireExistingSession(sessionResource, debugOwner);
|
|
638
846
|
if (existingRef) {
|
|
@@ -649,6 +857,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
649
857
|
}
|
|
650
858
|
const providedSession = await this.chatSessionService.getOrCreateChatSession(sessionResource, token);
|
|
651
859
|
const modelStartedAt = loadWatch.elapsed();
|
|
860
|
+
this.chatOpenDiagnosticsService.mark(sessionResource, "contentReceived");
|
|
652
861
|
const loadTrace = CloudSandboxSessionTrace.get(providedSession);
|
|
653
862
|
this.trace("loadRemoteSession", `session content resolved for ${( sessionResource.toString())} with ${providedSession.history.length} history item(s)`);
|
|
654
863
|
{
|
|
@@ -658,6 +867,51 @@ let ChatService = class ChatService extends Disposable {
|
|
|
658
867
|
}
|
|
659
868
|
}
|
|
660
869
|
const chatSessionType = getChatSessionType(sessionResource);
|
|
870
|
+
const {
|
|
871
|
+
model,
|
|
872
|
+
inputRestore
|
|
873
|
+
} = this.createRemoteSessionModel(sessionResource, providedSession, location, sessionTypeSelectionReason);
|
|
874
|
+
const parsePrompt = this.createRemoteHistoryPromptParser(chatSessionType, location);
|
|
875
|
+
const restorer = this.instantiationService.createInstance(RemoteChatSessionRestorer, {
|
|
876
|
+
model,
|
|
877
|
+
session: providedSession,
|
|
878
|
+
chatSessionType,
|
|
879
|
+
token,
|
|
880
|
+
trace: loadTrace,
|
|
881
|
+
parsePrompt,
|
|
882
|
+
publishModel: restoredModel => {
|
|
883
|
+
this.chatOpenDiagnosticsService.mark(sessionResource, "replayDone");
|
|
884
|
+
const reference = this.publishRemoteSessionModel(restoredModel, location, debugOwner ?? "ChatService#loadRemoteSession");
|
|
885
|
+
this.chatOpenDiagnosticsService.mark(sessionResource, "published");
|
|
886
|
+
return reference;
|
|
887
|
+
}
|
|
888
|
+
}, this._remoteHistoryScheduler);
|
|
889
|
+
const restored = await restorer.restore();
|
|
890
|
+
try {
|
|
891
|
+
loadTrace?.associate(model);
|
|
892
|
+
this.finishRemoteSessionInputState(model, providedSession, inputRestore);
|
|
893
|
+
this.trace("loadRemoteSession", `history applied to model for ${( sessionResource.toString())}: ${model.getRequests().length} request(s)`);
|
|
894
|
+
this.trackRemoteSession(model, providedSession, restorer, restored, parsePrompt);
|
|
895
|
+
if (loadTrace) {
|
|
896
|
+
const modelReadyAt = loadWatch.elapsed();
|
|
897
|
+
loadTrace.record("modelReady", {
|
|
898
|
+
loadRemoteSessionMs: modelReadyAt,
|
|
899
|
+
modelBuildMs: modelReadyAt - modelStartedAt,
|
|
900
|
+
historyReplayYieldCount: restorer.yieldCount
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
return restored.reference;
|
|
904
|
+
} catch (error) {
|
|
905
|
+
const activeRequest = model.lastRequest;
|
|
906
|
+
if (activeRequest?.response?.isIncomplete.get()) {
|
|
907
|
+
model.cancelRequest(activeRequest);
|
|
908
|
+
}
|
|
909
|
+
this._pendingRequests.deleteAndDispose(sessionResource);
|
|
910
|
+
restored.reference.dispose();
|
|
911
|
+
throw error;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
createRemoteSessionModel(sessionResource, providedSession, location, sessionTypeSelectionReason) {
|
|
661
915
|
const modelId = findLast(
|
|
662
916
|
providedSession.history.filter(m => m.type === "request"),
|
|
663
917
|
req => req.modelId
|
|
@@ -725,10 +979,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
725
979
|
const transferredInputState = providedSession.transferredState?.inputState;
|
|
726
980
|
const stateToApply = transferredInputState ? backfillTransferredModel(transferredInputState, historyDerivedModel) : restoredDraft;
|
|
727
981
|
const inputState = backfillRestoredPickerState(stateToApply, storedInputState, ChatMode.Agent.id);
|
|
728
|
-
const
|
|
982
|
+
const model = this._startSession({
|
|
729
983
|
initialData,
|
|
730
984
|
location,
|
|
731
|
-
sessionResource
|
|
985
|
+
sessionResource,
|
|
732
986
|
canUseTools: false,
|
|
733
987
|
transferEditingSession: providedSession.transferredState?.editingSession,
|
|
734
988
|
inputState,
|
|
@@ -737,39 +991,62 @@ let ChatService = class ChatService extends Disposable {
|
|
|
737
991
|
historyStatus: providedSession.historyStatus,
|
|
738
992
|
backgroundShellCount: providedSession.backgroundShellCount,
|
|
739
993
|
canvasContext: providedSession.canvasContext,
|
|
994
|
+
modelConfigurationState: providedSession.modelConfigurationState,
|
|
740
995
|
sessionTypeSelectionReason
|
|
741
|
-
}
|
|
996
|
+
});
|
|
742
997
|
if (modelId && !historySelectedModel) {
|
|
743
|
-
|
|
998
|
+
model.inputModel.setIntendedModel({
|
|
744
999
|
modelId,
|
|
745
1000
|
reason: ModelSelectionReason.SessionRestore
|
|
746
1001
|
});
|
|
747
1002
|
}
|
|
748
|
-
logChangesToStateModel(
|
|
749
|
-
modelRef.object.inputModel,
|
|
750
|
-
`loadRemoteSession inputState source: session=${( sessionResource.toString())}, chatSessionType=${chatSessionType}, historyModelId=${modelId}, agentUri=${agentUri?.toString()}, historySelectedModel=${historySelectedModel}, transferredSelectedModel=${providedSession.transferredState?.inputState?.selectedModel?.identifier}, storedSelectedModel=${storedInputState?.selectedModel?.identifier}, finalSelectedModel=${modelRef.object.inputModel.state.get()?.selectedModel?.identifier}, hasTransferredInputState=${!!providedSession.transferredState?.inputState}, hasStoredInputState=${!!storedInputState}, hasInitialData=${!!initialData}`,
|
|
751
|
-
modelRef.object.inputModel.state.get(),
|
|
752
|
-
undefined,
|
|
753
|
-
this.logService
|
|
754
|
-
);
|
|
755
1003
|
if (storedPermissionLevel && !initialData && !storedInputState) {
|
|
756
|
-
|
|
1004
|
+
model.inputModel.setState({
|
|
757
1005
|
permissionLevel: storedPermissionLevel
|
|
758
1006
|
});
|
|
759
1007
|
}
|
|
760
1008
|
if (providedSession.title) {
|
|
761
|
-
|
|
1009
|
+
model.setCustomTitle(providedSession.title);
|
|
762
1010
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
1011
|
+
return {
|
|
1012
|
+
model,
|
|
1013
|
+
inputRestore: {
|
|
1014
|
+
modelId,
|
|
1015
|
+
agentUri,
|
|
1016
|
+
historySelectedModel,
|
|
1017
|
+
storedInputState,
|
|
1018
|
+
hasInitialData: !!initialData
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
finishRemoteSessionInputState(
|
|
1023
|
+
model,
|
|
1024
|
+
providedSession,
|
|
1025
|
+
{
|
|
1026
|
+
modelId,
|
|
1027
|
+
agentUri,
|
|
1028
|
+
historySelectedModel,
|
|
1029
|
+
storedInputState,
|
|
1030
|
+
hasInitialData
|
|
1031
|
+
}
|
|
1032
|
+
) {
|
|
1033
|
+
if (modelId && !historySelectedModel) {
|
|
1034
|
+
model.inputModel.setIntendedModel({
|
|
1035
|
+
modelId,
|
|
1036
|
+
reason: ModelSelectionReason.SessionRestore
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
logChangesToStateModel(
|
|
1040
|
+
model.inputModel,
|
|
1041
|
+
`loadRemoteSession inputState source: session=${( model.sessionResource.toString())}, chatSessionType=${getChatSessionType(model.sessionResource)}, historyModelId=${modelId}, agentUri=${agentUri?.toString()}, historySelectedModel=${historySelectedModel}, transferredSelectedModel=${providedSession.transferredState?.inputState?.selectedModel?.identifier}, storedSelectedModel=${storedInputState?.selectedModel?.identifier}, finalSelectedModel=${model.inputModel.state.get()?.selectedModel?.identifier}, hasTransferredInputState=${!!providedSession.transferredState?.inputState}, hasStoredInputState=${!!storedInputState}, hasInitialData=${hasInitialData}`,
|
|
1042
|
+
model.inputModel.state.get(),
|
|
1043
|
+
undefined,
|
|
1044
|
+
this.logService
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1047
|
+
createRemoteHistoryPromptParser(chatSessionType, location) {
|
|
1048
|
+
const requestParser = isAgentHostTarget(chatSessionType) ? this.instantiationService.createInstance(ChatRequestParser) : undefined;
|
|
1049
|
+
return (text, agent) => {
|
|
773
1050
|
if (requestParser) {
|
|
774
1051
|
try {
|
|
775
1052
|
const attachmentCapabilities = this.getAttachmentCapabilitiesForParser(chatSessionType, agent);
|
|
@@ -798,188 +1075,34 @@ let ChatService = class ChatService extends Disposable {
|
|
|
798
1075
|
}, text))]
|
|
799
1076
|
};
|
|
800
1077
|
};
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
lastRequest?.response?.complete(lastResponseCompletedAt);
|
|
806
|
-
} else if (finishedNow) {
|
|
807
|
-
lastRequest?.response?.complete();
|
|
808
|
-
} else {
|
|
809
|
-
lastRequest?.response?.completeWithoutTimestamp();
|
|
810
|
-
}
|
|
811
|
-
lastResponseCompletedAt = undefined;
|
|
812
|
-
};
|
|
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();
|
|
819
|
-
}
|
|
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;
|
|
861
|
-
}
|
|
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);
|
|
879
|
-
}
|
|
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;
|
|
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
|
-
}));
|
|
1078
|
+
}
|
|
1079
|
+
publishRemoteSessionModel(model, location, debugOwner) {
|
|
1080
|
+
if (( this._sessionModels.has(model.sessionResource))) {
|
|
1081
|
+
throw ( new BugIndicatingError("A chat model is already published for the restored remote session"));
|
|
979
1082
|
}
|
|
980
|
-
this.
|
|
981
|
-
|
|
982
|
-
|
|
1083
|
+
this._remoteSessionModelsPendingPublication.set(model.sessionResource, model);
|
|
1084
|
+
try {
|
|
1085
|
+
return this._sessionModels.acquireOrCreate({
|
|
1086
|
+
location,
|
|
1087
|
+
sessionResource: model.sessionResource,
|
|
1088
|
+
canUseTools: false
|
|
1089
|
+
}, debugOwner);
|
|
1090
|
+
} finally {
|
|
1091
|
+
this._remoteSessionModelsPendingPublication.delete(model.sessionResource);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
trackRemoteSession(model, providedSession, restorer, restored, parsePrompt) {
|
|
1095
|
+
const disposables = ( new DisposableStore());
|
|
1096
|
+
disposables.add(Event.once(model.onDidDispose)(() => disposables.dispose()));
|
|
1097
|
+
this._remoteSessionRestorers.set(model.sessionResource, restorer);
|
|
1098
|
+
disposables.add(toDisposable(() => {
|
|
1099
|
+
if (this._remoteSessionRestorers.get(model.sessionResource) === restorer) {
|
|
1100
|
+
this._remoteSessionRestorers.delete(model.sessionResource);
|
|
1101
|
+
}
|
|
1102
|
+
}));
|
|
1103
|
+
if (providedSession.progressObs && providedSession.interruptActiveResponseCallback) {
|
|
1104
|
+
let streamingRequest = restored.lastRequest;
|
|
1105
|
+
let streamingResponseCompletedAt = restored.lastResponseCompletedAt;
|
|
983
1106
|
let lastProgressLength = 0;
|
|
984
1107
|
let wasComplete;
|
|
985
1108
|
const cancellationListener = disposables.add(( new MutableDisposable()));
|
|
@@ -1008,11 +1131,43 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1008
1131
|
trackNewCancellableRequest();
|
|
1009
1132
|
}
|
|
1010
1133
|
};
|
|
1011
|
-
|
|
1134
|
+
const completeStreamingResponse = (finishedNow = false) => {
|
|
1135
|
+
if (Number.isFinite(streamingResponseCompletedAt)) {
|
|
1136
|
+
streamingRequest?.response?.complete(streamingResponseCompletedAt);
|
|
1137
|
+
} else if (finishedNow) {
|
|
1138
|
+
streamingRequest?.response?.complete();
|
|
1139
|
+
} else {
|
|
1140
|
+
streamingRequest?.response?.completeWithoutTimestamp();
|
|
1141
|
+
}
|
|
1142
|
+
streamingResponseCompletedAt = undefined;
|
|
1143
|
+
};
|
|
1144
|
+
const processProgress = (progressArray, isComplete) => {
|
|
1145
|
+
const restoredProgress = wasComplete === undefined;
|
|
1146
|
+
const justCompleted = wasComplete === false && isComplete;
|
|
1147
|
+
wasComplete = isComplete;
|
|
1148
|
+
if (!isComplete) {
|
|
1149
|
+
ensureCancellationTracking();
|
|
1150
|
+
}
|
|
1151
|
+
if (streamingRequest && progressArray.length > lastProgressLength) {
|
|
1152
|
+
const newProgress = progressArray.slice(lastProgressLength);
|
|
1153
|
+
for (const progress of newProgress) {
|
|
1154
|
+
model?.acceptResponseProgress(streamingRequest, progress, undefined, restoredProgress);
|
|
1155
|
+
}
|
|
1156
|
+
lastProgressLength = progressArray.length;
|
|
1157
|
+
}
|
|
1158
|
+
if (isComplete && streamingRequest) {
|
|
1159
|
+
this._pendingRequests.deleteAndDispose(model.sessionResource);
|
|
1160
|
+
cancellationListener.clear();
|
|
1161
|
+
completeStreamingResponse(justCompleted);
|
|
1162
|
+
void restorer.scheduleHistoryRefresh().then(() => this.processPendingRequests(model.sessionResource));
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
if (streamingRequest && !providedSession.isCompleteObs?.get()) {
|
|
1012
1166
|
trackNewCancellableRequest();
|
|
1013
1167
|
}
|
|
1168
|
+
let progressDeferredForServerRequest = false;
|
|
1014
1169
|
if (providedSession.onDidStartServerRequest) {
|
|
1015
|
-
|
|
1170
|
+
const handleServerRequest = (
|
|
1016
1171
|
{
|
|
1017
1172
|
id,
|
|
1018
1173
|
prompt,
|
|
@@ -1023,11 +1178,13 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1023
1178
|
timestamp,
|
|
1024
1179
|
isSystemInitiated,
|
|
1025
1180
|
requestSource,
|
|
1181
|
+
artifactRequest,
|
|
1026
1182
|
isHidden,
|
|
1027
1183
|
isRequestHidden,
|
|
1028
1184
|
systemInitiatedLabel,
|
|
1029
1185
|
isTerminalRequest,
|
|
1030
1186
|
resume,
|
|
1187
|
+
replacesRequestId,
|
|
1031
1188
|
origin
|
|
1032
1189
|
}
|
|
1033
1190
|
) => {
|
|
@@ -1037,17 +1194,25 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1037
1194
|
throw ( new Error(`Cannot resume missing chat request: ${id}`));
|
|
1038
1195
|
}
|
|
1039
1196
|
request.response.reopen();
|
|
1040
|
-
|
|
1197
|
+
streamingRequest = request;
|
|
1198
|
+
streamingResponseCompletedAt = undefined;
|
|
1041
1199
|
lastProgressLength = 0;
|
|
1042
1200
|
ensureCancellationTracking();
|
|
1043
1201
|
return;
|
|
1044
1202
|
}
|
|
1045
|
-
if (
|
|
1046
|
-
|
|
1203
|
+
if (streamingRequest?.response && !streamingRequest.response.isComplete) {
|
|
1204
|
+
completeStreamingResponse(true);
|
|
1205
|
+
}
|
|
1206
|
+
const replaced = replacesRequestId === undefined ? undefined : model.getRequests().find(request => request.id === replacesRequestId);
|
|
1207
|
+
if (replaced?.response?.isComplete) {
|
|
1208
|
+
model.removeRequest(
|
|
1209
|
+
replaced.id,
|
|
1210
|
+
replaced.response.usage ? ChatRequestRemovalReason.Removal : ChatRequestRemovalReason.Replacement
|
|
1211
|
+
);
|
|
1047
1212
|
}
|
|
1048
|
-
const agent = this.chatAgentService.getAgent(
|
|
1049
|
-
const parsedRequest =
|
|
1050
|
-
|
|
1213
|
+
const agent = this.chatAgentService.getAgent(getChatSessionType(model.sessionResource));
|
|
1214
|
+
const parsedRequest = parsePrompt(prompt, agent);
|
|
1215
|
+
streamingRequest = model.addRequest(parsedRequest, variableData ?? {
|
|
1051
1216
|
variables: []
|
|
1052
1217
|
}, 0,
|
|
1053
1218
|
undefined,
|
|
@@ -1058,10 +1223,22 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1058
1223
|
undefined,
|
|
1059
1224
|
modelId, undefined,
|
|
1060
1225
|
id, isSystemInitiated, systemInitiatedLabel, undefined,
|
|
1061
|
-
isTerminalRequest, timestamp, isHidden, origin, isRequestHidden, requestSource, modelConfiguration, metadata);
|
|
1226
|
+
isTerminalRequest, timestamp, isHidden, origin, isRequestHidden, requestSource, modelConfiguration, metadata, undefined, artifactRequest);
|
|
1062
1227
|
lastProgressLength = 0;
|
|
1063
1228
|
ensureCancellationTracking();
|
|
1064
|
-
}
|
|
1229
|
+
};
|
|
1230
|
+
restorer.setServerRequestHandler({
|
|
1231
|
+
handleRequest: handleServerRequest,
|
|
1232
|
+
handleRequestsApplied: () => {
|
|
1233
|
+
if (progressDeferredForServerRequest) {
|
|
1234
|
+
progressDeferredForServerRequest = false;
|
|
1235
|
+
processProgress(
|
|
1236
|
+
providedSession.progressObs?.get() ?? [],
|
|
1237
|
+
providedSession.isCompleteObs?.get() ?? false
|
|
1238
|
+
);
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1065
1242
|
}
|
|
1066
1243
|
if (!this._isServerManagedQueue(model.sessionResource)) {
|
|
1067
1244
|
let dispatchingImmediateSteer = false;
|
|
@@ -1097,52 +1274,28 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1097
1274
|
disposables.add(autorun(reader => {
|
|
1098
1275
|
const progressArray = providedSession.progressObs?.read(reader) ?? [];
|
|
1099
1276
|
const isComplete = providedSession.isCompleteObs?.read(reader) ?? false;
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
}
|
|
1105
|
-
if (lastRequest && progressArray.length > lastProgressLength) {
|
|
1106
|
-
const newProgress = progressArray.slice(lastProgressLength);
|
|
1107
|
-
for (const progress of newProgress) {
|
|
1108
|
-
model?.acceptResponseProgress(lastRequest, progress);
|
|
1109
|
-
}
|
|
1110
|
-
lastProgressLength = progressArray.length;
|
|
1111
|
-
}
|
|
1112
|
-
if (isComplete && lastRequest) {
|
|
1113
|
-
this._pendingRequests.deleteAndDispose(model.sessionResource);
|
|
1114
|
-
cancellationListener.clear();
|
|
1115
|
-
completeLastResponse(justCompleted);
|
|
1116
|
-
this.processPendingRequests(model.sessionResource);
|
|
1277
|
+
if (!restorer.hasUnappliedServerRequests) {
|
|
1278
|
+
processProgress(progressArray, isComplete);
|
|
1279
|
+
} else {
|
|
1280
|
+
progressDeferredForServerRequest = true;
|
|
1117
1281
|
}
|
|
1118
1282
|
}));
|
|
1119
1283
|
} else {
|
|
1120
|
-
if (providedSession.isCompleteObs?.get()) {
|
|
1121
|
-
completeLastResponse();
|
|
1122
|
-
}
|
|
1123
1284
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
1124
1285
|
action: "notCancelable",
|
|
1125
1286
|
source: "remoteSession",
|
|
1126
1287
|
...getChatSessionTelemetryIds(model.sessionResource, this.agentHostConnectionsService)
|
|
1127
1288
|
});
|
|
1128
|
-
if (lastRequest && model.editingSession) {
|
|
1129
|
-
await chatEditingSessionIsReady(model.editingSession);
|
|
1130
|
-
completeLastResponse();
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
if (loadTrace) {
|
|
1134
|
-
const modelReadyAt = loadWatch.elapsed();
|
|
1135
|
-
loadTrace.record("modelReady", {
|
|
1136
|
-
loadRemoteSessionMs: modelReadyAt,
|
|
1137
|
-
modelBuildMs: modelReadyAt - modelStartedAt
|
|
1138
|
-
});
|
|
1139
1289
|
}
|
|
1140
|
-
return modelRef;
|
|
1141
1290
|
}
|
|
1142
1291
|
async resendRequest(request, options, preserveRequestId = false) {
|
|
1143
1292
|
if (isLocalChatSessionSubjectToManagedPolicy(request.session.sessionResource, request.session.initialLocation) && !this.policyInitialized) {
|
|
1144
1293
|
await whenAccountPolicySettled(this.accountPolicyGateService);
|
|
1145
1294
|
}
|
|
1295
|
+
const remoteSessionMutation = this.waitForRemoteSessionMutation(request.session.sessionResource);
|
|
1296
|
+
if (remoteSessionMutation) {
|
|
1297
|
+
await remoteSessionMutation;
|
|
1298
|
+
}
|
|
1146
1299
|
const model = this._sessionModels.get(request.session.sessionResource);
|
|
1147
1300
|
if (!model && model !== request.session) {
|
|
1148
1301
|
throw ( new Error(`Unknown session: ${request.session.sessionResource}`));
|
|
@@ -1175,7 +1328,11 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1175
1328
|
...options,
|
|
1176
1329
|
metadata: options?.metadata ?? request.agentHostMetadata,
|
|
1177
1330
|
locationData: request.locationData,
|
|
1178
|
-
attachedContext: request.attachedContext
|
|
1331
|
+
attachedContext: request.attachedContext,
|
|
1332
|
+
isSystemInitiated: options?.isSystemInitiated ?? request.isSystemInitiated,
|
|
1333
|
+
systemInitiatedLabel: options?.systemInitiatedLabel ?? request.systemInitiatedLabel,
|
|
1334
|
+
terminalExecutionId: options?.terminalExecutionId ?? request.terminalExecutionId,
|
|
1335
|
+
hideFromTranscript: options?.hideFromTranscript ?? (request.isHiddenFromTranscript ? true : undefined)
|
|
1179
1336
|
};
|
|
1180
1337
|
await this._sendRequestAsync(
|
|
1181
1338
|
model,
|
|
@@ -1256,6 +1413,12 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1256
1413
|
) && !this.policyInitialized) {
|
|
1257
1414
|
await whenAccountPolicySettled(this.accountPolicyGateService);
|
|
1258
1415
|
}
|
|
1416
|
+
if (isSubmission || !( this._sessionModels.has(sessionResource))) {
|
|
1417
|
+
const remoteSessionMutation = this.waitForRemoteSessionMutation(sessionResource);
|
|
1418
|
+
if (remoteSessionMutation) {
|
|
1419
|
+
await remoteSessionMutation;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1259
1422
|
this.trace("sendRequest", `sessionResource: ${( sessionResource.toString())}, message: ${request.substring(0, 20)}${request.length > 20 ? "[...]" : ""}}`);
|
|
1260
1423
|
const hasExplicitFileOrImageAttachment = ( [...(options?.attachedContext ?? []), ...(options?.resolvedVariables ?? [])].some(isExplicitFileOrImageVariableEntry));
|
|
1261
1424
|
if (!request.trim() && !hasExplicitFileOrImageAttachment && !options?.slashCommand && !options?.agentId && !options?.agentIdSilent) {
|
|
@@ -1278,6 +1441,12 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1278
1441
|
transferredMode = submittedMode ?? this._sessionModels.get(sessionResource)?.inputModel.state.get()?.mode;
|
|
1279
1442
|
sessionResource = materializedReal;
|
|
1280
1443
|
newSessionResource = materializedReal;
|
|
1444
|
+
if (isSubmission || !( this._sessionModels.has(sessionResource))) {
|
|
1445
|
+
const remoteSessionMutation = this.waitForRemoteSessionMutation(sessionResource);
|
|
1446
|
+
if (remoteSessionMutation) {
|
|
1447
|
+
await remoteSessionMutation;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1281
1450
|
}
|
|
1282
1451
|
let model = this._sessionModels.get(sessionResource);
|
|
1283
1452
|
if (!model) {
|
|
@@ -1320,6 +1489,12 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1320
1489
|
chatSessionResource: sessionResource,
|
|
1321
1490
|
isNewSession
|
|
1322
1491
|
});
|
|
1492
|
+
const provider = this.chatSessionService.getChatSessionContribution(getChatSessionType(sessionResource))?.agentHostProviderId;
|
|
1493
|
+
if (isCopilotAgentHostProvider(provider)) {
|
|
1494
|
+
this.commandService.executeCommand("github.copilot.survey.signalUsage", "agent.copilot").catch(
|
|
1495
|
+
error => this.logService.warn("[CopilotSurvey] Failed to signal Copilot harness usage", error)
|
|
1496
|
+
);
|
|
1497
|
+
}
|
|
1323
1498
|
}
|
|
1324
1499
|
};
|
|
1325
1500
|
if (options?.queue) {
|
|
@@ -1439,7 +1614,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1439
1614
|
return undefined;
|
|
1440
1615
|
}
|
|
1441
1616
|
this.chatSessionService.registerSessionResourceAlias(untitledResource, newItem.resource);
|
|
1442
|
-
const tempRef = await this.
|
|
1617
|
+
const tempRef = await this.acquireOrLoadSession(
|
|
1443
1618
|
newItem.resource,
|
|
1444
1619
|
untitledModel.initialLocation,
|
|
1445
1620
|
CancellationToken.None,
|
|
@@ -1453,7 +1628,11 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1453
1628
|
if (initialSessionOptions) {
|
|
1454
1629
|
this.chatSessionService.updateSessionOptions(realModel.sessionResource, initialSessionOptions);
|
|
1455
1630
|
}
|
|
1456
|
-
realModel.inputModel.setIntendedModel(
|
|
1631
|
+
realModel.inputModel.setIntendedModel(rekeyIntendedModel(
|
|
1632
|
+
untitledModel.inputModel.intendedModel,
|
|
1633
|
+
getChatSessionType(untitledResource),
|
|
1634
|
+
getChatSessionType(newItem.resource)
|
|
1635
|
+
));
|
|
1457
1636
|
this.chatSessionService.setMaterializedSessionResource(untitledResource, newItem.resource);
|
|
1458
1637
|
materialized.complete(newItem.resource);
|
|
1459
1638
|
this.info(
|
|
@@ -1618,7 +1797,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1618
1797
|
model.acceptResponseProgress(request, {
|
|
1619
1798
|
kind: "markdownContent",
|
|
1620
1799
|
content: ( new MarkdownString(( localize(
|
|
1621
|
-
|
|
1800
|
+
17564,
|
|
1622
1801
|
"The `{0}` skill requires `{1}` to be enabled. After enabling, reload the window to apply. [Enable in Settings](command:workbench.action.openSettings?{2})",
|
|
1623
1802
|
TROUBLESHOOT_COMMAND_NAME,
|
|
1624
1803
|
AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING,
|
|
@@ -1840,12 +2019,19 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1840
2019
|
this.generateInitialChatTitleIfNeeded(model, requestProps, defaultAgent, token);
|
|
1841
2020
|
const pendingRequest = this._pendingRequests.get(sessionResource);
|
|
1842
2021
|
if (pendingRequest) {
|
|
2022
|
+
let yieldForwardedRequestId;
|
|
1843
2023
|
store.add(autorun(reader => {
|
|
1844
2024
|
const yieldRequested = pendingRequest.yieldRequested.read(reader);
|
|
1845
2025
|
if (request) {
|
|
2026
|
+
yieldForwardedRequestId = yieldRequested ? request.id : undefined;
|
|
1846
2027
|
this.chatAgentService.setYieldRequested(agent.id, request.id, yieldRequested);
|
|
1847
2028
|
}
|
|
1848
2029
|
}));
|
|
2030
|
+
store.add(toDisposable(() => {
|
|
2031
|
+
if (yieldForwardedRequestId) {
|
|
2032
|
+
this.chatAgentService.setYieldRequested(agent.id, yieldForwardedRequestId, false);
|
|
2033
|
+
}
|
|
2034
|
+
}));
|
|
1849
2035
|
pendingRequest.requestId ??= requestProps.requestId;
|
|
1850
2036
|
if (pendingRequest.requestId) {
|
|
1851
2037
|
this.telemetryService.publicLog2(ChatPendingRequestChangeEventName, {
|
|
@@ -1925,8 +2111,12 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1925
2111
|
location,
|
|
1926
2112
|
model.sessionResource,
|
|
1927
2113
|
token,
|
|
1928
|
-
options
|
|
2114
|
+
options,
|
|
2115
|
+
{
|
|
2116
|
+
input: message
|
|
2117
|
+
}
|
|
1929
2118
|
);
|
|
2119
|
+
options?.onDidExecuteSlashCommand?.();
|
|
1930
2120
|
agentOrCommandFollowups = Promise.resolve(commandResult?.followUp);
|
|
1931
2121
|
rawResult = {};
|
|
1932
2122
|
} else {
|
|
@@ -1945,7 +2135,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1945
2135
|
);
|
|
1946
2136
|
rawResult = {
|
|
1947
2137
|
errorDetails: {
|
|
1948
|
-
message: ( localize(
|
|
2138
|
+
message: ( localize(17565, "Provider returned null response"))
|
|
1949
2139
|
}
|
|
1950
2140
|
};
|
|
1951
2141
|
}
|
|
@@ -2046,6 +2236,18 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2046
2236
|
};
|
|
2047
2237
|
}
|
|
2048
2238
|
processPendingRequests(sessionResource) {
|
|
2239
|
+
const refresh = this._remoteSessionRestorers.get(sessionResource)?.historyRefresh;
|
|
2240
|
+
if (refresh) {
|
|
2241
|
+
void refresh.then(() => this.processPendingRequests(sessionResource), error => {
|
|
2242
|
+
if (!isCancellationError(error)) {
|
|
2243
|
+
this.logService.error(
|
|
2244
|
+
`ChatService#processPendingRequests: failed to refresh history for ${( sessionResource.toString())}`,
|
|
2245
|
+
error
|
|
2246
|
+
);
|
|
2247
|
+
}
|
|
2248
|
+
});
|
|
2249
|
+
return;
|
|
2250
|
+
}
|
|
2049
2251
|
const model = this._sessionModels.get(sessionResource);
|
|
2050
2252
|
if (model && !( this._pendingRequests.has(sessionResource))) {
|
|
2051
2253
|
this.processNextPendingRequest(model);
|
|
@@ -2071,7 +2273,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2071
2273
|
if (this._isServerManagedQueue(model.sessionResource)) {
|
|
2072
2274
|
return;
|
|
2073
2275
|
}
|
|
2074
|
-
const steeringRequests = model.
|
|
2276
|
+
const steeringRequests = model.dequeueSteeringBatch();
|
|
2075
2277
|
const nextQueued = steeringRequests.length === 0 ? model.dequeuePendingRequest() : undefined;
|
|
2076
2278
|
const allRequests = steeringRequests.length > 0 ? steeringRequests : (nextQueued ? [nextQueued] : []);
|
|
2077
2279
|
if (allRequests.length === 0) {
|
|
@@ -2156,6 +2358,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2156
2358
|
location,
|
|
2157
2359
|
sendOptions
|
|
2158
2360
|
);
|
|
2361
|
+
if (steeringRequests.length > 0 && ( model.getPendingRequests().some(r => r.kind === ChatRequestQueueKind.Steering))) {
|
|
2362
|
+
this.setYieldRequested(model.sessionResource);
|
|
2363
|
+
}
|
|
2159
2364
|
const result = {
|
|
2160
2365
|
kind: "sent",
|
|
2161
2366
|
data: {
|
|
@@ -2300,7 +2505,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2300
2505
|
});
|
|
2301
2506
|
} else {
|
|
2302
2507
|
for (const part of response.message) {
|
|
2303
|
-
model.acceptResponseProgress(request, part, true);
|
|
2508
|
+
model.acceptResponseProgress(request, part, true, true );
|
|
2304
2509
|
}
|
|
2305
2510
|
}
|
|
2306
2511
|
model.setResponse(request, response.result || {});
|
|
@@ -2417,8 +2622,10 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2417
2622
|
const agentHostMessageOrigin = remote.agentHostMessageOrigin ?? local?.sendOptions.agentHostMessageOrigin;
|
|
2418
2623
|
const metadata = remote.agentHostMessageOrigin !== undefined ? remote.metadata : remote.metadata ?? local?.sendOptions.metadata;
|
|
2419
2624
|
const isSystemInitiated = remote.isSystemInitiated ?? local?.request.isSystemInitiated;
|
|
2625
|
+
const requestSource = remote.agentHostMessageOrigin !== undefined ? remote.requestSource : remote.requestSource ?? local?.request.requestSource;
|
|
2626
|
+
const artifactRequest = remote.agentHostMessageOrigin !== undefined ? remote.artifactRequest : remote.artifactRequest ?? local?.request.artifactRequest;
|
|
2420
2627
|
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)) {
|
|
2628
|
+
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 && local.request.requestSource === requestSource && equals(local.request.artifactRequest, artifactRequest) && equals(local.sendOptions.agentHostMessageOrigin, agentHostMessageOrigin) && equals(local.sendOptions.metadata, metadata)) {
|
|
2422
2629
|
return local.kind === remote.kind ? local : {
|
|
2423
2630
|
...local,
|
|
2424
2631
|
kind: remote.kind
|
|
@@ -2432,9 +2639,12 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2432
2639
|
timestamp: remote.timestamp,
|
|
2433
2640
|
attachedContext: variableData.variables.slice(),
|
|
2434
2641
|
restoredId: remote.id,
|
|
2642
|
+
version: local ? local.request.version + 1 : undefined,
|
|
2435
2643
|
modelId,
|
|
2436
2644
|
modelConfiguration,
|
|
2437
2645
|
isSystemInitiated,
|
|
2646
|
+
requestSource,
|
|
2647
|
+
artifactRequest,
|
|
2438
2648
|
systemInitiatedLabel
|
|
2439
2649
|
}));
|
|
2440
2650
|
return {
|
|
@@ -2581,9 +2791,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
2581
2791
|
return localSessionId;
|
|
2582
2792
|
}
|
|
2583
2793
|
};
|
|
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));
|
|
2794
|
+
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)), ( __param(19, ICommandService)), ( __param(20, IChatOpenDiagnosticsService))], ChatService));
|
|
2585
2795
|
async function chatModelToChatDetail(model) {
|
|
2586
|
-
const title = model.title || ( localize(
|
|
2796
|
+
const title = model.title || ( localize(17566, "New Chat"));
|
|
2587
2797
|
return {
|
|
2588
2798
|
sessionResource: model.sessionResource,
|
|
2589
2799
|
title,
|
|
@@ -2596,4 +2806,4 @@ async function chatModelToChatDetail(model) {
|
|
|
2596
2806
|
};
|
|
2597
2807
|
}
|
|
2598
2808
|
|
|
2599
|
-
export { ChatService, backfillRestoredPickerState, backfillTransferredModel, chatModelToChatDetail };
|
|
2809
|
+
export { ChatService, backfillRestoredPickerState, backfillTransferredModel, chatModelToChatDetail, rekeyIntendedModel };
|