@codingame/monaco-vscode-chat-service-override 33.0.9 → 34.0.1
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 +19 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +32 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +77 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +84 -17
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +235 -190
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +3 -2
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +23 -4
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +22 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +107 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +272 -49
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +2 -2
- package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.d.ts → agentHostResourceService.d.ts} +26 -0
- package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +11 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +13 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +26 -18
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +119 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +135 -19
- package/vscode/src/vs/platform/agentHost/common/agentService.js +8 -2
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +5 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +85 -22
- package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +36 -0
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +12 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +81 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +103 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +86 -10
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +129 -37
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +72 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.js +30 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{reducers.js → channels-session/reducer.js} +99 -168
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +110 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.d.ts → common/errors.d.ts} +13 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.js → common/errors.js} +1 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +17 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +33 -8
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +2 -3
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +36 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +6 -3
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +3 -3
- package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
- package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +4 -1
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +9 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +21 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +28 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +31 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +49 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +182 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +784 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +18 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +305 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +120 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +100 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
- 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 +106 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +22 -36
- 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 +21 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +38 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- 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 +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +40 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +23 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +119 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +44 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +38 -28
- 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/aiCustomization/aiCustomizationDebugPanel.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +22 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +112 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +62 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +149 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +13 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +15 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +78 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +140 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +11 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +59 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +440 -357
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
- 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/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 +13 -13
- 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 +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.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/chatGoalSummaryService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +28 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +187 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +41 -0
- 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/chatQuotaNotification.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +346 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +72 -29
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +144 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +126 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +32 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +40 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +25 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- 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/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +1 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +12 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +14 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +56 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +33 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +1 -1
- 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/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/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +22 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- 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.d.ts +14 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +55 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +54 -12
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +40 -4
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +30 -8
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +205 -46
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +153 -38
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +70 -37
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +6 -28
- 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 +5 -5
- 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 +150 -150
- 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/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/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/terminalChatAccessibilityHelp.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +21 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +122 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +232 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +225 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +143 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +205 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +260 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +98 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +226 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +177 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +102 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +55 -0
- 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.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +31 -9
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +177 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +518 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +297 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2961 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +63 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +14 -14
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +223 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +81 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +63 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +349 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +75 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +192 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +89 -0
- package/vscode/src/vs/workbench/services/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +226 -9
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +0 -30
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +0 -119
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +0 -552
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +0 -83
|
@@ -5,7 +5,7 @@ import { SequencerByKey } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
5
5
|
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
6
6
|
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
7
7
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
8
|
-
import { joinPath, isEqual,
|
|
8
|
+
import { joinPath, isEqual, isEqualOrParent, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
9
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
10
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
11
11
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
@@ -83,8 +83,16 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
83
83
|
return this._getRepoCacheDirForReference(marketplace);
|
|
84
84
|
}
|
|
85
85
|
getPluginInstallUri(plugin) {
|
|
86
|
+
if (plugin.sourceDescriptor.kind !== PluginSourceKind.RelativePath) {
|
|
87
|
+
return this.getPluginSourceInstallUri(plugin.sourceDescriptor);
|
|
88
|
+
}
|
|
86
89
|
const repoDir = this.getRepositoryUri(plugin.marketplaceReference, plugin.marketplaceType);
|
|
87
|
-
|
|
90
|
+
const normalizedSource = plugin.source.trim().replace(/^\.?\/+|\/+$/g, "");
|
|
91
|
+
const pluginDir = normalizedSource ? joinPath(repoDir, normalizedSource) : repoDir;
|
|
92
|
+
if (!isEqualOrParent(pluginDir, repoDir)) {
|
|
93
|
+
throw ( new Error(`Invalid plugin source path '${plugin.source}'`));
|
|
94
|
+
}
|
|
95
|
+
return pluginDir;
|
|
88
96
|
}
|
|
89
97
|
async ensureRepository(marketplace, options) {
|
|
90
98
|
await this._migrationDone;
|
|
@@ -98,9 +106,15 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
98
106
|
if (marketplace.kind === MarketplaceReferenceKind.LocalFileUri) {
|
|
99
107
|
throw ( new Error(`Local marketplace repository does not exist: ${repoDir.fsPath}`));
|
|
100
108
|
}
|
|
101
|
-
const progressTitle = options?.progressTitle ?? ( localize(
|
|
109
|
+
const progressTitle = options?.progressTitle ?? ( localize(5250, "Preparing plugin marketplace '{0}'...", marketplace.displayLabel));
|
|
102
110
|
const failureLabel = options?.failureLabel ?? marketplace.displayLabel;
|
|
103
|
-
await this._cloneRepository(
|
|
111
|
+
await this._cloneRepository(
|
|
112
|
+
repoDir,
|
|
113
|
+
marketplace.cloneUrl,
|
|
114
|
+
progressTitle,
|
|
115
|
+
failureLabel,
|
|
116
|
+
marketplace.ref
|
|
117
|
+
);
|
|
104
118
|
this._updateMarketplaceIndex(marketplace, repoDir, options?.marketplaceType);
|
|
105
119
|
return repoDir;
|
|
106
120
|
});
|
|
@@ -123,7 +137,7 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
123
137
|
try {
|
|
124
138
|
return await this._progressService.withProgress({
|
|
125
139
|
location: ProgressLocation.Notification,
|
|
126
|
-
title: ( localize(
|
|
140
|
+
title: ( localize(5251, "Updating plugin '{0}'...", updateLabel)),
|
|
127
141
|
cancellable: true
|
|
128
142
|
}, () => this._pluginGit.pull(repoDir, cts.token), () => cts.dispose(true));
|
|
129
143
|
} finally {
|
|
@@ -138,13 +152,13 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
138
152
|
this._notificationService.notify({
|
|
139
153
|
severity: Severity.Error,
|
|
140
154
|
message: ( localize(
|
|
141
|
-
|
|
155
|
+
5252,
|
|
142
156
|
"Failed to update plugin '{0}': {1}",
|
|
143
157
|
options?.failureLabel ?? updateLabel,
|
|
144
158
|
err?.message ?? String(err)
|
|
145
159
|
)),
|
|
146
160
|
actions: {
|
|
147
|
-
primary: [( new Action("showGitOutput", ( localize(
|
|
161
|
+
primary: [( new Action("showGitOutput", ( localize(5253, "Show Git Output")), undefined, true, () => {
|
|
148
162
|
this._commandService.executeCommand("git.showOutput");
|
|
149
163
|
}))]
|
|
150
164
|
}
|
|
@@ -223,13 +237,13 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
223
237
|
this._notificationService.notify({
|
|
224
238
|
severity: Severity.Error,
|
|
225
239
|
message: ( localize(
|
|
226
|
-
|
|
240
|
+
5254,
|
|
227
241
|
"Failed to install plugin '{0}': {1}",
|
|
228
242
|
failureLabel,
|
|
229
243
|
err?.message ?? String(err)
|
|
230
244
|
)),
|
|
231
245
|
actions: {
|
|
232
|
-
primary: [( new Action("showGitOutput", ( localize(
|
|
246
|
+
primary: [( new Action("showGitOutput", ( localize(5253, "Show Git Output")), undefined, true, () => {
|
|
233
247
|
this._commandService.executeCommand("git.showOutput");
|
|
234
248
|
}))]
|
|
235
249
|
}
|
|
@@ -239,14 +253,6 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
239
253
|
cts.dispose();
|
|
240
254
|
}
|
|
241
255
|
}
|
|
242
|
-
_getPluginDir(repoDir, source) {
|
|
243
|
-
const normalizedSource = source.trim().replace(/^\.?\/+|\/+$/g, "");
|
|
244
|
-
const pluginDir = normalizedSource ? joinPath(repoDir, normalizedSource) : repoDir;
|
|
245
|
-
if (!isEqualOrParent(pluginDir, repoDir)) {
|
|
246
|
-
throw ( new Error(`Invalid plugin source path '${source}'`));
|
|
247
|
-
}
|
|
248
|
-
return pluginDir;
|
|
249
|
-
}
|
|
250
256
|
getPluginSourceInstallUri(sourceDescriptor) {
|
|
251
257
|
return this.getPluginSource(sourceDescriptor.kind).getInstallUri(this._cacheRoot, sourceDescriptor);
|
|
252
258
|
}
|
|
@@ -92,7 +92,7 @@ let UpdatePluginAction = class UpdatePluginAction extends Action {
|
|
|
92
92
|
pluginInstallService,
|
|
93
93
|
pluginMarketplaceService
|
|
94
94
|
) {
|
|
95
|
-
super(UpdatePluginAction_1.ID, ( localize(
|
|
95
|
+
super(UpdatePluginAction_1.ID, ( localize(5255, "Update")), "extension-action label prominent install");
|
|
96
96
|
this.plugin = plugin;
|
|
97
97
|
this.liveMarketplacePlugin = liveMarketplacePlugin;
|
|
98
98
|
this.pluginInstallService = pluginInstallService;
|
|
@@ -120,7 +120,7 @@ let ManagePluginAction = class ManagePluginAction extends Action {
|
|
|
120
120
|
this.getActionGroups = getActionGroups;
|
|
121
121
|
this.instantiationService = instantiationService;
|
|
122
122
|
this._actionViewItem = null;
|
|
123
|
-
this.tooltip = ( localize(
|
|
123
|
+
this.tooltip = ( localize(5256, "Manage"));
|
|
124
124
|
}
|
|
125
125
|
createActionViewItem(options) {
|
|
126
126
|
this._actionViewItem = this.instantiationService.createInstance(DropDownActionViewItem, this, options);
|
|
@@ -357,7 +357,7 @@ let AgentPluginsListView = class AgentPluginsListView extends AbstractExtensions
|
|
|
357
357
|
return item?.name ?? "";
|
|
358
358
|
},
|
|
359
359
|
getWidgetAriaLabel() {
|
|
360
|
-
return localize(
|
|
360
|
+
return localize(5257, "Agent Plugins");
|
|
361
361
|
}
|
|
362
362
|
},
|
|
363
363
|
overrideStyles: getLocationBasedViewColors(this.viewDescriptorService.getViewLocationById(this.id)).listOverrideStyles
|
|
@@ -532,7 +532,7 @@ let AgentPluginsListView = class AgentPluginsListView extends AbstractExtensions
|
|
|
532
532
|
this.bodyTemplate.pluginsList.classList.toggle("hidden", count === 0);
|
|
533
533
|
this.bodyTemplate.messageContainer.classList.toggle("hidden", count > 0);
|
|
534
534
|
if (count === 0 && this.isBodyVisible()) {
|
|
535
|
-
this.bodyTemplate.messageBox.textContent = ( localize(
|
|
535
|
+
this.bodyTemplate.messageBox.textContent = ( localize(5258, "No agent plugins found."));
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
}
|
|
@@ -542,8 +542,8 @@ class AgentPluginsBrowseCommand extends Action2 {
|
|
|
542
542
|
constructor() {
|
|
543
543
|
super({
|
|
544
544
|
id: "workbench.agentPlugins.browse",
|
|
545
|
-
title: ( localize2(
|
|
546
|
-
tooltip: ( localize2(
|
|
545
|
+
title: ( localize2(5259, "Agent Plugins")),
|
|
546
|
+
tooltip: ( localize2(5260, "Browse Agent Plugins")),
|
|
547
547
|
icon: Codicon.search,
|
|
548
548
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
549
549
|
menu: [{
|
|
@@ -566,8 +566,8 @@ class CheckForPluginUpdatesCommand extends Action2 {
|
|
|
566
566
|
constructor() {
|
|
567
567
|
super({
|
|
568
568
|
id: "workbench.agentPlugins.checkForUpdates",
|
|
569
|
-
title: ( localize2(
|
|
570
|
-
category: ( localize2(
|
|
569
|
+
title: ( localize2(5261, "Update Plugins")),
|
|
570
|
+
category: ( localize2(5262, "Chat")),
|
|
571
571
|
precondition: ChatContextKeys.enabled,
|
|
572
572
|
f1: true
|
|
573
573
|
});
|
|
@@ -580,8 +580,8 @@ class ForceUpdatePluginsCommand extends Action2 {
|
|
|
580
580
|
constructor() {
|
|
581
581
|
super({
|
|
582
582
|
id: "workbench.agentPlugins.forceUpdate",
|
|
583
|
-
title: ( localize2(
|
|
584
|
-
category: ( localize2(
|
|
583
|
+
title: ( localize2(5263, "Update Plugins (Force)")),
|
|
584
|
+
category: ( localize2(5262, "Chat")),
|
|
585
585
|
precondition: ChatContextKeys.enabled,
|
|
586
586
|
f1: true
|
|
587
587
|
});
|
|
@@ -607,7 +607,7 @@ let AgentPluginsViewsContribution = class AgentPluginsViewsContribution extends
|
|
|
607
607
|
registerAction2(ForceUpdatePluginsCommand);
|
|
608
608
|
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
609
609
|
id: InstalledAgentPluginsViewId,
|
|
610
|
-
name: ( localize2(
|
|
610
|
+
name: ( localize2(5264, "Agent Plugins - Installed")),
|
|
611
611
|
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{
|
|
612
612
|
installedOnly: true
|
|
613
613
|
}])),
|
|
@@ -617,7 +617,7 @@ let AgentPluginsViewsContribution = class AgentPluginsViewsContribution extends
|
|
|
617
617
|
canToggleVisibility: true
|
|
618
618
|
}, {
|
|
619
619
|
id: "workbench.views.agentPlugins.default.marketplace",
|
|
620
|
-
name: ( localize2(
|
|
620
|
+
name: ( localize2(5265, "Agent Plugins")),
|
|
621
621
|
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{}])),
|
|
622
622
|
when: ( ContextKeyExpr.and(DefaultViewsContext, ( HasInstalledAgentPluginsContext.toNegated()), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
623
623
|
weight: 30,
|
|
@@ -626,7 +626,7 @@ let AgentPluginsViewsContribution = class AgentPluginsViewsContribution extends
|
|
|
626
626
|
hideByDefault: true
|
|
627
627
|
}, {
|
|
628
628
|
id: "workbench.views.agentPlugins.marketplace",
|
|
629
|
-
name: ( localize2(
|
|
629
|
+
name: ( localize2(5265, "Agent Plugins")),
|
|
630
630
|
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{}])),
|
|
631
631
|
when: ( ContextKeyExpr.and(SearchAgentPluginsContext, ( ChatContextKeys.Setup.hidden.negate())))
|
|
632
632
|
}], VIEW_CONTAINER);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
5
|
+
import { type ICustomizationSyncProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService";
|
|
6
|
+
/**
|
|
7
|
+
* Per-harness sync provider that tracks which local customization URIs the
|
|
8
|
+
* user has explicitly **disabled** for syncing to a particular agent host.
|
|
9
|
+
*
|
|
10
|
+
* Auto-sync semantics: every local customization is synced by default.
|
|
11
|
+
* The persisted set captures only the user's opt-outs.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AgentCustomizationSyncProvider extends Disposable implements ICustomizationSyncProvider {
|
|
14
|
+
private readonly _storageService;
|
|
15
|
+
private readonly _onDidChange;
|
|
16
|
+
readonly onDidChange: Event<void>;
|
|
17
|
+
private readonly _storageKey;
|
|
18
|
+
private _disabled;
|
|
19
|
+
constructor(harnessId: string, _storageService: IStorageService);
|
|
20
|
+
isDisabled(uri: URI): boolean;
|
|
21
|
+
setDisabled(uri: URI, disabled: boolean): void;
|
|
22
|
+
private _load;
|
|
23
|
+
private _persist;
|
|
24
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
import { Emitter } 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 { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
5
|
+
|
|
6
|
+
const SYNC_STORAGE_KEY_PREFIX = "customizationSync.disabled.";
|
|
7
|
+
class AgentCustomizationSyncProvider extends Disposable {
|
|
8
|
+
constructor(harnessId, _storageService) {
|
|
9
|
+
super();
|
|
10
|
+
this._storageService = _storageService;
|
|
11
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
12
|
+
this.onDidChange = this._onDidChange.event;
|
|
13
|
+
this._storageKey = SYNC_STORAGE_KEY_PREFIX + harnessId;
|
|
14
|
+
this._disabled = this._load();
|
|
15
|
+
}
|
|
16
|
+
isDisabled(uri) {
|
|
17
|
+
return ( this._disabled.has(( uri.toString())));
|
|
18
|
+
}
|
|
19
|
+
setDisabled(uri, disabled) {
|
|
20
|
+
const key = ( uri.toString());
|
|
21
|
+
const had = ( this._disabled.has(key));
|
|
22
|
+
if (disabled && !had) {
|
|
23
|
+
this._disabled.add(key);
|
|
24
|
+
} else if (!disabled && had) {
|
|
25
|
+
this._disabled.delete(key);
|
|
26
|
+
} else {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this._persist();
|
|
30
|
+
this._onDidChange.fire();
|
|
31
|
+
}
|
|
32
|
+
_load() {
|
|
33
|
+
const stored = this._storageService.get(this._storageKey, StorageScope.PROFILE);
|
|
34
|
+
if (!stored) {
|
|
35
|
+
return ( new Set());
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
const parsed = JSON.parse(stored);
|
|
39
|
+
if (Array.isArray(parsed)) {
|
|
40
|
+
return ( new Set(parsed.filter(v => typeof v === "string")));
|
|
41
|
+
}
|
|
42
|
+
} catch {}
|
|
43
|
+
return ( new Set());
|
|
44
|
+
}
|
|
45
|
+
_persist() {
|
|
46
|
+
this._storageService.store(
|
|
47
|
+
this._storageKey,
|
|
48
|
+
JSON.stringify([...this._disabled]),
|
|
49
|
+
StorageScope.PROFILE,
|
|
50
|
+
StorageTarget.MACHINE
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { AgentCustomizationSyncProvider };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
6
|
+
import type { SessionActiveClient, ToolDefinition } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
7
|
+
import type { ClientPluginCustomization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
8
|
+
import { ICustomizationSyncProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService";
|
|
9
|
+
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
10
|
+
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
11
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
12
|
+
import { IAgentHostActiveClientService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service";
|
|
13
|
+
/** The exposed `syncProvider` is the same instance the service uses to resolve customizations; the contribution wires it into its harness so opt-out toggles propagate. */
|
|
14
|
+
export interface IAgentRegistration extends IDisposable {
|
|
15
|
+
readonly syncProvider: ICustomizationSyncProvider;
|
|
16
|
+
}
|
|
17
|
+
export declare class AgentHostActiveClientService extends Disposable implements IAgentHostActiveClientService {
|
|
18
|
+
private readonly _promptsService;
|
|
19
|
+
private readonly _agentPluginService;
|
|
20
|
+
private readonly _storageService;
|
|
21
|
+
private readonly _instantiationService;
|
|
22
|
+
readonly _serviceBrand: undefined;
|
|
23
|
+
private readonly _customizationsByType;
|
|
24
|
+
readonly clientTools: IObservable<readonly ToolDefinition[]>;
|
|
25
|
+
constructor(toolsService: ILanguageModelToolsService, configurationService: IConfigurationService, _promptsService: IPromptsService, _agentPluginService: IAgentPluginService, _storageService: IStorageService, _instantiationService: IInstantiationService);
|
|
26
|
+
registerForAgent(sessionType: string): IAgentRegistration;
|
|
27
|
+
private _setCustomizations;
|
|
28
|
+
getActiveClient(sessionType: string, clientId: string): SessionActiveClient;
|
|
29
|
+
getCustomizations(sessionType: string): IObservable<readonly ClientPluginCustomization[]>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
8
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
10
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
+
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
12
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
13
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
14
|
+
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
15
|
+
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
16
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
17
|
+
import { AgentCustomizationSyncProvider } from './agentCustomizationSyncProvider.js';
|
|
18
|
+
import { resolveCustomizationRefs } from './agentHostLocalCustomizations.js';
|
|
19
|
+
import { toolDataToDefinition } from './agentHostToolUtils.js';
|
|
20
|
+
import { SyncedCustomizationBundler } from './syncedCustomizationBundler.js';
|
|
21
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
22
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
23
|
+
|
|
24
|
+
let AgentHostActiveClientService = class AgentHostActiveClientService extends Disposable {
|
|
25
|
+
constructor(
|
|
26
|
+
toolsService,
|
|
27
|
+
configurationService,
|
|
28
|
+
_promptsService,
|
|
29
|
+
_agentPluginService,
|
|
30
|
+
_storageService,
|
|
31
|
+
_instantiationService
|
|
32
|
+
) {
|
|
33
|
+
super();
|
|
34
|
+
this._promptsService = _promptsService;
|
|
35
|
+
this._agentPluginService = _agentPluginService;
|
|
36
|
+
this._storageService = _storageService;
|
|
37
|
+
this._instantiationService = _instantiationService;
|
|
38
|
+
this._customizationsByType = observableValue("agentHostCustomizationsByType", ( new Map()));
|
|
39
|
+
const allToolsObs = toolsService.observeTools(undefined);
|
|
40
|
+
const allowlistObs = observableConfigValue(ChatConfiguration.AgentHostClientTools, [], configurationService);
|
|
41
|
+
this.clientTools = derived(reader => {
|
|
42
|
+
const allowlist = ( new Set(allowlistObs.read(reader)));
|
|
43
|
+
return ( allToolsObs.read(reader).filter(t => t.toolReferenceName !== undefined && ( allowlist.has(t.toolReferenceName))).map(toolDataToDefinition));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
registerForAgent(sessionType) {
|
|
47
|
+
const store = ( new DisposableStore());
|
|
48
|
+
const syncProvider = store.add(( new AgentCustomizationSyncProvider(sessionType, this._storageService)));
|
|
49
|
+
const bundler = store.add(
|
|
50
|
+
this._instantiationService.createInstance(SyncedCustomizationBundler, sessionType)
|
|
51
|
+
);
|
|
52
|
+
const customizations = observableValue("agentCustomizations", []);
|
|
53
|
+
let updateSeq = 0;
|
|
54
|
+
const updateCustomizations = async () => {
|
|
55
|
+
const seq = ++updateSeq;
|
|
56
|
+
try {
|
|
57
|
+
const refs = await resolveCustomizationRefs(
|
|
58
|
+
this._promptsService,
|
|
59
|
+
syncProvider,
|
|
60
|
+
this._agentPluginService,
|
|
61
|
+
bundler,
|
|
62
|
+
sessionType
|
|
63
|
+
);
|
|
64
|
+
if (seq !== updateSeq) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (equals(customizations.get(), refs)) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
customizations.set(refs, undefined);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
onUnexpectedError(err);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
store.add(syncProvider.onDidChange(() => updateCustomizations()));
|
|
76
|
+
store.add(Event.any(
|
|
77
|
+
this._promptsService.onDidChangeCustomAgents,
|
|
78
|
+
this._promptsService.onDidChangeSlashCommands,
|
|
79
|
+
this._promptsService.onDidChangeSkills,
|
|
80
|
+
this._promptsService.onDidChangeInstructions
|
|
81
|
+
)(() => updateCustomizations()));
|
|
82
|
+
updateCustomizations();
|
|
83
|
+
store.add(this._setCustomizations(sessionType, customizations));
|
|
84
|
+
return {
|
|
85
|
+
syncProvider,
|
|
86
|
+
dispose: () => store.dispose()
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
_setCustomizations(sessionType, customizations) {
|
|
90
|
+
const next = ( new Map(this._customizationsByType.get()));
|
|
91
|
+
next.set(sessionType, customizations);
|
|
92
|
+
this._customizationsByType.set(next, undefined);
|
|
93
|
+
return toDisposable(() => {
|
|
94
|
+
const current = this._customizationsByType.get();
|
|
95
|
+
if (current.get(sessionType) !== customizations) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const removed = ( new Map(current));
|
|
99
|
+
removed.delete(sessionType);
|
|
100
|
+
this._customizationsByType.set(removed, undefined);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
getActiveClient(sessionType, clientId) {
|
|
104
|
+
return {
|
|
105
|
+
clientId,
|
|
106
|
+
tools: [...this.clientTools.get()],
|
|
107
|
+
customizations: [...(this._customizationsByType.get().get(sessionType)?.get() ?? [])]
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
getCustomizations(sessionType) {
|
|
111
|
+
return derived(
|
|
112
|
+
reader => this._customizationsByType.read(reader).get(sessionType)?.read(reader) ?? EMPTY_CUSTOMIZATIONS
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
AgentHostActiveClientService = ( __decorate([( __param(0, ILanguageModelToolsService)), ( __param(1, IConfigurationService)), ( __param(2, IPromptsService)), ( __param(3, IAgentPluginService)), ( __param(4, IStorageService)), ( __param(5, IInstantiationService))], AgentHostActiveClientService));
|
|
117
|
+
const EMPTY_CUSTOMIZATIONS = ( Object.freeze([]));
|
|
118
|
+
|
|
119
|
+
export { AgentHostActiveClientService };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import type { Customization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
4
|
+
import { AgentCustomization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
5
|
+
import { IAgentHostCustomizationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.service";
|
|
6
|
+
export declare class NullAgentHostCustomizationService implements IAgentHostCustomizationService {
|
|
7
|
+
readonly _serviceBrand: undefined;
|
|
8
|
+
readonly onDidChangeCustomAgents: Event<any>;
|
|
9
|
+
readonly onDidChangeCustomizations: Event<any>;
|
|
10
|
+
getCustomAgents(_sessionResource: URI): readonly AgentCustomization[];
|
|
11
|
+
getCustomizations(_sessionResource: URI): readonly Customization[];
|
|
12
|
+
getWorkingDirectory(sessionResource: URI): string | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import '../../../../../../platform/agentHost/common/agentService.js';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-root/state';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-terminal/state';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-resource-watch/state';
|
|
11
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
12
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
14
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
15
|
+
|
|
16
|
+
class NullAgentHostCustomizationService {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.onDidChangeCustomAgents = Event.None;
|
|
19
|
+
this.onDidChangeCustomizations = Event.None;
|
|
20
|
+
}
|
|
21
|
+
getCustomAgents(_sessionResource) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
getCustomizations(_sessionResource) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
getWorkingDirectory(sessionResource) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { NullAgentHostCustomizationService };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { type ClientPluginCustomization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
4
|
+
import { AICustomizationSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService";
|
|
5
|
+
import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
6
|
+
import { PromptsStorage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
7
|
+
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
8
|
+
import { type ICustomizationSyncProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService";
|
|
9
|
+
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
10
|
+
import type { SyncedCustomizationBundler } from "./syncedCustomizationBundler.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prompt types that participate in auto-sync to an agent host harness.
|
|
13
|
+
*
|
|
14
|
+
* Hooks are intentionally excluded — bundling hooks requires merging into
|
|
15
|
+
* `hooks/hooks.json` (see {@link SyncedCustomizationBundler}).
|
|
16
|
+
*/
|
|
17
|
+
export declare const SYNCABLE_PROMPT_TYPES: readonly PromptsType[];
|
|
18
|
+
/**
|
|
19
|
+
* Storage sources whose contents are auto-synced. Extension and built-in
|
|
20
|
+
* customizations are included so the agent host has the same skills,
|
|
21
|
+
* instructions, and agents available as the local VS Code client.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SYNCABLE_STORAGE_SOURCES: readonly PromptsStorage[];
|
|
24
|
+
export interface ILocalCustomizationFile {
|
|
25
|
+
readonly uri: URI;
|
|
26
|
+
readonly type: PromptsType;
|
|
27
|
+
readonly source: AICustomizationSource;
|
|
28
|
+
readonly disabled: boolean;
|
|
29
|
+
readonly pluginUri?: URI;
|
|
30
|
+
readonly extensionId?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Enumerates all local customization files eligible for auto-sync to an
|
|
34
|
+
* agent host harness, annotating each with whether the user has opted out.
|
|
35
|
+
*
|
|
36
|
+
* This is the single source of truth used by both the AI Customization view
|
|
37
|
+
* (to render disable affordances) and the agent host wire (to compute the
|
|
38
|
+
* `customizations` set published via `activeClientChanged`).
|
|
39
|
+
*
|
|
40
|
+
* Built-in skills bundled with the Agents app (only present when the
|
|
41
|
+
* sessions-aware prompts service is in play) are also enumerated so that
|
|
42
|
+
* `/create-pr`, `/merge`, etc. are available to every agent host without
|
|
43
|
+
* any per-provider plumbing. In the regular VS Code workbench window the
|
|
44
|
+
* built-in lookup returns nothing and this is a no-op.
|
|
45
|
+
*/
|
|
46
|
+
export declare function enumerateLocalCustomizationsForHarness(promptsService: IPromptsService, syncProvider: ICustomizationSyncProvider, sessionType: string, token: CancellationToken): Promise<readonly ILocalCustomizationFile[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Resolves the customization refs to include in an `activeClientChanged`
|
|
49
|
+
* message.
|
|
50
|
+
*
|
|
51
|
+
* Every eligible local file is synced unless the user opted out. Files
|
|
52
|
+
* belonging to installed plugins are de-duped to a single plugin ref;
|
|
53
|
+
* remaining loose files are bundled into a synthetic Open Plugin.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveCustomizationRefs(promptsService: IPromptsService, syncProvider: ICustomizationSyncProvider, agentPluginService: IAgentPluginService, bundler: SyncedCustomizationBundler, sessionType: string): Promise<ClientPluginCustomization[]>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
|
|
2
|
+
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
3
|
+
import { isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
4
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-root/state';
|
|
5
|
+
import { CustomizationType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-terminal/state';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-resource-watch/state';
|
|
9
|
+
import { customizationId } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
10
|
+
import { BUILTIN_STORAGE, AICustomizationSources } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
11
|
+
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
12
|
+
import { PromptsStorage, matchesSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
13
|
+
|
|
14
|
+
const SYNCABLE_PROMPT_TYPES = [
|
|
15
|
+
PromptsType.agent,
|
|
16
|
+
PromptsType.skill,
|
|
17
|
+
PromptsType.instructions,
|
|
18
|
+
PromptsType.prompt
|
|
19
|
+
];
|
|
20
|
+
const SYNCABLE_STORAGE_SOURCES = [PromptsStorage.plugin, PromptsStorage.extension];
|
|
21
|
+
async function enumerateLocalCustomizationsForHarness(promptsService, syncProvider, sessionType, token) {
|
|
22
|
+
const result = [];
|
|
23
|
+
for (const type of SYNCABLE_PROMPT_TYPES) {
|
|
24
|
+
const lists = await Promise.all(( SYNCABLE_STORAGE_SOURCES.map(storage => promptsService.listPromptFilesForStorage(type, storage, token))));
|
|
25
|
+
for (let i = 0; i < lists.length; i++) {
|
|
26
|
+
const source = SYNCABLE_STORAGE_SOURCES[i];
|
|
27
|
+
for (const file of lists[i]) {
|
|
28
|
+
if (matchesSessionType(file.sessionTypes, sessionType)) {
|
|
29
|
+
result.push({
|
|
30
|
+
uri: file.uri,
|
|
31
|
+
type,
|
|
32
|
+
source,
|
|
33
|
+
pluginUri: file.pluginUri,
|
|
34
|
+
extensionId: file.extension?.identifier.value,
|
|
35
|
+
disabled: syncProvider.isDisabled(file.uri)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
let builtinSkills = [];
|
|
42
|
+
try {
|
|
43
|
+
builtinSkills = await promptsService.listPromptFilesForStorage(PromptsType.skill, BUILTIN_STORAGE, token);
|
|
44
|
+
} catch {
|
|
45
|
+
builtinSkills = [];
|
|
46
|
+
}
|
|
47
|
+
for (const file of builtinSkills) {
|
|
48
|
+
if (matchesSessionType(file.sessionTypes, sessionType)) {
|
|
49
|
+
result.push({
|
|
50
|
+
uri: file.uri,
|
|
51
|
+
type: PromptsType.skill,
|
|
52
|
+
source: BUILTIN_STORAGE,
|
|
53
|
+
disabled: syncProvider.isDisabled(file.uri)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
async function resolveCustomizationRefs(promptsService, syncProvider, agentPluginService, bundler, sessionType) {
|
|
60
|
+
const enumerated = await enumerateLocalCustomizationsForHarness(promptsService, syncProvider, sessionType, CancellationToken.None);
|
|
61
|
+
const enabled = enumerated.filter(e => !e.disabled);
|
|
62
|
+
if (enabled.length === 0) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const plugins = agentPluginService.plugins.get();
|
|
66
|
+
const pluginRefs = ( new Map());
|
|
67
|
+
const looseFiles = [];
|
|
68
|
+
for (const entry of enabled) {
|
|
69
|
+
if (entry.source === AICustomizationSources.plugin) {
|
|
70
|
+
const plugin = plugins.find(p => isEqualOrParent(entry.uri, p.uri));
|
|
71
|
+
if (!plugin) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (syncProvider.isDisabled(plugin.uri)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const key = ( plugin.uri.toString());
|
|
78
|
+
if (!( pluginRefs.has(key))) {
|
|
79
|
+
pluginRefs.set(key, {
|
|
80
|
+
type: CustomizationType.Plugin,
|
|
81
|
+
id: customizationId(key),
|
|
82
|
+
uri: key,
|
|
83
|
+
name: plugin.label,
|
|
84
|
+
enabled: true
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
looseFiles.push({
|
|
89
|
+
uri: entry.uri,
|
|
90
|
+
type: entry.type
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const refs = [...( pluginRefs.values())];
|
|
95
|
+
if (looseFiles.length > 0) {
|
|
96
|
+
const result = await bundler.bundle(looseFiles);
|
|
97
|
+
if (result) {
|
|
98
|
+
refs.push(result.ref);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return refs;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { SYNCABLE_PROMPT_TYPES, SYNCABLE_STORAGE_SOURCES, enumerateLocalCustomizationsForHarness, resolveCustomizationRefs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|