@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,390 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import * as chatEditingEditorOverlay from './media/chatEditingEditorOverlay.css';
|
|
5
|
+
import { MutableDisposable, Disposable, DisposableStore, toDisposable, DisposableMap, combinedDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
|
+
import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
8
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
10
|
+
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
11
|
+
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
|
+
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
13
|
+
import { addDisposableGenericMouseMoveListener, createElement, append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
14
|
+
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
15
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
|
+
import { AcceptAction, navigationBearingFakeActionId, RejectAction } from './chatEditingEditorActions.js';
|
|
17
|
+
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
18
|
+
import { EditorGroupView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorGroupView';
|
|
19
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
20
|
+
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
21
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
22
|
+
import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
23
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
24
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
25
|
+
import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
26
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
27
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
28
|
+
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
29
|
+
import { getCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
30
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
31
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
32
|
+
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
33
|
+
import { derived, derivedOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
34
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
35
|
+
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
36
|
+
|
|
37
|
+
registerCss(chatEditingEditorOverlay);
|
|
38
|
+
class ChatEditingAcceptRejectActionViewItem extends ActionViewItem {
|
|
39
|
+
constructor(
|
|
40
|
+
action,
|
|
41
|
+
options,
|
|
42
|
+
_entry,
|
|
43
|
+
_editor,
|
|
44
|
+
_keybindingService,
|
|
45
|
+
_primaryActionIds = [AcceptAction.ID]
|
|
46
|
+
) {
|
|
47
|
+
super(undefined, action, {
|
|
48
|
+
...options,
|
|
49
|
+
icon: false,
|
|
50
|
+
label: true,
|
|
51
|
+
keybindingNotRenderedWithLabel: true
|
|
52
|
+
});
|
|
53
|
+
this._entry = _entry;
|
|
54
|
+
this._editor = _editor;
|
|
55
|
+
this._keybindingService = _keybindingService;
|
|
56
|
+
this._primaryActionIds = _primaryActionIds;
|
|
57
|
+
this._reveal = this._store.add(( new MutableDisposable()));
|
|
58
|
+
}
|
|
59
|
+
render(container) {
|
|
60
|
+
super.render(container);
|
|
61
|
+
if (this._primaryActionIds.includes(this._action.id)) {
|
|
62
|
+
this.element?.classList.add("primary");
|
|
63
|
+
}
|
|
64
|
+
if (this._action.id === AcceptAction.ID) {
|
|
65
|
+
const listener = this._store.add(( new MutableDisposable()));
|
|
66
|
+
this._store.add(autorun(r => {
|
|
67
|
+
assertType(this.label);
|
|
68
|
+
assertType(this.element);
|
|
69
|
+
const ctrl = this._entry.read(r)?.autoAcceptController.read(r);
|
|
70
|
+
if (ctrl) {
|
|
71
|
+
const ratio = -100 * (ctrl.remaining / ctrl.total);
|
|
72
|
+
this.element.style.setProperty("--vscode-action-item-auto-timeout", `${ratio}%`);
|
|
73
|
+
this.element.classList.toggle("auto", true);
|
|
74
|
+
listener.value = addDisposableGenericMouseMoveListener(this.element, () => ctrl.cancel());
|
|
75
|
+
} else {
|
|
76
|
+
this.element.classList.toggle("auto", false);
|
|
77
|
+
listener.clear();
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
set actionRunner(actionRunner) {
|
|
83
|
+
super.actionRunner = actionRunner;
|
|
84
|
+
if (this._editor) {
|
|
85
|
+
this._reveal.value = actionRunner.onWillRun(_e => {
|
|
86
|
+
this._editor.focus();
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
get actionRunner() {
|
|
91
|
+
return super.actionRunner;
|
|
92
|
+
}
|
|
93
|
+
getTooltip() {
|
|
94
|
+
const value = super.getTooltip();
|
|
95
|
+
if (!value) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
return this._keybindingService.appendKeybinding(value, this._action.id);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
102
|
+
constructor(_editor, _keybindingService, _instaService) {
|
|
103
|
+
super();
|
|
104
|
+
this._editor = _editor;
|
|
105
|
+
this._keybindingService = _keybindingService;
|
|
106
|
+
this._instaService = _instaService;
|
|
107
|
+
this._showStore = this._store.add(( new DisposableStore()));
|
|
108
|
+
this._session = observableValue(this, undefined);
|
|
109
|
+
this._entry = observableValue(this, undefined);
|
|
110
|
+
this._navigationBearings = observableValue(this, {
|
|
111
|
+
changeCount: -1,
|
|
112
|
+
activeIdx: -1,
|
|
113
|
+
entriesCount: -1
|
|
114
|
+
});
|
|
115
|
+
this._domNode = createElement("div");
|
|
116
|
+
this._domNode.classList.add("chat-editor-overlay-widget");
|
|
117
|
+
this._isBusy = derived(r => {
|
|
118
|
+
const entry = this._entry.read(r);
|
|
119
|
+
return entry?.waitsForLastEdits.read(r);
|
|
120
|
+
});
|
|
121
|
+
const progressNode = createElement("div");
|
|
122
|
+
progressNode.classList.add("chat-editor-overlay-progress");
|
|
123
|
+
append(progressNode, renderIcon(ThemeIcon.modify(Codicon.loading, "spin")));
|
|
124
|
+
const textProgress = append(progressNode, $("span.progress-message"));
|
|
125
|
+
this._domNode.appendChild(progressNode);
|
|
126
|
+
this._store.add(autorun(r => {
|
|
127
|
+
const busy = this._isBusy.read(r);
|
|
128
|
+
this._domNode.classList.toggle("busy", busy);
|
|
129
|
+
textProgress.innerText = "";
|
|
130
|
+
}));
|
|
131
|
+
this._toolbarNode = createElement("div");
|
|
132
|
+
this._toolbarNode.classList.add("chat-editor-overlay-toolbar");
|
|
133
|
+
}
|
|
134
|
+
dispose() {
|
|
135
|
+
this.hide();
|
|
136
|
+
super.dispose();
|
|
137
|
+
}
|
|
138
|
+
getDomNode() {
|
|
139
|
+
return this._domNode;
|
|
140
|
+
}
|
|
141
|
+
show(session, entry, indicies) {
|
|
142
|
+
this._showStore.clear();
|
|
143
|
+
transaction(tx => {
|
|
144
|
+
this._session.set(session, tx);
|
|
145
|
+
this._entry.set(entry, tx);
|
|
146
|
+
});
|
|
147
|
+
this._showStore.add(autorun(r => {
|
|
148
|
+
const entryIndex = indicies.entryIndex.read(r);
|
|
149
|
+
const changeIndex = indicies.changeIndex.read(r);
|
|
150
|
+
const entries = session.entries.read(r);
|
|
151
|
+
let activeIdx = entryIndex !== undefined && changeIndex !== undefined ? changeIndex : -1;
|
|
152
|
+
let totalChangesCount = 0;
|
|
153
|
+
for (let i = 0; i < entries.length; i++) {
|
|
154
|
+
const changesCount = entries[i].changesCount.read(r);
|
|
155
|
+
totalChangesCount += changesCount;
|
|
156
|
+
if (entryIndex !== undefined && i < entryIndex) {
|
|
157
|
+
activeIdx += changesCount;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
this._navigationBearings.set({
|
|
161
|
+
changeCount: totalChangesCount,
|
|
162
|
+
activeIdx,
|
|
163
|
+
entriesCount: entries.length
|
|
164
|
+
}, undefined);
|
|
165
|
+
}));
|
|
166
|
+
this._domNode.appendChild(this._toolbarNode);
|
|
167
|
+
this._showStore.add(toDisposable(() => this._toolbarNode.remove()));
|
|
168
|
+
this._showStore.add(this._instaService.createInstance(
|
|
169
|
+
MenuWorkbenchToolBar,
|
|
170
|
+
this._toolbarNode,
|
|
171
|
+
MenuId.ChatEditingEditorContent,
|
|
172
|
+
{
|
|
173
|
+
telemetrySource: "chatEditor.overlayToolbar",
|
|
174
|
+
hiddenItemStrategy: HiddenItemStrategy.Ignore,
|
|
175
|
+
toolbarOptions: {
|
|
176
|
+
primaryGroup: () => true,
|
|
177
|
+
useSeparatorsInPrimaryActions: true
|
|
178
|
+
},
|
|
179
|
+
menuOptions: {
|
|
180
|
+
renderShortTitle: true
|
|
181
|
+
},
|
|
182
|
+
actionViewItemProvider: (action, options) => {
|
|
183
|
+
const that = this;
|
|
184
|
+
if (action.id === navigationBearingFakeActionId) {
|
|
185
|
+
return new (class extends ActionViewItem {
|
|
186
|
+
constructor() {
|
|
187
|
+
super(undefined, action, {
|
|
188
|
+
...options,
|
|
189
|
+
icon: false,
|
|
190
|
+
label: true,
|
|
191
|
+
keybindingNotRenderedWithLabel: true
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
render(container) {
|
|
195
|
+
super.render(container);
|
|
196
|
+
container.classList.add("label-item");
|
|
197
|
+
this._store.add(autorun(r => {
|
|
198
|
+
assertType(this.label);
|
|
199
|
+
const {
|
|
200
|
+
changeCount,
|
|
201
|
+
activeIdx
|
|
202
|
+
} = that._navigationBearings.read(r);
|
|
203
|
+
if (changeCount > 0) {
|
|
204
|
+
const n = activeIdx === -1 ? "1" : `${activeIdx + 1}`;
|
|
205
|
+
this.label.innerText = ( localize(6357, "{0} of {1}", n, changeCount));
|
|
206
|
+
} else {
|
|
207
|
+
this.label.innerText = ( localize(6358, "—"));
|
|
208
|
+
}
|
|
209
|
+
this.updateTooltip();
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
getTooltip() {
|
|
213
|
+
const {
|
|
214
|
+
changeCount,
|
|
215
|
+
entriesCount
|
|
216
|
+
} = that._navigationBearings.get();
|
|
217
|
+
if (changeCount === -1 || entriesCount === -1) {
|
|
218
|
+
return undefined;
|
|
219
|
+
}
|
|
220
|
+
let result;
|
|
221
|
+
if (changeCount === 1 && entriesCount === 1) {
|
|
222
|
+
result = ( localize(6359, "1 change in 1 file"));
|
|
223
|
+
} else if (changeCount === 1) {
|
|
224
|
+
result = ( localize(6360, "1 change in {0} files", entriesCount));
|
|
225
|
+
} else if (entriesCount === 1) {
|
|
226
|
+
result = ( localize(6361, "{0} changes in 1 file", changeCount));
|
|
227
|
+
} else {
|
|
228
|
+
result = ( localize(6362, "{0} changes in {1} files", changeCount, entriesCount));
|
|
229
|
+
}
|
|
230
|
+
if (!that._isBusy.get()) {
|
|
231
|
+
return result;
|
|
232
|
+
}
|
|
233
|
+
return localize(6363, "{0} - Working...", result);
|
|
234
|
+
}
|
|
235
|
+
})();
|
|
236
|
+
}
|
|
237
|
+
if (action.id === AcceptAction.ID || action.id === RejectAction.ID) {
|
|
238
|
+
return ( new ChatEditingAcceptRejectActionViewItem(action, options, that._entry, that._editor, that._keybindingService));
|
|
239
|
+
}
|
|
240
|
+
return undefined;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
));
|
|
244
|
+
}
|
|
245
|
+
hide() {
|
|
246
|
+
transaction(tx => {
|
|
247
|
+
this._session.set(undefined, tx);
|
|
248
|
+
this._entry.set(undefined, tx);
|
|
249
|
+
this._navigationBearings.set({
|
|
250
|
+
changeCount: -1,
|
|
251
|
+
activeIdx: -1,
|
|
252
|
+
entriesCount: -1
|
|
253
|
+
}, tx);
|
|
254
|
+
});
|
|
255
|
+
this._showStore.clear();
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
ChatEditorOverlayWidget = ( __decorate([( __param(1, IKeybindingService)), ( __param(2, IInstantiationService))], ChatEditorOverlayWidget));
|
|
259
|
+
let ChatEditingOverlayController = class ChatEditingOverlayController {
|
|
260
|
+
constructor(container, group, instaService, chatEditingService) {
|
|
261
|
+
this._store = ( new DisposableStore());
|
|
262
|
+
this._domNode = createElement("div");
|
|
263
|
+
this._domNode.classList.add("chat-editing-editor-overlay");
|
|
264
|
+
this._domNode.style.position = "absolute";
|
|
265
|
+
this._domNode.style.bottom = `24px`;
|
|
266
|
+
this._domNode.style.right = `24px`;
|
|
267
|
+
this._domNode.style.zIndex = `100`;
|
|
268
|
+
const widget = instaService.createInstance(ChatEditorOverlayWidget, group);
|
|
269
|
+
this._domNode.appendChild(widget.getDomNode());
|
|
270
|
+
this._store.add(toDisposable(() => this._domNode.remove()));
|
|
271
|
+
this._store.add(widget);
|
|
272
|
+
const show = () => {
|
|
273
|
+
if (!container.contains(this._domNode)) {
|
|
274
|
+
container.appendChild(this._domNode);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
const hide = () => {
|
|
278
|
+
if (container.contains(this._domNode)) {
|
|
279
|
+
widget.hide();
|
|
280
|
+
this._domNode.remove();
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
const activeEditorSignal = observableSignalFromEvent(this, Event.any(group.onDidActiveEditorChange, group.onDidModelChange));
|
|
284
|
+
const activeUriObs = derivedOpts({
|
|
285
|
+
equalsFn: isEqual
|
|
286
|
+
}, r => {
|
|
287
|
+
activeEditorSignal.read(r);
|
|
288
|
+
const editor = group.activeEditorPane;
|
|
289
|
+
if (!getCodeEditor(editor?.getControl())) {
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
const uri = EditorResourceAccessor.getOriginalUri(editor?.input, {
|
|
293
|
+
supportSideBySide: SideBySideEditor.PRIMARY
|
|
294
|
+
});
|
|
295
|
+
return uri;
|
|
296
|
+
});
|
|
297
|
+
const sessionAndEntry = derived(r => {
|
|
298
|
+
activeEditorSignal.read(r);
|
|
299
|
+
const uri = activeUriObs.read(r);
|
|
300
|
+
if (!uri) {
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
for (const session of chatEditingService.editingSessionsObs.read(r)) {
|
|
304
|
+
if (!session.isGlobalEditingSession) {
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
const entry = session.readEntry(uri, r);
|
|
308
|
+
if (entry) {
|
|
309
|
+
return {
|
|
310
|
+
session,
|
|
311
|
+
entry
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return undefined;
|
|
316
|
+
});
|
|
317
|
+
this._store.add(autorun(r => {
|
|
318
|
+
const data = sessionAndEntry.read(r);
|
|
319
|
+
if (!data) {
|
|
320
|
+
hide();
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
const {
|
|
324
|
+
session,
|
|
325
|
+
entry
|
|
326
|
+
} = data;
|
|
327
|
+
if (entry?.state.read(r) === ModifiedFileEntryState.Modified) {
|
|
328
|
+
const editorPane = group.activeEditorPane;
|
|
329
|
+
assertType(editorPane);
|
|
330
|
+
const changeIndex = derived(
|
|
331
|
+
r => entry ? entry.getEditorIntegration(editorPane).currentIndex.read(r) : 0
|
|
332
|
+
);
|
|
333
|
+
const entryIndex = derived(r => entry ? session.entries.read(r).indexOf(entry) : 0);
|
|
334
|
+
widget.show(session, entry, {
|
|
335
|
+
entryIndex,
|
|
336
|
+
changeIndex
|
|
337
|
+
});
|
|
338
|
+
show();
|
|
339
|
+
} else {
|
|
340
|
+
hide();
|
|
341
|
+
}
|
|
342
|
+
}));
|
|
343
|
+
}
|
|
344
|
+
dispose() {
|
|
345
|
+
this._store.dispose();
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
ChatEditingOverlayController = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IChatEditingService))], ChatEditingOverlayController));
|
|
349
|
+
let ChatEditingEditorOverlay = class ChatEditingEditorOverlay {
|
|
350
|
+
static {
|
|
351
|
+
this.ID = "chat.edits.editorOverlay";
|
|
352
|
+
}
|
|
353
|
+
constructor(editorGroupsService, instantiationService, environmentService) {
|
|
354
|
+
this._store = ( new DisposableStore());
|
|
355
|
+
const editorGroups = observableFromEvent(
|
|
356
|
+
this,
|
|
357
|
+
Event.any(editorGroupsService.onDidAddGroup, editorGroupsService.onDidRemoveGroup),
|
|
358
|
+
() => editorGroupsService.groups
|
|
359
|
+
);
|
|
360
|
+
const overlayWidgets = this._store.add(( new DisposableMap()));
|
|
361
|
+
this._store.add(autorun(r => {
|
|
362
|
+
if (environmentService.isSessionsWindow) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const toDelete = ( new Set(( overlayWidgets.keys())));
|
|
366
|
+
const groups = editorGroups.read(r);
|
|
367
|
+
for (const group of groups) {
|
|
368
|
+
if (!(group instanceof EditorGroupView)) {
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
toDelete.delete(group);
|
|
372
|
+
if (!( overlayWidgets.has(group))) {
|
|
373
|
+
const scopedInstaService = instantiationService.createChild(( new ServiceCollection([IContextKeyService, group.scopedContextKeyService])));
|
|
374
|
+
const container = group.element;
|
|
375
|
+
const ctrl = scopedInstaService.createInstance(ChatEditingOverlayController, container, group);
|
|
376
|
+
overlayWidgets.set(group, combinedDisposable(ctrl, scopedInstaService));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
for (const group of toDelete) {
|
|
380
|
+
overlayWidgets.deleteAndDispose(group);
|
|
381
|
+
}
|
|
382
|
+
}));
|
|
383
|
+
}
|
|
384
|
+
dispose() {
|
|
385
|
+
this._store.dispose();
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
ChatEditingEditorOverlay = ( __decorate([( __param(0, IEditorGroupsService)), ( __param(1, IInstantiationService)), ( __param(2, IWorkbenchEnvironmentService))], ChatEditingEditorOverlay));
|
|
389
|
+
|
|
390
|
+
export { ChatEditingAcceptRejectActionViewItem, ChatEditingEditorOverlay };
|
|
@@ -129,7 +129,7 @@ let ChatEditingExplanationModelManager = class ChatEditingExplanationModelManage
|
|
|
129
129
|
this._updateUriStatePartial(fileData.uri, {
|
|
130
130
|
progress: "error",
|
|
131
131
|
explanations: [],
|
|
132
|
-
errorMessage: ( localize(
|
|
132
|
+
errorMessage: ( localize(6364, "No language model available"))
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
return;
|
|
@@ -200,7 +200,7 @@ Example response format:
|
|
|
200
200
|
for (const fileData of fileChanges) {
|
|
201
201
|
const explanations = [];
|
|
202
202
|
for (const data of fileData.changes) {
|
|
203
|
-
const parsedExplanation = parsed[parsedIndex]?.explanation?.trim() || ( localize(
|
|
203
|
+
const parsedExplanation = parsed[parsedIndex]?.explanation?.trim() || ( localize(6365, "Code was modified."));
|
|
204
204
|
explanations.push({
|
|
205
205
|
uri: fileData.uri,
|
|
206
206
|
startLineNumber: data.startLineNumber,
|
|
@@ -218,7 +218,7 @@ Example response format:
|
|
|
218
218
|
}
|
|
219
219
|
} catch (e) {
|
|
220
220
|
if (!cancellationToken.isCancellationRequested) {
|
|
221
|
-
const errorMessage = e instanceof Error ? e.message : ( localize(
|
|
221
|
+
const errorMessage = e instanceof Error ? e.message : ( localize(6366, "Failed to generate explanations"));
|
|
222
222
|
for (const fileData of fileChanges) {
|
|
223
223
|
this._updateUriStatePartial(fileData.uri, {
|
|
224
224
|
progress: "error",
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
import { DetailedLineRangeMapping, LineRangeMapping } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping";
|
|
4
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
6
|
+
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
7
|
+
import { IExplanationDiffInfo } from "./chatEditingExplanationModelManager.js";
|
|
8
|
+
import { IChatEditingExplanationModelManager } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service";
|
|
9
|
+
/**
|
|
10
|
+
* Widget that displays explanatory comments for chat-made changes
|
|
11
|
+
* Positioned on the right side of the editor like a speech bubble
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChatEditingExplanationWidget extends Disposable implements IOverlayWidget {
|
|
14
|
+
private readonly _editor;
|
|
15
|
+
private _changes;
|
|
16
|
+
private readonly _chatWidgetService;
|
|
17
|
+
private readonly _viewsService;
|
|
18
|
+
private readonly _chatSessionResource?;
|
|
19
|
+
private static _idPool;
|
|
20
|
+
private readonly _id;
|
|
21
|
+
private readonly _domNode;
|
|
22
|
+
private readonly _headerNode;
|
|
23
|
+
private readonly _readIndicator;
|
|
24
|
+
private readonly _titleNode;
|
|
25
|
+
private readonly _dismissButton;
|
|
26
|
+
private readonly _toggleButton;
|
|
27
|
+
private readonly _bodyNode;
|
|
28
|
+
private readonly _explanationItems;
|
|
29
|
+
private _position;
|
|
30
|
+
private _explanations;
|
|
31
|
+
private _isExpanded;
|
|
32
|
+
private _isAllRead;
|
|
33
|
+
private _disposed;
|
|
34
|
+
private _startLineNumber;
|
|
35
|
+
private readonly _uri;
|
|
36
|
+
private readonly _rangeHighlightDecoration;
|
|
37
|
+
private readonly _eventStore;
|
|
38
|
+
constructor(_editor: ICodeEditor, _changes: readonly (LineRangeMapping | DetailedLineRangeMapping)[], diffInfo: IExplanationDiffInfo, _chatWidgetService: IChatWidgetService, _viewsService: IViewsService, _chatSessionResource?: URI | undefined);
|
|
39
|
+
private _setupEventHandlers;
|
|
40
|
+
private _toggleExpanded;
|
|
41
|
+
private _dismiss;
|
|
42
|
+
private _updateReadIndicator;
|
|
43
|
+
private _updateTitle;
|
|
44
|
+
private _updateToggleButton;
|
|
45
|
+
private _buildExplanationItems;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the explanation for a change matching the given line number range.
|
|
48
|
+
* @returns true if a matching explanation was found and updated
|
|
49
|
+
*/
|
|
50
|
+
setExplanationByLineNumber(startLineNumber: number, endLineNumber: number, explanation: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the number of explanations in this widget.
|
|
53
|
+
*/
|
|
54
|
+
get explanationCount(): number;
|
|
55
|
+
private _updateExplanationText;
|
|
56
|
+
private _updateItemReadIndicator;
|
|
57
|
+
private _updateExplanationItemsReadState;
|
|
58
|
+
/**
|
|
59
|
+
* Updates the widget position and layout
|
|
60
|
+
*/
|
|
61
|
+
layout(startLineNumber: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* Shows or hides the widget
|
|
64
|
+
*/
|
|
65
|
+
toggle(show: boolean): void;
|
|
66
|
+
/**
|
|
67
|
+
* Relayouts the widget at its current line number
|
|
68
|
+
*/
|
|
69
|
+
relayout(): void;
|
|
70
|
+
getId(): string;
|
|
71
|
+
getDomNode(): HTMLElement;
|
|
72
|
+
getPosition(): IOverlayWidgetPosition | null;
|
|
73
|
+
dispose(): void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Manager for explanation widgets in an editor
|
|
77
|
+
* Groups changes and creates combined widgets for nearby changes
|
|
78
|
+
*/
|
|
79
|
+
export declare class ChatEditingExplanationWidgetManager extends Disposable {
|
|
80
|
+
private readonly _editor;
|
|
81
|
+
private readonly _chatWidgetService;
|
|
82
|
+
private readonly _viewsService;
|
|
83
|
+
private readonly _modelUri;
|
|
84
|
+
private readonly _widgets;
|
|
85
|
+
private _visible;
|
|
86
|
+
private _chatSessionResource;
|
|
87
|
+
private _diffInfo;
|
|
88
|
+
constructor(_editor: ICodeEditor, _chatWidgetService: IChatWidgetService, _viewsService: IViewsService, modelManager: IChatEditingExplanationModelManager, _modelUri: URI);
|
|
89
|
+
private _createWidgets;
|
|
90
|
+
private _handleExplanations;
|
|
91
|
+
/**
|
|
92
|
+
* Shows all widgets
|
|
93
|
+
*/
|
|
94
|
+
show(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Hides all widgets
|
|
97
|
+
*/
|
|
98
|
+
hide(): void;
|
|
99
|
+
private _clearWidgets;
|
|
100
|
+
dispose(): void;
|
|
101
|
+
}
|