@codingame/monaco-vscode-chat-service-override 31.0.1 → 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
|
@@ -3,19 +3,15 @@ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
3
3
|
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
4
4
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
5
|
import { createToolSimpleTextResult } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers';
|
|
6
|
+
import { WorkingDirectory } from '../../common/workingDirectory.js';
|
|
6
7
|
|
|
7
|
-
function resolveToolUri(input, workspaceContextService) {
|
|
8
|
+
function resolveToolUri(input, workspaceContextService, workingDirectory) {
|
|
8
9
|
if (input.uri) {
|
|
9
10
|
return ( URI.parse(input.uri));
|
|
10
11
|
}
|
|
11
12
|
if (input.filePath) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
return folders[0].toResource(input.filePath);
|
|
15
|
-
}
|
|
16
|
-
for (const folder of folders) {
|
|
17
|
-
return folder.toResource(input.filePath);
|
|
18
|
-
}
|
|
13
|
+
const workingDir = ( new WorkingDirectory(workspaceContextService, workingDirectory));
|
|
14
|
+
return workingDir.resolveRelativePath(input.filePath);
|
|
19
15
|
}
|
|
20
16
|
return undefined;
|
|
21
17
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
5
|
+
import { IToolResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
6
|
+
import { IToolResultFilter } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/toolResultCompressor";
|
|
7
|
+
import { IToolResultCompressor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/toolResultCompressor.service";
|
|
8
|
+
export declare class ToolResultCompressorService extends Disposable implements IToolResultCompressor {
|
|
9
|
+
private readonly _configurationService;
|
|
10
|
+
private readonly _telemetryService;
|
|
11
|
+
private readonly _logService;
|
|
12
|
+
readonly _serviceBrand: undefined;
|
|
13
|
+
private readonly _filters;
|
|
14
|
+
constructor(_configurationService: IConfigurationService, _telemetryService: ITelemetryService, _logService: ILogService);
|
|
15
|
+
registerFilter(filter: IToolResultFilter): void;
|
|
16
|
+
maybeCompress(toolId: string, input: unknown, result: IToolResult): IToolResult | undefined;
|
|
17
|
+
private _sendTelemetry;
|
|
18
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
7
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
8
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
9
|
+
|
|
10
|
+
let ToolResultCompressorService = class ToolResultCompressorService extends Disposable {
|
|
11
|
+
constructor(_configurationService, _telemetryService, _logService) {
|
|
12
|
+
super();
|
|
13
|
+
this._configurationService = _configurationService;
|
|
14
|
+
this._telemetryService = _telemetryService;
|
|
15
|
+
this._logService = _logService;
|
|
16
|
+
this._filters = ( new Map());
|
|
17
|
+
}
|
|
18
|
+
registerFilter(filter) {
|
|
19
|
+
for (const id of filter.toolIds) {
|
|
20
|
+
let bucket = this._filters.get(id);
|
|
21
|
+
if (!bucket) {
|
|
22
|
+
bucket = [];
|
|
23
|
+
this._filters.set(id, bucket);
|
|
24
|
+
}
|
|
25
|
+
bucket.push(filter);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
maybeCompress(toolId, input, result) {
|
|
29
|
+
if (!this._configurationService.getValue(ChatConfiguration.CompressOutputEnabled)) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const filters = this._filters.get(toolId);
|
|
33
|
+
if (!filters || filters.length === 0) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
const matchingFilters = filters.filter(f => f.matches(toolId, input));
|
|
37
|
+
if (matchingFilters.length === 0) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
matchingFilters.slice();
|
|
41
|
+
{
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
_sendTelemetry(toolId, filterIds, beforeChars, afterChars) {
|
|
46
|
+
this._telemetryService.publicLog2("toolResultCompressed", {
|
|
47
|
+
toolId,
|
|
48
|
+
filters: filterIds.join(","),
|
|
49
|
+
beforeChars,
|
|
50
|
+
afterChars
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
ToolResultCompressorService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, ITelemetryService)), ( __param(2, ILogService))], ToolResultCompressorService));
|
|
55
|
+
|
|
56
|
+
export { ToolResultCompressorService };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
3
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
5
4
|
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
|
|
6
5
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
7
|
-
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
8
6
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
7
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
10
8
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
@@ -14,15 +12,13 @@ import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/
|
|
|
14
12
|
export declare const UsagesToolId = "vscode_listCodeUsages";
|
|
15
13
|
export declare class UsagesTool extends Disposable implements IToolImpl {
|
|
16
14
|
private readonly _languageFeaturesService;
|
|
17
|
-
private readonly _languageService;
|
|
18
15
|
private readonly _modelService;
|
|
19
16
|
private readonly _searchService;
|
|
20
17
|
private readonly _textModelService;
|
|
21
18
|
private readonly _workspaceContextService;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
getToolData(): IToolData | undefined;
|
|
19
|
+
constructor(_languageFeaturesService: ILanguageFeaturesService, _modelService: IModelService, _searchService: ISearchService, _textModelService: ITextModelService, _workspaceContextService: IWorkspaceContextService);
|
|
20
|
+
getToolData(): IToolData;
|
|
21
|
+
private _buildToolData;
|
|
26
22
|
prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
27
23
|
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
28
24
|
private _getLinePreviews;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
-
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
4
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
5
|
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
7
6
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
@@ -13,7 +12,6 @@ import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core
|
|
|
13
12
|
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
14
13
|
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
15
14
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
16
|
-
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
17
15
|
import { getDefinitionsAtPosition, getReferencesAtPosition, getImplementationsAtPosition } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/gotoSymbol/browser/goToSymbol';
|
|
18
16
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
19
17
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -38,10 +36,12 @@ Input:
|
|
|
38
36
|
IMPORTANT: The file and line do NOT need to be the definition of the symbol. Any occurrence works - a usage, an import, a call site, etc. You can pick whichever occurrence is most convenient.
|
|
39
37
|
|
|
40
38
|
If the tool returns an error, retry with corrected input - ensure the file path is correct, the line content matches the actual file content, and the symbol name appears in that line.`;
|
|
39
|
+
const StaticModelDescription = BaseModelDescription + `
|
|
40
|
+
|
|
41
|
+
If the file's language has no reference provider registered, the tool returns an error.`;
|
|
41
42
|
let UsagesTool = class UsagesTool extends Disposable {
|
|
42
43
|
constructor(
|
|
43
44
|
_languageFeaturesService,
|
|
44
|
-
_languageService,
|
|
45
45
|
_modelService,
|
|
46
46
|
_searchService,
|
|
47
47
|
_textModelService,
|
|
@@ -49,45 +49,21 @@ let UsagesTool = class UsagesTool extends Disposable {
|
|
|
49
49
|
) {
|
|
50
50
|
super();
|
|
51
51
|
this._languageFeaturesService = _languageFeaturesService;
|
|
52
|
-
this._languageService = _languageService;
|
|
53
52
|
this._modelService = _modelService;
|
|
54
53
|
this._searchService = _searchService;
|
|
55
54
|
this._textModelService = _textModelService;
|
|
56
55
|
this._workspaceContextService = _workspaceContextService;
|
|
57
|
-
this._onDidUpdateToolData = this._store.add(( new Emitter()));
|
|
58
|
-
this.onDidUpdateToolData = this._onDidUpdateToolData.event;
|
|
59
|
-
this._store.add(Event.debounce(
|
|
60
|
-
this._languageFeaturesService.referenceProvider.onDidChange,
|
|
61
|
-
() => {},
|
|
62
|
-
2000
|
|
63
|
-
)((() => this._onDidUpdateToolData.fire())));
|
|
64
56
|
}
|
|
65
57
|
getToolData() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
let modelDescription = BaseModelDescription;
|
|
71
|
-
let userDescription;
|
|
72
|
-
if (( languageIds.has("*"))) {
|
|
73
|
-
modelDescription += "\n\nSupported for all languages.";
|
|
74
|
-
userDescription = ( localize(6779, "Find references, definitions, and implementations of a symbol"));
|
|
75
|
-
} else {
|
|
76
|
-
const sorted = [...languageIds].sort();
|
|
77
|
-
modelDescription += `\n\nCurrently supported for: ${sorted.join(", ")}.`;
|
|
78
|
-
const niceNames = ( sorted.map(id => this._languageService.getLanguageName(id) ?? id));
|
|
79
|
-
userDescription = ( localize(
|
|
80
|
-
6780,
|
|
81
|
-
"Find references, definitions, and implementations of a symbol ({0})",
|
|
82
|
-
niceNames.join(", ")
|
|
83
|
-
));
|
|
84
|
-
}
|
|
58
|
+
return this._buildToolData(StaticModelDescription, ( localize(7026, "Find references, definitions, and implementations of a symbol")));
|
|
59
|
+
}
|
|
60
|
+
_buildToolData(modelDescription, userDescription) {
|
|
85
61
|
return {
|
|
86
62
|
id: UsagesToolId,
|
|
87
63
|
toolReferenceName: "usages",
|
|
88
64
|
canBeReferencedInPrompt: false,
|
|
89
65
|
icon: ThemeIcon.fromId(Codicon.references.id),
|
|
90
|
-
displayName: ( localize(
|
|
66
|
+
displayName: ( localize(7027, "List Code Usages")),
|
|
91
67
|
userDescription,
|
|
92
68
|
modelDescription,
|
|
93
69
|
source: ToolDataSource.Internal,
|
|
@@ -119,12 +95,12 @@ let UsagesTool = class UsagesTool extends Disposable {
|
|
|
119
95
|
async prepareToolInvocation(context, _token) {
|
|
120
96
|
const input = context.parameters;
|
|
121
97
|
return {
|
|
122
|
-
invocationMessage: ( localize(
|
|
98
|
+
invocationMessage: ( localize(7028, "Analyzing usages of `{0}`", input.symbol))
|
|
123
99
|
};
|
|
124
100
|
}
|
|
125
101
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
126
102
|
const input = invocation.parameters;
|
|
127
|
-
const uri = resolveToolUri(input, this._workspaceContextService);
|
|
103
|
+
const uri = resolveToolUri(input, this._workspaceContextService, invocation.context?.workingDirectory);
|
|
128
104
|
if (!uri) {
|
|
129
105
|
return errorResult(
|
|
130
106
|
"Provide either \"uri\" (a full URI) or \"filePath\" (a workspace-relative path) to identify the file."
|
|
@@ -172,7 +148,7 @@ let UsagesTool = class UsagesTool extends Disposable {
|
|
|
172
148
|
)]);
|
|
173
149
|
if (references.length === 0) {
|
|
174
150
|
const result = createToolSimpleTextResult(`No usages found for \`${input.symbol}\`.`);
|
|
175
|
-
result.toolResultMessage = ( new MarkdownString(( localize(
|
|
151
|
+
result.toolResultMessage = ( new MarkdownString(( localize(7029, "Analyzed usages of `{0}`, no results", input.symbol))));
|
|
176
152
|
return result;
|
|
177
153
|
}
|
|
178
154
|
const previews = await this._getLinePreviews(input.symbol, references, token);
|
|
@@ -193,8 +169,8 @@ let UsagesTool = class UsagesTool extends Disposable {
|
|
|
193
169
|
}
|
|
194
170
|
const text = lines.join("\n");
|
|
195
171
|
const result = createToolSimpleTextResult(text);
|
|
196
|
-
result.toolResultMessage = references.length === 1 ? ( new MarkdownString(( localize(
|
|
197
|
-
|
|
172
|
+
result.toolResultMessage = references.length === 1 ? ( new MarkdownString(( localize(7030, "Analyzed usages of `{0}`, 1 result", input.symbol)))) : ( new MarkdownString(( localize(
|
|
173
|
+
7031,
|
|
198
174
|
"Analyzed usages of `{0}`, {1} results",
|
|
199
175
|
input.symbol,
|
|
200
176
|
references.length
|
|
@@ -296,7 +272,7 @@ let UsagesTool = class UsagesTool extends Disposable {
|
|
|
296
272
|
return Range.areIntersectingOrTouching(a.range, b.range);
|
|
297
273
|
}
|
|
298
274
|
};
|
|
299
|
-
UsagesTool = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1,
|
|
275
|
+
UsagesTool = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1, IModelService)), ( __param(2, ISearchService)), ( __param(3, ITextModelService)), ( __param(4, IWorkspaceContextService))], UsagesTool));
|
|
300
276
|
let UsagesToolContribution = class UsagesToolContribution extends Disposable {
|
|
301
277
|
static {
|
|
302
278
|
this.ID = "chat.usagesTool";
|
|
@@ -304,21 +280,7 @@ let UsagesToolContribution = class UsagesToolContribution extends Disposable {
|
|
|
304
280
|
constructor(toolsService, instantiationService) {
|
|
305
281
|
super();
|
|
306
282
|
const usagesTool = this._store.add(instantiationService.createInstance(UsagesTool));
|
|
307
|
-
|
|
308
|
-
const registerUsagesTool = () => {
|
|
309
|
-
registration?.dispose();
|
|
310
|
-
registration = undefined;
|
|
311
|
-
toolsService.flushToolUpdates();
|
|
312
|
-
const toolData = usagesTool.getToolData();
|
|
313
|
-
if (toolData) {
|
|
314
|
-
registration = toolsService.registerTool(toolData, usagesTool);
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
registerUsagesTool();
|
|
318
|
-
this._store.add(usagesTool.onDidUpdateToolData(registerUsagesTool));
|
|
319
|
-
this._store.add({
|
|
320
|
-
dispose: () => registration?.dispose()
|
|
321
|
-
});
|
|
283
|
+
this._store.add(toolsService.registerTool(usagesTool.getToolData(), usagesTool));
|
|
322
284
|
}
|
|
323
285
|
};
|
|
324
286
|
UsagesToolContribution = ( __decorate([( __param(0, ILanguageModelToolsService)), ( __param(1, IInstantiationService))], UsagesToolContribution));
|
package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js
CHANGED
|
@@ -17,29 +17,29 @@ const chatViewsWelcomeJsonSchema = {
|
|
|
17
17
|
properties: {
|
|
18
18
|
icon: {
|
|
19
19
|
type: "string",
|
|
20
|
-
description: ( localize(
|
|
20
|
+
description: ( localize(7032, "The icon for the welcome message."))
|
|
21
21
|
},
|
|
22
22
|
title: {
|
|
23
23
|
type: "string",
|
|
24
|
-
description: ( localize(
|
|
24
|
+
description: ( localize(7033, "The title of the welcome message."))
|
|
25
25
|
},
|
|
26
26
|
content: {
|
|
27
27
|
type: "string",
|
|
28
28
|
description: ( localize(
|
|
29
|
-
|
|
29
|
+
7034,
|
|
30
30
|
"The content of the welcome message. The first command link will be rendered as a button."
|
|
31
31
|
))
|
|
32
32
|
},
|
|
33
33
|
when: {
|
|
34
34
|
type: "string",
|
|
35
|
-
description: ( localize(
|
|
35
|
+
description: ( localize(7035, "Condition when the welcome message is shown."))
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const chatViewsWelcomeExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
40
40
|
extensionPoint: "chatViewsWelcome",
|
|
41
41
|
jsonSchema: {
|
|
42
|
-
description: ( localize(
|
|
42
|
+
description: ( localize(7036, "Contributes a welcome message to a chat view")),
|
|
43
43
|
type: "array",
|
|
44
44
|
items: chatViewsWelcomeJsonSchema
|
|
45
45
|
}
|
|
@@ -2,6 +2,7 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
|
|
|
2
2
|
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
|
|
5
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
6
|
import { type PreferredGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService";
|
|
6
7
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
7
8
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
@@ -19,6 +20,7 @@ export declare class ChatWidgetService extends Disposable implements IChatWidget
|
|
|
19
20
|
private readonly layoutService;
|
|
20
21
|
private readonly editorService;
|
|
21
22
|
private readonly chatService;
|
|
23
|
+
private readonly logService;
|
|
22
24
|
readonly _serviceBrand: undefined;
|
|
23
25
|
private _widgets;
|
|
24
26
|
private _lastFocusedWidget;
|
|
@@ -30,7 +32,7 @@ export declare class ChatWidgetService extends Disposable implements IChatWidget
|
|
|
30
32
|
readonly onDidChangeFocusedWidget: Event<IChatWidget | undefined>;
|
|
31
33
|
private readonly _onDidChangeFocusedSession;
|
|
32
34
|
readonly onDidChangeFocusedSession: Event<void>;
|
|
33
|
-
constructor(editorGroupsService: IEditorGroupsService, viewsService: IViewsService, quickChatService: IQuickChatService, layoutService: ILayoutService, editorService: IEditorService, chatService: IChatService);
|
|
35
|
+
constructor(editorGroupsService: IEditorGroupsService, viewsService: IViewsService, quickChatService: IQuickChatService, layoutService: ILayoutService, editorService: IEditorService, chatService: IChatService, logService: ILogService);
|
|
34
36
|
get lastFocusedWidget(): IChatWidget | undefined;
|
|
35
37
|
getAllWidgets(): ReadonlyArray<IChatWidget>;
|
|
36
38
|
getWidgetsByLocations(location: ChatAgentLocation): ReadonlyArray<IChatWidget>;
|
|
@@ -6,6 +6,7 @@ import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
6
6
|
import { Disposable, combinedDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
8
|
import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
|
|
9
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
9
10
|
import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
10
11
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
12
|
import { isEditorGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
@@ -24,7 +25,8 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
24
25
|
quickChatService,
|
|
25
26
|
layoutService,
|
|
26
27
|
editorService,
|
|
27
|
-
chatService
|
|
28
|
+
chatService,
|
|
29
|
+
logService
|
|
28
30
|
) {
|
|
29
31
|
super();
|
|
30
32
|
this.editorGroupsService = editorGroupsService;
|
|
@@ -33,6 +35,7 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
33
35
|
this.layoutService = layoutService;
|
|
34
36
|
this.editorService = editorService;
|
|
35
37
|
this.chatService = chatService;
|
|
38
|
+
this.logService = logService;
|
|
36
39
|
this._widgets = [];
|
|
37
40
|
this._lastFocusedWidget = undefined;
|
|
38
41
|
this._onDidAddWidget = this._register(( new Emitter()));
|
|
@@ -85,9 +88,15 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
85
88
|
return false;
|
|
86
89
|
}
|
|
87
90
|
async openSession(sessionResource, target, options) {
|
|
91
|
+
const t0 = Date.now();
|
|
92
|
+
const targetKind = target === ChatViewPaneTarget ? "view" : (typeof target === "undefined" ? "undefined" : "editor");
|
|
93
|
+
this.logService.trace(`[ChatWidgetService] openSession start uri=${( sessionResource.toString())} target=${targetKind}`);
|
|
88
94
|
if (typeof target === "undefined" || options?.revealIfOpened) {
|
|
89
95
|
const alreadyOpenWidget = await this.revealSessionIfAlreadyOpen(sessionResource, options);
|
|
90
96
|
if (alreadyOpenWidget) {
|
|
97
|
+
this.logService.trace(
|
|
98
|
+
`[ChatWidgetService] openSession done total=${Date.now() - t0}ms uri=${( sessionResource.toString())} path=reveal`
|
|
99
|
+
);
|
|
91
100
|
return alreadyOpenWidget;
|
|
92
101
|
}
|
|
93
102
|
} else {
|
|
@@ -101,6 +110,9 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
101
110
|
chatView.focusInput();
|
|
102
111
|
}
|
|
103
112
|
}
|
|
113
|
+
this.logService.trace(
|
|
114
|
+
`[ChatWidgetService] openSession done total=${Date.now() - t0}ms uri=${( sessionResource.toString())} path=view`
|
|
115
|
+
);
|
|
104
116
|
return chatView?.widget;
|
|
105
117
|
}
|
|
106
118
|
const pane = await this.editorService.openEditor({
|
|
@@ -110,6 +122,9 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
110
122
|
revealIfOpened: options?.revealIfOpened ?? true
|
|
111
123
|
}
|
|
112
124
|
}, target);
|
|
125
|
+
this.logService.trace(
|
|
126
|
+
`[ChatWidgetService] openSession done total=${Date.now() - t0}ms uri=${( sessionResource.toString())} path=editor`
|
|
127
|
+
);
|
|
113
128
|
return pane instanceof ChatEditor ? pane.widget : undefined;
|
|
114
129
|
}
|
|
115
130
|
async revealSessionIfAlreadyOpen(sessionResource, options) {
|
|
@@ -225,6 +240,6 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
|
|
|
225
240
|
);
|
|
226
241
|
}
|
|
227
242
|
};
|
|
228
|
-
ChatWidgetService = ( __decorate([( __param(0, IEditorGroupsService)), ( __param(1, IViewsService)), ( __param(2, IQuickChatService)), ( __param(3, ILayoutService)), ( __param(4, IEditorService)), ( __param(5, IChatService))], ChatWidgetService));
|
|
243
|
+
ChatWidgetService = ( __decorate([( __param(0, IEditorGroupsService)), ( __param(1, IViewsService)), ( __param(2, IQuickChatService)), ( __param(3, ILayoutService)), ( __param(4, IEditorService)), ( __param(5, IChatService)), ( __param(6, ILogService))], ChatWidgetService));
|
|
229
244
|
|
|
230
245
|
export { ChatWidgetService };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
21
21
|
export declare class ChatQueuePickerActionItem extends BaseActionViewItem {
|
|
22
22
|
private readonly commandService;
|
|
23
23
|
private readonly configurationService;
|
|
24
|
+
private readonly keybindingService;
|
|
25
|
+
private readonly contextKeyService;
|
|
24
26
|
private readonly _primaryActionAction;
|
|
25
27
|
private readonly _primaryAction;
|
|
26
28
|
private readonly _dropdown;
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js
CHANGED
|
@@ -37,23 +37,25 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
37
37
|
super(undefined, action);
|
|
38
38
|
this.commandService = commandService;
|
|
39
39
|
this.configurationService = configurationService;
|
|
40
|
+
this.keybindingService = keybindingService;
|
|
41
|
+
this.contextKeyService = contextKeyService;
|
|
40
42
|
this._altKeyPressed = false;
|
|
41
43
|
const isSteerDefault = this._isSteerDefault();
|
|
42
|
-
this._primaryActionAction = this._register(( new Action("chat.queuePickerPrimary", isSteerDefault ? ( localize(
|
|
44
|
+
this._primaryActionAction = this._register(( new Action("chat.queuePickerPrimary", isSteerDefault ? ( localize(7495, "Steer with Message")) : ( localize(7496, "Add to Queue")), ThemeIcon.asClassName(isSteerDefault ? Codicon.arrowUp : Codicon.add), !!this.contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key), () => this._runDefaultAction())));
|
|
43
45
|
this._primaryAction = this._register(( new ActionViewItem(undefined, this._primaryActionAction, {
|
|
44
46
|
icon: true,
|
|
45
47
|
label: false
|
|
46
48
|
})));
|
|
47
|
-
this._register(contextKeyService.onDidChangeContext(e => {
|
|
48
|
-
this._primaryActionAction.enabled = !!contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key);
|
|
49
|
+
this._register(this.contextKeyService.onDidChangeContext(e => {
|
|
50
|
+
this._primaryActionAction.enabled = !!this.contextKeyService.getContextKeyValue(ChatContextKeys.inputHasText.key);
|
|
49
51
|
}));
|
|
50
|
-
const dropdownAction = this._register(( new Action("chat.queuePickerDropdown", ( localize(
|
|
52
|
+
const dropdownAction = this._register(( new Action("chat.queuePickerDropdown", ( localize(7497, "More Actions...")))));
|
|
51
53
|
this._dropdown = this._register(( new ChevronActionWidgetDropdown(dropdownAction, {
|
|
52
54
|
actionProvider: {
|
|
53
55
|
getActions: () => this._getDropdownActions()
|
|
54
56
|
},
|
|
55
57
|
showItemKeybindings: true
|
|
56
|
-
}, actionWidgetService, keybindingService, contextKeyService, telemetryService)));
|
|
58
|
+
}, actionWidgetService, this.keybindingService, this.contextKeyService, telemetryService)));
|
|
57
59
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
58
60
|
if (e.affectsConfiguration(ChatConfiguration.RequestQueueingDefaultAction)) {
|
|
59
61
|
this._updatePrimaryAction();
|
|
@@ -75,7 +77,7 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
75
77
|
}
|
|
76
78
|
_updatePrimaryAction() {
|
|
77
79
|
const isSteer = this._isEffectiveSteer();
|
|
78
|
-
this._primaryActionAction.label = isSteer ? ( localize(
|
|
80
|
+
this._primaryActionAction.label = isSteer ? ( localize(7495, "Steer with Message")) : ( localize(7496, "Add to Queue"));
|
|
79
81
|
this._primaryActionAction.class = ThemeIcon.asClassName(isSteer ? Codicon.arrowUp : Codicon.add);
|
|
80
82
|
}
|
|
81
83
|
_runDefaultAction() {
|
|
@@ -123,17 +125,25 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
123
125
|
}
|
|
124
126
|
_getDropdownActions() {
|
|
125
127
|
const isSteerDefault = this._isSteerDefault();
|
|
128
|
+
const lookupContext = this.contextKeyService.createOverlay([
|
|
129
|
+
[ChatContextKeys.inputHasText.key, true],
|
|
130
|
+
[ChatContextKeys.inChatInput.key, true],
|
|
131
|
+
[ChatContextKeys.requestInProgress.key, true]
|
|
132
|
+
]);
|
|
133
|
+
const queueKeybinding = this.keybindingService.lookupKeybinding(ChatQueueMessageAction.ID, lookupContext, true);
|
|
134
|
+
const steerKeybinding = this.keybindingService.lookupKeybinding(ChatSteerWithMessageAction.ID, lookupContext, true);
|
|
126
135
|
const queueAction = {
|
|
127
136
|
id: ChatQueueMessageAction.ID,
|
|
128
|
-
label: ( localize(
|
|
137
|
+
label: ( localize(7496, "Add to Queue")),
|
|
129
138
|
tooltip: "",
|
|
130
139
|
enabled: true,
|
|
131
140
|
checked: !isSteerDefault,
|
|
132
141
|
icon: Codicon.add,
|
|
133
142
|
class: undefined,
|
|
143
|
+
keybinding: queueKeybinding,
|
|
134
144
|
hover: {
|
|
135
145
|
content: ( localize(
|
|
136
|
-
|
|
146
|
+
7498,
|
|
137
147
|
"Queue this message to send after the current request completes. The current response will finish uninterrupted before the queued message is sent."
|
|
138
148
|
))
|
|
139
149
|
},
|
|
@@ -143,15 +153,16 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
143
153
|
};
|
|
144
154
|
const steerAction = {
|
|
145
155
|
id: ChatSteerWithMessageAction.ID,
|
|
146
|
-
label: ( localize(
|
|
156
|
+
label: ( localize(7495, "Steer with Message")),
|
|
147
157
|
tooltip: "",
|
|
148
158
|
enabled: true,
|
|
149
159
|
checked: isSteerDefault,
|
|
150
160
|
icon: Codicon.arrowUp,
|
|
151
161
|
class: undefined,
|
|
162
|
+
keybinding: steerKeybinding,
|
|
152
163
|
hover: {
|
|
153
164
|
content: ( localize(
|
|
154
|
-
|
|
165
|
+
7499,
|
|
155
166
|
"Send this message at the next opportunity, signaling the current request to yield. The current response will stop and the new message will be sent immediately."
|
|
156
167
|
))
|
|
157
168
|
},
|
|
@@ -161,13 +172,13 @@ let ChatQueuePickerActionItem = class ChatQueuePickerActionItem extends BaseActi
|
|
|
161
172
|
};
|
|
162
173
|
const sendAction = {
|
|
163
174
|
id: "_" + ChatSubmitAction.ID,
|
|
164
|
-
label: ( localize(
|
|
175
|
+
label: ( localize(7500, "Stop and Send")),
|
|
165
176
|
tooltip: "",
|
|
166
177
|
enabled: true,
|
|
167
178
|
icon: Codicon.arrowRight,
|
|
168
179
|
class: undefined,
|
|
169
180
|
hover: {
|
|
170
|
-
content: ( localize(
|
|
181
|
+
content: ( localize(7501, "Cancel the current request and send this message immediately."))
|
|
171
182
|
},
|
|
172
183
|
run: () => {
|
|
173
184
|
this.commandService.executeCommand(ChatSubmitAction.ID);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position";
|
|
3
|
+
import { CompletionItem } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
4
|
+
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
5
|
+
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
|
|
6
|
+
import { IChatInputCompletionItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
7
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
8
|
+
import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
9
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
10
|
+
import { AgentHostInputCompletionsBase } from "./agentHostInputCompletionsBase.js";
|
|
11
|
+
/**
|
|
12
|
+
* Completion provider that delegates `@`-mention (and other server-defined)
|
|
13
|
+
* completions to the agent host for AHP-backed chat sessions.
|
|
14
|
+
*
|
|
15
|
+
* Registrations are made dynamically per content-provider scheme so each
|
|
16
|
+
* connection can announce its own trigger characters via the protocol's
|
|
17
|
+
* `InitializeResult.completionTriggerCharacters`. When a content provider
|
|
18
|
+
* is registered, we ask it for its trigger chars and register a Monaco
|
|
19
|
+
* completion provider scoped to that scheme; when it is unregistered we
|
|
20
|
+
* tear the registration down.
|
|
21
|
+
*
|
|
22
|
+
* The provider uses the same `_addReferenceCmd` pattern as
|
|
23
|
+
* `BuiltinDynamicCompletions`: when an item is accepted, a command runs
|
|
24
|
+
* that adds an {@link IDynamicVariable} entry to the widget's variable
|
|
25
|
+
* model so the resource becomes part of the outgoing user message.
|
|
26
|
+
*/
|
|
27
|
+
export declare class AgentHostInputCompletions extends AgentHostInputCompletionsBase<IChatWidget, string> {
|
|
28
|
+
private readonly _chatWidgetService;
|
|
29
|
+
private static readonly addReferenceCommand;
|
|
30
|
+
/** Per-scheme registrations of the Monaco completion provider. */
|
|
31
|
+
private readonly _registrations;
|
|
32
|
+
constructor(languageFeaturesService: ILanguageFeaturesService, _chatWidgetService: IChatWidgetService, chatSessionsService: IChatSessionsService);
|
|
33
|
+
private _registerForScheme;
|
|
34
|
+
protected _resolveContext(model: ITextModel, scheme: string): {
|
|
35
|
+
sessionResource: URI;
|
|
36
|
+
context: IChatWidget;
|
|
37
|
+
} | undefined;
|
|
38
|
+
protected _buildItem(position: Position, item: IChatInputCompletionItem, widget: IChatWidget): CompletionItem;
|
|
39
|
+
}
|