@codingame/monaco-vscode-chat-service-override 33.0.8 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable, DisposableMap, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
+
import { AgentSession } from '../../../../../../platform/agentHost/common/agentService.js';
|
|
6
|
+
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
7
|
+
import { fromAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
8
|
+
import { agentHostAgentPickerStorageKey } from '../../../../../../platform/agentHost/common/customAgents.js';
|
|
9
|
+
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
10
|
+
import { StateComponents } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
11
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
12
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
13
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
14
|
+
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
15
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
16
|
+
import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
17
|
+
import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
18
|
+
import { IAgentHostUntitledProvisionalSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service';
|
|
19
|
+
|
|
20
|
+
const AGENT_HOST_SESSION_SCHEME_PREFIX = "agent-host-";
|
|
21
|
+
let AgentHostModeSynchronizer = class AgentHostModeSynchronizer extends Disposable {
|
|
22
|
+
static {
|
|
23
|
+
this.ID = "workbench.contrib.agentHostModeSynchronizer";
|
|
24
|
+
}
|
|
25
|
+
constructor(
|
|
26
|
+
_chatWidgetService,
|
|
27
|
+
_agentHostService,
|
|
28
|
+
_provisionalSessionService,
|
|
29
|
+
_storageService,
|
|
30
|
+
environmentService
|
|
31
|
+
) {
|
|
32
|
+
super();
|
|
33
|
+
this._chatWidgetService = _chatWidgetService;
|
|
34
|
+
this._agentHostService = _agentHostService;
|
|
35
|
+
this._provisionalSessionService = _provisionalSessionService;
|
|
36
|
+
this._storageService = _storageService;
|
|
37
|
+
this._widgetListeners = this._register(( new DisposableMap()));
|
|
38
|
+
this._updatingWidgets = ( new Set());
|
|
39
|
+
if (environmentService.isSessionsWindow) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
for (const widget of this._chatWidgetService.getAllWidgets()) {
|
|
43
|
+
this._attachWidget(widget);
|
|
44
|
+
}
|
|
45
|
+
this._register(
|
|
46
|
+
this._chatWidgetService.onDidAddWidget(widget => this._attachWidget(widget))
|
|
47
|
+
);
|
|
48
|
+
this._register(this._chatWidgetService.onDidChangeFocusedSession(() => {
|
|
49
|
+
const widget = this._chatWidgetService.lastFocusedWidget;
|
|
50
|
+
if (widget) {
|
|
51
|
+
this._syncWidgetFromBackend(widget);
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
this._register(this._provisionalSessionService.onDidChange(sessionResource => {
|
|
55
|
+
const widget = this._chatWidgetService.getWidgetBySessionResource(sessionResource);
|
|
56
|
+
if (widget) {
|
|
57
|
+
this._syncWidgetFromBackend(widget);
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
this._register(this._agentHostService.onDidAction(envelope => {
|
|
61
|
+
if (envelope.action.type === ActionType.SessionAgentChanged) {
|
|
62
|
+
this._syncWidgetsFromBackend();
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
_attachWidget(widget) {
|
|
67
|
+
if (( this._widgetListeners.has(widget))) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const store = ( new DisposableStore());
|
|
71
|
+
store.add(
|
|
72
|
+
widget.input.onDidChangeCurrentChatMode(() => this._onWidgetModeChanged(widget))
|
|
73
|
+
);
|
|
74
|
+
store.add(widget.onDidChangeViewModel(() => this._syncWidgetFromBackend(widget)));
|
|
75
|
+
this._widgetListeners.set(widget, store);
|
|
76
|
+
this._syncWidgetFromBackend(widget);
|
|
77
|
+
}
|
|
78
|
+
_syncWidgetsFromBackend() {
|
|
79
|
+
for (const widget of this._chatWidgetService.getAllWidgets()) {
|
|
80
|
+
this._syncWidgetFromBackend(widget);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
_onWidgetModeChanged(widget) {
|
|
84
|
+
if (( this._updatingWidgets.has(widget))) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const sessionResource = widget.viewModel?.sessionResource;
|
|
88
|
+
const backendSession = sessionResource ? this._resolveBackendSession(sessionResource) : undefined;
|
|
89
|
+
if (!sessionResource || !backendSession) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const mode = widget.input.currentModeObs.get();
|
|
93
|
+
const agentUri = this._agentUriFromMode(mode);
|
|
94
|
+
this._storeSelectedAgent(sessionResource, agentUri);
|
|
95
|
+
const currentAgentUri = this._readSessionState(backendSession)?.summary.agent?.uri;
|
|
96
|
+
if (currentAgentUri === agentUri) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this._agentHostService.dispatch(( backendSession.toString()), {
|
|
100
|
+
type: ActionType.SessionAgentChanged,
|
|
101
|
+
...(agentUri ? {
|
|
102
|
+
agent: {
|
|
103
|
+
uri: agentUri
|
|
104
|
+
}
|
|
105
|
+
} : {})
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
_syncWidgetFromBackend(widget) {
|
|
109
|
+
const sessionResource = widget.viewModel?.sessionResource;
|
|
110
|
+
const backendSession = sessionResource ? this._resolveBackendSession(sessionResource) : undefined;
|
|
111
|
+
if (!sessionResource || !backendSession) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const agentUri = this._readSessionState(backendSession)?.summary.agent?.uri;
|
|
115
|
+
void this._applyMode(widget, sessionResource, agentUri);
|
|
116
|
+
}
|
|
117
|
+
async _applyMode(widget, sessionResource, agentUri) {
|
|
118
|
+
const modes = widget.input.currentChatModesObs.get();
|
|
119
|
+
await modes.waitForPendingUpdates();
|
|
120
|
+
if (widget.viewModel?.sessionResource.toString() !== ( sessionResource.toString())) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const modeId = agentUri ?? ChatMode.Agent.id;
|
|
124
|
+
const mode = this._findMode(modes, modeId);
|
|
125
|
+
if (!mode || widget.input.currentModeObs.get().id === mode.id) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this._updatingWidgets.add(widget);
|
|
129
|
+
try {
|
|
130
|
+
widget.input.setChatMode(mode.id, false);
|
|
131
|
+
} finally {
|
|
132
|
+
this._updatingWidgets.delete(widget);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
_findMode(modes, modeId) {
|
|
136
|
+
return modes.findModeById(modeId) ?? modes.custom.find(mode => {
|
|
137
|
+
const uri = mode.uri?.get();
|
|
138
|
+
return uri && ( fromAgentHostUri(uri).toString()) === modeId;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
_agentUriFromMode(mode) {
|
|
142
|
+
if (mode.kind !== ChatModeKind.Agent || mode.id === ChatMode.Agent.id || mode.isBuiltin) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
const uri = mode.uri?.get();
|
|
146
|
+
return uri ? ( fromAgentHostUri(uri).toString()) : ( ( URI.parse(mode.id)).toString());
|
|
147
|
+
}
|
|
148
|
+
_storeSelectedAgent(sessionResource, agentUri) {
|
|
149
|
+
const key = agentHostAgentPickerStorageKey(sessionResource.scheme);
|
|
150
|
+
if (agentUri) {
|
|
151
|
+
this._storageService.store(key, agentUri, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
152
|
+
} else {
|
|
153
|
+
this._storageService.remove(key, StorageScope.PROFILE);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
_readSessionState(backendSession) {
|
|
157
|
+
const value = this._agentHostService.getSubscriptionUnmanaged(StateComponents.Session, backendSession)?.value;
|
|
158
|
+
return value && !(value instanceof Error) ? value : undefined;
|
|
159
|
+
}
|
|
160
|
+
_resolveBackendSession(sessionResource) {
|
|
161
|
+
const provisionalSession = this._provisionalSessionService.get(sessionResource);
|
|
162
|
+
if (provisionalSession) {
|
|
163
|
+
return provisionalSession;
|
|
164
|
+
}
|
|
165
|
+
if (!sessionResource.scheme.startsWith(AGENT_HOST_SESSION_SCHEME_PREFIX)) {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
const provider = sessionResource.scheme.substring(AGENT_HOST_SESSION_SCHEME_PREFIX.length);
|
|
169
|
+
return provider ? AgentSession.uri(provider, sessionResource.path.substring(1)) : undefined;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
AgentHostModeSynchronizer = ( __decorate([( __param(0, IChatWidgetService)), ( __param(1, IAgentHostService)), ( __param(2, IAgentHostUntitledProvisionalSessionService)), ( __param(3, IStorageService)), ( __param(4, IWorkbenchEnvironmentService))], AgentHostModeSynchronizer));
|
|
173
|
+
registerWorkbenchContribution2(
|
|
174
|
+
AgentHostModeSynchronizer.ID,
|
|
175
|
+
AgentHostModeSynchronizer,
|
|
176
|
+
WorkbenchPhase.Eventually
|
|
177
|
+
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import {
|
|
2
|
+
import { IAgentHostResourceService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostResourceService.service";
|
|
3
3
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
4
4
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
5
|
import { IChatInputNotificationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service";
|
|
6
6
|
/**
|
|
7
|
-
* Bridges {@link
|
|
7
|
+
* Bridges {@link IAgentHostResourceService} to the chat input notification
|
|
8
8
|
* banner. While there are pending permission requests, the oldest one is
|
|
9
9
|
* shown above the chat input with three actions:
|
|
10
10
|
*
|
|
@@ -21,7 +21,7 @@ export declare class AgentHostPermissionUiContribution extends Disposable implem
|
|
|
21
21
|
/** Stable id used in {@link IChatInputNotification} so updates replace in place. */
|
|
22
22
|
private static readonly NOTIFICATION_ID;
|
|
23
23
|
private _lastRequestId;
|
|
24
|
-
constructor(_permissionService:
|
|
24
|
+
constructor(_permissionService: IAgentHostResourceService, _chatInputNotificationService: IChatInputNotificationService, _labelService: ILabelService);
|
|
25
25
|
private _render;
|
|
26
26
|
private _buildNotification;
|
|
27
27
|
private _resolveHostName;
|
|
@@ -5,8 +5,8 @@ import { escapeMarkdownSyntaxTokens, MarkdownString } from '@codingame/monaco-vs
|
|
|
5
5
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
6
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
7
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
-
import { AgentHostPermissionMode } from '../../../../../../platform/agentHost/common/
|
|
9
|
-
import {
|
|
8
|
+
import { AgentHostPermissionMode } from '../../../../../../platform/agentHost/common/agentHostResourceService.js';
|
|
9
|
+
import { IAgentHostResourceService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostResourceService.service';
|
|
10
10
|
import { agentHostAuthority, AGENT_HOST_SCHEME } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
11
11
|
import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
|
|
12
12
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
@@ -19,13 +19,13 @@ const ALLOW_COMMAND = "_agentHost.permission.allow";
|
|
|
19
19
|
const ALLOW_ALWAYS_COMMAND = "_agentHost.permission.allowAlways";
|
|
20
20
|
const DENY_COMMAND = "_agentHost.permission.deny";
|
|
21
21
|
CommandsRegistry.registerCommand(ALLOW_COMMAND, (accessor, requestId) => {
|
|
22
|
-
accessor.get(
|
|
22
|
+
accessor.get(IAgentHostResourceService).findPending(requestId)?.allow();
|
|
23
23
|
});
|
|
24
24
|
CommandsRegistry.registerCommand(ALLOW_ALWAYS_COMMAND, (accessor, requestId) => {
|
|
25
|
-
accessor.get(
|
|
25
|
+
accessor.get(IAgentHostResourceService).findPending(requestId)?.allowAlways();
|
|
26
26
|
});
|
|
27
27
|
CommandsRegistry.registerCommand(DENY_COMMAND, (accessor, requestId) => {
|
|
28
|
-
accessor.get(
|
|
28
|
+
accessor.get(IAgentHostResourceService).findPending(requestId)?.deny();
|
|
29
29
|
});
|
|
30
30
|
let AgentHostPermissionUiContribution = class AgentHostPermissionUiContribution extends Disposable {
|
|
31
31
|
static {
|
|
@@ -64,23 +64,23 @@ let AgentHostPermissionUiContribution = class AgentHostPermissionUiContribution
|
|
|
64
64
|
const path = request.uri.scheme === Schemas.file ? request.uri.fsPath : ( request.uri.toString());
|
|
65
65
|
const fence = "`".repeat((path.match(/`+/g)?.reduce((m, s) => Math.max(m, s.length), 0) ?? 0) + 1);
|
|
66
66
|
const codePath = `${fence}${path}${fence}`;
|
|
67
|
-
const message = ( new MarkdownString(request.mode === AgentHostPermissionMode.Write ? ( localize(
|
|
68
|
-
const description = totalPending > 1 ? totalPending === 2 ? ( localize(
|
|
67
|
+
const message = ( new MarkdownString(request.mode === AgentHostPermissionMode.Write ? ( localize(5279, "Remote agent host \"{0}\" wants to write {1}", hostName, codePath)) : ( localize(5280, "Remote agent host \"{0}\" wants to read {1}", hostName, codePath))));
|
|
68
|
+
const description = totalPending > 1 ? totalPending === 2 ? ( localize(5281, "+1 more request waiting")) : ( localize(5282, "+{0} more requests waiting", totalPending - 1)) : undefined;
|
|
69
69
|
return {
|
|
70
70
|
id: AgentHostPermissionUiContribution_1.NOTIFICATION_ID,
|
|
71
71
|
severity: ChatInputNotificationSeverity.Warning,
|
|
72
72
|
message,
|
|
73
73
|
description,
|
|
74
74
|
actions: [{
|
|
75
|
-
label: ( localize(
|
|
75
|
+
label: ( localize(5283, "Deny")),
|
|
76
76
|
commandId: DENY_COMMAND,
|
|
77
77
|
commandArgs: [request.id]
|
|
78
78
|
}, {
|
|
79
|
-
label: ( localize(
|
|
79
|
+
label: ( localize(5284, "Allow")),
|
|
80
80
|
commandId: ALLOW_COMMAND,
|
|
81
81
|
commandArgs: [request.id]
|
|
82
82
|
}, {
|
|
83
|
-
label: ( localize(
|
|
83
|
+
label: ( localize(5285, "Always Allow")),
|
|
84
84
|
commandId: ALLOW_ALWAYS_COMMAND,
|
|
85
85
|
commandArgs: [request.id]
|
|
86
86
|
}],
|
|
@@ -94,6 +94,6 @@ let AgentHostPermissionUiContribution = class AgentHostPermissionUiContribution
|
|
|
94
94
|
return label && label !== authority ? label : address;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
AgentHostPermissionUiContribution = AgentHostPermissionUiContribution_1 = ( __decorate([( __param(0,
|
|
97
|
+
AgentHostPermissionUiContribution = AgentHostPermissionUiContribution_1 = ( __decorate([( __param(0, IAgentHostResourceService)), ( __param(1, IChatInputNotificationService)), ( __param(2, ILabelService))], AgentHostPermissionUiContribution));
|
|
98
98
|
|
|
99
99
|
export { AgentHostPermissionUiContribution };
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToolDefinition } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
2
|
+
import type { IToolData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
3
|
+
/**
|
|
4
|
+
* Converts an internal {@link IToolData} to a protocol {@link ToolDefinition}.
|
|
5
|
+
*/
|
|
6
|
+
export declare function toolDataToDefinition(tool: IToolData): ToolDefinition;
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
function toolDataToDefinition(tool) {
|
|
4
|
+
return {
|
|
5
|
+
name: tool.toolReferenceName ?? tool.id,
|
|
6
|
+
title: tool.displayName,
|
|
7
|
+
description: tool.modelDescription,
|
|
8
|
+
inputSchema: tool.inputSchema?.type === 'object'
|
|
9
|
+
? tool.inputSchema
|
|
10
|
+
: undefined,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { toolDataToDefinition };
|
|
@@ -15,6 +15,8 @@ export declare class AgentHostUntitledProvisionalSessionService extends Disposab
|
|
|
15
15
|
readonly _serviceBrand: undefined;
|
|
16
16
|
private readonly _entries;
|
|
17
17
|
private readonly _pending;
|
|
18
|
+
private readonly _resolvedConfigs;
|
|
19
|
+
private readonly _resolvedConfigRequestSeq;
|
|
18
20
|
private readonly _rebound;
|
|
19
21
|
private readonly _sequencer;
|
|
20
22
|
private readonly _onDidChange;
|
|
@@ -32,6 +34,7 @@ export declare class AgentHostUntitledProvisionalSessionService extends Disposab
|
|
|
32
34
|
*/
|
|
33
35
|
private _toBackendUri;
|
|
34
36
|
getResolvedConfig(sessionResource: URI): ResolveSessionConfigResult | undefined;
|
|
37
|
+
refreshResolvedConfig(sessionResource: URI, provider: string, workingDirectory: URI | undefined, config: Record<string, unknown> | undefined): Promise<void>;
|
|
35
38
|
applyConfigChange(sessionResource: URI, provider: string, workingDirectory: URI | undefined, partial: Record<string, unknown>): Promise<URI | undefined>;
|
|
36
39
|
/**
|
|
37
40
|
* Workbench-side initial config seed sent at `createSession` time so the
|
|
@@ -8,7 +8,7 @@ import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objec
|
|
|
8
8
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
9
|
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
10
10
|
import { SessionConfigKey, KNOWN_AUTO_APPROVE_VALUES } from '@codingame/monaco-vscode-katex-common/vscode/vs/platform/agentHost/common/sessionConfigKeys';
|
|
11
|
-
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions';
|
|
11
|
+
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
12
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
13
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
14
14
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
@@ -32,6 +32,8 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
32
32
|
this._environmentService = _environmentService;
|
|
33
33
|
this._entries = ( new ResourceMap());
|
|
34
34
|
this._pending = ( new ResourceMap());
|
|
35
|
+
this._resolvedConfigs = ( new ResourceMap());
|
|
36
|
+
this._resolvedConfigRequestSeq = ( new ResourceMap());
|
|
35
37
|
this._rebound = ( new ResourceSet());
|
|
36
38
|
this._sequencer = ( new SequencerByKey());
|
|
37
39
|
this._onDidChange = this._register(( new Emitter()));
|
|
@@ -41,6 +43,8 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
41
43
|
if (( this._entries.has(sessionResource))) {
|
|
42
44
|
void this.disposeSession(sessionResource);
|
|
43
45
|
}
|
|
46
|
+
this._resolvedConfigs.delete(sessionResource);
|
|
47
|
+
this._resolvedConfigRequestSeq.delete(sessionResource);
|
|
44
48
|
this._rebound.delete(sessionResource);
|
|
45
49
|
}
|
|
46
50
|
}));
|
|
@@ -134,9 +138,12 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
134
138
|
backendSession: created,
|
|
135
139
|
config: {
|
|
136
140
|
...config
|
|
137
|
-
}
|
|
141
|
+
},
|
|
142
|
+
resolvedConfig: oldEntry.resolvedConfig
|
|
138
143
|
});
|
|
139
144
|
this._entries.delete(oldSessionResource);
|
|
145
|
+
this._resolvedConfigs.delete(oldSessionResource);
|
|
146
|
+
this._resolvedConfigRequestSeq.delete(oldSessionResource);
|
|
140
147
|
this._rebound.add(oldSessionResource);
|
|
141
148
|
this._onDidChange.fire(newSessionResource);
|
|
142
149
|
this._agentHostService.disposeSession(oldEntry.backendSession).catch(err => {
|
|
@@ -149,6 +156,8 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
149
156
|
async disposeSession(sessionResource) {
|
|
150
157
|
await this.waitForPending(sessionResource);
|
|
151
158
|
const entry = this._entries.get(sessionResource);
|
|
159
|
+
this._resolvedConfigs.delete(sessionResource);
|
|
160
|
+
this._resolvedConfigRequestSeq.delete(sessionResource);
|
|
152
161
|
if (!entry) {
|
|
153
162
|
return;
|
|
154
163
|
}
|
|
@@ -166,6 +175,8 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
166
175
|
}
|
|
167
176
|
this._entries.clear();
|
|
168
177
|
this._pending.clear();
|
|
178
|
+
this._resolvedConfigs.clear();
|
|
179
|
+
this._resolvedConfigRequestSeq.clear();
|
|
169
180
|
this._rebound.clear();
|
|
170
181
|
super.dispose();
|
|
171
182
|
}
|
|
@@ -177,7 +188,36 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
177
188
|
}));
|
|
178
189
|
}
|
|
179
190
|
getResolvedConfig(sessionResource) {
|
|
180
|
-
return this._entries.get(sessionResource)?.resolvedConfig;
|
|
191
|
+
return this._entries.get(sessionResource)?.resolvedConfig ?? this._resolvedConfigs.get(sessionResource);
|
|
192
|
+
}
|
|
193
|
+
async refreshResolvedConfig(sessionResource, provider, workingDirectory, config) {
|
|
194
|
+
const seq = (this._resolvedConfigRequestSeq.get(sessionResource) ?? 0) + 1;
|
|
195
|
+
this._resolvedConfigRequestSeq.set(sessionResource, seq);
|
|
196
|
+
try {
|
|
197
|
+
const resolved = await this._agentHostService.resolveSessionConfig({
|
|
198
|
+
provider,
|
|
199
|
+
workingDirectory,
|
|
200
|
+
config
|
|
201
|
+
});
|
|
202
|
+
if (this._resolvedConfigRequestSeq.get(sessionResource) !== seq) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const entry = this._entries.get(sessionResource);
|
|
206
|
+
if (entry) {
|
|
207
|
+
entry.config = {
|
|
208
|
+
...entry.config,
|
|
209
|
+
...resolved.values
|
|
210
|
+
};
|
|
211
|
+
entry.resolvedConfig = resolved;
|
|
212
|
+
} else {
|
|
213
|
+
this._resolvedConfigs.set(sessionResource, resolved);
|
|
214
|
+
}
|
|
215
|
+
this._onDidChange.fire(sessionResource);
|
|
216
|
+
} catch (err) {
|
|
217
|
+
this._logService.warn(
|
|
218
|
+
`[AgentHostProvisional] schema re-resolve failed: ${err instanceof Error ? err.message : String(err)}`
|
|
219
|
+
);
|
|
220
|
+
}
|
|
181
221
|
}
|
|
182
222
|
async applyConfigChange(sessionResource, provider, workingDirectory, partial) {
|
|
183
223
|
const preExisting = this._entries.get(sessionResource);
|
|
@@ -203,9 +243,8 @@ let AgentHostUntitledProvisionalSessionService = class AgentHostUntitledProvisio
|
|
|
203
243
|
Object.assign(entry.config, partial);
|
|
204
244
|
}
|
|
205
245
|
}
|
|
206
|
-
this._agentHostService.dispatch({
|
|
246
|
+
this._agentHostService.dispatch(( backend.toString()), {
|
|
207
247
|
type: ActionType.SessionConfigChanged,
|
|
208
|
-
session: ( backend.toString()),
|
|
209
248
|
config: partial
|
|
210
249
|
});
|
|
211
250
|
return this._sequencer.queue(( sessionResource.toString()), async () => {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Disposable } 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 { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
|
+
import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
5
|
+
import { type ClientPluginCustomization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
6
|
+
import { SYNCED_CUSTOMIZATION_SCHEME } from "../../../../../services/agentHost/common/agentHostFileSystemService.js";
|
|
7
|
+
import { IAgentHostFileSystemService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/agentHost/common/agentHostFileSystemService.service";
|
|
8
|
+
export { SYNCED_CUSTOMIZATION_SCHEME };
|
|
9
|
+
interface ISyncableFile {
|
|
10
|
+
readonly uri: URI;
|
|
11
|
+
readonly type: PromptsType;
|
|
12
|
+
}
|
|
13
|
+
interface IBundleResult {
|
|
14
|
+
readonly ref: ClientPluginCustomization;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Bundles individual customization files into a synthetic Open Plugin
|
|
18
|
+
* backed by an in-memory filesystem.
|
|
19
|
+
*
|
|
20
|
+
* Each bundler instance is namespaced by its authority string so that
|
|
21
|
+
* multiple agents can coexist under the same scheme without conflicts.
|
|
22
|
+
* The plugin is mounted at `vscode-synced-customization:///{authority}/`
|
|
23
|
+
* and structured as:
|
|
24
|
+
*
|
|
25
|
+
* ```
|
|
26
|
+
* .plugin/plugin.json
|
|
27
|
+
* rules/ ← instruction files
|
|
28
|
+
* commands/ ← prompt files
|
|
29
|
+
* agents/ ← agent files
|
|
30
|
+
* skills/ ← skill files
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* The bundler computes a content-based nonce so the agent host can
|
|
34
|
+
* skip re-loading when nothing has changed.
|
|
35
|
+
*/
|
|
36
|
+
export declare class SyncedCustomizationBundler extends Disposable {
|
|
37
|
+
private readonly _fileService;
|
|
38
|
+
private readonly _authority;
|
|
39
|
+
private _lastNonce;
|
|
40
|
+
constructor(authority: string, _fileService: IFileService, agentHostFileSystemService: IAgentHostFileSystemService);
|
|
41
|
+
/**
|
|
42
|
+
* Root URI of the virtual plugin directory for this bundler.
|
|
43
|
+
* The authority is encoded into the path (not the URI authority) because
|
|
44
|
+
* {@link InMemoryFileSystemProvider} only routes by path.
|
|
45
|
+
*/
|
|
46
|
+
private get _rootUri();
|
|
47
|
+
/**
|
|
48
|
+
* Bundles the given files into the in-memory plugin filesystem.
|
|
49
|
+
*
|
|
50
|
+
* Overwrites any previous bundle content. Returns a {@link ClientPluginCustomization}
|
|
51
|
+
* pointing at the virtual plugin directory with a content-based nonce.
|
|
52
|
+
*
|
|
53
|
+
* @returns The bundle result, or `undefined` if no syncable files were provided.
|
|
54
|
+
*/
|
|
55
|
+
bundle(files: readonly ISyncableFile[]): Promise<IBundleResult | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Returns the last computed nonce, or `undefined` if no bundle has been created.
|
|
58
|
+
*/
|
|
59
|
+
get lastNonce(): string | undefined;
|
|
60
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
+
import { hash } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
|
|
8
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
9
|
+
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
10
|
+
import { customizationId } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
11
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-root/state';
|
|
12
|
+
import { CustomizationType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-terminal/state';
|
|
14
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
|
|
15
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-resource-watch/state';
|
|
16
|
+
import '../../../../../services/agentHost/common/agentHostFileSystemService.js';
|
|
17
|
+
import { IAgentHostFileSystemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/agentHost/common/agentHostFileSystemService.service';
|
|
18
|
+
import { SYNCED_CUSTOMIZATION_SCHEME } from '../../../../../../platform/agentHost/common/agentHostFileSystemService.js';
|
|
19
|
+
|
|
20
|
+
const DISPLAY_NAME = "VS Code Synced Data";
|
|
21
|
+
const MANIFEST_CONTENT = JSON.stringify({
|
|
22
|
+
name: DISPLAY_NAME,
|
|
23
|
+
description: "Customization data synced from VS Code"
|
|
24
|
+
}, null, "\t");
|
|
25
|
+
function pluginDirForType(type) {
|
|
26
|
+
switch (type) {
|
|
27
|
+
case PromptsType.instructions:
|
|
28
|
+
return "rules";
|
|
29
|
+
case PromptsType.prompt:
|
|
30
|
+
return "commands";
|
|
31
|
+
case PromptsType.agent:
|
|
32
|
+
return "agents";
|
|
33
|
+
case PromptsType.skill:
|
|
34
|
+
return "skills";
|
|
35
|
+
case PromptsType.hook:
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
let SyncedCustomizationBundler = class SyncedCustomizationBundler extends Disposable {
|
|
40
|
+
constructor(authority, _fileService, agentHostFileSystemService) {
|
|
41
|
+
super();
|
|
42
|
+
this._fileService = _fileService;
|
|
43
|
+
this._authority = authority;
|
|
44
|
+
agentHostFileSystemService.ensureSyncedCustomizationProvider();
|
|
45
|
+
}
|
|
46
|
+
get _rootUri() {
|
|
47
|
+
return ( URI.from({
|
|
48
|
+
scheme: SYNCED_CUSTOMIZATION_SCHEME,
|
|
49
|
+
path: `/${this._authority}`
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
async bundle(files) {
|
|
53
|
+
const syncable = files.filter(f => pluginDirForType(f.type) !== undefined);
|
|
54
|
+
if (syncable.length === 0) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
await this._fileService.del(this._rootUri, {
|
|
59
|
+
recursive: true
|
|
60
|
+
});
|
|
61
|
+
} catch {}
|
|
62
|
+
const manifestUri = URI.joinPath(this._rootUri, ".plugin", "plugin.json");
|
|
63
|
+
await this._fileService.writeFile(manifestUri, VSBuffer.fromString(MANIFEST_CONTENT));
|
|
64
|
+
const hashParts = [];
|
|
65
|
+
for (const file of syncable) {
|
|
66
|
+
const dir = pluginDirForType(file.type);
|
|
67
|
+
const fileName = basename(file.uri);
|
|
68
|
+
let destUri;
|
|
69
|
+
let hashKey;
|
|
70
|
+
if (file.type === PromptsType.skill && fileName.toLowerCase() === "skill.md") {
|
|
71
|
+
const skillDirName = basename(dirname(file.uri));
|
|
72
|
+
destUri = URI.joinPath(this._rootUri, dir, skillDirName, fileName);
|
|
73
|
+
hashKey = `${dir}/${skillDirName}/${fileName}`;
|
|
74
|
+
} else {
|
|
75
|
+
destUri = URI.joinPath(this._rootUri, dir, fileName);
|
|
76
|
+
hashKey = `${dir}/${fileName}`;
|
|
77
|
+
}
|
|
78
|
+
const content = await this._fileService.readFile(file.uri);
|
|
79
|
+
await this._fileService.writeFile(destUri, content.value);
|
|
80
|
+
hashParts.push(`${hashKey}:${( content.value.toString())}`);
|
|
81
|
+
}
|
|
82
|
+
hashParts.sort();
|
|
83
|
+
const nonce = String(hash(hashParts.join("\n")));
|
|
84
|
+
this._lastNonce = nonce;
|
|
85
|
+
const rootUriString = ( this._rootUri.toString());
|
|
86
|
+
return {
|
|
87
|
+
ref: {
|
|
88
|
+
type: CustomizationType.Plugin,
|
|
89
|
+
id: customizationId(rootUriString),
|
|
90
|
+
uri: rootUriString,
|
|
91
|
+
name: DISPLAY_NAME,
|
|
92
|
+
enabled: true,
|
|
93
|
+
nonce
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
get lastNonce() {
|
|
98
|
+
return this._lastNonce;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
SyncedCustomizationBundler = ( __decorate([( __param(1, IFileService)), ( __param(2, IAgentHostFileSystemService))], SyncedCustomizationBundler));
|
|
102
|
+
|
|
103
|
+
export { SYNCED_CUSTOMIZATION_SCHEME, SyncedCustomizationBundler };
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js
CHANGED
|
@@ -17,6 +17,7 @@ import { FocusAgentSessionsAction, PickAgentSessionAction, ArchiveAllAgentSessio
|
|
|
17
17
|
import { AGENT_SESSIONS_QUICK_ACCESS_PREFIX, AgentSessionsQuickAccessProvider } from './agentSessionsQuickAccess.js';
|
|
18
18
|
import { AgentHostPermissionUiContribution } from './agentHost/agentHostPermissionUiContribution.js';
|
|
19
19
|
import '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution';
|
|
20
|
+
import './agentHost/agentHostModeSynchronizer.js';
|
|
20
21
|
|
|
21
22
|
registerAction2(FocusAgentSessionsAction);
|
|
22
23
|
registerAction2(PickAgentSessionAction);
|
|
@@ -48,7 +49,7 @@ registerAction2(SetAgentSessionsOrientationStackedAction);
|
|
|
48
49
|
registerAction2(SetAgentSessionsOrientationSideBySideAction);
|
|
49
50
|
MenuRegistry.appendMenuItem(MenuId.AgentSessionsToolbar, {
|
|
50
51
|
submenu: MenuId.AgentSessionsViewerFilterSubMenu,
|
|
51
|
-
title: ( localize2(
|
|
52
|
+
title: ( localize2(5293, "Filter Agent Sessions")),
|
|
52
53
|
group: "navigation",
|
|
53
54
|
order: 3,
|
|
54
55
|
icon: Codicon.filter
|
|
@@ -118,9 +119,9 @@ MenuRegistry.appendMenuItem(MenuId.ChatViewSessionTitleToolbar, {
|
|
|
118
119
|
prefix: AGENT_SESSIONS_QUICK_ACCESS_PREFIX,
|
|
119
120
|
contextKey: "inAgentSessionsPicker",
|
|
120
121
|
when: ChatContextKeys.enabled,
|
|
121
|
-
placeholder: ( localize(
|
|
122
|
+
placeholder: ( localize(5294, "Search agent sessions by name")),
|
|
122
123
|
helpEntries: [{
|
|
123
|
-
description: ( localize(
|
|
124
|
+
description: ( localize(5295, "Show All Agent Sessions")),
|
|
124
125
|
commandId: "workbench.action.chat.history"
|
|
125
126
|
}]
|
|
126
127
|
});
|