@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
|
@@ -0,0 +1,125 @@
|
|
|
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 { type IAgentSessionMetadata } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService";
|
|
6
|
+
import { type INotification, type SessionAction } from "../../../../../../platform/agentHost/common/state/sessionActions.js";
|
|
7
|
+
import { type SessionSummary } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
8
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
9
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
|
+
/**
|
|
11
|
+
* Minimal agent-host connection surface needed by the session list store.
|
|
12
|
+
*/
|
|
13
|
+
export interface IAgentHostSessionListConnection {
|
|
14
|
+
readonly onDidNotification: Event<INotification>;
|
|
15
|
+
listSessions(): Promise<IAgentSessionMetadata[]>;
|
|
16
|
+
disposeSession(session: URI): Promise<void>;
|
|
17
|
+
dispatch(channel: string, action: SessionAction): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Provider-tagged backend session entry owned by the shared session-list store.
|
|
21
|
+
*/
|
|
22
|
+
export interface IAgentHostSessionListEntry {
|
|
23
|
+
readonly provider: string;
|
|
24
|
+
readonly rawId: string;
|
|
25
|
+
readonly summary: SessionSummary;
|
|
26
|
+
/**
|
|
27
|
+
* Whether {@link summary}'s status came from the host. `listSessions()`
|
|
28
|
+
* metadata carries no status for a cold session that has never been marked
|
|
29
|
+
* read or archived, and `SessionSummary.status` is required — so the status
|
|
30
|
+
* is synthesized and the session-scoped flags on it mean nothing.
|
|
31
|
+
*/
|
|
32
|
+
readonly statusKnown: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Provider-tagged backend session removal emitted by the shared session-list store.
|
|
36
|
+
*/
|
|
37
|
+
export interface IAgentHostSessionListRemoval {
|
|
38
|
+
readonly provider: string;
|
|
39
|
+
readonly rawId: string;
|
|
40
|
+
readonly session: URI;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Backend session delta emitted by the shared session-list store. Every delta
|
|
44
|
+
* carries the affected entries, so consumers can apply them incrementally:
|
|
45
|
+
* narrow notifications carry the single changed/removed entry, while a refresh
|
|
46
|
+
* carries the full current entry set (plus any sessions that dropped out).
|
|
47
|
+
*/
|
|
48
|
+
export interface IAgentHostSessionListDelta {
|
|
49
|
+
readonly addedOrUpdated?: readonly IAgentHostSessionListEntry[];
|
|
50
|
+
readonly removed?: readonly IAgentHostSessionListRemoval[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Shared provider-agnostic cache of agent-host sessions. It owns the
|
|
54
|
+
* provider-wide listSessions refresh, workspace filtering, and root session
|
|
55
|
+
* notifications. Per-provider list controllers project this state into chat
|
|
56
|
+
* session items.
|
|
57
|
+
*/
|
|
58
|
+
export declare class AgentHostSessionListStore extends Disposable {
|
|
59
|
+
private readonly _connection;
|
|
60
|
+
private readonly _workspaceContextService;
|
|
61
|
+
private readonly _logService;
|
|
62
|
+
private readonly _onDidChangeSessions;
|
|
63
|
+
readonly onDidChangeSessions: Event<IAgentHostSessionListDelta>;
|
|
64
|
+
private readonly _entries;
|
|
65
|
+
/**
|
|
66
|
+
* Backend session keys for sessions a controller created locally (via
|
|
67
|
+
* `newChatSessionItem`) that the backend has not yet announced. Tracked here
|
|
68
|
+
* so per-provider controllers stay stateless; cleared once the backend
|
|
69
|
+
* surfaces or removes the session.
|
|
70
|
+
*/
|
|
71
|
+
private readonly _pendingNewSessions;
|
|
72
|
+
private _cacheValid;
|
|
73
|
+
private _refreshInFlight;
|
|
74
|
+
/**
|
|
75
|
+
* Incremented whenever the in-memory list is mutated outside of
|
|
76
|
+
* {@link refresh}. Used to detect races where a `root/sessionAdded`,
|
|
77
|
+
* `root/sessionRemoved`, or `root/sessionSummaryChanged` notification
|
|
78
|
+
* arrives while a `listSessions()` round-trip is in flight.
|
|
79
|
+
*/
|
|
80
|
+
private _mutationGeneration;
|
|
81
|
+
/** Sessions already reported as having an unusable (non-local) project root. */
|
|
82
|
+
private readonly _reportedNonLocalProjects;
|
|
83
|
+
constructor(_connection: IAgentHostSessionListConnection, _workspaceContextService: IWorkspaceContextService, _logService: ILogService);
|
|
84
|
+
getSessions(provider: string): readonly IAgentHostSessionListEntry[];
|
|
85
|
+
/** Record a session created locally before the backend has announced it. */
|
|
86
|
+
addPendingNewSession(provider: string, rawId: string): void;
|
|
87
|
+
/** Whether a session was created locally and the backend has not surfaced it yet. */
|
|
88
|
+
isPendingNewSession(provider: string, rawId: string): boolean;
|
|
89
|
+
/** Stop treating a locally-created session as pending without adding it to the visible list. */
|
|
90
|
+
clearPendingNewSession(provider: string, rawId: string): void;
|
|
91
|
+
resetCache(): void;
|
|
92
|
+
disposeSession(provider: string, rawId: string): Promise<void>;
|
|
93
|
+
setSessionArchived(provider: string, rawId: string, archived: boolean): void;
|
|
94
|
+
setSessionRead(provider: string, rawId: string, isRead: boolean): void;
|
|
95
|
+
/**
|
|
96
|
+
* Optimistically flips a session-scoped status flag and dispatches the owning
|
|
97
|
+
* action, so the host can fan the change out to other connected clients. An
|
|
98
|
+
* uncached session still dispatches; the summary notification seeds the entry.
|
|
99
|
+
*/
|
|
100
|
+
private _setSessionFlag;
|
|
101
|
+
removeSession(provider: string, rawId: string): void;
|
|
102
|
+
private _removeSessionFromList;
|
|
103
|
+
refresh(token: CancellationToken): Promise<void>;
|
|
104
|
+
private _doRefresh;
|
|
105
|
+
private _onNotification;
|
|
106
|
+
private _makeEntryFromMetadata;
|
|
107
|
+
private _makeEntryFromSummary;
|
|
108
|
+
/** Uses workspace-file provenance for multi-root workspaces and path containment otherwise. */
|
|
109
|
+
private _isSessionInWorkspace;
|
|
110
|
+
private _computeSessionInWorkspace;
|
|
111
|
+
private _filterEntriesToWorkspace;
|
|
112
|
+
private _matchesAnyFolder;
|
|
113
|
+
/**
|
|
114
|
+
* The directories a session may be matched against a workspace folder by: its
|
|
115
|
+
* working directories plus - for legacy Copilot CLI sessions only - its
|
|
116
|
+
* server-owned project (repository) root. Those legacy sessions run out of a
|
|
117
|
+
* `copilot-worktrees/` directory outside the repository, so working
|
|
118
|
+
* directories alone would hide them from a window opened on that repository.
|
|
119
|
+
* The marker has to outlive adoption: a migrated session is still a legacy
|
|
120
|
+
* session and must not drop out of the list the moment it migrates.
|
|
121
|
+
*/
|
|
122
|
+
private _containmentCandidates;
|
|
123
|
+
private _toRemoval;
|
|
124
|
+
private _key;
|
|
125
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { extUriBiasedIgnorePathCase } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService';
|
|
9
|
+
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/notifications';
|
|
11
|
+
import { readSessionMatchesByProjectRoot, readSessionMultiRootMetadata } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
12
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
13
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
14
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
15
|
+
import { AgentSession } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agent';
|
|
16
|
+
import { SessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
17
|
+
|
|
18
|
+
let AgentHostSessionListStore = class AgentHostSessionListStore extends Disposable {
|
|
19
|
+
constructor(_connection, _workspaceContextService, _logService) {
|
|
20
|
+
super();
|
|
21
|
+
this._connection = _connection;
|
|
22
|
+
this._workspaceContextService = _workspaceContextService;
|
|
23
|
+
this._logService = _logService;
|
|
24
|
+
this._onDidChangeSessions = this._register(( new Emitter()));
|
|
25
|
+
this.onDidChangeSessions = this._onDidChangeSessions.event;
|
|
26
|
+
this._entries = ( new Map());
|
|
27
|
+
this._pendingNewSessions = ( new Set());
|
|
28
|
+
this._cacheValid = false;
|
|
29
|
+
this._mutationGeneration = 0;
|
|
30
|
+
this._reportedNonLocalProjects = ( new Set());
|
|
31
|
+
this._register(this._connection.onDidNotification(n => this._onNotification(n)));
|
|
32
|
+
this._register(this._workspaceContextService.onDidChangeWorkspaceFolders(() => {
|
|
33
|
+
this._cacheValid = false;
|
|
34
|
+
this._filterEntriesToWorkspace();
|
|
35
|
+
void this.refresh(CancellationToken.None);
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
getSessions(provider) {
|
|
39
|
+
return [...( this._entries.values())].filter(entry => entry.provider === provider);
|
|
40
|
+
}
|
|
41
|
+
addPendingNewSession(provider, rawId) {
|
|
42
|
+
this._pendingNewSessions.add(this._key(provider, rawId));
|
|
43
|
+
}
|
|
44
|
+
isPendingNewSession(provider, rawId) {
|
|
45
|
+
return ( this._pendingNewSessions.has(this._key(provider, rawId)));
|
|
46
|
+
}
|
|
47
|
+
clearPendingNewSession(provider, rawId) {
|
|
48
|
+
this._pendingNewSessions.delete(this._key(provider, rawId));
|
|
49
|
+
}
|
|
50
|
+
resetCache() {
|
|
51
|
+
this._cacheValid = false;
|
|
52
|
+
this._mutationGeneration++;
|
|
53
|
+
}
|
|
54
|
+
async disposeSession(provider, rawId) {
|
|
55
|
+
await this._connection.disposeSession(AgentSession.uri(provider, rawId));
|
|
56
|
+
}
|
|
57
|
+
setSessionArchived(provider, rawId, archived) {
|
|
58
|
+
this._setSessionFlag(provider, rawId, SessionStatus.IsArchived, archived, {
|
|
59
|
+
type: ActionType.SessionIsArchivedChanged,
|
|
60
|
+
isArchived: archived
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
setSessionRead(provider, rawId, isRead) {
|
|
64
|
+
this._setSessionFlag(provider, rawId, SessionStatus.IsRead, isRead, {
|
|
65
|
+
type: ActionType.SessionIsReadChanged,
|
|
66
|
+
isRead
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
_setSessionFlag(provider, rawId, flag, set, action) {
|
|
70
|
+
const session = AgentSession.uri(provider, rawId);
|
|
71
|
+
const key = this._key(provider, rawId);
|
|
72
|
+
const cached = this._entries.get(key);
|
|
73
|
+
let updated;
|
|
74
|
+
if (cached) {
|
|
75
|
+
const status = set ? cached.summary.status | flag : cached.summary.status & ~flag;
|
|
76
|
+
if (status === cached.summary.status && cached.statusKnown) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
updated = {
|
|
80
|
+
...cached,
|
|
81
|
+
statusKnown: true,
|
|
82
|
+
summary: {
|
|
83
|
+
...cached.summary,
|
|
84
|
+
status
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
this._mutationGeneration++;
|
|
89
|
+
this._connection.dispatch(( session.toString()), action);
|
|
90
|
+
if (updated) {
|
|
91
|
+
this._entries.set(key, updated);
|
|
92
|
+
this._onDidChangeSessions.fire({
|
|
93
|
+
addedOrUpdated: [updated]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
removeSession(provider, rawId) {
|
|
98
|
+
this._mutationGeneration++;
|
|
99
|
+
this._removeSessionFromList(provider, rawId);
|
|
100
|
+
}
|
|
101
|
+
_removeSessionFromList(provider, rawId) {
|
|
102
|
+
const key = this._key(provider, rawId);
|
|
103
|
+
this._pendingNewSessions.delete(key);
|
|
104
|
+
const entry = this._entries.get(key);
|
|
105
|
+
if (!entry) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
this._entries.delete(key);
|
|
109
|
+
this._onDidChangeSessions.fire({
|
|
110
|
+
removed: [this._toRemoval(entry)]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async refresh(token) {
|
|
114
|
+
if (this._refreshInFlight) {
|
|
115
|
+
return this._refreshInFlight;
|
|
116
|
+
}
|
|
117
|
+
this._refreshInFlight = this._doRefresh(token);
|
|
118
|
+
try {
|
|
119
|
+
await this._refreshInFlight;
|
|
120
|
+
} finally {
|
|
121
|
+
this._refreshInFlight = undefined;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async _doRefresh(token) {
|
|
125
|
+
if (this._cacheValid) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const previousEntries = [...( this._entries.values())];
|
|
129
|
+
const startGeneration = this._mutationGeneration;
|
|
130
|
+
let sessions;
|
|
131
|
+
try {
|
|
132
|
+
sessions = await this._connection.listSessions();
|
|
133
|
+
} catch {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (startGeneration !== this._mutationGeneration) {
|
|
137
|
+
return this._doRefresh(token);
|
|
138
|
+
}
|
|
139
|
+
const nextEntries = [];
|
|
140
|
+
for (const session of sessions) {
|
|
141
|
+
const entry = this._makeEntryFromMetadata(session);
|
|
142
|
+
if (entry) {
|
|
143
|
+
if (this._isSessionInWorkspace(entry)) {
|
|
144
|
+
nextEntries.push(entry);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
this._entries.clear();
|
|
149
|
+
for (const entry of nextEntries) {
|
|
150
|
+
const key = this._key(entry.provider, entry.rawId);
|
|
151
|
+
this._entries.set(key, entry);
|
|
152
|
+
this._pendingNewSessions.delete(key);
|
|
153
|
+
}
|
|
154
|
+
this._cacheValid = true;
|
|
155
|
+
const nextKeys = ( new Set(( nextEntries.map(entry => this._key(entry.provider, entry.rawId)))));
|
|
156
|
+
const removed = ( previousEntries.filter(entry => !( nextKeys.has(this._key(entry.provider, entry.rawId)))).map(entry => this._toRemoval(entry)));
|
|
157
|
+
if (nextEntries.length === 0 && removed.length === 0) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
this._onDidChangeSessions.fire({
|
|
161
|
+
...(nextEntries.length > 0 ? {
|
|
162
|
+
addedOrUpdated: nextEntries
|
|
163
|
+
} : undefined),
|
|
164
|
+
...(removed.length > 0 ? {
|
|
165
|
+
removed
|
|
166
|
+
} : undefined)
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
_onNotification(notification) {
|
|
170
|
+
if (notification.type === "root/sessionAdded") {
|
|
171
|
+
const entry = this._makeEntryFromSummary(notification.summary);
|
|
172
|
+
if (!entry) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const key = this._key(entry.provider, entry.rawId);
|
|
176
|
+
if (!this._isSessionInWorkspace(entry)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this._mutationGeneration++;
|
|
180
|
+
this._entries.set(key, entry);
|
|
181
|
+
this._pendingNewSessions.delete(key);
|
|
182
|
+
this._onDidChangeSessions.fire({
|
|
183
|
+
addedOrUpdated: [entry]
|
|
184
|
+
});
|
|
185
|
+
} else if (notification.type === "root/sessionRemoved") {
|
|
186
|
+
const provider = AgentSession.provider(notification.session);
|
|
187
|
+
if (!provider) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.removeSession(provider, AgentSession.id(notification.session));
|
|
191
|
+
} else if (notification.type === "root/sessionSummaryChanged") {
|
|
192
|
+
const provider = AgentSession.provider(notification.session);
|
|
193
|
+
if (!provider) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const rawId = AgentSession.id(notification.session);
|
|
197
|
+
const key = this._key(provider, rawId);
|
|
198
|
+
const cached = this._entries.get(key);
|
|
199
|
+
if (!cached) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const {
|
|
203
|
+
activity,
|
|
204
|
+
...changes
|
|
205
|
+
} = notification.changes;
|
|
206
|
+
const updated = {
|
|
207
|
+
provider,
|
|
208
|
+
rawId,
|
|
209
|
+
statusKnown: cached.statusKnown || notification.changes.status !== undefined,
|
|
210
|
+
summary: {
|
|
211
|
+
...cached.summary,
|
|
212
|
+
...changes,
|
|
213
|
+
...(Object.prototype.hasOwnProperty.call(notification.changes, "activity") ? {
|
|
214
|
+
activity: activity ?? undefined
|
|
215
|
+
} : {})
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
if (!this._isSessionInWorkspace(updated)) {
|
|
219
|
+
this._mutationGeneration++;
|
|
220
|
+
this._removeSessionFromList(provider, rawId);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
this._mutationGeneration++;
|
|
224
|
+
this._entries.set(key, updated);
|
|
225
|
+
this._onDidChangeSessions.fire({
|
|
226
|
+
addedOrUpdated: [updated]
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
_makeEntryFromMetadata(session) {
|
|
231
|
+
const provider = AgentSession.provider(session.session);
|
|
232
|
+
if (!provider) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
const rawId = AgentSession.id(session.session);
|
|
236
|
+
return {
|
|
237
|
+
provider,
|
|
238
|
+
rawId,
|
|
239
|
+
statusKnown: session.status !== undefined,
|
|
240
|
+
summary: {
|
|
241
|
+
resource: ( session.session.toString()),
|
|
242
|
+
provider,
|
|
243
|
+
title: session.summary ?? `Session ${rawId.substring(0, 8)}`,
|
|
244
|
+
status: session.status ?? SessionStatus.Idle,
|
|
245
|
+
activity: session.activity,
|
|
246
|
+
createdAt: ( new Date(session.startTime)).toISOString(),
|
|
247
|
+
modifiedAt: ( new Date(session.modifiedTime)).toISOString(),
|
|
248
|
+
changes: session.changes,
|
|
249
|
+
workingDirectories: session.workingDirectories?.map(d => ( d.toString())),
|
|
250
|
+
...(session.project ? {
|
|
251
|
+
project: {
|
|
252
|
+
uri: ( session.project.uri.toString()),
|
|
253
|
+
displayName: session.project.displayName
|
|
254
|
+
}
|
|
255
|
+
} : {}),
|
|
256
|
+
...(session._meta !== undefined ? {
|
|
257
|
+
_meta: session._meta
|
|
258
|
+
} : {})
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
_makeEntryFromSummary(summary) {
|
|
263
|
+
const provider = summary.provider || AgentSession.provider(summary.resource);
|
|
264
|
+
if (!provider) {
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
provider,
|
|
269
|
+
rawId: AgentSession.id(summary.resource),
|
|
270
|
+
statusKnown: true,
|
|
271
|
+
summary
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
_isSessionInWorkspace(entry) {
|
|
275
|
+
const inWorkspace = this._computeSessionInWorkspace(entry);
|
|
276
|
+
if (!inWorkspace && readSessionMatchesByProjectRoot(entry.summary._meta) && entry.summary.project && ( URI.parse(entry.summary.project.uri)).scheme !== Schemas.file && !( this._reportedNonLocalProjects.has(entry.summary.resource))) {
|
|
277
|
+
this._reportedNonLocalProjects.add(entry.summary.resource);
|
|
278
|
+
this._logService.warn(
|
|
279
|
+
`[AgentHost] legacy session ${entry.summary.resource} has a non-local project '${entry.summary.project.uri}' and cannot be matched to a workspace folder`
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
return inWorkspace;
|
|
283
|
+
}
|
|
284
|
+
_computeSessionInWorkspace(entry) {
|
|
285
|
+
const workingDirectories = this._containmentCandidates(entry.summary);
|
|
286
|
+
const workspace = this._workspaceContextService.getWorkspace();
|
|
287
|
+
const folders = workspace.folders;
|
|
288
|
+
const configuration = workspace.configuration;
|
|
289
|
+
const multiRoot = readSessionMultiRootMetadata(entry.summary._meta);
|
|
290
|
+
if (multiRoot) {
|
|
291
|
+
if (URI.isUri(configuration)) {
|
|
292
|
+
return extUriBiasedIgnorePathCase.isEqual(( URI.parse(multiRoot.workspaceFile)), configuration);
|
|
293
|
+
}
|
|
294
|
+
return folders.length === 0 || this._matchesAnyFolder(workingDirectories, folders);
|
|
295
|
+
}
|
|
296
|
+
if (folders.length === 0) {
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
return this._matchesAnyFolder(workingDirectories, folders);
|
|
300
|
+
}
|
|
301
|
+
_filterEntriesToWorkspace() {
|
|
302
|
+
const removed = [];
|
|
303
|
+
for (const [key, entry] of this._entries) {
|
|
304
|
+
if (!this._isSessionInWorkspace(entry)) {
|
|
305
|
+
this._entries.delete(key);
|
|
306
|
+
this._pendingNewSessions.delete(key);
|
|
307
|
+
removed.push(this._toRemoval(entry));
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (removed.length > 0) {
|
|
311
|
+
this._mutationGeneration++;
|
|
312
|
+
this._onDidChangeSessions.fire({
|
|
313
|
+
removed
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
_matchesAnyFolder(workingDirectories, folders) {
|
|
318
|
+
return ( workingDirectories.some(directory => ( folders.some(
|
|
319
|
+
folder => extUriBiasedIgnorePathCase.isEqualOrParent(directory, folder.uri)
|
|
320
|
+
))));
|
|
321
|
+
}
|
|
322
|
+
_containmentCandidates(summary) {
|
|
323
|
+
const candidates = summary.workingDirectories?.map(directory => ( URI.parse(directory))) ?? [];
|
|
324
|
+
if (summary.project?.uri && readSessionMatchesByProjectRoot(summary._meta)) {
|
|
325
|
+
const project = ( URI.parse(summary.project.uri));
|
|
326
|
+
if (project.scheme === Schemas.file) {
|
|
327
|
+
candidates.push(project);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return candidates;
|
|
331
|
+
}
|
|
332
|
+
_toRemoval(entry) {
|
|
333
|
+
return {
|
|
334
|
+
provider: entry.provider,
|
|
335
|
+
rawId: entry.rawId,
|
|
336
|
+
session: AgentSession.uri(entry.provider, entry.rawId)
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
_key(provider, rawId) {
|
|
340
|
+
return `${provider}://${rawId}`;
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
AgentHostSessionListStore = ( __decorate([( __param(1, IWorkspaceContextService)), ( __param(2, ILogService))], AgentHostSessionListStore));
|
|
344
|
+
|
|
345
|
+
export { AgentHostSessionListStore };
|
|
@@ -195,7 +195,7 @@ let AgentHostSessionWorkingDirectorySynchronizer = class AgentHostSessionWorking
|
|
|
195
195
|
} = await this._workspaceTrustManagementService.getUriTrustInfo(directory);
|
|
196
196
|
if (!trusted) {
|
|
197
197
|
return (new Error(
|
|
198
|
-
localize(
|
|
198
|
+
localize(6103, "The workspace folder '{0}' is not trusted.", directory.path)
|
|
199
199
|
));
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
+
import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
6
|
+
import { AGENT_HOST_ENABLED_CONTEXT_KEY } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostEnablementService';
|
|
7
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
8
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
9
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
11
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
12
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
14
|
+
import { AgentHostSettingsSchemaRegistrar, AgentHostSettingsFileSystemProvider, AGENT_HOST_SETTINGS_SCHEME, agentHostSettingsUri } from './agentHostSettingsFileSystemProvider.js';
|
|
15
|
+
|
|
16
|
+
let AgentHostSettingsContribution = class AgentHostSettingsContribution extends Disposable {
|
|
17
|
+
static {
|
|
18
|
+
this.ID = "workbench.contrib.chat.agentHostSettingsEditor";
|
|
19
|
+
}
|
|
20
|
+
constructor(fileService, instantiationService, labelService) {
|
|
21
|
+
super();
|
|
22
|
+
const schemaRegistrar = this._register(instantiationService.createInstance(AgentHostSettingsSchemaRegistrar));
|
|
23
|
+
const provider = this._register(
|
|
24
|
+
instantiationService.createInstance(AgentHostSettingsFileSystemProvider, schemaRegistrar)
|
|
25
|
+
);
|
|
26
|
+
this._register(fileService.registerProvider(AGENT_HOST_SETTINGS_SCHEME, provider));
|
|
27
|
+
this._register(labelService.registerFormatter({
|
|
28
|
+
scheme: AGENT_HOST_SETTINGS_SCHEME,
|
|
29
|
+
formatting: {
|
|
30
|
+
label: ( localize(6104, "Host Settings")),
|
|
31
|
+
separator: "/"
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
AgentHostSettingsContribution = ( __decorate([( __param(0, IFileService)), ( __param(1, IInstantiationService)), ( __param(2, ILabelService))], AgentHostSettingsContribution));
|
|
37
|
+
registerWorkbenchContribution2(
|
|
38
|
+
AgentHostSettingsContribution.ID,
|
|
39
|
+
AgentHostSettingsContribution,
|
|
40
|
+
WorkbenchPhase.AfterRestored
|
|
41
|
+
);
|
|
42
|
+
const LOCAL_AGENT_HOST_SESSION_TYPE_RE = /^agent-host-/;
|
|
43
|
+
const agentHostSettingsPrecondition = ( ContextKeyExpr.and(ChatContextKeys.enabled, AGENT_HOST_ENABLED_CONTEXT_KEY));
|
|
44
|
+
registerAction2(class OpenAgentHostSettingsAction extends Action2 {
|
|
45
|
+
constructor() {
|
|
46
|
+
super({
|
|
47
|
+
id: "workbench.action.chat.openAgentHostSettings",
|
|
48
|
+
title: ( localize2(6105, "Open Host Settings")),
|
|
49
|
+
f1: true,
|
|
50
|
+
precondition: agentHostSettingsPrecondition,
|
|
51
|
+
menu: [{
|
|
52
|
+
id: MenuId.AgentSessionsContext,
|
|
53
|
+
group: "3_settings",
|
|
54
|
+
order: 1,
|
|
55
|
+
when: ( ContextKeyExpr.and(agentHostSettingsPrecondition, ( ContextKeyExpr.regex(ChatContextKeys.agentSessionType.key, LOCAL_AGENT_HOST_SESSION_TYPE_RE))))
|
|
56
|
+
}]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async run(accessor) {
|
|
60
|
+
const editorService = accessor.get(IEditorService);
|
|
61
|
+
await editorService.openEditor({
|
|
62
|
+
resource: agentHostSettingsUri(),
|
|
63
|
+
options: {
|
|
64
|
+
pinned: true
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service";
|
|
5
|
+
import { AbstractAgentHostConfigFileSystemProvider, AbstractAgentHostConfigSchemaRegistrar, AgentHostConfigPropertyFilter, IAgentHostConfigLike, IAgentHostSettingsLocale } from "./agentHostConfigEditor.js";
|
|
6
|
+
/** Scheme for the synthetic ambient agent-host settings file. */
|
|
7
|
+
export declare const AGENT_HOST_SETTINGS_SCHEME = "agent-host-settings";
|
|
8
|
+
/** Fixed authority identifying the single ambient local agent host. */
|
|
9
|
+
export declare const AGENT_HOST_SETTINGS_LOCAL_AUTHORITY = "local";
|
|
10
|
+
/**
|
|
11
|
+
* Build the URI used to open the ambient local agent host's settings file.
|
|
12
|
+
*
|
|
13
|
+
* URI shape: `agent-host-settings://local/settings.jsonc`
|
|
14
|
+
*/
|
|
15
|
+
export declare function agentHostSettingsUri(): URI;
|
|
16
|
+
/** Marker context: there is exactly one ambient target, so no fields are needed to identify it. */
|
|
17
|
+
interface IAmbientAgentHostSettingsContext {
|
|
18
|
+
readonly kind: "local";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Filesystem provider serving a synthetic JSONC document representing the
|
|
22
|
+
* root configuration of the ambient local {@link IAgentHostService}. Unlike
|
|
23
|
+
* the sessions-window's provider-keyed equivalent, there is exactly one
|
|
24
|
+
* target, the ambient agent host, so the provider maintains its own
|
|
25
|
+
* optimistically-updated cache of the root config rather than resolving a
|
|
26
|
+
* per-request target from a registry.
|
|
27
|
+
*/
|
|
28
|
+
export declare class AgentHostSettingsFileSystemProvider extends AbstractAgentHostConfigFileSystemProvider<IAmbientAgentHostSettingsContext, IAgentHostService> {
|
|
29
|
+
private readonly _schemaRegistrar;
|
|
30
|
+
private readonly _agentHostService;
|
|
31
|
+
protected readonly _schemeLabel = "agent-host-settings";
|
|
32
|
+
protected readonly _traceTag = "AgentHostSettings";
|
|
33
|
+
protected readonly _locale: IAgentHostSettingsLocale;
|
|
34
|
+
private readonly _onDidChangeRootConfig;
|
|
35
|
+
/** Last-known root config state (schema + values), kept in sync with {@link IAgentHostService.rootState}. */
|
|
36
|
+
private _rootConfig;
|
|
37
|
+
constructor(_schemaRegistrar: AgentHostSettingsSchemaRegistrar, _agentHostService: IAgentHostService, logService: ILogService);
|
|
38
|
+
private _syncRootConfig;
|
|
39
|
+
protected _parseUri(resource: URI): IAmbientAgentHostSettingsContext | undefined;
|
|
40
|
+
protected _resolveTarget(): IAgentHostService;
|
|
41
|
+
protected _missingTargetError(): Error;
|
|
42
|
+
protected _serialize(): string;
|
|
43
|
+
protected _watchChanges(_target: IAgentHostService, _ctx: IAmbientAgentHostSettingsContext, fire: () => void): IDisposable;
|
|
44
|
+
protected _ensureSchemaRegistered(target: IAgentHostService): void;
|
|
45
|
+
protected _hasConfig(): boolean;
|
|
46
|
+
protected _replaceConfig(_target: IAgentHostService, _ctx: IAmbientAgentHostSettingsContext, values: Record<string, unknown>): Promise<void>;
|
|
47
|
+
protected _describeForTrace(): string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Keeps the ambient local agent host's JSON schema registered so editors of
|
|
51
|
+
* the synthetic `agent-host-settings://local/settings.jsonc` document get
|
|
52
|
+
* completions, hover, and validation.
|
|
53
|
+
*/
|
|
54
|
+
export declare class AgentHostSettingsSchemaRegistrar extends AbstractAgentHostConfigSchemaRegistrar<IAgentHostService> {
|
|
55
|
+
private readonly _agentHostService;
|
|
56
|
+
constructor(_agentHostService: IAgentHostService);
|
|
57
|
+
protected _propertyFilter(): AgentHostConfigPropertyFilter;
|
|
58
|
+
protected _settingsUri(): string;
|
|
59
|
+
protected _schemaId(): string;
|
|
60
|
+
protected _getConfig(target: IAgentHostService): IAgentHostConfigLike | undefined;
|
|
61
|
+
}
|
|
62
|
+
export {};
|