@codingame/monaco-vscode-chat-service-override 31.0.0 → 32.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.d.ts +1 -1
- package/index.js +21 -5
- package/package.json +5 -5
- package/vscode/src/vs/base/common/defaultAccount.d.ts +69 -0
- package/vscode/src/vs/base/common/defaultAccount.js +12 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +91 -22
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +301 -68
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +24 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +89 -16
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +17 -5
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +73 -10
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +32 -6
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +32 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.d.ts +37 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.js +15 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +242 -201
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +35 -0
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +106 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +38 -30
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +2 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +114 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +10 -10
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +52 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +7 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +42 -41
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +6 -6
- package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/transportConstants.js +6 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +4 -3
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +4 -3
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +15 -7
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +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 +14 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +64 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +30 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +27 -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 +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +63 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +99 -39
- 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 +17 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +35 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +347 -326
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +1 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +113 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +37 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +436 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +52 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +73 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +272 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +430 -185
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +44 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +480 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.d.ts +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +1216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +26 -19
- 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 +28 -25
- 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 +25 -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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +68 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +650 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +390 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -7
- 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 +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +6 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +116 -182
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +61 -41
- 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 +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +106 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +629 -425
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +175 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +9 -2
- 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/defaultModelContribution.js +4 -4
- 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.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +339 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +572 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +49 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +315 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +45 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +44 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -1
- 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.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +111 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +13 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +14 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +17 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +23 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +41 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +30 -12
- 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 +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +108 -45
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +65 -26
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +38 -11
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +165 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +62 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -1
- 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.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +15 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +18 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +203 -180
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +35 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +27 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +14 -49
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +35 -177
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
- 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 +13 -13
- 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 +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +29 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +129 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -6
- 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 +1 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +12 -38
- 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/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +77 -70
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +232 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +83 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.js +243 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +0 -749
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +0 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +0 -40
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +0 -638
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +0 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -242
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1701
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -191
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -728
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +0 -69
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
|
|
2
|
+
import { raceCancellation } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
3
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
5
|
+
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
6
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
8
|
+
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
9
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
10
|
+
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
11
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
12
|
+
import { waitForState } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utilsCancellation';
|
|
13
|
+
|
|
14
|
+
async function reviewEdits(accessor, editor, stream, token, applyCodeBlockSuggestionId) {
|
|
15
|
+
if (!editor.hasModel()) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const chatService = accessor.get(IChatService);
|
|
19
|
+
const uri = editor.getModel().uri;
|
|
20
|
+
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
|
|
21
|
+
const chatModel = chatModelRef.object;
|
|
22
|
+
chatModel.startEditingSession(true);
|
|
23
|
+
const store = ( new DisposableStore());
|
|
24
|
+
store.add(chatModelRef);
|
|
25
|
+
const chatRequest = chatModel?.addRequest({
|
|
26
|
+
text: "",
|
|
27
|
+
parts: []
|
|
28
|
+
}, {
|
|
29
|
+
variables: []
|
|
30
|
+
}, 0, {
|
|
31
|
+
kind: undefined,
|
|
32
|
+
modeId: "applyCodeBlock",
|
|
33
|
+
modeInstructions: undefined,
|
|
34
|
+
isBuiltin: true,
|
|
35
|
+
applyCodeBlockSuggestionId
|
|
36
|
+
});
|
|
37
|
+
assertType(chatRequest.response);
|
|
38
|
+
chatRequest.response.updateContent({
|
|
39
|
+
kind: "textEdit",
|
|
40
|
+
uri,
|
|
41
|
+
edits: [],
|
|
42
|
+
done: false
|
|
43
|
+
});
|
|
44
|
+
for await (const chunk of stream) {
|
|
45
|
+
if (token.isCancellationRequested) {
|
|
46
|
+
chatRequest.response.cancel();
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
chatRequest.response.updateContent({
|
|
50
|
+
kind: "textEdit",
|
|
51
|
+
uri,
|
|
52
|
+
edits: chunk,
|
|
53
|
+
done: false
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
chatRequest.response.updateContent({
|
|
57
|
+
kind: "textEdit",
|
|
58
|
+
uri,
|
|
59
|
+
edits: [],
|
|
60
|
+
done: true
|
|
61
|
+
});
|
|
62
|
+
if (!token.isCancellationRequested) {
|
|
63
|
+
chatRequest.response.complete();
|
|
64
|
+
}
|
|
65
|
+
const isSettled = derived(r => {
|
|
66
|
+
const entry = chatModel.editingSession?.readEntry(uri, r);
|
|
67
|
+
if (!entry) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
const state = entry.state.read(r);
|
|
71
|
+
return state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected;
|
|
72
|
+
});
|
|
73
|
+
const whenDecided = waitForState(isSettled, Boolean);
|
|
74
|
+
await raceCancellation(whenDecided, token);
|
|
75
|
+
store.dispose();
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
async function reviewNotebookEdits(accessor, uri, stream, token) {
|
|
79
|
+
const chatService = accessor.get(IChatService);
|
|
80
|
+
const notebookService = accessor.get(INotebookService);
|
|
81
|
+
const isNotebook = notebookService.hasSupportedNotebooks(uri);
|
|
82
|
+
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
|
|
83
|
+
const chatModel = chatModelRef.object;
|
|
84
|
+
chatModel.startEditingSession(true);
|
|
85
|
+
const store = ( new DisposableStore());
|
|
86
|
+
store.add(chatModelRef);
|
|
87
|
+
const chatRequest = chatModel?.addRequest({
|
|
88
|
+
text: "",
|
|
89
|
+
parts: []
|
|
90
|
+
}, {
|
|
91
|
+
variables: []
|
|
92
|
+
}, 0);
|
|
93
|
+
assertType(chatRequest.response);
|
|
94
|
+
if (isNotebook) {
|
|
95
|
+
chatRequest.response.updateContent({
|
|
96
|
+
kind: "notebookEdit",
|
|
97
|
+
uri,
|
|
98
|
+
edits: [],
|
|
99
|
+
done: false
|
|
100
|
+
});
|
|
101
|
+
} else {
|
|
102
|
+
chatRequest.response.updateContent({
|
|
103
|
+
kind: "textEdit",
|
|
104
|
+
uri,
|
|
105
|
+
edits: [],
|
|
106
|
+
done: false
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
for await (const chunk of stream) {
|
|
110
|
+
if (token.isCancellationRequested) {
|
|
111
|
+
chatRequest.response.cancel();
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
if (chunk.every(isCellEditOperation)) {
|
|
115
|
+
chatRequest.response.updateContent({
|
|
116
|
+
kind: "notebookEdit",
|
|
117
|
+
uri,
|
|
118
|
+
edits: chunk,
|
|
119
|
+
done: false
|
|
120
|
+
});
|
|
121
|
+
} else {
|
|
122
|
+
chatRequest.response.updateContent({
|
|
123
|
+
kind: "textEdit",
|
|
124
|
+
uri: chunk[0],
|
|
125
|
+
edits: chunk[1],
|
|
126
|
+
done: false
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (isNotebook) {
|
|
131
|
+
chatRequest.response.updateContent({
|
|
132
|
+
kind: "notebookEdit",
|
|
133
|
+
uri,
|
|
134
|
+
edits: [],
|
|
135
|
+
done: true
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
chatRequest.response.updateContent({
|
|
139
|
+
kind: "textEdit",
|
|
140
|
+
uri,
|
|
141
|
+
edits: [],
|
|
142
|
+
done: true
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (!token.isCancellationRequested) {
|
|
146
|
+
chatRequest.response.complete();
|
|
147
|
+
}
|
|
148
|
+
const isSettled = derived(r => {
|
|
149
|
+
const entry = chatModel.editingSession?.readEntry(uri, r);
|
|
150
|
+
if (!entry) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
const state = entry.state.read(r);
|
|
154
|
+
return state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected;
|
|
155
|
+
});
|
|
156
|
+
const whenDecided = waitForState(isSettled, Boolean);
|
|
157
|
+
await raceCancellation(whenDecided, token);
|
|
158
|
+
store.dispose();
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
function isCellEditOperation(edit) {
|
|
162
|
+
if (URI.isUri(edit)) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
if (Array.isArray(edit)) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { reviewEdits, reviewNotebookEdits };
|
|
@@ -8,7 +8,7 @@ import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
8
8
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
9
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
10
10
|
import { IEnablementModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement";
|
|
11
|
-
import { IAgentPlugin } from "
|
|
11
|
+
import { IAgentPlugin } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService";
|
|
12
12
|
import { IPluginInstallService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service";
|
|
13
13
|
import { IMarketplacePluginItem } from "./agentPluginEditor/agentPluginItems.js";
|
|
14
14
|
export declare class InstallPluginAction extends Action {
|
|
@@ -17,7 +17,7 @@ import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types
|
|
|
17
17
|
|
|
18
18
|
let InstallPluginAction = class InstallPluginAction extends Action {
|
|
19
19
|
constructor(item, pluginInstallService) {
|
|
20
|
-
super("agentPlugin.install", ( localize(
|
|
20
|
+
super("agentPlugin.install", ( localize(5140, "Install")), "extension-action label prominent install", true, () => pluginInstallService.installPlugin({
|
|
21
21
|
name: item.name,
|
|
22
22
|
description: item.description,
|
|
23
23
|
version: "",
|
|
@@ -33,7 +33,7 @@ let InstallPluginAction = class InstallPluginAction extends Action {
|
|
|
33
33
|
InstallPluginAction = ( __decorate([( __param(1, IPluginInstallService))], InstallPluginAction));
|
|
34
34
|
class UninstallPluginAction extends Action {
|
|
35
35
|
constructor(plugin) {
|
|
36
|
-
super("agentPlugin.uninstall", ( localize(
|
|
36
|
+
super("agentPlugin.uninstall", ( localize(5141, "Uninstall")), "extension-action label uninstall", true, () => {
|
|
37
37
|
plugin.remove();
|
|
38
38
|
return Promise.resolve();
|
|
39
39
|
});
|
|
@@ -41,7 +41,7 @@ class UninstallPluginAction extends Action {
|
|
|
41
41
|
}
|
|
42
42
|
let OpenPluginFolderAction = class OpenPluginFolderAction extends Action {
|
|
43
43
|
constructor(plugin, commandService, openerService) {
|
|
44
|
-
super("agentPlugin.openFolder", ( localize(
|
|
44
|
+
super("agentPlugin.openFolder", ( localize(5142, "Open Plugin Folder")), undefined, true, async () => {
|
|
45
45
|
try {
|
|
46
46
|
await commandService.executeCommand("revealFileInOS", plugin.uri);
|
|
47
47
|
} catch {
|
|
@@ -53,7 +53,7 @@ let OpenPluginFolderAction = class OpenPluginFolderAction extends Action {
|
|
|
53
53
|
OpenPluginFolderAction = ( __decorate([( __param(1, ICommandService)), ( __param(2, IOpenerService))], OpenPluginFolderAction));
|
|
54
54
|
let OpenPluginReadmeAction = class OpenPluginReadmeAction extends Action {
|
|
55
55
|
constructor(readmeUri, openerService) {
|
|
56
|
-
super("agentPlugin.openReadme", ( localize(
|
|
56
|
+
super("agentPlugin.openReadme", ( localize(5143, "Open README")), undefined, true, () => openerService.open(readmeUri));
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
OpenPluginReadmeAction = ( __decorate([( __param(1, IOpenerService))], OpenPluginReadmeAction));
|
|
@@ -168,11 +168,11 @@ class EnablementDropdownActionViewItem extends ActionWithDropdownActionViewItem
|
|
|
168
168
|
function createEnablePluginDropDown(plugin, enablementModel, workspaceContextService) {
|
|
169
169
|
const key = ( plugin.uri.toString());
|
|
170
170
|
const hasWorkspace = workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY;
|
|
171
|
-
const enable = ( new EnablementSubAction("agentPlugin.enable", ( localize(
|
|
171
|
+
const enable = ( new EnablementSubAction("agentPlugin.enable", ( localize(5144, "Enable")), "extension-action label prominent", isContributionDisabled(plugin.enablement.get()), () => {
|
|
172
172
|
enablementModel.setEnabled(key, ContributionEnablementState.EnabledProfile);
|
|
173
173
|
return Promise.resolve();
|
|
174
174
|
}));
|
|
175
|
-
const enableWorkspace = ( new EnablementSubAction("agentPlugin.enableForWorkspace", ( localize(
|
|
175
|
+
const enableWorkspace = ( new EnablementSubAction("agentPlugin.enableForWorkspace", ( localize(5145, "Enable (Workspace)")), "extension-action label", isContributionDisabled(plugin.enablement.get()) && hasWorkspace, () => {
|
|
176
176
|
enablementModel.setEnabled(key, ContributionEnablementState.EnabledWorkspace);
|
|
177
177
|
return Promise.resolve();
|
|
178
178
|
}));
|
|
@@ -181,11 +181,11 @@ function createEnablePluginDropDown(plugin, enablementModel, workspaceContextSer
|
|
|
181
181
|
function createDisablePluginDropDown(plugin, enablementModel, workspaceContextService) {
|
|
182
182
|
const key = ( plugin.uri.toString());
|
|
183
183
|
const hasWorkspace = workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY;
|
|
184
|
-
const disable = ( new EnablementSubAction("agentPlugin.disable", ( localize(
|
|
184
|
+
const disable = ( new EnablementSubAction("agentPlugin.disable", ( localize(5146, "Disable")), "extension-action label disable", isContributionEnabled(plugin.enablement.get()), () => {
|
|
185
185
|
enablementModel.setEnabled(key, ContributionEnablementState.DisabledProfile);
|
|
186
186
|
return Promise.resolve();
|
|
187
187
|
}));
|
|
188
|
-
const disableWorkspace = ( new EnablementSubAction("agentPlugin.disableForWorkspace", ( localize(
|
|
188
|
+
const disableWorkspace = ( new EnablementSubAction("agentPlugin.disableForWorkspace", ( localize(5147, "Disable (Workspace)")), "extension-action label disable", isContributionEnabled(plugin.enablement.get()) && hasWorkspace, () => {
|
|
189
189
|
enablementModel.setEnabled(key, ContributionEnablementState.DisabledWorkspace);
|
|
190
190
|
return Promise.resolve();
|
|
191
191
|
}));
|
|
@@ -357,7 +357,7 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
|
|
|
357
357
|
this.contentDisposables.add(toDisposable(insert(this.layoutParticipants, {
|
|
358
358
|
layout
|
|
359
359
|
})));
|
|
360
|
-
return this.openMarkdown(this.pluginReadme.get(), ( localize(
|
|
360
|
+
return this.openMarkdown(this.pluginReadme.get(), ( localize(5148, "No README available.")), readmeContainer, WebviewIndex.Readme, ( localize(5149, "Readme")), token);
|
|
361
361
|
}
|
|
362
362
|
async openMarkdown(cacheResult, noContentCopy, container, webviewIndex, title, token) {
|
|
363
363
|
try {
|
|
@@ -378,7 +378,7 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
|
|
|
378
378
|
webview.initialScrollProgress = this.initialScrollProgress.get(webviewIndex) || 0;
|
|
379
379
|
webview.claim(this, this.window, undefined);
|
|
380
380
|
setParentFlowTo(webview.container, container);
|
|
381
|
-
webview.
|
|
381
|
+
webview.setAnchorElement(container);
|
|
382
382
|
webview.setHtml(body);
|
|
383
383
|
webview.claim(this, this.window, undefined);
|
|
384
384
|
this.contentDisposables.add(webview.onDidFocus(() => this._onDidFocus?.fire()));
|
|
@@ -387,7 +387,7 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
|
|
|
387
387
|
));
|
|
388
388
|
const removeLayoutParticipant = insert(this.layoutParticipants, {
|
|
389
389
|
layout: () => {
|
|
390
|
-
webview.
|
|
390
|
+
webview.setAnchorElement(container);
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
393
|
this.contentDisposables.add(toDisposable(removeLayoutParticipant));
|
|
@@ -529,7 +529,7 @@ let UpdatePluginEditorAction = class UpdatePluginEditorAction extends Action {
|
|
|
529
529
|
pluginInstallService,
|
|
530
530
|
pluginMarketplaceService
|
|
531
531
|
) {
|
|
532
|
-
super(UpdatePluginEditorAction_1.ID, ( localize(
|
|
532
|
+
super(UpdatePluginEditorAction_1.ID, ( localize(5150, "Update")), "extension-action label prominent install");
|
|
533
533
|
this.plugin = plugin;
|
|
534
534
|
this.liveMarketplacePlugin = liveMarketplacePlugin;
|
|
535
535
|
this.pluginInstallService = pluginInstallService;
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js
CHANGED
|
@@ -8,7 +8,7 @@ import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/
|
|
|
8
8
|
import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
|
|
9
9
|
import { AgentPluginItemKind } from './agentPluginItems.js';
|
|
10
10
|
|
|
11
|
-
const AgentPluginEditorIcon = registerIcon("agent-plugin-editor-icon", Codicon.extensions, ( localize(
|
|
11
|
+
const AgentPluginEditorIcon = registerIcon("agent-plugin-editor-icon", Codicon.extensions, ( localize(5151, "Icon of the Agent Plugin editor.")));
|
|
12
12
|
function getPluginId(item) {
|
|
13
13
|
if (item.kind === AgentPluginItemKind.Installed) {
|
|
14
14
|
return ( item.plugin.uri.toString());
|
|
@@ -39,7 +39,7 @@ class AgentPluginEditorInput extends EditorInput {
|
|
|
39
39
|
return this._item;
|
|
40
40
|
}
|
|
41
41
|
getName() {
|
|
42
|
-
return localize(
|
|
42
|
+
return localize(5152, "Plugin: {0}", this._item.name);
|
|
43
43
|
}
|
|
44
44
|
getIcon() {
|
|
45
45
|
return AgentPluginEditorIcon;
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import type { IAgentPlugin } from "
|
|
3
|
+
import type { IAgentPlugin } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService";
|
|
4
4
|
import type { IMarketplacePlugin, IMarketplaceReference, IPluginSourceDescriptor, MarketplaceType } from "../../common/plugins/pluginMarketplaceService.js";
|
|
5
5
|
export declare enum AgentPluginItemKind {
|
|
6
6
|
Installed = "installed",
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
2
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
3
|
-
import {
|
|
3
|
+
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
4
4
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
5
5
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
6
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
7
7
|
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
8
8
|
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
9
9
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
10
|
+
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
10
11
|
import { IEnsureRepositoryOptions, IPullRepositoryOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService";
|
|
11
12
|
import { IAgentPluginRepositoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service";
|
|
12
13
|
import { IMarketplacePlugin, IMarketplaceReference, IPluginSourceDescriptor, MarketplaceType, PluginSourceKind } from "../common/plugins/pluginMarketplaceService.js";
|
|
@@ -27,7 +28,7 @@ export declare class AgentPluginRepositoryService implements IAgentPluginReposit
|
|
|
27
28
|
private readonly _pluginSources;
|
|
28
29
|
private readonly _cloneSequencer;
|
|
29
30
|
private readonly _migrationDone;
|
|
30
|
-
constructor(_commandService: ICommandService, environmentService:
|
|
31
|
+
constructor(_commandService: ICommandService, environmentService: IEnvironmentService, _fileService: IFileService, instantiationService: IInstantiationService, _logService: ILogService, _notificationService: INotificationService, _pluginGit: IPluginGitService, _progressService: IProgressService, _storageService: IStorageService, userDataProfileService: IUserDataProfileService);
|
|
31
32
|
getPluginSource(kind: PluginSourceKind): IPluginSource;
|
|
32
33
|
getRepositoryUri(marketplace: IMarketplaceReference, marketplaceType?: MarketplaceType): URI;
|
|
33
34
|
getPluginInstallUri(plugin: IMarketplacePlugin): URI;
|
|
@@ -8,7 +8,7 @@ import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marsh
|
|
|
8
8
|
import { joinPath, isEqual, dirname, isEqualOrParent } 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
|
-
import {
|
|
11
|
+
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
12
12
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
13
13
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
14
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
@@ -18,6 +18,7 @@ import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
18
18
|
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
19
19
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
20
20
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
21
|
+
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
21
22
|
import { PluginSourceKind } from '../common/plugins/pluginMarketplaceService.js';
|
|
22
23
|
import { IPluginGitService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginGitService.service';
|
|
23
24
|
import { RelativePathPluginSource, GitHubPluginSource, GitUrlPluginSource, NpmPluginSource, PipPluginSource } from './pluginSources.js';
|
|
@@ -35,7 +36,8 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
35
36
|
_notificationService,
|
|
36
37
|
_pluginGit,
|
|
37
38
|
_progressService,
|
|
38
|
-
_storageService
|
|
39
|
+
_storageService,
|
|
40
|
+
userDataProfileService
|
|
39
41
|
) {
|
|
40
42
|
this._commandService = _commandService;
|
|
41
43
|
this._fileService = _fileService;
|
|
@@ -46,7 +48,7 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
46
48
|
this._storageService = _storageService;
|
|
47
49
|
this._marketplaceIndex = ( new Lazy(() => this._loadMarketplaceIndex()));
|
|
48
50
|
this._cloneSequencer = ( new SequencerByKey());
|
|
49
|
-
this.agentPluginsHome =
|
|
51
|
+
this.agentPluginsHome = userDataProfileService.currentProfile.agentPluginsHome;
|
|
50
52
|
const legacyCacheRoot = joinPath(environmentService.cacheHome, "agentPlugins");
|
|
51
53
|
const oldCacheRoot = environmentService.cacheHome.scheme === "file" ? legacyCacheRoot : this.agentPluginsHome;
|
|
52
54
|
this._cacheRoot = this.agentPluginsHome;
|
|
@@ -96,7 +98,7 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
96
98
|
if (marketplace.kind === MarketplaceReferenceKind.LocalFileUri) {
|
|
97
99
|
throw ( new Error(`Local marketplace repository does not exist: ${repoDir.fsPath}`));
|
|
98
100
|
}
|
|
99
|
-
const progressTitle = options?.progressTitle ?? ( localize(
|
|
101
|
+
const progressTitle = options?.progressTitle ?? ( localize(5153, "Preparing plugin marketplace '{0}'...", marketplace.displayLabel));
|
|
100
102
|
const failureLabel = options?.failureLabel ?? marketplace.displayLabel;
|
|
101
103
|
await this._cloneRepository(repoDir, marketplace.cloneUrl, progressTitle, failureLabel);
|
|
102
104
|
this._updateMarketplaceIndex(marketplace, repoDir, options?.marketplaceType);
|
|
@@ -121,7 +123,7 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
121
123
|
try {
|
|
122
124
|
return await this._progressService.withProgress({
|
|
123
125
|
location: ProgressLocation.Notification,
|
|
124
|
-
title: ( localize(
|
|
126
|
+
title: ( localize(5154, "Updating plugin '{0}'...", updateLabel)),
|
|
125
127
|
cancellable: true
|
|
126
128
|
}, () => this._pluginGit.pull(repoDir, cts.token), () => cts.dispose(true));
|
|
127
129
|
} finally {
|
|
@@ -136,13 +138,13 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
136
138
|
this._notificationService.notify({
|
|
137
139
|
severity: Severity.Error,
|
|
138
140
|
message: ( localize(
|
|
139
|
-
|
|
141
|
+
5155,
|
|
140
142
|
"Failed to update plugin '{0}': {1}",
|
|
141
143
|
options?.failureLabel ?? updateLabel,
|
|
142
144
|
err?.message ?? String(err)
|
|
143
145
|
)),
|
|
144
146
|
actions: {
|
|
145
|
-
primary: [( new Action("showGitOutput", ( localize(
|
|
147
|
+
primary: [( new Action("showGitOutput", ( localize(5156, "Show Git Output")), undefined, true, () => {
|
|
146
148
|
this._commandService.executeCommand("git.showOutput");
|
|
147
149
|
}))]
|
|
148
150
|
}
|
|
@@ -221,13 +223,13 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
221
223
|
this._notificationService.notify({
|
|
222
224
|
severity: Severity.Error,
|
|
223
225
|
message: ( localize(
|
|
224
|
-
|
|
226
|
+
5157,
|
|
225
227
|
"Failed to install plugin '{0}': {1}",
|
|
226
228
|
failureLabel,
|
|
227
229
|
err?.message ?? String(err)
|
|
228
230
|
)),
|
|
229
231
|
actions: {
|
|
230
|
-
primary: [( new Action("showGitOutput", ( localize(
|
|
232
|
+
primary: [( new Action("showGitOutput", ( localize(5156, "Show Git Output")), undefined, true, () => {
|
|
231
233
|
this._commandService.executeCommand("git.showOutput");
|
|
232
234
|
}))]
|
|
233
235
|
}
|
|
@@ -362,6 +364,6 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
|
|
|
362
364
|
}
|
|
363
365
|
}
|
|
364
366
|
};
|
|
365
|
-
AgentPluginRepositoryService = ( __decorate([( __param(0, ICommandService)), ( __param(1,
|
|
367
|
+
AgentPluginRepositoryService = ( __decorate([( __param(0, ICommandService)), ( __param(1, IEnvironmentService)), ( __param(2, IFileService)), ( __param(3, IInstantiationService)), ( __param(4, ILogService)), ( __param(5, INotificationService)), ( __param(6, IPluginGitService)), ( __param(7, IProgressService)), ( __param(8, IStorageService)), ( __param(9, IUserDataProfileService))], AgentPluginRepositoryService));
|
|
366
368
|
|
|
367
369
|
export { AgentPluginRepositoryService };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IAgentHostPermissionService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostPermissionService.service";
|
|
3
|
+
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
4
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
|
+
import { IChatInputNotificationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service";
|
|
6
|
+
/**
|
|
7
|
+
* Bridges {@link IAgentHostPermissionService} to the chat input notification
|
|
8
|
+
* banner. While there are pending permission requests, the oldest one is
|
|
9
|
+
* shown above the chat input with three actions:
|
|
10
|
+
*
|
|
11
|
+
* - **Deny** — reject the request.
|
|
12
|
+
* - **Allow** — approve the request and remember it in memory until the
|
|
13
|
+
* connection closes or the window is reloaded.
|
|
14
|
+
* - **Always allow** — approve and persist into `chat.agentHost.localFilePermissions`.
|
|
15
|
+
*/
|
|
16
|
+
export declare class AgentHostPermissionUiContribution extends Disposable implements IWorkbenchContribution {
|
|
17
|
+
private readonly _permissionService;
|
|
18
|
+
private readonly _chatInputNotificationService;
|
|
19
|
+
private readonly _labelService;
|
|
20
|
+
static readonly ID = "workbench.contrib.agentHostPermissionUi";
|
|
21
|
+
/** Stable id used in {@link IChatInputNotification} so updates replace in place. */
|
|
22
|
+
private static readonly NOTIFICATION_ID;
|
|
23
|
+
private _lastRequestId;
|
|
24
|
+
constructor(_permissionService: IAgentHostPermissionService, _chatInputNotificationService: IChatInputNotificationService, _labelService: ILabelService);
|
|
25
|
+
private _render;
|
|
26
|
+
private _buildNotification;
|
|
27
|
+
private _resolveHostName;
|
|
28
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { escapeMarkdownSyntaxTokens, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
5
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
+
import { AgentHostPermissionMode } from '../../../../../../platform/agentHost/common/agentHostPermissionService.js';
|
|
9
|
+
import { IAgentHostPermissionService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostPermissionService.service';
|
|
10
|
+
import { agentHostAuthority, AGENT_HOST_SCHEME } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
11
|
+
import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
|
|
12
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
13
|
+
import { ChatInputNotificationSeverity } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService';
|
|
14
|
+
import { IChatInputNotificationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service';
|
|
15
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
16
|
+
|
|
17
|
+
var AgentHostPermissionUiContribution_1;
|
|
18
|
+
const ALLOW_COMMAND = "_agentHost.permission.allow";
|
|
19
|
+
const ALLOW_ALWAYS_COMMAND = "_agentHost.permission.allowAlways";
|
|
20
|
+
const DENY_COMMAND = "_agentHost.permission.deny";
|
|
21
|
+
CommandsRegistry.registerCommand(ALLOW_COMMAND, (accessor, requestId) => {
|
|
22
|
+
accessor.get(IAgentHostPermissionService).findPending(requestId)?.allow();
|
|
23
|
+
});
|
|
24
|
+
CommandsRegistry.registerCommand(ALLOW_ALWAYS_COMMAND, (accessor, requestId) => {
|
|
25
|
+
accessor.get(IAgentHostPermissionService).findPending(requestId)?.allowAlways();
|
|
26
|
+
});
|
|
27
|
+
CommandsRegistry.registerCommand(DENY_COMMAND, (accessor, requestId) => {
|
|
28
|
+
accessor.get(IAgentHostPermissionService).findPending(requestId)?.deny();
|
|
29
|
+
});
|
|
30
|
+
let AgentHostPermissionUiContribution = class AgentHostPermissionUiContribution extends Disposable {
|
|
31
|
+
static {
|
|
32
|
+
AgentHostPermissionUiContribution_1 = this;
|
|
33
|
+
}
|
|
34
|
+
static {
|
|
35
|
+
this.ID = "workbench.contrib.agentHostPermissionUi";
|
|
36
|
+
}
|
|
37
|
+
static {
|
|
38
|
+
this.NOTIFICATION_ID = "agentHost.permissionRequest";
|
|
39
|
+
}
|
|
40
|
+
constructor(_permissionService, _chatInputNotificationService, _labelService) {
|
|
41
|
+
super();
|
|
42
|
+
this._permissionService = _permissionService;
|
|
43
|
+
this._chatInputNotificationService = _chatInputNotificationService;
|
|
44
|
+
this._labelService = _labelService;
|
|
45
|
+
this._register(autorun(reader => {
|
|
46
|
+
const pending = this._permissionService.allPending.read(reader);
|
|
47
|
+
this._render(pending);
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
_render(pending) {
|
|
51
|
+
const next = pending[0];
|
|
52
|
+
if (!next) {
|
|
53
|
+
if (this._lastRequestId) {
|
|
54
|
+
this._chatInputNotificationService.deleteNotification(AgentHostPermissionUiContribution_1.NOTIFICATION_ID);
|
|
55
|
+
this._lastRequestId = undefined;
|
|
56
|
+
}
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
this._lastRequestId = next.id;
|
|
60
|
+
this._chatInputNotificationService.setNotification(this._buildNotification(next, pending.length));
|
|
61
|
+
}
|
|
62
|
+
_buildNotification(request, totalPending) {
|
|
63
|
+
const hostName = escapeMarkdownSyntaxTokens(this._resolveHostName(request.address));
|
|
64
|
+
const path = request.uri.scheme === Schemas.file ? request.uri.fsPath : ( request.uri.toString());
|
|
65
|
+
const fence = "`".repeat((path.match(/`+/g)?.reduce((m, s) => Math.max(m, s.length), 0) ?? 0) + 1);
|
|
66
|
+
const codePath = `${fence}${path}${fence}`;
|
|
67
|
+
const message = ( new MarkdownString(request.mode === AgentHostPermissionMode.Write ? ( localize(5158, "Remote agent host \"{0}\" wants to write {1}", hostName, codePath)) : ( localize(5159, "Remote agent host \"{0}\" wants to read {1}", hostName, codePath))));
|
|
68
|
+
const description = totalPending > 1 ? totalPending === 2 ? ( localize(5160, "+1 more request waiting")) : ( localize(5161, "+{0} more requests waiting", totalPending - 1)) : undefined;
|
|
69
|
+
return {
|
|
70
|
+
id: AgentHostPermissionUiContribution_1.NOTIFICATION_ID,
|
|
71
|
+
severity: ChatInputNotificationSeverity.Warning,
|
|
72
|
+
message,
|
|
73
|
+
description,
|
|
74
|
+
actions: [{
|
|
75
|
+
label: ( localize(5162, "Deny")),
|
|
76
|
+
commandId: DENY_COMMAND,
|
|
77
|
+
commandArgs: [request.id]
|
|
78
|
+
}, {
|
|
79
|
+
label: ( localize(5163, "Allow")),
|
|
80
|
+
commandId: ALLOW_COMMAND,
|
|
81
|
+
commandArgs: [request.id]
|
|
82
|
+
}, {
|
|
83
|
+
label: ( localize(5164, "Always Allow")),
|
|
84
|
+
commandId: ALLOW_ALWAYS_COMMAND,
|
|
85
|
+
commandArgs: [request.id]
|
|
86
|
+
}],
|
|
87
|
+
dismissible: false,
|
|
88
|
+
autoDismissOnMessage: false
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
_resolveHostName(address) {
|
|
92
|
+
const authority = agentHostAuthority(address);
|
|
93
|
+
const label = this._labelService.getHostLabel(AGENT_HOST_SCHEME, authority);
|
|
94
|
+
return label && label !== authority ? label : address;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
AgentHostPermissionUiContribution = AgentHostPermissionUiContribution_1 = ( __decorate([( __param(0, IAgentHostPermissionService)), ( __param(1, IChatInputNotificationService)), ( __param(2, ILabelService))], AgentHostPermissionUiContribution));
|
|
98
|
+
|
|
99
|
+
export { AgentHostPermissionUiContribution };
|
|
@@ -4,6 +4,7 @@ import { IAgentHostSessionWorkingDirectoryResolver } from "@codingame/monaco-vsc
|
|
|
4
4
|
export declare class AgentHostSessionWorkingDirectoryResolver implements IAgentHostSessionWorkingDirectoryResolver {
|
|
5
5
|
readonly _serviceBrand: undefined;
|
|
6
6
|
private readonly _resolvers;
|
|
7
|
-
registerResolver(sessionType: string, resolver: (sessionResource: URI) => URI | undefined): IDisposable;
|
|
7
|
+
registerResolver(sessionType: string, resolver: (sessionResource: URI) => URI | undefined, isNewSession?: (sessionResource: URI) => boolean): IDisposable;
|
|
8
8
|
resolve(sessionResource: URI): URI | undefined;
|
|
9
|
+
isNewSession(sessionResource: URI): boolean;
|
|
9
10
|
}
|
|
@@ -7,16 +7,23 @@ class AgentHostSessionWorkingDirectoryResolver {
|
|
|
7
7
|
constructor() {
|
|
8
8
|
this._resolvers = ( new Map());
|
|
9
9
|
}
|
|
10
|
-
registerResolver(sessionType, resolver) {
|
|
11
|
-
|
|
10
|
+
registerResolver(sessionType, resolver, isNewSession) {
|
|
11
|
+
const entry = {
|
|
12
|
+
resolve: resolver,
|
|
13
|
+
isNewSession
|
|
14
|
+
};
|
|
15
|
+
this._resolvers.set(sessionType, entry);
|
|
12
16
|
return toDisposable(() => {
|
|
13
|
-
if (this._resolvers.get(sessionType) ===
|
|
17
|
+
if (this._resolvers.get(sessionType) === entry) {
|
|
14
18
|
this._resolvers.delete(sessionType);
|
|
15
19
|
}
|
|
16
20
|
});
|
|
17
21
|
}
|
|
18
22
|
resolve(sessionResource) {
|
|
19
|
-
return this._resolvers.get(sessionResource.scheme)?.(sessionResource);
|
|
23
|
+
return this._resolvers.get(sessionResource.scheme)?.resolve(sessionResource);
|
|
24
|
+
}
|
|
25
|
+
isNewSession(sessionResource) {
|
|
26
|
+
return this._resolvers.get(sessionResource.scheme)?.isNewSession?.(sessionResource) ?? false;
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js
CHANGED
|
@@ -15,6 +15,7 @@ import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monac
|
|
|
15
15
|
import { registerAction2, MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
16
16
|
import { FocusAgentSessionsAction, PickAgentSessionAction, ArchiveAllAgentSessionsAction, MarkAllAgentSessionsReadAction, ArchiveAgentSessionSectionAction, UnarchiveAgentSessionSectionAction, MarkAgentSessionSectionReadAction, CollapseAllAgentSessionSectionsAction, ArchiveAgentSessionAction, UnarchiveAgentSessionAction, PinAgentSessionAction, UnpinAgentSessionAction, RenameAgentSessionAction, DeleteAgentSessionAction, DeleteAllLocalSessionsAction, MarkAgentSessionUnreadAction, MarkAgentSessionReadAction, OpenAgentSessionInNewWindowAction, OpenAgentSessionInEditorGroupAction, OpenAgentSessionInNewEditorGroupAction, RefreshAgentSessionsViewerAction, FindAgentSessionInViewerAction, ShowAgentSessionsSidebar, HideAgentSessionsSidebar, ToggleAgentSessionsSidebar, ToggleShowAgentSessionsAction, SetAgentSessionsOrientationStackedAction, SetAgentSessionsOrientationSideBySideAction } from './agentSessionsActions.js';
|
|
17
17
|
import { AGENT_SESSIONS_QUICK_ACCESS_PREFIX, AgentSessionsQuickAccessProvider } from './agentSessionsQuickAccess.js';
|
|
18
|
+
import { AgentHostPermissionUiContribution } from './agentHost/agentHostPermissionUiContribution.js';
|
|
18
19
|
|
|
19
20
|
registerAction2(FocusAgentSessionsAction);
|
|
20
21
|
registerAction2(PickAgentSessionAction);
|
|
@@ -46,7 +47,7 @@ registerAction2(SetAgentSessionsOrientationStackedAction);
|
|
|
46
47
|
registerAction2(SetAgentSessionsOrientationSideBySideAction);
|
|
47
48
|
MenuRegistry.appendMenuItem(MenuId.AgentSessionsToolbar, {
|
|
48
49
|
submenu: MenuId.AgentSessionsViewerFilterSubMenu,
|
|
49
|
-
title: ( localize2(
|
|
50
|
+
title: ( localize2(5172, "Filter Agent Sessions")),
|
|
50
51
|
group: "navigation",
|
|
51
52
|
order: 3,
|
|
52
53
|
icon: Codicon.filter
|
|
@@ -116,9 +117,9 @@ MenuRegistry.appendMenuItem(MenuId.ChatViewSessionTitleToolbar, {
|
|
|
116
117
|
prefix: AGENT_SESSIONS_QUICK_ACCESS_PREFIX,
|
|
117
118
|
contextKey: "inAgentSessionsPicker",
|
|
118
119
|
when: ChatContextKeys.enabled,
|
|
119
|
-
placeholder: ( localize(
|
|
120
|
+
placeholder: ( localize(5173, "Search agent sessions by name")),
|
|
120
121
|
helpEntries: [{
|
|
121
|
-
description: ( localize(
|
|
122
|
+
description: ( localize(5174, "Show All Agent Sessions")),
|
|
122
123
|
commandId: "workbench.action.chat.history"
|
|
123
124
|
}]
|
|
124
125
|
});
|
|
@@ -127,3 +128,8 @@ registerWorkbenchContribution2(
|
|
|
127
128
|
LocalAgentsSessionsController,
|
|
128
129
|
WorkbenchPhase.AfterRestored
|
|
129
130
|
);
|
|
131
|
+
registerWorkbenchContribution2(
|
|
132
|
+
AgentHostPermissionUiContribution.ID,
|
|
133
|
+
AgentHostPermissionUiContribution,
|
|
134
|
+
WorkbenchPhase.BlockRestore
|
|
135
|
+
);
|