@codingame/monaco-vscode-chat-service-override 37.0.0 → 37.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +11 -0
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +74 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +90 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSlashCommand.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSlashCommand.js +16 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +53 -53
- package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/agentMerge.js +7 -7
- package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.d.ts +24 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.js +13 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelNotices.d.ts +22 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelNotices.js +21 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelPricing.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelPricing.js +56 -0
- package/vscode/src/vs/platform/agentHost/common/changesetUri.js +15 -1
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.d.ts +73 -0
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +141 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +42 -1
- package/vscode/src/vs/platform/agentHost/common/meta/agentCustomizationMeta.d.ts +27 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentCustomizationMeta.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentEphemeralSessionMeta.d.ts +14 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentEphemeralSessionMeta.js +11 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +13 -13
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +4 -1
- package/vscode/src/vs/platform/agentHost/common/toolSearchConstants.d.ts +4 -0
- package/vscode/src/vs/platform/agentHost/common/toolSearchConstants.js +6 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
- package/vscode/src/vs/workbench/browser/chatChangesPill.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/exportAgentHostDebugLogsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +5 -5
- 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/agentCustomizationContentExpander.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.js +229 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +460 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +92 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.d.ts +142 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +746 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +474 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostConfigEditor.d.ts +169 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostConfigEditor.js +261 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +90 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.js +73 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.js +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +192 -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/agentHostPromptCacheNotification.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +137 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +301 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.js +96 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +884 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +5868 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +129 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +345 -0
- 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.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +163 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +219 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.js +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +161 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.js +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +205 -0
- 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/agentSessions/externalSessionsFilterMenu.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +126 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +44 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +137 -137
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +145 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +40 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +75 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +115 -115
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +344 -344
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +124 -124
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +35 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +40 -40
- 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/chatInputPills.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -63
- 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/chatSetup/chatSetupContributions.js +19 -19
- 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/chatStatusDashboard.js +62 -62
- 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/hookActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.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/sessionChatPillOptions.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +2 -2
- 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/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/sessionChatPills.js +9 -9
- 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/state/legacyProtocolCompatibility.d.ts +0 -30
- package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +0 -87
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +0 -205
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +0 -1580
|
@@ -62,22 +62,22 @@ const artifactIcons = ( new Map([
|
|
|
62
62
|
]));
|
|
63
63
|
const artifactSectionOrder = [{
|
|
64
64
|
type: SessionArtifactType.PullRequest,
|
|
65
|
-
title: ( localize(
|
|
65
|
+
title: ( localize(6080, "Pull Requests"))
|
|
66
66
|
}, {
|
|
67
67
|
type: SessionArtifactType.Issue,
|
|
68
|
-
title: ( localize(
|
|
68
|
+
title: ( localize(6081, "Issues"))
|
|
69
69
|
}, {
|
|
70
70
|
type: SessionArtifactType.Commit,
|
|
71
|
-
title: ( localize(
|
|
71
|
+
title: ( localize(6082, "Commits"))
|
|
72
72
|
}, {
|
|
73
73
|
type: SessionArtifactType.Website,
|
|
74
|
-
title: ( localize(
|
|
74
|
+
title: ( localize(6083, "Websites"))
|
|
75
75
|
}, {
|
|
76
76
|
type: SessionArtifactType.File,
|
|
77
|
-
title: ( localize(
|
|
77
|
+
title: ( localize(6084, "Files"))
|
|
78
78
|
}, {
|
|
79
79
|
type: SessionArtifactType.Resource,
|
|
80
|
-
title: ( localize(
|
|
80
|
+
title: ( localize(6085, "Resources"))
|
|
81
81
|
}];
|
|
82
82
|
function linkKey(link) {
|
|
83
83
|
return link.replace(/\/+$/, "").toLowerCase();
|
|
@@ -189,14 +189,14 @@ function referenceLabel(link, kind, title) {
|
|
|
189
189
|
const number = resource ? githubReferenceNumber(resource, kind) : undefined;
|
|
190
190
|
if (title) {
|
|
191
191
|
if (kind === "pullRequest") {
|
|
192
|
-
return number ? ( localize(
|
|
192
|
+
return number ? ( localize(6086, "Pull Request #{0}: {1}", number, title)) : title;
|
|
193
193
|
}
|
|
194
|
-
return number ? ( localize(
|
|
194
|
+
return number ? ( localize(6087, "Issue #{0}: {1}", number, title)) : title;
|
|
195
195
|
}
|
|
196
196
|
if (kind === "pullRequest") {
|
|
197
|
-
return number ? ( localize(
|
|
197
|
+
return number ? ( localize(6088, "Pull Request #{0}", number)) : ( localize(6089, "Pull Request"));
|
|
198
198
|
}
|
|
199
|
-
return number ? ( localize(
|
|
199
|
+
return number ? ( localize(6090, "Issue #{0}", number)) : ( localize(6091, "Issue"));
|
|
200
200
|
}
|
|
201
201
|
function githubReferenceNumber(resource, kind) {
|
|
202
202
|
const segment = kind === "pullRequest" ? "pull" : "issues";
|
|
@@ -387,7 +387,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
387
387
|
const browserSections = derived(this, reader => {
|
|
388
388
|
const entries = ( browserInputs.read(reader).map(input => this._browserEntry(input, sessionResource.read(reader))));
|
|
389
389
|
return entries.length > 0 ? [{
|
|
390
|
-
title: ( localize(
|
|
390
|
+
title: ( localize(6092, "Browsers")),
|
|
391
391
|
entries
|
|
392
392
|
}] : [];
|
|
393
393
|
});
|
|
@@ -396,9 +396,9 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
396
396
|
stats: changeStats,
|
|
397
397
|
label: derived(
|
|
398
398
|
this,
|
|
399
|
-
reader => changesetTarget.read(reader)?.changeset.label ?? ( localize(
|
|
399
|
+
reader => changesetTarget.read(reader)?.changeset.label ?? ( localize(6093, "Changes"))
|
|
400
400
|
),
|
|
401
|
-
open: () => this._openChanges(changesetTarget.get()?.changeset.label ?? ( localize(
|
|
401
|
+
open: () => this._openChanges(changesetTarget.get()?.changeset.label ?? ( localize(6094, "Session Changes")), changes.get())
|
|
402
402
|
},
|
|
403
403
|
pullRequests: createSessionPullRequestPillData(pullRequestSections, visibility.pullRequests, pullRequestIcon),
|
|
404
404
|
issues: {
|
|
@@ -424,7 +424,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
424
424
|
enabled: pillsVisible,
|
|
425
425
|
sources: constObservable(sources.sources),
|
|
426
426
|
offeredKinds: offeredPillKinds,
|
|
427
|
-
ariaLabel: ( localize(
|
|
427
|
+
ariaLabel: ( localize(6095, "Session status")),
|
|
428
428
|
focusFallback: () => this._widget.focusInput()
|
|
429
429
|
}
|
|
430
430
|
));
|
|
@@ -460,7 +460,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
460
460
|
pullRequestState: kind === "pullRequest" ? pullRequestState : undefined,
|
|
461
461
|
toolbarActions: [toAction({
|
|
462
462
|
id: `chatInputPills.copy.${kind}.${linkKey(link)}`,
|
|
463
|
-
label: kind === "pullRequest" ? ( localize(
|
|
463
|
+
label: kind === "pullRequest" ? ( localize(6096, "Copy Pull Request URL")) : ( localize(6097, "Copy Issue URL")),
|
|
464
464
|
class: ThemeIcon.asClassName(Codicon.copy),
|
|
465
465
|
run: () => this._clipboardService.writeText(( resource.toString(true)))
|
|
466
466
|
})],
|
|
@@ -471,7 +471,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
471
471
|
open: () => this._openExternal(resource)
|
|
472
472
|
};
|
|
473
473
|
})).filter(isDefined);
|
|
474
|
-
const title = kind === "pullRequest" ? ( localize(
|
|
474
|
+
const title = kind === "pullRequest" ? ( localize(6098, "Pull Requests")) : ( localize(6099, "Issues"));
|
|
475
475
|
return entries.length > 0 ? [{
|
|
476
476
|
title,
|
|
477
477
|
entries
|
|
@@ -532,7 +532,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
532
532
|
if (link) {
|
|
533
533
|
const copyAction = artifact.type === SessionArtifactType.Commit && artifact.commitHash ? [toAction({
|
|
534
534
|
id: "chat.agentHost.sessionPills.copyCommitHash",
|
|
535
|
-
label: ( localize(
|
|
535
|
+
label: ( localize(6100, "Copy Commit Hash")),
|
|
536
536
|
class: ThemeIcon.asClassName(Codicon.copy),
|
|
537
537
|
run: () => this._clipboardService.writeText(artifact.commitHash)
|
|
538
538
|
})] : undefined;
|
|
@@ -552,7 +552,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
552
552
|
id: artifact.id,
|
|
553
553
|
label: artifact.label,
|
|
554
554
|
icon,
|
|
555
|
-
ariaLabel: ( localize(
|
|
555
|
+
ariaLabel: ( localize(6101, "Copy commit hash for {0}", artifact.label)),
|
|
556
556
|
tooltip: artifact.commitHash,
|
|
557
557
|
open: () => {
|
|
558
558
|
void this._clipboardService.writeText(artifact.commitHash);
|
|
@@ -562,7 +562,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
|
|
|
562
562
|
return undefined;
|
|
563
563
|
}
|
|
564
564
|
_browserEntry(input, sessionResource) {
|
|
565
|
-
const label = input.title?.trim() || ( localize(
|
|
565
|
+
const label = input.title?.trim() || ( localize(6102, "Browser"));
|
|
566
566
|
return {
|
|
567
567
|
id: input.id,
|
|
568
568
|
label,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service";
|
|
3
|
+
import { IAgentHostEnablementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostEnablementService.service";
|
|
4
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
7
|
+
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
8
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
9
|
+
import { IAgentHostSessionWorkingDirectoryResolver } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.service";
|
|
10
|
+
export declare class AgentHostSessionListContribution extends Disposable implements IWorkbenchContribution {
|
|
11
|
+
private readonly _agentHostService;
|
|
12
|
+
private readonly _chatSessionsService;
|
|
13
|
+
private readonly _configurationService;
|
|
14
|
+
private readonly _instantiationService;
|
|
15
|
+
private readonly _workingDirectoryResolver;
|
|
16
|
+
private readonly _agentHostEnablementService;
|
|
17
|
+
static readonly ID = "workbench.contrib.agentHostSessionListContribution";
|
|
18
|
+
private readonly _agentRegistrations;
|
|
19
|
+
private readonly _isSessionsWindow;
|
|
20
|
+
private _initialized;
|
|
21
|
+
private _sessionListStore;
|
|
22
|
+
constructor(_agentHostService: IAgentHostService, _chatSessionsService: IChatSessionsService, _configurationService: IConfigurationService, _instantiationService: IInstantiationService, environmentService: IWorkbenchEnvironmentService, _workingDirectoryResolver: IAgentHostSessionWorkingDirectoryResolver, _agentHostEnablementService: IAgentHostEnablementService);
|
|
23
|
+
private _initialize;
|
|
24
|
+
private _shouldRegisterAgent;
|
|
25
|
+
private _handleRootStateChange;
|
|
26
|
+
private _registerAgent;
|
|
27
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable, DisposableMap, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
5
|
+
import { affectsAgentHostProviderPreference, shouldSurfaceLocalAgentHostProvider } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService';
|
|
6
|
+
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
7
|
+
import { IAgentHostEnablementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostEnablementService.service';
|
|
8
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
|
+
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
11
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
12
|
+
import { IAgentHostSessionWorkingDirectoryResolver } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.service';
|
|
13
|
+
import { AgentHostSessionListController } from './agentHostSessionListController.js';
|
|
14
|
+
import { AgentHostSessionListStore } from './agentHostSessionListStore.js';
|
|
15
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
16
|
+
|
|
17
|
+
let AgentHostSessionListContribution = class AgentHostSessionListContribution extends Disposable {
|
|
18
|
+
static {
|
|
19
|
+
this.ID = "workbench.contrib.agentHostSessionListContribution";
|
|
20
|
+
}
|
|
21
|
+
constructor(
|
|
22
|
+
_agentHostService,
|
|
23
|
+
_chatSessionsService,
|
|
24
|
+
_configurationService,
|
|
25
|
+
_instantiationService,
|
|
26
|
+
environmentService,
|
|
27
|
+
_workingDirectoryResolver,
|
|
28
|
+
_agentHostEnablementService
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this._agentHostService = _agentHostService;
|
|
32
|
+
this._chatSessionsService = _chatSessionsService;
|
|
33
|
+
this._configurationService = _configurationService;
|
|
34
|
+
this._instantiationService = _instantiationService;
|
|
35
|
+
this._workingDirectoryResolver = _workingDirectoryResolver;
|
|
36
|
+
this._agentHostEnablementService = _agentHostEnablementService;
|
|
37
|
+
this._agentRegistrations = this._register(( new DisposableMap()));
|
|
38
|
+
this._initialized = false;
|
|
39
|
+
this._isSessionsWindow = environmentService.isSessionsWindow;
|
|
40
|
+
if (this._isSessionsWindow) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this._register(autorun(reader => {
|
|
44
|
+
if (this._agentHostEnablementService.enabled.read(reader)) {
|
|
45
|
+
const wasInitialized = this._initialized;
|
|
46
|
+
this._initialize();
|
|
47
|
+
const current = this._agentHostService.rootState.value;
|
|
48
|
+
if (wasInitialized && current && !(current instanceof Error) && this._sessionListStore) {
|
|
49
|
+
this._handleRootStateChange(current, this._sessionListStore);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
this._agentRegistrations.clearAndDisposeAll();
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
_initialize() {
|
|
57
|
+
if (this._initialized) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this._initialized = true;
|
|
61
|
+
const sessionListStore = this._register(
|
|
62
|
+
this._instantiationService.createInstance(AgentHostSessionListStore, this._agentHostService)
|
|
63
|
+
);
|
|
64
|
+
this._sessionListStore = sessionListStore;
|
|
65
|
+
this._register(this._agentHostService.rootState.onDidChange(rootState => {
|
|
66
|
+
this._handleRootStateChange(rootState, sessionListStore);
|
|
67
|
+
}));
|
|
68
|
+
this._register(this._agentHostService.onAgentHostStart(() => {
|
|
69
|
+
sessionListStore.resetCache();
|
|
70
|
+
}));
|
|
71
|
+
const initialRootState = this._agentHostService.rootState.value;
|
|
72
|
+
if (initialRootState && !(initialRootState instanceof Error)) {
|
|
73
|
+
this._handleRootStateChange(initialRootState, sessionListStore);
|
|
74
|
+
}
|
|
75
|
+
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
76
|
+
if (!affectsAgentHostProviderPreference(e, this._isSessionsWindow)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const current = this._agentHostService.rootState.value;
|
|
80
|
+
if (current && !(current instanceof Error)) {
|
|
81
|
+
this._handleRootStateChange(current, sessionListStore);
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
_shouldRegisterAgent(provider) {
|
|
86
|
+
return shouldSurfaceLocalAgentHostProvider(provider, this._configurationService, this._isSessionsWindow);
|
|
87
|
+
}
|
|
88
|
+
_handleRootStateChange(rootState, sessionListStore) {
|
|
89
|
+
if (!this._agentHostEnablementService.enabled.get()) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const allowed = rootState.agents.filter(agent => this._shouldRegisterAgent(agent.provider));
|
|
93
|
+
const incoming = ( new Set(( allowed.map(agent => agent.provider))));
|
|
94
|
+
for (const [provider] of this._agentRegistrations) {
|
|
95
|
+
if (!( incoming.has(provider))) {
|
|
96
|
+
this._agentRegistrations.deleteAndDispose(provider);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
for (const agent of allowed) {
|
|
100
|
+
if (!( this._agentRegistrations.has(agent.provider))) {
|
|
101
|
+
this._registerAgent(agent, sessionListStore);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
_registerAgent(agent, sessionListStore) {
|
|
106
|
+
const store = ( new DisposableStore());
|
|
107
|
+
this._agentRegistrations.set(agent.provider, store);
|
|
108
|
+
const sessionType = `agent-host-${agent.provider}`;
|
|
109
|
+
const listController = store.add(this._instantiationService.createInstance(
|
|
110
|
+
AgentHostSessionListController,
|
|
111
|
+
sessionType,
|
|
112
|
+
agent.provider,
|
|
113
|
+
sessionListStore,
|
|
114
|
+
undefined,
|
|
115
|
+
"local"
|
|
116
|
+
));
|
|
117
|
+
store.add(
|
|
118
|
+
this._chatSessionsService.registerChatSessionItemController(sessionType, listController)
|
|
119
|
+
);
|
|
120
|
+
store.add(this._workingDirectoryResolver.registerResolver(
|
|
121
|
+
sessionType,
|
|
122
|
+
_sessionResource => undefined,
|
|
123
|
+
sessionResource => listController.isNewSession(sessionResource)
|
|
124
|
+
));
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
AgentHostSessionListContribution = ( __decorate([( __param(0, IAgentHostService)), ( __param(1, IChatSessionsService)), ( __param(2, IConfigurationService)), ( __param(3, IInstantiationService)), ( __param(4, IWorkbenchEnvironmentService)), ( __param(5, IAgentHostSessionWorkingDirectoryResolver)), ( __param(6, IAgentHostEnablementService))], AgentHostSessionListContribution));
|
|
128
|
+
|
|
129
|
+
export { AgentHostSessionListContribution };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
6
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
7
|
+
import { IChatNewSessionRequest, IChatSessionItem, IChatSessionItemController, IChatSessionItemsDelta } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
8
|
+
import { IAgentHostUntitledProvisionalSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service";
|
|
9
|
+
import { IAgentHostImportConversationStore } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.service";
|
|
10
|
+
import { IAgentHostNewSessionFolderService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.service";
|
|
11
|
+
import { AgentHostSessionListStore } from "./agentHostSessionListStore.js";
|
|
12
|
+
/**
|
|
13
|
+
* Provides provider-specific session list items for the chat sessions sidebar
|
|
14
|
+
* by projecting the shared {@link AgentHostSessionListStore} state. The
|
|
15
|
+
* controller is a stateless view: items are derived from the store on demand
|
|
16
|
+
* and change events are a filtered/mapped projection of the store's event.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AgentHostSessionListController extends Disposable implements IChatSessionItemController {
|
|
19
|
+
private readonly _sessionType;
|
|
20
|
+
private readonly _provider;
|
|
21
|
+
private readonly _sessionListStore;
|
|
22
|
+
private readonly _description;
|
|
23
|
+
private readonly _provisional;
|
|
24
|
+
private readonly _workspaceContextService;
|
|
25
|
+
private readonly _newSessionFolderService;
|
|
26
|
+
private readonly _importConversationStore;
|
|
27
|
+
readonly onDidChangeChatSessionItems: Event<IChatSessionItemsDelta>;
|
|
28
|
+
constructor(_sessionType: string, _provider: string, _sessionListStore: AgentHostSessionListStore, _description: string | undefined, _connectionAuthority: string, _provisional: IAgentHostUntitledProvisionalSessionService, _workspaceContextService: IWorkspaceContextService, _newSessionFolderService: IAgentHostNewSessionFolderService, _importConversationStore: IAgentHostImportConversationStore, chatService: IChatService);
|
|
29
|
+
get items(): readonly IChatSessionItem[];
|
|
30
|
+
isNewSession(resource: URI): boolean;
|
|
31
|
+
notifySessionMaterialized(resource: URI): void;
|
|
32
|
+
newChatSessionItem(request: IChatNewSessionRequest, token: CancellationToken): Promise<IChatSessionItem | undefined>;
|
|
33
|
+
deleteChatSessionItem(resource: URI, _token: CancellationToken): Promise<void>;
|
|
34
|
+
setChatSessionItemArchived(resource: URI, archived: boolean): void;
|
|
35
|
+
setChatSessionItemRead(resource: URI, isRead: boolean): void;
|
|
36
|
+
refresh(token: CancellationToken): Promise<void>;
|
|
37
|
+
private _projectDelta;
|
|
38
|
+
private _makeItemFromSummary;
|
|
39
|
+
private _makeItem;
|
|
40
|
+
private _resource;
|
|
41
|
+
private _buildMetadata;
|
|
42
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
6
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService';
|
|
8
|
+
import { withEphemeralSessionMeta } from '../../../../../../platform/agentHost/common/meta/agentEphemeralSessionMeta.js';
|
|
9
|
+
import { readSessionEhcliAdoptable, SESSION_META_EHCLI_ADOPTABLE_KEY } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
10
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
11
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
12
|
+
import { ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
13
|
+
import { getAgentSessionProviderIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
14
|
+
import { IAgentHostUntitledProvisionalSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service';
|
|
15
|
+
import { IAgentHostImportConversationStore } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.service';
|
|
16
|
+
import { IAgentHostNewSessionFolderService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.service';
|
|
17
|
+
import { AgentSession } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agent';
|
|
18
|
+
import { SessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
19
|
+
|
|
20
|
+
function mapSessionStatus(status) {
|
|
21
|
+
if (status !== undefined && (status & SessionStatus.InputNeeded) === SessionStatus.InputNeeded) {
|
|
22
|
+
return ChatSessionStatus.NeedsInput;
|
|
23
|
+
}
|
|
24
|
+
if (status !== undefined && (status & SessionStatus.InProgress)) {
|
|
25
|
+
return ChatSessionStatus.InProgress;
|
|
26
|
+
}
|
|
27
|
+
if (status !== undefined && (status & SessionStatus.Error)) {
|
|
28
|
+
return ChatSessionStatus.Failed;
|
|
29
|
+
}
|
|
30
|
+
return ChatSessionStatus.Completed;
|
|
31
|
+
}
|
|
32
|
+
let AgentHostSessionListController = class AgentHostSessionListController extends Disposable {
|
|
33
|
+
constructor(
|
|
34
|
+
_sessionType,
|
|
35
|
+
_provider,
|
|
36
|
+
_sessionListStore,
|
|
37
|
+
_description,
|
|
38
|
+
_connectionAuthority,
|
|
39
|
+
_provisional,
|
|
40
|
+
_workspaceContextService,
|
|
41
|
+
_newSessionFolderService,
|
|
42
|
+
_importConversationStore,
|
|
43
|
+
chatService
|
|
44
|
+
) {
|
|
45
|
+
super();
|
|
46
|
+
this._sessionType = _sessionType;
|
|
47
|
+
this._provider = _provider;
|
|
48
|
+
this._sessionListStore = _sessionListStore;
|
|
49
|
+
this._description = _description;
|
|
50
|
+
this._provisional = _provisional;
|
|
51
|
+
this._workspaceContextService = _workspaceContextService;
|
|
52
|
+
this._newSessionFolderService = _newSessionFolderService;
|
|
53
|
+
this._importConversationStore = _importConversationStore;
|
|
54
|
+
this._register(chatService.onDidDisposeSession(event => {
|
|
55
|
+
for (const resource of event.sessionResources) {
|
|
56
|
+
if (resource.scheme === this._sessionType) {
|
|
57
|
+
this._sessionListStore.clearPendingNewSession(this._provider, AgentSession.id(resource));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
this.onDidChangeChatSessionItems = Event.filter(( Event.map(
|
|
62
|
+
this._sessionListStore.onDidChangeSessions,
|
|
63
|
+
delta => this._projectDelta(delta),
|
|
64
|
+
this._store
|
|
65
|
+
)), delta => delta !== undefined, this._store);
|
|
66
|
+
}
|
|
67
|
+
get items() {
|
|
68
|
+
return ( this._sessionListStore.getSessions(this._provider).map(
|
|
69
|
+
entry => this._makeItemFromSummary(entry.rawId, entry.summary, entry.statusKnown)
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
isNewSession(resource) {
|
|
73
|
+
return resource.scheme === this._sessionType && this._sessionListStore.isPendingNewSession(this._provider, resource.path.substring(1));
|
|
74
|
+
}
|
|
75
|
+
notifySessionMaterialized(resource) {
|
|
76
|
+
if (resource.scheme === this._sessionType) {
|
|
77
|
+
this._sessionListStore.clearPendingNewSession(this._provider, AgentSession.id(resource));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async newChatSessionItem(request, token) {
|
|
81
|
+
if (token.isCancellationRequested) {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
const rawId = generateUuid();
|
|
85
|
+
this._sessionListStore.addPendingNewSession(this._provider, rawId);
|
|
86
|
+
const now = Date.now();
|
|
87
|
+
const item = this._makeItem(rawId, {
|
|
88
|
+
title: request.prompt.trim(),
|
|
89
|
+
status: SessionStatus.InProgress,
|
|
90
|
+
createdAt: now,
|
|
91
|
+
modifiedAt: now
|
|
92
|
+
});
|
|
93
|
+
const metadata = withEphemeralSessionMeta(request._meta, request.isEphemeral ? true : undefined);
|
|
94
|
+
if (metadata) {
|
|
95
|
+
this._provisional.setSessionCreationMetadata(item.resource, metadata);
|
|
96
|
+
}
|
|
97
|
+
if (request.untitledResource) {
|
|
98
|
+
const workingDirectory = this._newSessionFolderService.getFolder(request.untitledResource) ?? this._newSessionFolderService.getDefaultFolder() ?? this._workspaceContextService.getWorkspace().folders[0]?.uri;
|
|
99
|
+
if (workingDirectory) {
|
|
100
|
+
this._newSessionFolderService.setFolder(item.resource, workingDirectory);
|
|
101
|
+
}
|
|
102
|
+
this._importConversationStore.rename(request.untitledResource, item.resource);
|
|
103
|
+
await this._provisional.tryRebind(request.untitledResource, item.resource, this._provider);
|
|
104
|
+
}
|
|
105
|
+
return item;
|
|
106
|
+
}
|
|
107
|
+
async deleteChatSessionItem(resource, _token) {
|
|
108
|
+
if (resource.scheme !== this._sessionType) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const rawId = AgentSession.id(resource);
|
|
112
|
+
await this._sessionListStore.disposeSession(this._provider, rawId);
|
|
113
|
+
this._sessionListStore.removeSession(this._provider, rawId);
|
|
114
|
+
}
|
|
115
|
+
setChatSessionItemArchived(resource, archived) {
|
|
116
|
+
if (resource.scheme !== this._sessionType) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this._sessionListStore.setSessionArchived(this._provider, AgentSession.id(resource), archived);
|
|
120
|
+
}
|
|
121
|
+
setChatSessionItemRead(resource, isRead) {
|
|
122
|
+
if (resource.scheme !== this._sessionType) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this._sessionListStore.setSessionRead(this._provider, AgentSession.id(resource), isRead);
|
|
126
|
+
}
|
|
127
|
+
async refresh(token) {
|
|
128
|
+
await this._sessionListStore.refresh(token);
|
|
129
|
+
}
|
|
130
|
+
_projectDelta(delta) {
|
|
131
|
+
let addedOrUpdated;
|
|
132
|
+
for (const entry of delta.addedOrUpdated ?? []) {
|
|
133
|
+
if (entry.provider !== this._provider) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
(addedOrUpdated ??= []).push(this._makeItemFromSummary(entry.rawId, entry.summary, entry.statusKnown));
|
|
137
|
+
}
|
|
138
|
+
let removed;
|
|
139
|
+
for (const removal of delta.removed ?? []) {
|
|
140
|
+
if (removal.provider !== this._provider) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
(removed ??= []).push(this._resource(removal.rawId));
|
|
144
|
+
}
|
|
145
|
+
if (!addedOrUpdated && !removed) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
...(addedOrUpdated ? {
|
|
150
|
+
addedOrUpdated
|
|
151
|
+
} : undefined),
|
|
152
|
+
...(removed ? {
|
|
153
|
+
removed
|
|
154
|
+
} : undefined)
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
_makeItemFromSummary(rawId, summary, statusKnown) {
|
|
158
|
+
const workingDir = typeof summary.workingDirectories?.[0] === "string" ? ( URI.parse(summary.workingDirectories?.[0])) : summary.workingDirectories?.[0];
|
|
159
|
+
return this._makeItem(rawId, {
|
|
160
|
+
title: summary.title,
|
|
161
|
+
status: summary.status,
|
|
162
|
+
statusKnown,
|
|
163
|
+
activity: summary.activity,
|
|
164
|
+
workingDirectory: workingDir,
|
|
165
|
+
createdAt: Date.parse(summary.createdAt),
|
|
166
|
+
modifiedAt: Date.parse(summary.modifiedAt),
|
|
167
|
+
changesSummary: summary.changes,
|
|
168
|
+
adoptable: readSessionEhcliAdoptable(summary._meta)
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
_makeItem(rawId, opts) {
|
|
172
|
+
const inProgress = opts.status !== undefined && (opts.status & SessionStatus.InProgress) !== 0;
|
|
173
|
+
const description = inProgress && opts.activity ? opts.activity : this._description;
|
|
174
|
+
const metadata = opts.adoptable ? {
|
|
175
|
+
...(this._buildMetadata(opts.workingDirectory) ?? {}),
|
|
176
|
+
[SESSION_META_EHCLI_ADOPTABLE_KEY]: true
|
|
177
|
+
} : this._buildMetadata(opts.workingDirectory);
|
|
178
|
+
return {
|
|
179
|
+
resource: this._resource(rawId),
|
|
180
|
+
label: opts.title || `Session ${rawId.substring(0, 8)}`,
|
|
181
|
+
description,
|
|
182
|
+
iconPath: getAgentSessionProviderIcon(this._sessionType),
|
|
183
|
+
status: mapSessionStatus(opts.status),
|
|
184
|
+
archived: opts.status !== undefined && (opts.status & SessionStatus.IsArchived) === SessionStatus.IsArchived,
|
|
185
|
+
isRead: opts.status !== undefined && opts.statusKnown !== false ? (opts.status & SessionStatus.IsRead) === SessionStatus.IsRead : undefined,
|
|
186
|
+
metadata,
|
|
187
|
+
timing: {
|
|
188
|
+
created: opts.createdAt,
|
|
189
|
+
lastRequestStarted: opts.modifiedAt,
|
|
190
|
+
lastRequestEnded: opts.modifiedAt
|
|
191
|
+
},
|
|
192
|
+
changes: opts.changesSummary ? {
|
|
193
|
+
files: opts.changesSummary.files ?? 0,
|
|
194
|
+
insertions: opts.changesSummary.additions ?? 0,
|
|
195
|
+
deletions: opts.changesSummary.deletions ?? 0
|
|
196
|
+
} : undefined
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
_resource(rawId) {
|
|
200
|
+
return ( URI.from({
|
|
201
|
+
scheme: this._sessionType,
|
|
202
|
+
path: `/${rawId}`
|
|
203
|
+
}));
|
|
204
|
+
}
|
|
205
|
+
_buildMetadata(workingDirectory) {
|
|
206
|
+
if (!this._description && !workingDirectory) {
|
|
207
|
+
return undefined;
|
|
208
|
+
}
|
|
209
|
+
const result = {};
|
|
210
|
+
if (this._description) {
|
|
211
|
+
result.remoteAgentHost = this._description;
|
|
212
|
+
}
|
|
213
|
+
if (workingDirectory) {
|
|
214
|
+
result.workingDirectoryPath = workingDirectory.fsPath;
|
|
215
|
+
}
|
|
216
|
+
return ( Object.keys(result)).length > 0 ? result : undefined;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
AgentHostSessionListController = ( __decorate([( __param(5, IAgentHostUntitledProvisionalSessionService)), ( __param(6, IWorkspaceContextService)), ( __param(7, IAgentHostNewSessionFolderService)), ( __param(8, IAgentHostImportConversationStore)), ( __param(9, IChatService))], AgentHostSessionListController));
|
|
220
|
+
|
|
221
|
+
export { AgentHostSessionListController };
|