@codingame/monaco-vscode-chat-service-override 38.1.3 → 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
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostEditReview.js
ADDED
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Sequencer, raceCancellationError, raceTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { cancelOnDispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
+
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
6
|
+
import { CancellationError, isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
7
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { ResourceMap, ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
|
+
import { basename, isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
12
|
+
import { stripUTF8BOM } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
13
|
+
import { isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
14
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
15
|
+
import { StringEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/edits/stringEdit';
|
|
16
|
+
import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
|
|
17
|
+
import { OffsetRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/offsetRange';
|
|
18
|
+
import { StringText } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/text/abstractText';
|
|
19
|
+
import { lineRangeMappingFromRangeMappings, RangeMapping } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping';
|
|
20
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
21
|
+
import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service';
|
|
22
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
23
|
+
import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
24
|
+
import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
25
|
+
import { AGENT_HOST_ACCEPT_CHANGES_OPERATION_ID, AGENT_HOST_DISCARD_CHANGES_OPERATION_ID } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostChangesetOperationService';
|
|
26
|
+
import { IAgentHostConnectionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService.service';
|
|
27
|
+
import { ChangesetKind, resolveChangesetUriTemplate } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/changesetUri';
|
|
28
|
+
import { observableFromSubscription } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/agentSubscription';
|
|
29
|
+
import { StateComponents } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
30
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
31
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
32
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
33
|
+
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
34
|
+
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
35
|
+
import { SaveReason, isDiffEditorInput, EditorsOrder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
36
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
37
|
+
import { UTF8, UTF8_with_bom } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/encoding';
|
|
38
|
+
import { isTextFileEditorModel, TextFileReconcileResult } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles';
|
|
39
|
+
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
40
|
+
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
41
|
+
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
42
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
43
|
+
import { ModifiedFileEntryState, getMultiDiffSourceUri, ChatEditKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
44
|
+
import { isUntitledChatSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
45
|
+
import { ChatEditingModifiedDocumentEntry } from '../../chatEditing/chatEditingModifiedDocumentEntry.js';
|
|
46
|
+
import { getAgentHostResourceAuthority, agentHostChangesetFileToEntryDiff } from './agentHostResponseFileChanges.js';
|
|
47
|
+
import { IAgentHostUntitledProvisionalSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service';
|
|
48
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
49
|
+
import { derived, derivedOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
50
|
+
import { ChangesetStatus, ChangesetOperationScope, ChangesetOperationStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
|
|
51
|
+
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
52
|
+
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
53
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
54
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
55
|
+
import { ChangesetOperationTargetKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands';
|
|
56
|
+
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
57
|
+
|
|
58
|
+
const DIFF_TIMEOUT_MS = 1000;
|
|
59
|
+
const WORKING_SET_READY_TIMEOUT_MS = 30_000;
|
|
60
|
+
class EditReviewSynchronizationError extends Error {}
|
|
61
|
+
class AgentHostEditReviewEntry extends ChatEditingModifiedDocumentEntry {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(...arguments);
|
|
64
|
+
this._agentEditing = false;
|
|
65
|
+
this._agentReloads = 0;
|
|
66
|
+
}
|
|
67
|
+
get file() {
|
|
68
|
+
if (!this._file) {
|
|
69
|
+
throw ( new Error("Review entry is not connected"));
|
|
70
|
+
}
|
|
71
|
+
return this._file;
|
|
72
|
+
}
|
|
73
|
+
connect(operations, file, edit) {
|
|
74
|
+
this._operations = operations;
|
|
75
|
+
this._file = file;
|
|
76
|
+
this._matchLineEndings();
|
|
77
|
+
this._mapOriginalToModified(edit);
|
|
78
|
+
this._register(this.modifiedModel.onDidChangeContent(e => {
|
|
79
|
+
if (e.isEolChange) {
|
|
80
|
+
this._matchLineEndings();
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
async update(file, original, edit) {
|
|
85
|
+
this._file = file;
|
|
86
|
+
const reset = this._resetOriginalContent(original);
|
|
87
|
+
this._matchLineEndings();
|
|
88
|
+
this._mapOriginalToModified(edit);
|
|
89
|
+
await reset;
|
|
90
|
+
}
|
|
91
|
+
get diffInfo() {
|
|
92
|
+
return super.diffInfo.map(diff => ({
|
|
93
|
+
...diff,
|
|
94
|
+
keep: change => this._operations?.keep(this, change) ?? Promise.resolve(false),
|
|
95
|
+
undo: change => this._operations?.undo(this, change) ?? Promise.resolve(false)
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
async _doAccept() {
|
|
99
|
+
if (!(await this._operations?.keep(this))) {
|
|
100
|
+
throw ( new CancellationError());
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async _doReject() {
|
|
104
|
+
if (!(await this._operations?.undo(this))) {
|
|
105
|
+
throw ( new CancellationError());
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
acceptDeferred() {
|
|
109
|
+
const file = this.file;
|
|
110
|
+
return completeIfCurrent(super.acceptDeferred(), () => isSameWorkingSetFile(this.file, file));
|
|
111
|
+
}
|
|
112
|
+
rejectDeferred() {
|
|
113
|
+
const file = this.file;
|
|
114
|
+
return completeIfCurrent(super.rejectDeferred(), () => isSameWorkingSetFile(this.file, file));
|
|
115
|
+
}
|
|
116
|
+
get isAgentEditing() {
|
|
117
|
+
return this._agentEditing;
|
|
118
|
+
}
|
|
119
|
+
setEditing(editing) {
|
|
120
|
+
this._agentEditing = editing;
|
|
121
|
+
this._updateExternalEdit();
|
|
122
|
+
if (!!this._isCurrentlyBeingModifiedByObs.get() === editing) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
transaction(tx => {
|
|
126
|
+
this._isCurrentlyBeingModifiedByObs.set(editing ? {
|
|
127
|
+
responseModel: undefined,
|
|
128
|
+
undoStopId: undefined
|
|
129
|
+
} : undefined, tx);
|
|
130
|
+
this._waitsForLastEdits.set(editing, tx);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
async runAsAgentEdit(task) {
|
|
134
|
+
this._agentReloads++;
|
|
135
|
+
this._updateExternalEdit();
|
|
136
|
+
try {
|
|
137
|
+
await task();
|
|
138
|
+
} finally {
|
|
139
|
+
this._agentReloads--;
|
|
140
|
+
this._updateExternalEdit();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
_updateExternalEdit() {
|
|
144
|
+
if (this._agentEditing || this._agentReloads > 0) {
|
|
145
|
+
this.startExternalEdit();
|
|
146
|
+
} else {
|
|
147
|
+
this.stopExternalEdit();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
_matchLineEndings() {
|
|
151
|
+
this.originalModel.setEOL(this.modifiedModel.getEndOfLineSequence());
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
let AgentHostEditReview = class AgentHostEditReview extends Disposable {
|
|
155
|
+
constructor(
|
|
156
|
+
chatSessionResource,
|
|
157
|
+
connectionsService,
|
|
158
|
+
provisionalSessions,
|
|
159
|
+
_instantiationService,
|
|
160
|
+
_textModelService,
|
|
161
|
+
_textFileService,
|
|
162
|
+
_fileService,
|
|
163
|
+
_chatService,
|
|
164
|
+
_editorService,
|
|
165
|
+
_notificationService,
|
|
166
|
+
_accessibilitySignalService,
|
|
167
|
+
_notebookService,
|
|
168
|
+
_uriIdentityService,
|
|
169
|
+
_logService,
|
|
170
|
+
_editorWorkerService
|
|
171
|
+
) {
|
|
172
|
+
super();
|
|
173
|
+
this.chatSessionResource = chatSessionResource;
|
|
174
|
+
this._instantiationService = _instantiationService;
|
|
175
|
+
this._textModelService = _textModelService;
|
|
176
|
+
this._textFileService = _textFileService;
|
|
177
|
+
this._fileService = _fileService;
|
|
178
|
+
this._chatService = _chatService;
|
|
179
|
+
this._editorService = _editorService;
|
|
180
|
+
this._notificationService = _notificationService;
|
|
181
|
+
this._accessibilitySignalService = _accessibilitySignalService;
|
|
182
|
+
this._notebookService = _notebookService;
|
|
183
|
+
this._uriIdentityService = _uriIdentityService;
|
|
184
|
+
this._logService = _logService;
|
|
185
|
+
this._editorWorkerService = _editorWorkerService;
|
|
186
|
+
this._entries = ( new ResourceMap());
|
|
187
|
+
this._entriesObs = observableValue(this, []);
|
|
188
|
+
this.entries = derived(
|
|
189
|
+
this,
|
|
190
|
+
reader => this._entriesObs.read(reader).filter(entry => this._isFileVisible(entry, reader))
|
|
191
|
+
);
|
|
192
|
+
this._checkpointReview = observableValue(this, undefined);
|
|
193
|
+
this._rawChanges = derived(this, reader => {
|
|
194
|
+
const workingSet = this._workingSet.read(reader);
|
|
195
|
+
const state = workingSet?.state.read(reader);
|
|
196
|
+
return workingSet ? {
|
|
197
|
+
channel: workingSet.channel,
|
|
198
|
+
ready: state?.status === ChangesetStatus.Ready,
|
|
199
|
+
failed: workingSet.failed.read(reader) || state?.status === ChangesetStatus.Error,
|
|
200
|
+
files: state ? toWorkingSetFileChanges(state, workingSet.resourceAuthority) : []
|
|
201
|
+
} : undefined;
|
|
202
|
+
});
|
|
203
|
+
this.fileChanges = derived(this, reader => {
|
|
204
|
+
const current = this._rawChanges.read(reader);
|
|
205
|
+
return current ? (this._checkpointReview.read(reader)?.project(current.channel, current.files, reader) ?? current.files).map(file => file.diff) : [];
|
|
206
|
+
});
|
|
207
|
+
this._updates = ( new Sequencer());
|
|
208
|
+
this._operations = ( new Sequencer());
|
|
209
|
+
this._blockedFiles = ( new ResourceSet());
|
|
210
|
+
this._lifetimeToken = cancelOnDispose(this._store);
|
|
211
|
+
this._register(this._textFileService.files.retainResolvedContent());
|
|
212
|
+
const resolutionChanged = observableSignalFromEvent(this, Event.any(
|
|
213
|
+
connectionsService.onDidChangeSessionResolution,
|
|
214
|
+
provisionalSessions.onDidChange
|
|
215
|
+
));
|
|
216
|
+
const resolution = derivedOpts({
|
|
217
|
+
owner: this,
|
|
218
|
+
equalsFn: resolutionEquals
|
|
219
|
+
}, reader => {
|
|
220
|
+
resolutionChanged.read(reader);
|
|
221
|
+
const provisionalBackend = provisionalSessions.get(chatSessionResource);
|
|
222
|
+
if (isUntitledChatSession(chatSessionResource) && !provisionalBackend) {
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
225
|
+
const resolved = connectionsService.resolveSessionResource(chatSessionResource);
|
|
226
|
+
return resolved && provisionalBackend ? {
|
|
227
|
+
...resolved,
|
|
228
|
+
backendSession: provisionalBackend
|
|
229
|
+
} : resolved;
|
|
230
|
+
});
|
|
231
|
+
const sessionState = derived(this, reader => {
|
|
232
|
+
const current = resolution.read(reader);
|
|
233
|
+
if (!current) {
|
|
234
|
+
return constObservable(undefined);
|
|
235
|
+
}
|
|
236
|
+
const subscription = reader.store.add(
|
|
237
|
+
current.connection.getSubscription(StateComponents.Session, current.backendSession, "AgentHostEditReview")
|
|
238
|
+
);
|
|
239
|
+
return observableFromSubscription(this, subscription.object);
|
|
240
|
+
});
|
|
241
|
+
const workingSet = derivedOpts({
|
|
242
|
+
owner: this,
|
|
243
|
+
equalsFn: workingSetEquals
|
|
244
|
+
}, reader => {
|
|
245
|
+
const current = resolution.read(reader);
|
|
246
|
+
const state = sessionState.read(reader).read(reader);
|
|
247
|
+
const changeset = state?.changesets?.find(
|
|
248
|
+
candidate => candidate.changeKind === ChangesetKind.WorkingSet && !candidate.uriTemplate.includes("{")
|
|
249
|
+
);
|
|
250
|
+
return current && changeset ? {
|
|
251
|
+
connection: current.connection,
|
|
252
|
+
resourceAuthority: getAgentHostResourceAuthority(current),
|
|
253
|
+
channel: ( URI.parse(resolveChangesetUriTemplate(( current.backendSession.toString()), changeset.uriTemplate)))
|
|
254
|
+
} : undefined;
|
|
255
|
+
});
|
|
256
|
+
this._workingSet = derived(this, reader => {
|
|
257
|
+
const current = workingSet.read(reader);
|
|
258
|
+
if (!current) {
|
|
259
|
+
return undefined;
|
|
260
|
+
}
|
|
261
|
+
const subscription = reader.store.add(
|
|
262
|
+
current.connection.getSubscription(StateComponents.Changeset, current.channel, "AgentHostEditReview")
|
|
263
|
+
).object;
|
|
264
|
+
return {
|
|
265
|
+
...current,
|
|
266
|
+
subscription,
|
|
267
|
+
state: observableFromSubscription(this, subscription),
|
|
268
|
+
failed: observableFromEvent(
|
|
269
|
+
this,
|
|
270
|
+
Event.any(subscription.onDidChange, subscription.onDidError ?? Event.None),
|
|
271
|
+
() => subscription.value instanceof Error
|
|
272
|
+
)
|
|
273
|
+
};
|
|
274
|
+
});
|
|
275
|
+
const retryBlockedFiles = observableSignalFromEvent(this, Event.filter(Event.any(
|
|
276
|
+
Event.map(this._textFileService.files.onDidSave, event => event.model),
|
|
277
|
+
this._textFileService.files.onDidRevert
|
|
278
|
+
), model => ( this._blockedFiles.has(model.resource))));
|
|
279
|
+
this._register(autorun(reader => {
|
|
280
|
+
retryBlockedFiles.read(reader);
|
|
281
|
+
const current = this._workingSet.read(reader);
|
|
282
|
+
const state = current?.state.read(reader);
|
|
283
|
+
const rawFiles = current && state ? toWorkingSetFileChanges(state, current.resourceAuthority) : [];
|
|
284
|
+
const files = current ? this._checkpointReview.read(reader)?.project(current.channel, rawFiles, reader) ?? rawFiles : rawFiles;
|
|
285
|
+
for (const file of files) {
|
|
286
|
+
if (file.editing) {
|
|
287
|
+
this._entries.get(this._uriIdentityService.asCanonicalUri(file.diff.modifiedURI))?.setEditing(true);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (current && state?.status !== ChangesetStatus.Ready) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const token = cancelOnDispose(reader.store);
|
|
294
|
+
this._updates.queue(() => this._update(files, token));
|
|
295
|
+
}));
|
|
296
|
+
}
|
|
297
|
+
getEntry(uri) {
|
|
298
|
+
const entry = this._entries.get(uri);
|
|
299
|
+
return entry && this._isFileVisible(entry) ? entry : undefined;
|
|
300
|
+
}
|
|
301
|
+
setCheckpointReview(review) {
|
|
302
|
+
this._register(review.registerSource(this._rawChanges));
|
|
303
|
+
this._checkpointReview.set(review, undefined);
|
|
304
|
+
}
|
|
305
|
+
async resolveEntry(uri) {
|
|
306
|
+
const workingSet = this._workingSet.get();
|
|
307
|
+
if (workingSet && !(await whenReady(workingSet.subscription))) {
|
|
308
|
+
throw ( new Error(( localize(11287, "The session's changes couldn't be checked. Try again."))));
|
|
309
|
+
}
|
|
310
|
+
await raceCancellationError(this._updates.queue(async () => {}), this._lifetimeToken);
|
|
311
|
+
return this.getEntry(uri);
|
|
312
|
+
}
|
|
313
|
+
readEntry(uri, reader) {
|
|
314
|
+
this._entriesObs.read(reader);
|
|
315
|
+
const entry = this._entries.get(uri);
|
|
316
|
+
return entry && this._isFileVisible(entry, reader) ? entry : undefined;
|
|
317
|
+
}
|
|
318
|
+
async accept(...uris) {
|
|
319
|
+
if (await this._decide(uris, entry => entry.accept(), ModifiedFileEntryState.Accepted)) {
|
|
320
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.editsKept, {
|
|
321
|
+
allowManyInParallel: true
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
async reject(...uris) {
|
|
326
|
+
if (await this._decide(uris, entry => entry.reject(), ModifiedFileEntryState.Rejected)) {
|
|
327
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.editsUndone, {
|
|
328
|
+
allowManyInParallel: true
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
async _decide(uris, decide, decided) {
|
|
333
|
+
const entries = this._getEntries(uris);
|
|
334
|
+
await Promise.all(entries.map(decide));
|
|
335
|
+
return ( entries.some(entry => entry.state.get() === decided));
|
|
336
|
+
}
|
|
337
|
+
async show(session, previousChanges) {
|
|
338
|
+
const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
|
|
339
|
+
multiDiffSource: getMultiDiffSourceUri(session, previousChanges),
|
|
340
|
+
label: ( localize(11288, "Suggested Edits"))
|
|
341
|
+
}, this._instantiationService);
|
|
342
|
+
await this._editorService.openEditor(input, {
|
|
343
|
+
pinned: true
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
keep(entry, change) {
|
|
347
|
+
return this._invoke(
|
|
348
|
+
entry,
|
|
349
|
+
AGENT_HOST_ACCEPT_CHANGES_OPERATION_ID,
|
|
350
|
+
change,
|
|
351
|
+
AccessibilitySignal.editsKept,
|
|
352
|
+
(fileName, message) => ( localize(11289, "Could not keep the changes to '{0}': {1}", fileName, message))
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
undo(entry, change) {
|
|
356
|
+
return this._invoke(
|
|
357
|
+
entry,
|
|
358
|
+
AGENT_HOST_DISCARD_CHANGES_OPERATION_ID,
|
|
359
|
+
change,
|
|
360
|
+
AccessibilitySignal.editsUndone,
|
|
361
|
+
(fileName, message) => ( localize(11290, "Could not undo the changes to '{0}': {1}", fileName, message))
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
dispose() {
|
|
365
|
+
const entries = [...( this._entries.values())];
|
|
366
|
+
this._entries.clear();
|
|
367
|
+
this._entriesObs.set([], undefined);
|
|
368
|
+
for (const entry of entries) {
|
|
369
|
+
this._releaseEntry(entry, false);
|
|
370
|
+
}
|
|
371
|
+
super.dispose();
|
|
372
|
+
}
|
|
373
|
+
async _update(files, token) {
|
|
374
|
+
const listed = ( new ResourceSet());
|
|
375
|
+
for (const file of files) {
|
|
376
|
+
if (token.isCancellationRequested) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
if (file.diff.isDeleted || this._store.isDisposed) {
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
const resource = this._uriIdentityService.asCanonicalUri(file.diff.modifiedURI);
|
|
383
|
+
listed.add(resource);
|
|
384
|
+
if (file.editing) {
|
|
385
|
+
this._entries.get(resource)?.setEditing(true);
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
try {
|
|
389
|
+
await this._updateFile(resource, file, token);
|
|
390
|
+
if (token.isCancellationRequested) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
const entry = this._entries.get(resource);
|
|
394
|
+
if (entry) {
|
|
395
|
+
if (entry.isAgentEditing) {
|
|
396
|
+
await entry.getDiffInfo();
|
|
397
|
+
const workingSet = this._workingSet.get();
|
|
398
|
+
const state = workingSet?.state.get();
|
|
399
|
+
const latest = workingSet && state ? this._findWorkingSetFile(state, workingSet, entry) : undefined;
|
|
400
|
+
if (!token.isCancellationRequested && state?.status === ChangesetStatus.Ready && latest && !latest.editing && isSameWorkingSetFile(latest, file)) {
|
|
401
|
+
entry.setEditing(false);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
this._blockedFiles.delete(resource);
|
|
406
|
+
} catch (error) {
|
|
407
|
+
if (isCancellationError(error) || token.isCancellationRequested) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
this._logService.error(`[AgentHostEditReview] Could not review ${resource}`, error);
|
|
411
|
+
if (error instanceof EditReviewSynchronizationError) {
|
|
412
|
+
const entry = this._entries.get(resource);
|
|
413
|
+
if (entry) {
|
|
414
|
+
entry.setEditing(false);
|
|
415
|
+
this._removeEntry(entry);
|
|
416
|
+
}
|
|
417
|
+
if (!( this._blockedFiles.has(resource))) {
|
|
418
|
+
this._blockedFiles.add(resource);
|
|
419
|
+
this._notificationService.warn(( localize(
|
|
420
|
+
11291,
|
|
421
|
+
"Could not update editor review for '{0}': {1} Your text has been preserved. Resolve the file's changes and save or revert it to resume editor review.",
|
|
422
|
+
basename(resource),
|
|
423
|
+
error.message
|
|
424
|
+
)));
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
if (token.isCancellationRequested) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
for (const resource of this._blockedFiles) {
|
|
433
|
+
if (!( listed.has(resource))) {
|
|
434
|
+
this._blockedFiles.delete(resource);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
for (const entry of [...( this._entries.values())]) {
|
|
438
|
+
if (!( listed.has(entry.modifiedURI))) {
|
|
439
|
+
this._removeEntry(entry);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
async _updateFile(resource, change, token) {
|
|
444
|
+
const existing = this._entries.get(resource);
|
|
445
|
+
if (existing && isSameWorkingSetFile(existing.file, change)) {
|
|
446
|
+
if (existing.isAgentEditing) {
|
|
447
|
+
await existing.runAsAgentEdit(() => this._reloadFromDisk(resource, existing.file.current, token));
|
|
448
|
+
}
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
const contents = await this._readContents(change.diff);
|
|
452
|
+
const entry = this._entries.get(resource);
|
|
453
|
+
if (this._store.isDisposed || token.isCancellationRequested) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
if (!contents) {
|
|
457
|
+
if (entry) {
|
|
458
|
+
this._removeEntry(entry);
|
|
459
|
+
}
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
if (entry?.state.get() === ModifiedFileEntryState.Modified) {
|
|
463
|
+
entry.setEditing(true);
|
|
464
|
+
await entry.runAsAgentEdit(() => this._reloadFromDisk(resource, contents.current, token));
|
|
465
|
+
if (token.isCancellationRequested) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
const file = {
|
|
469
|
+
...change,
|
|
470
|
+
...contents
|
|
471
|
+
};
|
|
472
|
+
const prepared = await this._prepareFile(file, entry.modifiedModel, token);
|
|
473
|
+
await entry.update(file, prepared.original, prepared.edit);
|
|
474
|
+
entry.updateTelemetryInfo(this._getTelemetryInfo());
|
|
475
|
+
this._entriesObs.set([...( this._entries.values())], undefined);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
if (entry) {
|
|
479
|
+
this._removeEntry(entry);
|
|
480
|
+
}
|
|
481
|
+
await this._createEntry(resource, {
|
|
482
|
+
...change,
|
|
483
|
+
...contents
|
|
484
|
+
}, token);
|
|
485
|
+
}
|
|
486
|
+
async _createEntry(resource, file, token) {
|
|
487
|
+
if (this._notebookService.hasSupportedNotebooks(resource)) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
let ref;
|
|
491
|
+
try {
|
|
492
|
+
ref = await this._textModelService.createModelReference(resource);
|
|
493
|
+
} catch (error) {
|
|
494
|
+
this._logService.warn(`[AgentHostEditReview] Could not open ${resource} for review`, error);
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
if (this._store.isDisposed || token.isCancellationRequested || ( this._entries.has(resource)) || !this._hasSupportedEncoding(ref.object)) {
|
|
498
|
+
ref.dispose();
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
let prepared;
|
|
502
|
+
try {
|
|
503
|
+
await this._reloadFromDisk(resource, file.current, token);
|
|
504
|
+
prepared = await this._prepareFile(file, ref.object.textEditorModel, token);
|
|
505
|
+
} catch (error) {
|
|
506
|
+
ref.dispose();
|
|
507
|
+
throw error;
|
|
508
|
+
}
|
|
509
|
+
if (this._store.isDisposed || token.isCancellationRequested) {
|
|
510
|
+
ref.dispose();
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
const entry = this._instantiationService.createInstance(AgentHostEditReviewEntry, ref, {
|
|
514
|
+
collapse: () => {}
|
|
515
|
+
}, this._getTelemetryInfo(), file.diff.isCreated ? ChatEditKind.Created : ChatEditKind.Modified, prepared.original);
|
|
516
|
+
entry.connect(this, file, prepared.edit);
|
|
517
|
+
entry.setEditing(file.editing);
|
|
518
|
+
entry.enableReviewModeUntilSettled();
|
|
519
|
+
this._entries.set(entry.modifiedURI, entry);
|
|
520
|
+
this._entriesObs.set([...( this._entries.values())], undefined);
|
|
521
|
+
}
|
|
522
|
+
async _prepareFile(file, model, token) {
|
|
523
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
524
|
+
if (token.isCancellationRequested || model.isDisposed()) {
|
|
525
|
+
throw ( new CancellationError());
|
|
526
|
+
}
|
|
527
|
+
const version = model.getVersionId();
|
|
528
|
+
const live = model.getValue();
|
|
529
|
+
const original = await getReviewedOriginal(file, live, model.getEOL(), this._editorWorkerService);
|
|
530
|
+
if (token.isCancellationRequested || model.isDisposed()) {
|
|
531
|
+
throw ( new CancellationError());
|
|
532
|
+
}
|
|
533
|
+
if (version !== model.getVersionId()) {
|
|
534
|
+
continue;
|
|
535
|
+
}
|
|
536
|
+
const edit = (await computeEdit(original, live, this._editorWorkerService)) ?? StringEdit.replace(OffsetRange.ofLength(original.length), live).removeCommonSuffixAndPrefix(original);
|
|
537
|
+
if (token.isCancellationRequested || model.isDisposed()) {
|
|
538
|
+
throw ( new CancellationError());
|
|
539
|
+
}
|
|
540
|
+
if (version === model.getVersionId()) {
|
|
541
|
+
return {
|
|
542
|
+
original,
|
|
543
|
+
edit
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
throw ( new EditReviewSynchronizationError(( localize(11292, "The document changed while its changes were being compared."))));
|
|
548
|
+
}
|
|
549
|
+
async _readContents(diff) {
|
|
550
|
+
const [baseline, current] = await Promise.all([
|
|
551
|
+
diff.isCreated ? "" : this._readText(diff.originalURI),
|
|
552
|
+
diff.modifiedSnapshotURI ? this._readText(diff.modifiedSnapshotURI) : undefined
|
|
553
|
+
]);
|
|
554
|
+
return baseline !== undefined && current !== undefined ? {
|
|
555
|
+
baseline,
|
|
556
|
+
current
|
|
557
|
+
} : undefined;
|
|
558
|
+
}
|
|
559
|
+
async _readText(resource) {
|
|
560
|
+
let text;
|
|
561
|
+
try {
|
|
562
|
+
text = ( (await this._fileService.readFile(resource)).value.toString());
|
|
563
|
+
} catch (error) {
|
|
564
|
+
this._logService.warn(`[AgentHostEditReview] Could not read ${resource}`, error);
|
|
565
|
+
return undefined;
|
|
566
|
+
}
|
|
567
|
+
return text.includes("�") || text.includes("\u0000") ? undefined : stripUTF8BOM(text);
|
|
568
|
+
}
|
|
569
|
+
_hasSupportedEncoding(model) {
|
|
570
|
+
const encoding = isTextFileEditorModel(model) ? model.getEncoding() : undefined;
|
|
571
|
+
if (encoding === UTF8 || encoding === UTF8_with_bom) {
|
|
572
|
+
return true;
|
|
573
|
+
}
|
|
574
|
+
this._logService.info(
|
|
575
|
+
`[AgentHostEditReview] Not reviewing ${model.textEditorModel.uri} because its encoding is ${encoding ?? "unknown"}`
|
|
576
|
+
);
|
|
577
|
+
return false;
|
|
578
|
+
}
|
|
579
|
+
async _reloadFromDisk(resource, expectedContent, token) {
|
|
580
|
+
const model = this._textFileService.files.get(resource);
|
|
581
|
+
if (!model || model.isDisposed()) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
if (!model.isDirty()) {
|
|
585
|
+
try {
|
|
586
|
+
await model.resolve({
|
|
587
|
+
forceReadFromFile: true
|
|
588
|
+
});
|
|
589
|
+
} catch (error) {
|
|
590
|
+
if (isCancellationError(error) || token.isCancellationRequested) {
|
|
591
|
+
throw ( new CancellationError());
|
|
592
|
+
}
|
|
593
|
+
throw ( new EditReviewSynchronizationError(toErrorMessage(error)));
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (model.isDirty()) {
|
|
597
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
598
|
+
let result;
|
|
599
|
+
try {
|
|
600
|
+
result = await model.reconcileExternalChanges(expectedContent, token);
|
|
601
|
+
} catch (error) {
|
|
602
|
+
if (isCancellationError(error) || token.isCancellationRequested) {
|
|
603
|
+
throw ( new CancellationError());
|
|
604
|
+
}
|
|
605
|
+
throw ( new EditReviewSynchronizationError(toErrorMessage(error)));
|
|
606
|
+
}
|
|
607
|
+
if (token.isCancellationRequested) {
|
|
608
|
+
throw ( new CancellationError());
|
|
609
|
+
}
|
|
610
|
+
if (result === TextFileReconcileResult.Reconciled) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (result === TextFileReconcileResult.Conflict) {
|
|
614
|
+
throw ( new EditReviewSynchronizationError(( localize(11293, "Both edits change the same text."))));
|
|
615
|
+
}
|
|
616
|
+
if (result === TextFileReconcileResult.Unavailable) {
|
|
617
|
+
throw ( new EditReviewSynchronizationError(( localize(11294, "A safe comparison with the saved file is unavailable."))));
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
throw ( new EditReviewSynchronizationError(( localize(11295, "The file changed again while it was being compared."))));
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
_invoke(entry, operationId, change, decided, failed) {
|
|
624
|
+
const shown = entry.file;
|
|
625
|
+
return this._operations.queue(async () => {
|
|
626
|
+
try {
|
|
627
|
+
const done = await this._doInvoke(entry, shown, operationId, change);
|
|
628
|
+
if (done && change) {
|
|
629
|
+
this._accessibilitySignalService.playSignal(decided, {
|
|
630
|
+
allowManyInParallel: true
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
return done;
|
|
634
|
+
} catch (error) {
|
|
635
|
+
if (this._store.isDisposed && isCancellationError(error)) {
|
|
636
|
+
return false;
|
|
637
|
+
}
|
|
638
|
+
this._notificationService.error(failed(basename(entry.modifiedURI), toErrorMessage(error)));
|
|
639
|
+
return false;
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
async _doInvoke(entry, shown, operationId, change) {
|
|
644
|
+
await this._updates.queue(async () => {});
|
|
645
|
+
if (!this._isReviewing(entry)) {
|
|
646
|
+
return false;
|
|
647
|
+
}
|
|
648
|
+
if (!isSameWorkingSetFile(entry.file, shown)) {
|
|
649
|
+
throw ( new Error(( localize(11296, "The changes were updated in the meantime. Try again."))));
|
|
650
|
+
}
|
|
651
|
+
if (change && !entry.diffInfo.get().changes.includes(change)) {
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
if (entry.isCurrentlyBeingModifiedBy.get()) {
|
|
655
|
+
throw ( new Error(( localize(11297, "The agent is editing this file. Try again once it has finished."))));
|
|
656
|
+
}
|
|
657
|
+
const workingSet = this._workingSet.get();
|
|
658
|
+
const state = workingSet && (await whenReady(workingSet.subscription));
|
|
659
|
+
if (!workingSet || !state) {
|
|
660
|
+
throw ( new Error(( localize(11287, "The session's changes couldn't be checked. Try again."))));
|
|
661
|
+
}
|
|
662
|
+
const file = this._findWorkingSetFile(state, workingSet, entry);
|
|
663
|
+
if (!file) {
|
|
664
|
+
return false;
|
|
665
|
+
}
|
|
666
|
+
if (!isSameWorkingSetFile(file, shown)) {
|
|
667
|
+
throw ( new Error(( localize(11296, "The changes were updated in the meantime. Try again."))));
|
|
668
|
+
}
|
|
669
|
+
if (file.editing || entry.isCurrentlyBeingModifiedBy.get()) {
|
|
670
|
+
throw ( new Error(( localize(11297, "The agent is editing this file. Try again once it has finished."))));
|
|
671
|
+
}
|
|
672
|
+
await this._invokeOperation(
|
|
673
|
+
workingSet,
|
|
674
|
+
entry,
|
|
675
|
+
shown,
|
|
676
|
+
operationId,
|
|
677
|
+
state,
|
|
678
|
+
change && !file.diff.isCreated ? change : undefined
|
|
679
|
+
);
|
|
680
|
+
if (change) {
|
|
681
|
+
const isUpdated = state => {
|
|
682
|
+
if (state instanceof Error || state?.status === ChangesetStatus.Error) {
|
|
683
|
+
return true;
|
|
684
|
+
}
|
|
685
|
+
const current = state && this._findWorkingSetFile(state, workingSet, entry);
|
|
686
|
+
return state?.status === ChangesetStatus.Ready && (!current || !isSameWorkingSetFile(current, shown));
|
|
687
|
+
};
|
|
688
|
+
if (!isUpdated(workingSet.subscription.value)) {
|
|
689
|
+
const updated = Event.toPromise(Event.filter(Event.any(
|
|
690
|
+
workingSet.subscription.onDidChange,
|
|
691
|
+
workingSet.subscription.onDidError ?? Event.None
|
|
692
|
+
), () => isUpdated(workingSet.subscription.value)));
|
|
693
|
+
try {
|
|
694
|
+
await raceCancellationError(
|
|
695
|
+
raceTimeout(updated, WORKING_SET_READY_TIMEOUT_MS, () => updated.cancel()),
|
|
696
|
+
this._lifetimeToken
|
|
697
|
+
);
|
|
698
|
+
} finally {
|
|
699
|
+
updated.cancel();
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
const updated = workingSet.subscription.value;
|
|
703
|
+
if (!isUpdated(updated) || updated instanceof Error || updated?.status !== ChangesetStatus.Ready) {
|
|
704
|
+
throw ( new Error(( localize(
|
|
705
|
+
11298,
|
|
706
|
+
"The decision was sent, but the updated changes could not be loaded. Check the working set before trying again."
|
|
707
|
+
))));
|
|
708
|
+
}
|
|
709
|
+
await this._updates.queue(async () => {});
|
|
710
|
+
if (this._isReviewing(entry)) {
|
|
711
|
+
await entry.getDiffInfo();
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
return true;
|
|
715
|
+
}
|
|
716
|
+
async _invokeOperation(workingSet, entry, shown, operationId, state, change) {
|
|
717
|
+
const scope = change ? ChangesetOperationScope.Range : ChangesetOperationScope.Resource;
|
|
718
|
+
const operation = state.operations?.find(
|
|
719
|
+
candidate => candidate.id === operationId && candidate.scopes.includes(scope)
|
|
720
|
+
);
|
|
721
|
+
if (!operation) {
|
|
722
|
+
throw ( new Error(( localize(11299, "The agent host doesn't support this."))));
|
|
723
|
+
}
|
|
724
|
+
if (operation.status === ChangesetOperationStatus.Disabled) {
|
|
725
|
+
throw ( new Error(( localize(11300, "Try again once the agent has finished working."))));
|
|
726
|
+
}
|
|
727
|
+
const resource = ( workingSet.connection.resourceUris.toAgentHost(entry.modifiedURI).toString());
|
|
728
|
+
let range;
|
|
729
|
+
if (change) {
|
|
730
|
+
const modelVersion = entry.modifiedModel.getVersionId();
|
|
731
|
+
const lines = await mapLinesToCurrent(
|
|
732
|
+
change.modified,
|
|
733
|
+
entry.modifiedModel.getValue(),
|
|
734
|
+
withLineEndings(shown.current, entry.modifiedModel.getEOL()),
|
|
735
|
+
this._editorWorkerService
|
|
736
|
+
);
|
|
737
|
+
const latest = workingSet.subscription.value;
|
|
738
|
+
const latestFile = latest && !(latest instanceof Error) ? this._findWorkingSetFile(latest, workingSet, entry) : undefined;
|
|
739
|
+
if (entry.modifiedModel.isDisposed() || entry.modifiedModel.getVersionId() !== modelVersion || !this._isReviewing(entry) || entry.isCurrentlyBeingModifiedBy.get() || latest instanceof Error || latest?.status !== ChangesetStatus.Ready || !latestFile || latestFile.editing || !isSameWorkingSetFile(latestFile, shown)) {
|
|
740
|
+
throw ( new Error(( localize(11296, "The changes were updated in the meantime. Try again."))));
|
|
741
|
+
}
|
|
742
|
+
if (!lines) {
|
|
743
|
+
throw ( new Error(( localize(
|
|
744
|
+
11301,
|
|
745
|
+
"The change couldn't be matched with the session's changes. Keep or undo the whole file instead."
|
|
746
|
+
))));
|
|
747
|
+
}
|
|
748
|
+
range = toTextRange(lines);
|
|
749
|
+
}
|
|
750
|
+
if (operationId === AGENT_HOST_DISCARD_CHANGES_OPERATION_ID && this._textFileService.isDirty(entry.modifiedURI)) {
|
|
751
|
+
const saved = await this._textFileService.save(entry.modifiedURI, {
|
|
752
|
+
reason: SaveReason.EXPLICIT,
|
|
753
|
+
skipSaveParticipants: true
|
|
754
|
+
});
|
|
755
|
+
if (!saved || this._textFileService.isDirty(entry.modifiedURI)) {
|
|
756
|
+
throw ( new Error(( localize(
|
|
757
|
+
11302,
|
|
758
|
+
"Its unsaved changes couldn't be saved. Save the file and try again."
|
|
759
|
+
))));
|
|
760
|
+
}
|
|
761
|
+
const latest = workingSet.subscription.value;
|
|
762
|
+
const latestFile = latest && !(latest instanceof Error) ? this._findWorkingSetFile(latest, workingSet, entry) : undefined;
|
|
763
|
+
if (!latestFile || !isSameWorkingSetFile(latestFile, shown)) {
|
|
764
|
+
throw ( new Error(( localize(11296, "The changes were updated in the meantime. Try again."))));
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
const target = {
|
|
768
|
+
resource,
|
|
769
|
+
...(shown.nonce !== undefined ? {
|
|
770
|
+
nonce: shown.nonce
|
|
771
|
+
} : {})
|
|
772
|
+
};
|
|
773
|
+
await workingSet.connection.invokeChangesetOperation({
|
|
774
|
+
channel: ( workingSet.channel.toString()),
|
|
775
|
+
operationId,
|
|
776
|
+
target: range ? {
|
|
777
|
+
kind: ChangesetOperationTargetKind.Range,
|
|
778
|
+
...target,
|
|
779
|
+
side: "after",
|
|
780
|
+
range
|
|
781
|
+
} : {
|
|
782
|
+
kind: ChangesetOperationTargetKind.Resource,
|
|
783
|
+
...target
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
_findWorkingSetFile(state, workingSet, entry) {
|
|
788
|
+
return toWorkingSetFileChanges(state, workingSet.resourceAuthority).find(candidate => isEqual(
|
|
789
|
+
this._uriIdentityService.asCanonicalUri(candidate.diff.modifiedURI),
|
|
790
|
+
entry.modifiedURI
|
|
791
|
+
));
|
|
792
|
+
}
|
|
793
|
+
_isReviewing(entry) {
|
|
794
|
+
return this._entries.get(entry.modifiedURI) === entry && this._isFileVisible(entry);
|
|
795
|
+
}
|
|
796
|
+
_isFileVisible(entry, reader) {
|
|
797
|
+
const review = this._checkpointReview.read(reader);
|
|
798
|
+
const current = this._workingSet.read(reader);
|
|
799
|
+
return !review || !current || review.project(current.channel, [entry.file], reader).length > 0;
|
|
800
|
+
}
|
|
801
|
+
_removeEntry(entry) {
|
|
802
|
+
if (this._entries.get(entry.modifiedURI) !== entry) {
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
this._entries.delete(entry.modifiedURI);
|
|
806
|
+
this._entriesObs.set([...( this._entries.values())], undefined);
|
|
807
|
+
this._releaseEntry(entry, true);
|
|
808
|
+
}
|
|
809
|
+
_releaseEntry(entry, closeEditors) {
|
|
810
|
+
entry.setEditing(false);
|
|
811
|
+
const editorService = this._editorService;
|
|
812
|
+
const original = entry.originalURI;
|
|
813
|
+
const referencesOriginal = (
|
|
814
|
+
{
|
|
815
|
+
editor
|
|
816
|
+
}
|
|
817
|
+
) => isDiffEditorInput(editor) && isEqual(editor.original.resource, original);
|
|
818
|
+
const diffEditors = editorService.getEditors(EditorsOrder.SEQUENTIAL).filter(referencesOriginal);
|
|
819
|
+
if (diffEditors.length === 0) {
|
|
820
|
+
entry.dispose();
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
const lifetime = ( new DisposableStore());
|
|
824
|
+
lifetime.add(entry);
|
|
825
|
+
const releaseIfClosed = () => {
|
|
826
|
+
if (!( editorService.getEditors(EditorsOrder.SEQUENTIAL).some(referencesOriginal))) {
|
|
827
|
+
lifetime.dispose();
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
lifetime.add(editorService.onDidCloseEditor(releaseIfClosed));
|
|
831
|
+
for (const editor of ( new Set(diffEditors.map(identifier => identifier.editor)))) {
|
|
832
|
+
lifetime.add(Event.once(editor.onWillDispose)(() => {
|
|
833
|
+
if (!( editorService.getEditors(EditorsOrder.SEQUENTIAL).some(
|
|
834
|
+
candidate => candidate.editor !== editor && !candidate.editor.isDisposed() && referencesOriginal(candidate)
|
|
835
|
+
))) {
|
|
836
|
+
lifetime.dispose();
|
|
837
|
+
}
|
|
838
|
+
}));
|
|
839
|
+
}
|
|
840
|
+
if (closeEditors) {
|
|
841
|
+
const logService = this._logService;
|
|
842
|
+
void editorService.closeEditors(diffEditors).then(releaseIfClosed, error => {
|
|
843
|
+
logService.error("[AgentHostEditReview] Could not close review diff editors", error);
|
|
844
|
+
releaseIfClosed();
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
_getEntries(uris) {
|
|
849
|
+
return [...( this._entries.values())].filter(entry => this._isFileVisible(entry)).filter(entry => uris.length === 0 || ( uris.some(uri => isEqual(entry.modifiedURI, uri)))).filter(entry => !entry.isCurrentlyBeingModifiedBy.get()).filter(entry => entry.state.get() === ModifiedFileEntryState.Modified);
|
|
850
|
+
}
|
|
851
|
+
_getTelemetryInfo() {
|
|
852
|
+
const request = this._chatService.getSession(this.chatSessionResource)?.getRequests().at(-1);
|
|
853
|
+
const response = request?.response;
|
|
854
|
+
return {
|
|
855
|
+
agentId: response?.agent?.id,
|
|
856
|
+
command: response?.slashCommand?.name,
|
|
857
|
+
sessionResource: this.chatSessionResource,
|
|
858
|
+
requestId: request?.id ?? "",
|
|
859
|
+
get result() {
|
|
860
|
+
return response?.result;
|
|
861
|
+
},
|
|
862
|
+
modelId: response?.request?.modelId,
|
|
863
|
+
modeId: response?.request?.modeInfo?.telemetryModeId,
|
|
864
|
+
applyCodeBlockSuggestionId: undefined,
|
|
865
|
+
feature: "sideBarChat"
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
AgentHostEditReview = ( __decorate([( __param(1, IAgentHostConnectionsService)), ( __param(2, IAgentHostUntitledProvisionalSessionService)), ( __param(3, IInstantiationService)), ( __param(4, ITextModelService)), ( __param(5, ITextFileService)), ( __param(6, IFileService)), ( __param(7, IChatService)), ( __param(8, IEditorService)), ( __param(9, INotificationService)), ( __param(10, IAccessibilitySignalService)), ( __param(11, INotebookService)), ( __param(12, IUriIdentityService)), ( __param(13, ILogService)), ( __param(14, IEditorWorkerService))], AgentHostEditReview));
|
|
870
|
+
async function getReviewedOriginal(file, live, eol, workerService) {
|
|
871
|
+
const baseline = withLineEndings(file.baseline, eol);
|
|
872
|
+
const current = withLineEndings(file.current, eol);
|
|
873
|
+
if (live === current) {
|
|
874
|
+
return baseline;
|
|
875
|
+
}
|
|
876
|
+
const [agent, user] = await Promise.all([
|
|
877
|
+
computeEdit(baseline, current, workerService),
|
|
878
|
+
computeEdit(current, live, workerService)
|
|
879
|
+
]);
|
|
880
|
+
return agent && user ? user.rebaseSkipConflicting(agent.inverse(baseline)).apply(baseline) : baseline;
|
|
881
|
+
}
|
|
882
|
+
async function mapLinesToCurrent(lines, live, current, workerService) {
|
|
883
|
+
if (live === current) {
|
|
884
|
+
return lines;
|
|
885
|
+
}
|
|
886
|
+
const edit = await computeEdit(current, live, workerService);
|
|
887
|
+
if (!edit) {
|
|
888
|
+
return undefined;
|
|
889
|
+
}
|
|
890
|
+
const originalText = ( new StringText(current));
|
|
891
|
+
const modifiedText = ( new StringText(live));
|
|
892
|
+
const changes = lineRangeMappingFromRangeMappings(
|
|
893
|
+
RangeMapping.fromEdit(originalText.getTransformer().getTextEdit(edit)),
|
|
894
|
+
originalText,
|
|
895
|
+
modifiedText
|
|
896
|
+
);
|
|
897
|
+
const map = line => {
|
|
898
|
+
let delta = 0;
|
|
899
|
+
for (const change of changes) {
|
|
900
|
+
if (line < change.modified.startLineNumber) {
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
if (line < change.modified.endLineNumberExclusive) {
|
|
904
|
+
return Math.min(
|
|
905
|
+
change.original.startLineNumber + line - change.modified.startLineNumber,
|
|
906
|
+
Math.max(
|
|
907
|
+
change.original.startLineNumber,
|
|
908
|
+
change.original.endLineNumberExclusive - 1
|
|
909
|
+
)
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
delta = change.original.endLineNumberExclusive - change.modified.endLineNumberExclusive;
|
|
913
|
+
}
|
|
914
|
+
return line + delta;
|
|
915
|
+
};
|
|
916
|
+
if (lines.isEmpty) {
|
|
917
|
+
const line = map(lines.startLineNumber);
|
|
918
|
+
return ( new LineRange(line, line));
|
|
919
|
+
}
|
|
920
|
+
const start = map(lines.startLineNumber);
|
|
921
|
+
return ( new LineRange(start, Math.max(start, map(lines.endLineNumberExclusive - 1)) + 1));
|
|
922
|
+
}
|
|
923
|
+
function toTextRange(lines) {
|
|
924
|
+
const start = {
|
|
925
|
+
line: lines.startLineNumber - 1,
|
|
926
|
+
character: 0
|
|
927
|
+
};
|
|
928
|
+
return {
|
|
929
|
+
start,
|
|
930
|
+
end: lines.isEmpty ? start : {
|
|
931
|
+
line: lines.endLineNumberExclusive - 1,
|
|
932
|
+
character: 0
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
async function computeEdit(original, modified, workerService) {
|
|
937
|
+
if (original === modified) {
|
|
938
|
+
return StringEdit.empty;
|
|
939
|
+
}
|
|
940
|
+
const diff = await workerService.computeStringEditFromDiffWithMetadata(original, modified, {
|
|
941
|
+
maxComputationTimeMs: DIFF_TIMEOUT_MS
|
|
942
|
+
}, "advanced");
|
|
943
|
+
return diff.isCoarse ? undefined : diff.edit;
|
|
944
|
+
}
|
|
945
|
+
function withLineEndings(text, eol) {
|
|
946
|
+
return text.replace(/\r\n|\r|\n/g, eol);
|
|
947
|
+
}
|
|
948
|
+
function isSameWorkingSetFile(a, b) {
|
|
949
|
+
return isEqual(a.diff.originalURI, b.diff.originalURI) && isEqual(a.diff.modifiedSnapshotURI, b.diff.modifiedSnapshotURI) && !!a.diff.isCreated === !!b.diff.isCreated && a.nonce === b.nonce;
|
|
950
|
+
}
|
|
951
|
+
function toWorkingSetFileChanges(state, resourceAuthority) {
|
|
952
|
+
return state.files.map(file => {
|
|
953
|
+
const diff = agentHostChangesetFileToEntryDiff(file, resourceAuthority);
|
|
954
|
+
return diff && {
|
|
955
|
+
diff,
|
|
956
|
+
nonce: file.nonce,
|
|
957
|
+
editing: file.isEditing === true
|
|
958
|
+
};
|
|
959
|
+
}).filter(isDefined);
|
|
960
|
+
}
|
|
961
|
+
async function whenReady(subscription) {
|
|
962
|
+
const isSettled = state => state instanceof Error || state?.status === ChangesetStatus.Ready || state?.status === ChangesetStatus.Error;
|
|
963
|
+
let state = subscription.value;
|
|
964
|
+
if (!isSettled(state)) {
|
|
965
|
+
const settled = Event.toPromise(Event.filter(
|
|
966
|
+
Event.any(subscription.onDidChange, subscription.onDidError ?? Event.None),
|
|
967
|
+
() => isSettled(subscription.value)
|
|
968
|
+
));
|
|
969
|
+
try {
|
|
970
|
+
await raceTimeout(settled, WORKING_SET_READY_TIMEOUT_MS, () => settled.cancel());
|
|
971
|
+
} finally {
|
|
972
|
+
settled.cancel();
|
|
973
|
+
}
|
|
974
|
+
state = subscription.value;
|
|
975
|
+
}
|
|
976
|
+
return state instanceof Error || state?.status !== ChangesetStatus.Ready ? undefined : state;
|
|
977
|
+
}
|
|
978
|
+
async function completeIfCurrent(promise, isCurrent) {
|
|
979
|
+
try {
|
|
980
|
+
const complete = await promise;
|
|
981
|
+
return complete && (tx => {
|
|
982
|
+
if (isCurrent()) {
|
|
983
|
+
complete(tx);
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
} catch (error) {
|
|
987
|
+
if (isCancellationError(error)) {
|
|
988
|
+
return undefined;
|
|
989
|
+
}
|
|
990
|
+
throw error;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
function resolutionEquals(a, b) {
|
|
994
|
+
return a === b || (!!a && !!b && a.connection === b.connection && a.connectionAuthority === b.connectionAuthority && isEqual(a.backendSession, b.backendSession));
|
|
995
|
+
}
|
|
996
|
+
function workingSetEquals(a, b) {
|
|
997
|
+
return a === b || (!!a && !!b && a.connection === b.connection && a.resourceAuthority === b.resourceAuthority && isEqual(a.channel, b.channel));
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export { AgentHostEditReview };
|