@codingame/monaco-vscode-chat-service-override 37.3.2 → 37.3.4
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 +1 -1
- package/package.json +4 -4
- package/session.js +5 -2
- package/vscode/src/vs/platform/agentHost/browser/nullWslRemoteAgentHostService.d.ts +20 -0
- package/vscode/src/vs/platform/agentHost/browser/nullWslRemoteAgentHostService.js +33 -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.js +3 -3
- package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.js +2 -2
- package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.js +6 -6
- package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.js +52 -52
- package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.js +4 -4
- package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.js +1 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.js +49 -49
- 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.js +66 -66
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.js +1 -1
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openAgentHostStateFileAction.js +1 -1
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.js +5 -5
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +6 -6
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.contribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.js +3 -3
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +1 -1
- 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 +11 -11
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.js +6 -6
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.js +11 -11
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.js +16 -16
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +90 -90
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostCustomizationHarness.js +4 -4
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.js +1 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.d.ts +1 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.js +2 -2
- package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +28 -28
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +18 -18
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +28 -28
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +93 -93
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +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 +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +14 -14
- 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/agentPluginCommands.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +1 -1
- 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.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +44 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +344 -344
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +38 -38
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +32 -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 +36 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +41 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +2 -2
- 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/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +35 -35
- 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/chatSessionDescription.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- 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/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +154 -154
- 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.js +2 -2
- 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.js +22 -22
- 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.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/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/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/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 +73 -73
- 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/platform/agentHost/common/wslRemoteAgentHost.service.d.ts +0 -51
- package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.service.js +0 -6
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -9
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +0 -104
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +0 -301
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +0 -518
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +0 -3121
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.d.ts +0 -25
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.js +0 -97
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/permissionPicker.d.ts +0 -135
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/permissionPicker.js +0 -521
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +0 -166
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +0 -586
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxConnectionCustomization.d.ts +0 -15
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxConnectionCustomization.js +0 -47
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxReadOnlySessionHandler.d.ts +0 -45
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxReadOnlySessionHandler.js +0 -109
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +0 -49
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +0 -112
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +0 -670
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.d.ts +0 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +0 -446
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.d.ts +0 -183
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.js +0 -218
package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js
DELETED
|
@@ -1,670 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
4
|
-
import { newWriteableBufferStream, VSBuffer, streamToBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
5
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
|
-
import { joinPath, basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
8
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
|
-
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
|
-
import { Categories } from '@codingame/monaco-vscode-api/vscode/vs/platform/action/common/actionCommonCategories';
|
|
11
|
-
import { Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
|
-
import { IAgentHostConnectionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService.service';
|
|
13
|
-
import { AGENT_HOST_ENABLED_CONTEXT_KEY } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostEnablementService';
|
|
14
|
-
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
15
|
-
import { remoteAgentHostLogOutputChannelId } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService';
|
|
16
|
-
import { IRemoteAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService.service';
|
|
17
|
-
import { getSessionChatResource, StateComponents, DEFAULT_CHAT_ID } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
18
|
-
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
19
|
-
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
20
|
-
import { IsWebContext } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
|
|
21
|
-
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
22
|
-
import { ByteSize } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
23
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
24
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
25
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
26
|
-
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
27
|
-
import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
28
|
-
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
29
|
-
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
30
|
-
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
31
|
-
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
32
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
33
|
-
import { getCopilotCliSessionRawId, COPILOT_CLI_LOCAL_AH_SCHEME, parseRemoteAuthorityFromScheme } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/copilotCliEventsUri';
|
|
34
|
-
import { sanitizeFilePart, getRemoteConnectionForSession } from '../chatDebug/agentHostLogSources.js';
|
|
35
|
-
import { buildAgentHostUsageUri, buildAgentHostCustomizationsUri } from '../chatDebug/agentHostUsageSidecar.js';
|
|
36
|
-
import { IAgentHostDebugLogsExportService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.service';
|
|
37
|
-
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
38
|
-
|
|
39
|
-
const SHARED_PROCESS_LOG_FILE_NAME = "sharedprocess.log";
|
|
40
|
-
const OUTPUT_LOG_FOLDER_PREFIX = "output_";
|
|
41
|
-
const MAX_INLINE_DEBUG_LOGS_BYTES = 30 * ByteSize.MB;
|
|
42
|
-
let BrowserAgentHostDebugLogsExportService = class BrowserAgentHostDebugLogsExportService {
|
|
43
|
-
constructor(fileDialogService, fileService, logService) {
|
|
44
|
-
this.fileDialogService = fileDialogService;
|
|
45
|
-
this.fileService = fileService;
|
|
46
|
-
this.logService = logService;
|
|
47
|
-
this.hostArtifactKind = "directory";
|
|
48
|
-
}
|
|
49
|
-
async selectDestination(exportName) {
|
|
50
|
-
const folders = await this.fileDialogService.showOpenDialog({
|
|
51
|
-
title: ( localize(7892, "Select Folder for Agent Host Debug Logs")),
|
|
52
|
-
canSelectFiles: false,
|
|
53
|
-
canSelectFolders: true,
|
|
54
|
-
canSelectMany: false,
|
|
55
|
-
availableFileSystems: [Schemas.file]
|
|
56
|
-
});
|
|
57
|
-
return folders?.[0] ? joinPath(folders[0], exportName) : undefined;
|
|
58
|
-
}
|
|
59
|
-
async save(destination, files, hostArtifact) {
|
|
60
|
-
await exportFilesToLocalFolder(destination, files, hostArtifact, this.fileService, this.logService);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
BrowserAgentHostDebugLogsExportService = ( __decorate([( __param(0, IFileDialogService)), ( __param(1, IFileService)), ( __param(2, ILogService))], BrowserAgentHostDebugLogsExportService));
|
|
64
|
-
function resolveAgentHostDebugLogsChat(activeSession, state) {
|
|
65
|
-
let backendChat = activeSession.backendChatResource;
|
|
66
|
-
let sessionTitle = activeSession.sessionTitle;
|
|
67
|
-
if (state && !(state instanceof Error)) {
|
|
68
|
-
if (!backendChat) {
|
|
69
|
-
const backendChatResource = getSessionChatResource(state, activeSession.chatId);
|
|
70
|
-
if (backendChatResource) {
|
|
71
|
-
backendChat = ( URI.parse(backendChatResource));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
sessionTitle ??= state.title;
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
backendChat,
|
|
78
|
-
sessionTitle
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function createHostArtifactStream(artifact, readChunk) {
|
|
82
|
-
const stream = newWriteableBufferStream();
|
|
83
|
-
(async () => {
|
|
84
|
-
let position = 0;
|
|
85
|
-
while (true) {
|
|
86
|
-
const chunk = await readChunk(position);
|
|
87
|
-
const byteLength = chunk.data.byteLength;
|
|
88
|
-
if (byteLength > 0) {
|
|
89
|
-
position += byteLength;
|
|
90
|
-
if (position > artifact.size) {
|
|
91
|
-
throw ( new Error(
|
|
92
|
-
`Agent Host debug log artifact exceeded its declared size of ${artifact.size} bytes`
|
|
93
|
-
));
|
|
94
|
-
}
|
|
95
|
-
await stream.write(chunk.data);
|
|
96
|
-
}
|
|
97
|
-
if (chunk.eof) {
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
if (byteLength === 0) {
|
|
101
|
-
throw ( new Error(
|
|
102
|
-
"Agent Host returned an empty debug log chunk before the end of the artifact"
|
|
103
|
-
));
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (position !== artifact.size) {
|
|
107
|
-
throw ( new Error(
|
|
108
|
-
`Agent Host debug log artifact ended after ${position} bytes, expected ${artifact.size}`
|
|
109
|
-
));
|
|
110
|
-
}
|
|
111
|
-
stream.end();
|
|
112
|
-
})().catch(error => {
|
|
113
|
-
stream.error(error instanceof Error ? error : ( new Error(String(error))));
|
|
114
|
-
stream.end();
|
|
115
|
-
});
|
|
116
|
-
return stream;
|
|
117
|
-
}
|
|
118
|
-
async function collectAgentHostDebugLogs(accessor, activeSession, onDidCreateHostArtifact) {
|
|
119
|
-
const agentHostService = accessor.get(IAgentHostService);
|
|
120
|
-
const agentHostConnectionsService = accessor.get(IAgentHostConnectionsService);
|
|
121
|
-
const remoteAgentHostService = accessor.get(IRemoteAgentHostService);
|
|
122
|
-
const fileService = accessor.get(IFileService);
|
|
123
|
-
const logService = accessor.get(ILogService);
|
|
124
|
-
const environmentService = accessor.get(IWorkbenchEnvironmentService);
|
|
125
|
-
const exportService = accessor.get(IAgentHostDebugLogsExportService);
|
|
126
|
-
let connection;
|
|
127
|
-
let backendSession;
|
|
128
|
-
let backendChat;
|
|
129
|
-
if (activeSession) {
|
|
130
|
-
const sessionResolution = agentHostConnectionsService.resolveSessionResource(activeSession.resource);
|
|
131
|
-
if (!sessionResolution) {
|
|
132
|
-
logService.warn(
|
|
133
|
-
`[ExportAgentHostDebugLogs] No live Agent Host connection owns session ${( activeSession.resource.toString())}; exporting client-owned logs only`
|
|
134
|
-
);
|
|
135
|
-
} else {
|
|
136
|
-
connection = sessionResolution.connection;
|
|
137
|
-
backendSession = sessionResolution.backendSession;
|
|
138
|
-
const state = connection.getSubscriptionUnmanaged(StateComponents.Session, backendSession)?.value;
|
|
139
|
-
backendChat = resolveAgentHostDebugLogsChat(activeSession, state).backendChat;
|
|
140
|
-
if (!backendChat) {
|
|
141
|
-
const reason = !state || state instanceof Error ? "session state is unavailable" : `chat '${activeSession.chatId}' is unavailable`;
|
|
142
|
-
logService.warn(
|
|
143
|
-
`[ExportAgentHostDebugLogs] Cannot resolve the active chat because ${reason} for ${( activeSession.resource.toString())}; exporting session and client-owned logs`
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
connection = agentHostConnectionsService.ambientConnection;
|
|
149
|
-
}
|
|
150
|
-
let hostArtifact;
|
|
151
|
-
if (connection) {
|
|
152
|
-
try {
|
|
153
|
-
hostArtifact = await connection.collectDebugLogs(backendSession, exportService.hostArtifactKind, backendChat);
|
|
154
|
-
onDidCreateHostArtifact(hostArtifact);
|
|
155
|
-
} catch (error) {
|
|
156
|
-
logService.warn(
|
|
157
|
-
`[ExportAgentHostDebugLogs] Failed to collect Agent Host logs: ${error instanceof Error ? error.message : String(error)}; exporting client-owned logs only`
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
let remainingInlineBytes = MAX_INLINE_DEBUG_LOGS_BYTES;
|
|
162
|
-
const forwardedAgentHostLogFileNames = ( new Set());
|
|
163
|
-
let ahpLogNameFilter;
|
|
164
|
-
if (activeSession) {
|
|
165
|
-
if (activeSession.isLocal) {
|
|
166
|
-
const localClientId = sanitizeFilePart(agentHostService.clientId);
|
|
167
|
-
ahpLogNameFilter = name => name.includes(localClientId);
|
|
168
|
-
} else {
|
|
169
|
-
const remoteConnection = getRemoteConnectionForSession(activeSession.resource, remoteAgentHostService.connections);
|
|
170
|
-
if (remoteConnection) {
|
|
171
|
-
forwardedAgentHostLogFileNames.add(
|
|
172
|
-
getOutputChannelLogFileName(remoteAgentHostLogOutputChannelId(remoteConnection.address))
|
|
173
|
-
);
|
|
174
|
-
const remoteConnectionId = sanitizeFilePart(remoteConnection.address);
|
|
175
|
-
ahpLogNameFilter = name => name.includes(remoteConnectionId);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
} else {
|
|
179
|
-
for (const remoteConnection of remoteAgentHostService.connections) {
|
|
180
|
-
forwardedAgentHostLogFileNames.add(
|
|
181
|
-
getOutputChannelLogFileName(remoteAgentHostLogOutputChannelId(remoteConnection.address))
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
const files = [];
|
|
186
|
-
const appendFile = file => {
|
|
187
|
-
files.push(file);
|
|
188
|
-
if (hasKey(file, {
|
|
189
|
-
contents: true
|
|
190
|
-
})) {
|
|
191
|
-
remainingInlineBytes -= file.size;
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
const appendFiles = collectedFiles => {
|
|
195
|
-
for (const file of collectedFiles) {
|
|
196
|
-
appendFile(file);
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const processLogs = [{
|
|
200
|
-
folder: "Window",
|
|
201
|
-
resource: environmentService.logFile
|
|
202
|
-
}, {
|
|
203
|
-
folder: "Shared",
|
|
204
|
-
resource: joinPath(environmentService.logsHome, SHARED_PROCESS_LOG_FILE_NAME)
|
|
205
|
-
}];
|
|
206
|
-
for (const processLog of processLogs) {
|
|
207
|
-
try {
|
|
208
|
-
appendFiles(await collectRotatedLogFiles(
|
|
209
|
-
`vscode-logs/${processLog.folder}`,
|
|
210
|
-
processLog.resource,
|
|
211
|
-
fileService,
|
|
212
|
-
remainingInlineBytes
|
|
213
|
-
));
|
|
214
|
-
} catch (error) {
|
|
215
|
-
logService.warn(
|
|
216
|
-
`[ExportAgentHostDebugLogs] Failed to collect rotated logs for '${( processLog.resource.toString())}': ${error instanceof Error ? error.message : String(error)}`
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
try {
|
|
221
|
-
const forwardedLogs = await findOutputChannelLogFiles(
|
|
222
|
-
environmentService.windowLogsPath,
|
|
223
|
-
forwardedAgentHostLogFileNames,
|
|
224
|
-
fileService
|
|
225
|
-
);
|
|
226
|
-
for (const forwardedLog of forwardedLogs) {
|
|
227
|
-
const file = await createDebugLogFile(
|
|
228
|
-
`vscode-logs/Agent Host/${basename(forwardedLog)}`,
|
|
229
|
-
forwardedLog,
|
|
230
|
-
fileService,
|
|
231
|
-
undefined,
|
|
232
|
-
remainingInlineBytes
|
|
233
|
-
);
|
|
234
|
-
if (file) {
|
|
235
|
-
appendFile(file);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
} catch (error) {
|
|
239
|
-
logService.warn(
|
|
240
|
-
`[ExportAgentHostDebugLogs] Failed to collect forwarded Agent Host logs: ${error instanceof Error ? error.message : String(error)}`
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
try {
|
|
244
|
-
const ahpDir = joinPath(environmentService.logsHome, "ahp");
|
|
245
|
-
const stat = await fileService.resolve(ahpDir, {
|
|
246
|
-
resolveMetadata: true
|
|
247
|
-
});
|
|
248
|
-
for (const child of stat.children ?? []) {
|
|
249
|
-
if (child.isDirectory || !child.name.endsWith(".jsonl") || ahpLogNameFilter && !ahpLogNameFilter(child.name)) {
|
|
250
|
-
continue;
|
|
251
|
-
}
|
|
252
|
-
try {
|
|
253
|
-
const file = await createDebugLogFile(
|
|
254
|
-
`ahp/${child.name}`,
|
|
255
|
-
child.resource,
|
|
256
|
-
fileService,
|
|
257
|
-
child.size,
|
|
258
|
-
remainingInlineBytes
|
|
259
|
-
);
|
|
260
|
-
if (file) {
|
|
261
|
-
appendFile(file);
|
|
262
|
-
}
|
|
263
|
-
} catch (error) {
|
|
264
|
-
logService.warn(
|
|
265
|
-
`[ExportAgentHostDebugLogs] Failed to read AHP log '${child.name}': ${error instanceof Error ? error.message : String(error)}`
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
} catch {}
|
|
270
|
-
const rawSessionId = getCopilotCliSessionRawId(activeSession?.resource);
|
|
271
|
-
if (rawSessionId) {
|
|
272
|
-
const sidecars = [{
|
|
273
|
-
path: "usage.jsonl",
|
|
274
|
-
resource: buildAgentHostUsageUri(environmentService.userRoamingDataHome, rawSessionId)
|
|
275
|
-
}, {
|
|
276
|
-
path: "customizations.json",
|
|
277
|
-
resource: buildAgentHostCustomizationsUri(environmentService.userRoamingDataHome, rawSessionId)
|
|
278
|
-
}];
|
|
279
|
-
for (const sidecar of sidecars) {
|
|
280
|
-
try {
|
|
281
|
-
const file = await createDebugLogFile(
|
|
282
|
-
sidecar.path,
|
|
283
|
-
sidecar.resource,
|
|
284
|
-
fileService,
|
|
285
|
-
undefined,
|
|
286
|
-
remainingInlineBytes
|
|
287
|
-
);
|
|
288
|
-
if (file) {
|
|
289
|
-
appendFile(file);
|
|
290
|
-
}
|
|
291
|
-
} catch {}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return {
|
|
295
|
-
files,
|
|
296
|
-
hostArtifact: hostArtifact && connection ? {
|
|
297
|
-
artifact: hostArtifact,
|
|
298
|
-
readChunk: createChunkReader(connection)
|
|
299
|
-
} : undefined
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
function getAgentHostDebugLogsExportName(sessionTitle, chatTitle, isPrimaryChat) {
|
|
303
|
-
const namespace = [
|
|
304
|
-
toDebugLogsTitleSlug(sessionTitle),
|
|
305
|
-
...(!isPrimaryChat ? [toDebugLogsTitleSlug(chatTitle)] : [])
|
|
306
|
-
].filter(title => title.length > 0);
|
|
307
|
-
return namespace.length > 0 ? `ah-logs-${namespace.join("--")}` : "ah-logs";
|
|
308
|
-
}
|
|
309
|
-
function prepareAgentHostDebugLogsExport(selectDestination, collectLogs) {
|
|
310
|
-
const destinationPromise = selectDestination();
|
|
311
|
-
const collectionPromise = collectLogs();
|
|
312
|
-
return Promise.allSettled([collectionPromise, destinationPromise]);
|
|
313
|
-
}
|
|
314
|
-
function toDebugLogsTitleSlug(title) {
|
|
315
|
-
return title?.replace(/[/\\:*?"<>|\s]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) ?? "";
|
|
316
|
-
}
|
|
317
|
-
function createChunkReader(connection) {
|
|
318
|
-
return (resource, position) => connection.readDebugLogsChunk(resource, position);
|
|
319
|
-
}
|
|
320
|
-
async function exportAgentHostDebugLogs(accessor, activeSession) {
|
|
321
|
-
const exportService = accessor.get(IAgentHostDebugLogsExportService);
|
|
322
|
-
const notificationService = accessor.get(INotificationService);
|
|
323
|
-
const chatEntitlementService = accessor.get(IChatEntitlementService);
|
|
324
|
-
const clipboardService = accessor.get(IClipboardService);
|
|
325
|
-
const fileService = accessor.get(IFileService);
|
|
326
|
-
const logService = accessor.get(ILogService);
|
|
327
|
-
const progressService = accessor.get(IProgressService);
|
|
328
|
-
let hostArtifact;
|
|
329
|
-
try {
|
|
330
|
-
const exportName = resolveAgentHostDebugLogsExportName(accessor, activeSession);
|
|
331
|
-
const [collectionResult, destinationResult] = await prepareAgentHostDebugLogsExport(
|
|
332
|
-
() => exportService.selectDestination(exportName),
|
|
333
|
-
() => progressService.withProgress({
|
|
334
|
-
location: ProgressLocation.Notification,
|
|
335
|
-
title: ( localize(7893, "Collecting Agent Host debug logs...")),
|
|
336
|
-
delay: 500
|
|
337
|
-
}, () => collectAgentHostDebugLogs(accessor, activeSession, artifact => hostArtifact = artifact))
|
|
338
|
-
);
|
|
339
|
-
if (collectionResult.status === "rejected") {
|
|
340
|
-
notificationService.notify({
|
|
341
|
-
severity: Severity.Error,
|
|
342
|
-
message: ( localize(
|
|
343
|
-
7894,
|
|
344
|
-
"Failed to collect debug logs: {0}",
|
|
345
|
-
collectionResult.reason instanceof Error ? collectionResult.reason.message : String(collectionResult.reason)
|
|
346
|
-
))
|
|
347
|
-
});
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
if (destinationResult.status === "rejected") {
|
|
351
|
-
notificationService.notify({
|
|
352
|
-
severity: Severity.Error,
|
|
353
|
-
message: ( localize(
|
|
354
|
-
7895,
|
|
355
|
-
"Failed to save debug logs: {0}",
|
|
356
|
-
destinationResult.reason instanceof Error ? destinationResult.reason.message : String(destinationResult.reason)
|
|
357
|
-
))
|
|
358
|
-
});
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
const destination = destinationResult.value;
|
|
362
|
-
if (!destination) {
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
try {
|
|
366
|
-
await exportService.save(
|
|
367
|
-
destination,
|
|
368
|
-
collectionResult.value.files,
|
|
369
|
-
collectionResult.value.hostArtifact
|
|
370
|
-
);
|
|
371
|
-
notifyAgentHostDebugLogsExported(
|
|
372
|
-
notificationService,
|
|
373
|
-
clipboardService,
|
|
374
|
-
chatEntitlementService.isInternal,
|
|
375
|
-
destination
|
|
376
|
-
);
|
|
377
|
-
} catch (error) {
|
|
378
|
-
notificationService.notify({
|
|
379
|
-
severity: Severity.Error,
|
|
380
|
-
message: ( localize(
|
|
381
|
-
7895,
|
|
382
|
-
"Failed to save debug logs: {0}",
|
|
383
|
-
error instanceof Error ? error.message : String(error)
|
|
384
|
-
))
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
} finally {
|
|
388
|
-
if (hostArtifact) {
|
|
389
|
-
try {
|
|
390
|
-
await fileService.del(hostArtifact.resource, {
|
|
391
|
-
recursive: hostArtifact.kind === "directory"
|
|
392
|
-
});
|
|
393
|
-
} catch (error) {
|
|
394
|
-
logService.warn(
|
|
395
|
-
`[ExportAgentHostDebugLogs] Failed to delete temporary Agent Host log artifact: ${error instanceof Error ? error.message : String(error)}`
|
|
396
|
-
);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
function resolveAgentHostDebugLogsExportName(accessor, activeSession) {
|
|
402
|
-
let sessionTitle = activeSession?.sessionTitle;
|
|
403
|
-
if (activeSession && !sessionTitle) {
|
|
404
|
-
const sessionResolution = accessor.get(IAgentHostConnectionsService).resolveSessionResource(activeSession.resource);
|
|
405
|
-
if (sessionResolution) {
|
|
406
|
-
const state = sessionResolution.connection.getSubscriptionUnmanaged(StateComponents.Session, sessionResolution.backendSession)?.value;
|
|
407
|
-
sessionTitle = resolveAgentHostDebugLogsChat(activeSession, state).sessionTitle;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
return getAgentHostDebugLogsExportName(
|
|
411
|
-
sessionTitle,
|
|
412
|
-
activeSession?.chatTitle,
|
|
413
|
-
activeSession?.chatId === DEFAULT_CHAT_ID
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
function notifyAgentHostDebugLogsExported(notificationService, clipboardService, isInternal, savedResource) {
|
|
417
|
-
const savedPath = savedResource.scheme === Schemas.file ? savedResource.fsPath : ( savedResource.toString(true));
|
|
418
|
-
notificationService.notify({
|
|
419
|
-
severity: Severity.Warning,
|
|
420
|
-
message: isInternal ? ( localize(
|
|
421
|
-
7896,
|
|
422
|
-
"Note: This log may contain personal information such as auth tokens, file contents, or terminal output. It MUST be shared privately via Slack or in an issue filed on the microsoft/vscode-internalbacklog repo."
|
|
423
|
-
)) : ( localize(
|
|
424
|
-
7897,
|
|
425
|
-
"Note: This log may contain personal information such as auth tokens, file contents, or terminal output. Please consider sharing privately or reviewing the contents carefully before sharing."
|
|
426
|
-
)),
|
|
427
|
-
actions: {
|
|
428
|
-
primary: [( new Action("copyAgentHostDebugLogsPath", ( localize(7898, "Copy Path")), undefined, true, () => clipboardService.writeText(savedPath)))]
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
class ExportAgentHostDebugLogsAction extends Action2 {
|
|
433
|
-
static {
|
|
434
|
-
this.ID = "workbench.action.chat.exportAgentHostDebugLogs";
|
|
435
|
-
}
|
|
436
|
-
constructor() {
|
|
437
|
-
super({
|
|
438
|
-
id: ExportAgentHostDebugLogsAction.ID,
|
|
439
|
-
title: ( localize2(7899, "Export Agent Host Debug Logs...")),
|
|
440
|
-
f1: true,
|
|
441
|
-
category: Categories.Developer,
|
|
442
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( IsWebContext.negate()), AGENT_HOST_ENABLED_CONTEXT_KEY))
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
async run(accessor) {
|
|
446
|
-
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
447
|
-
const widget = chatWidgetService.lastFocusedWidget;
|
|
448
|
-
const model = widget?.viewModel?.model;
|
|
449
|
-
const activeSession = model ? toActiveAgentHostSession(model.sessionResource, model.title) : undefined;
|
|
450
|
-
await exportAgentHostDebugLogs(accessor, activeSession);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
function toActiveAgentHostSession(resource, chatTitle, sessionTitle) {
|
|
454
|
-
if (resource.scheme === COPILOT_CLI_LOCAL_AH_SCHEME) {
|
|
455
|
-
return {
|
|
456
|
-
resource: resource.with({
|
|
457
|
-
fragment: null
|
|
458
|
-
}),
|
|
459
|
-
sessionTitle,
|
|
460
|
-
chatTitle,
|
|
461
|
-
isLocal: true,
|
|
462
|
-
chatId: resource.fragment || DEFAULT_CHAT_ID,
|
|
463
|
-
backendChatResource: undefined
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
if (parseRemoteAuthorityFromScheme(resource.scheme)) {
|
|
467
|
-
return {
|
|
468
|
-
resource: resource.with({
|
|
469
|
-
fragment: null
|
|
470
|
-
}),
|
|
471
|
-
sessionTitle,
|
|
472
|
-
chatTitle,
|
|
473
|
-
isLocal: false,
|
|
474
|
-
chatId: resource.fragment || DEFAULT_CHAT_ID,
|
|
475
|
-
backendChatResource: undefined
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
return undefined;
|
|
479
|
-
}
|
|
480
|
-
async function exportFilesToLocalFolder(exportFolder, files, hostArtifact, fileService, logService) {
|
|
481
|
-
await fileService.createFolder(exportFolder);
|
|
482
|
-
if (hostArtifact) {
|
|
483
|
-
try {
|
|
484
|
-
if (hostArtifact.artifact.kind !== "directory") {
|
|
485
|
-
throw ( new Error(
|
|
486
|
-
`Expected an Agent Host debug-log directory, got ${hostArtifact.artifact.kind}`
|
|
487
|
-
));
|
|
488
|
-
}
|
|
489
|
-
await copyHostArtifactDirectory(exportFolder, hostArtifact, fileService);
|
|
490
|
-
} catch (error) {
|
|
491
|
-
logService.warn(
|
|
492
|
-
`[ExportAgentHostDebugLogs] Failed to save Agent Host logs: ${error instanceof Error ? error.message : String(error)}; saving client-owned logs only`
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
for (const file of files) {
|
|
497
|
-
const segments = toSafeRelativePathSegments(file.path);
|
|
498
|
-
if (segments.length === 0) {
|
|
499
|
-
continue;
|
|
500
|
-
}
|
|
501
|
-
let folder = exportFolder;
|
|
502
|
-
for (const segment of segments.slice(0, -1)) {
|
|
503
|
-
folder = joinPath(folder, segment);
|
|
504
|
-
await fileService.createFolder(folder);
|
|
505
|
-
}
|
|
506
|
-
const target = joinPath(folder, segments[segments.length - 1]);
|
|
507
|
-
if (hasKey(file, {
|
|
508
|
-
contents: true
|
|
509
|
-
})) {
|
|
510
|
-
await fileService.writeFile(target, VSBuffer.fromString(file.contents));
|
|
511
|
-
} else {
|
|
512
|
-
const source = await fileService.readFileStream(file.resource, {
|
|
513
|
-
length: file.size
|
|
514
|
-
});
|
|
515
|
-
await fileService.writeFile(target, source.value);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
async function copyHostArtifactDirectory(target, hostArtifact, fileService) {
|
|
520
|
-
let copiedSize = 0;
|
|
521
|
-
for (const entry of hostArtifact.artifact.entries) {
|
|
522
|
-
copiedSize += entry.size;
|
|
523
|
-
if (copiedSize > hostArtifact.artifact.uncompressedSize) {
|
|
524
|
-
throw ( new Error(
|
|
525
|
-
`Agent Host debug-log directory exceeded its declared size of ${hostArtifact.artifact.uncompressedSize} bytes`
|
|
526
|
-
));
|
|
527
|
-
}
|
|
528
|
-
const source = joinPath(hostArtifact.artifact.resource, ...entry.path.split("/"));
|
|
529
|
-
const segments = toSafeRelativePathSegments(entry.path);
|
|
530
|
-
if (segments.length === 0) {
|
|
531
|
-
throw ( new Error(`Agent Host returned an invalid debug-log artifact path: ${entry.path}`));
|
|
532
|
-
}
|
|
533
|
-
let targetFolder = target;
|
|
534
|
-
for (const segment of segments.slice(0, -1)) {
|
|
535
|
-
targetFolder = joinPath(targetFolder, segment);
|
|
536
|
-
await fileService.createFolder(targetFolder);
|
|
537
|
-
}
|
|
538
|
-
const entryTarget = joinPath(targetFolder, segments[segments.length - 1]);
|
|
539
|
-
if (source.scheme === Schemas.file) {
|
|
540
|
-
const sourceStat = await fileService.resolve(source, {
|
|
541
|
-
resolveMetadata: true
|
|
542
|
-
});
|
|
543
|
-
if (!sourceStat.isFile || sourceStat.isSymbolicLink || sourceStat.size !== entry.size) {
|
|
544
|
-
throw ( new Error(`Agent Host debug-log file no longer matches its manifest: ${entry.path}`));
|
|
545
|
-
}
|
|
546
|
-
await fileService.copy(source, entryTarget, true);
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
|
-
const artifact = {
|
|
550
|
-
size: entry.size};
|
|
551
|
-
await fileService.writeFile(
|
|
552
|
-
entryTarget,
|
|
553
|
-
createHostArtifactStream(artifact, position => hostArtifact.readChunk(source, position))
|
|
554
|
-
);
|
|
555
|
-
}
|
|
556
|
-
if (copiedSize !== hostArtifact.artifact.uncompressedSize) {
|
|
557
|
-
throw ( new Error(
|
|
558
|
-
`Agent Host debug-log directory manifest accounts for ${copiedSize} bytes, expected ${hostArtifact.artifact.uncompressedSize}`
|
|
559
|
-
));
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
async function createDebugLogFile(path, resource, fileService, size, maxInlineSize) {
|
|
563
|
-
if (resource.scheme === Schemas.file || resource.scheme === Schemas.vscodeUserData) {
|
|
564
|
-
const observedSize = size ?? (await fileService.resolve(resource, {
|
|
565
|
-
resolveMetadata: true
|
|
566
|
-
})).size;
|
|
567
|
-
return {
|
|
568
|
-
path,
|
|
569
|
-
resource,
|
|
570
|
-
size: observedSize
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
const observedSize = size ?? (await fileService.resolve(resource, {
|
|
574
|
-
resolveMetadata: true
|
|
575
|
-
})).size;
|
|
576
|
-
const readSize = Math.min(observedSize, maxInlineSize);
|
|
577
|
-
if (readSize === 0) {
|
|
578
|
-
return undefined;
|
|
579
|
-
}
|
|
580
|
-
const stream = await fileService.readFileStream(resource, {
|
|
581
|
-
position: observedSize - readSize,
|
|
582
|
-
length: readSize
|
|
583
|
-
});
|
|
584
|
-
return createInlineDebugLogFile(path, await streamToBuffer(stream.value), maxInlineSize);
|
|
585
|
-
}
|
|
586
|
-
function createInlineDebugLogFile(path, content, maxInlineSize) {
|
|
587
|
-
const size = Math.min(content.byteLength, maxInlineSize);
|
|
588
|
-
if (size === 0) {
|
|
589
|
-
return undefined;
|
|
590
|
-
}
|
|
591
|
-
const capturedContent = size === content.byteLength ? content : content.slice(content.byteLength - size);
|
|
592
|
-
return {
|
|
593
|
-
path,
|
|
594
|
-
contents: ( capturedContent.toString()),
|
|
595
|
-
size
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
async function collectRotatedLogFiles(path, current, fileService, maxInlineSize = MAX_INLINE_DEBUG_LOGS_BYTES) {
|
|
599
|
-
const currentName = basename(current);
|
|
600
|
-
const parent = await fileService.resolve(dirname(current), {
|
|
601
|
-
resolveMetadata: true
|
|
602
|
-
});
|
|
603
|
-
const files = [];
|
|
604
|
-
let remainingInlineSize = maxInlineSize;
|
|
605
|
-
for (const child of parent.children ?? []) {
|
|
606
|
-
if (child.isFile && !child.isSymbolicLink && isRotatedLogFile(child.name, currentName)) {
|
|
607
|
-
const file = await createDebugLogFile(
|
|
608
|
-
`${path}/${child.name}`,
|
|
609
|
-
child.resource,
|
|
610
|
-
fileService,
|
|
611
|
-
child.size,
|
|
612
|
-
remainingInlineSize
|
|
613
|
-
);
|
|
614
|
-
if (file) {
|
|
615
|
-
files.push(file);
|
|
616
|
-
if (hasKey(file, {
|
|
617
|
-
contents: true
|
|
618
|
-
})) {
|
|
619
|
-
remainingInlineSize -= file.size;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
return files;
|
|
625
|
-
}
|
|
626
|
-
async function findOutputChannelLogFiles(windowLogsPath, fileNames, fileService) {
|
|
627
|
-
if (fileNames.size === 0) {
|
|
628
|
-
return [];
|
|
629
|
-
}
|
|
630
|
-
const windowLogs = await fileService.resolve(windowLogsPath);
|
|
631
|
-
const outputFolders = (windowLogs.children ?? []).filter(
|
|
632
|
-
child => child.isDirectory && child.name.startsWith(OUTPUT_LOG_FOLDER_PREFIX)
|
|
633
|
-
).sort((a, b) => b.name.localeCompare(a.name));
|
|
634
|
-
const remaining = ( new Set(fileNames));
|
|
635
|
-
const result = [];
|
|
636
|
-
for (const outputFolder of outputFolders) {
|
|
637
|
-
const folder = await fileService.resolve(outputFolder.resource);
|
|
638
|
-
for (const child of folder.children ?? []) {
|
|
639
|
-
if (child.isFile && !child.isSymbolicLink && remaining.delete(child.name)) {
|
|
640
|
-
result.push(child.resource);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
if (remaining.size === 0) {
|
|
644
|
-
break;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
return result;
|
|
648
|
-
}
|
|
649
|
-
function getOutputChannelLogFileName(channelId) {
|
|
650
|
-
return `${channelId.replace(/[\\/:\*\?"<>\|]/g, "")}.log`;
|
|
651
|
-
}
|
|
652
|
-
function isRotatedLogFile(candidate, current) {
|
|
653
|
-
if (candidate === current) {
|
|
654
|
-
return true;
|
|
655
|
-
}
|
|
656
|
-
const stem = current.endsWith(".log") ? current.slice(0, -".log".length) : current;
|
|
657
|
-
const prefix = `${stem}.`;
|
|
658
|
-
if (!candidate.startsWith(prefix) || !candidate.endsWith(".log")) {
|
|
659
|
-
return false;
|
|
660
|
-
}
|
|
661
|
-
const rotation = candidate.slice(prefix.length, -".log".length);
|
|
662
|
-
return /^[1-9]\d*$/.test(rotation);
|
|
663
|
-
}
|
|
664
|
-
function toSafeRelativePathSegments(path) {
|
|
665
|
-
return path.replace(/\\/g, "/").split("/").filter(segment => {
|
|
666
|
-
return segment.length > 0 && segment !== "." && segment !== "..";
|
|
667
|
-
}).map(segment => segment.replace(/[/\\:*?"<>|]/g, "-"));
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
export { BrowserAgentHostDebugLogsExportService, ExportAgentHostDebugLogsAction, collectAgentHostDebugLogs, collectRotatedLogFiles, createHostArtifactStream, exportAgentHostDebugLogs, findOutputChannelLogFiles, getAgentHostDebugLogsExportName, notifyAgentHostDebugLogsExported, prepareAgentHostDebugLogsExport, resolveAgentHostDebugLogsChat, toActiveAgentHostSession };
|