@codingame/monaco-vscode-chat-service-override 28.4.1 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -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 +29 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -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 +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
- 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 +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
- 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.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- 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 +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- 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.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +22 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
- 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 +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- 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.js +3 -3
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
|
@@ -13,10 +13,12 @@ import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
13
13
|
import { MarkdownString, createMarkdownCommandLink } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
14
14
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
15
15
|
import { Disposable, DisposableStore, toDisposable, combinedDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
16
|
+
import { getMediaMime } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
16
17
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
17
18
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
18
19
|
import { StopWatch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/stopwatch';
|
|
19
20
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
21
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
20
22
|
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
21
23
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
22
24
|
import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
@@ -39,8 +41,9 @@ import { toToolSetVariableEntry, toToolVariableEntry } from '@codingame/monaco-v
|
|
|
39
41
|
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
40
42
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
41
43
|
import { ChatConfiguration, isAutoApproveLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
44
|
+
import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
42
45
|
import { ChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation';
|
|
43
|
-
import { chatSessionResourceToId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
46
|
+
import { chatSessionResourceToId, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
44
47
|
import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
45
48
|
import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.service';
|
|
46
49
|
import { ToolDataSource, VSCodeToolReference, SpecedToolAliases, isToolSet, createToolSchemaUri, toolMatchesModel, ToolInvocationPresentation, stringifyPromptTsxPart, ToolSetForModel, ToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
@@ -59,9 +62,12 @@ var AutoApproveStorageKeys;
|
|
|
59
62
|
AutoApproveStorageKeys["GlobalAutoApproveOptIn"] = "chat.tools.global.autoApprove.optIn";
|
|
60
63
|
})(AutoApproveStorageKeys || (AutoApproveStorageKeys = {}));
|
|
61
64
|
const SkipAutoApproveConfirmationKey = "vscode.chat.tools.global.autoApprove.testMode";
|
|
62
|
-
const
|
|
65
|
+
const toolIdsThatCannotBeAutoApproved = ( new Set([
|
|
66
|
+
"vscode_get_confirmation_with_options",
|
|
67
|
+
"vscode_get_modified_files_confirmation"
|
|
68
|
+
]));
|
|
63
69
|
const globalAutoApproveDescription = ( localize2(
|
|
64
|
-
|
|
70
|
+
6605,
|
|
65
71
|
"Global auto approve also known as \"YOLO mode\" disables manual approval completely for _all tools in all workspaces_, allowing the agent to act fully autonomously. This is extremely dangerous and is *never* recommended, even containerized environments like [Codespaces](https://github.com/features/codespaces) and [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) have user keys forwarded into the container that could be compromised.\n\n**This feature disables [critical security protections](https://code.visualstudio.com/docs/copilot/security) and makes it much easier for an attacker to compromise the machine.**\n\nNote: This setting only controls tool approval and does not prevent the agent from asking questions. To automatically answer agent questions, use the [`chat.autoReply`](command:workbench.action.openSettings?%5B%22chat.autoReply%22%5D) setting."
|
|
66
72
|
));
|
|
67
73
|
let LanguageModelToolsService = class LanguageModelToolsService extends Disposable {
|
|
@@ -164,25 +170,25 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
164
170
|
this.vscodeToolSet = this._register(
|
|
165
171
|
this.createToolSet(ToolDataSource.Internal, "vscode", VSCodeToolReference.vscode, {
|
|
166
172
|
icon: ThemeIcon.fromId(Codicon.vscode.id),
|
|
167
|
-
description: ( localize(
|
|
173
|
+
description: ( localize(6606, "Use VS Code features"))
|
|
168
174
|
})
|
|
169
175
|
);
|
|
170
176
|
this.executeToolSet = this._register(
|
|
171
177
|
this.createToolSet(ToolDataSource.Internal, "execute", SpecedToolAliases.execute, {
|
|
172
178
|
icon: ThemeIcon.fromId(Codicon.terminal.id),
|
|
173
|
-
description: ( localize(
|
|
179
|
+
description: ( localize(6607, "Execute code and applications on your machine"))
|
|
174
180
|
})
|
|
175
181
|
);
|
|
176
182
|
this.readToolSet = this._register(
|
|
177
183
|
this.createToolSet(ToolDataSource.Internal, "read", SpecedToolAliases.read, {
|
|
178
184
|
icon: ThemeIcon.fromId(Codicon.book.id),
|
|
179
|
-
description: ( localize(
|
|
185
|
+
description: ( localize(6608, "Read files in your workspace"))
|
|
180
186
|
})
|
|
181
187
|
);
|
|
182
188
|
this.agentToolSet = this._register(
|
|
183
189
|
this.createToolSet(ToolDataSource.Internal, "agent", SpecedToolAliases.agent, {
|
|
184
190
|
icon: ThemeIcon.fromId(Codicon.agent.id),
|
|
185
|
-
description: ( localize(
|
|
191
|
+
description: ( localize(6609, "Delegate tasks to other agents"))
|
|
186
192
|
})
|
|
187
193
|
);
|
|
188
194
|
}
|
|
@@ -336,8 +342,8 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
336
342
|
return undefined;
|
|
337
343
|
}
|
|
338
344
|
_handlePreToolUseDenial(dto, hookResult, toolData, pendingInvocation, request) {
|
|
339
|
-
const hookReason = hookResult.permissionDecisionReason ?? ( localize(
|
|
340
|
-
const reason = ( localize(
|
|
345
|
+
const hookReason = hookResult.permissionDecisionReason ?? ( localize(6610, "Hook denied tool execution"));
|
|
346
|
+
const reason = ( localize(6611, "Denied by {0} hook: {1}", HookType.PreToolUse, hookReason));
|
|
341
347
|
this._logService.debug(
|
|
342
348
|
`[LanguageModelToolsService#invokeTool] Tool ${dto.toolId} denied by preToolUse hook: ${hookReason}`
|
|
343
349
|
);
|
|
@@ -516,7 +522,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
516
522
|
toolInvocation = ( new ChatToolInvocation(
|
|
517
523
|
preparedInvocation,
|
|
518
524
|
tool.data,
|
|
519
|
-
dto.callId,
|
|
525
|
+
dto.chatStreamToolCallId ?? dto.callId,
|
|
520
526
|
dto.subAgentInvocationId,
|
|
521
527
|
dto.parameters
|
|
522
528
|
));
|
|
@@ -581,7 +587,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
581
587
|
}
|
|
582
588
|
}, token);
|
|
583
589
|
invocationTimeWatch.stop();
|
|
584
|
-
this.ensureToolDetails(dto, toolResult, tool.data);
|
|
590
|
+
this.ensureToolDetails(dto, toolResult, tool.data, toolInvocation);
|
|
585
591
|
const afterExecuteState = await toolInvocation?.didExecuteTool(toolResult, undefined, () => this.shouldAutoConfirmPostExecution(
|
|
586
592
|
tool.data.id,
|
|
587
593
|
tool.data.runsInWorkspace,
|
|
@@ -656,7 +662,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
656
662
|
async prepareToolInvocationWithHookResult(tool, dto, hookResult, token) {
|
|
657
663
|
let forceConfirmationReason;
|
|
658
664
|
if (hookResult?.permissionDecision === "ask") {
|
|
659
|
-
const hookMessage = ( localize(
|
|
665
|
+
const hookMessage = ( localize(6612, "{0} required confirmation", HookType.PreToolUse));
|
|
660
666
|
forceConfirmationReason = hookResult.permissionDecisionReason ? `${hookMessage}: ${hookResult.permissionDecisionReason}` : hookMessage;
|
|
661
667
|
}
|
|
662
668
|
return this.prepareToolInvocation(tool, dto, forceConfirmationReason, token);
|
|
@@ -669,7 +675,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
669
675
|
return {
|
|
670
676
|
autoConfirmed: {
|
|
671
677
|
type: ToolConfirmKind.ConfirmationNotNeeded,
|
|
672
|
-
reason: ( localize(
|
|
678
|
+
reason: ( localize(6613, "Allowed by hook"))
|
|
673
679
|
},
|
|
674
680
|
preparedInvocation
|
|
675
681
|
};
|
|
@@ -685,14 +691,14 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
685
691
|
const fullReferenceName = getToolFullReferenceName(tool.data);
|
|
686
692
|
const hookReason = hookResult.permissionDecisionReason;
|
|
687
693
|
const hookNote = hookReason ? ( localize(
|
|
688
|
-
|
|
694
|
+
6614,
|
|
689
695
|
"{0} hook required confirmation: {1}",
|
|
690
696
|
HookType.PreToolUse,
|
|
691
697
|
hookReason
|
|
692
|
-
)) : ( localize(
|
|
698
|
+
)) : ( localize(6615, "{0} hook required confirmation", HookType.PreToolUse));
|
|
693
699
|
preparedInvocation.confirmationMessages = {
|
|
694
700
|
...preparedInvocation.confirmationMessages,
|
|
695
|
-
title: ( localize(
|
|
701
|
+
title: ( localize(6616, "Use the '{0}' tool?", fullReferenceName)),
|
|
696
702
|
message: ( new MarkdownString(`_${hookNote}_`)),
|
|
697
703
|
allowAutoConfirm: false
|
|
698
704
|
};
|
|
@@ -703,11 +709,11 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
703
709
|
} else {
|
|
704
710
|
const hookReason = hookResult.permissionDecisionReason;
|
|
705
711
|
const hookNote = hookReason ? ( localize(
|
|
706
|
-
|
|
712
|
+
6617,
|
|
707
713
|
"{0} hook required confirmation: {1}",
|
|
708
714
|
HookType.PreToolUse,
|
|
709
715
|
hookReason
|
|
710
|
-
)) : ( localize(
|
|
716
|
+
)) : ( localize(6618, "{0} hook required confirmation", HookType.PreToolUse));
|
|
711
717
|
const existing = preparedInvocation.confirmationMessages;
|
|
712
718
|
if (preparedInvocation.toolSpecificData?.kind === "terminal") {
|
|
713
719
|
const existingDisclaimerText = existing.disclaimer ? (typeof existing.disclaimer === "string" ? existing.disclaimer : existing.disclaimer.value) : undefined;
|
|
@@ -731,13 +737,22 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
731
737
|
preparedInvocation
|
|
732
738
|
};
|
|
733
739
|
}
|
|
740
|
+
const approveCombination = preparedInvocation?.confirmationMessages?.approveCombination;
|
|
741
|
+
let combination;
|
|
742
|
+
if (approveCombination) {
|
|
743
|
+
combination = {
|
|
744
|
+
label: typeof approveCombination.label === "string" ? approveCombination.label : approveCombination.label.value,
|
|
745
|
+
key: approveCombination.key
|
|
746
|
+
};
|
|
747
|
+
}
|
|
734
748
|
const autoConfirmed = await this.shouldAutoConfirm(
|
|
735
749
|
tool.data.id,
|
|
736
750
|
tool.data.runsInWorkspace,
|
|
737
751
|
tool.data.source,
|
|
738
752
|
dto.parameters,
|
|
739
753
|
sessionResource,
|
|
740
|
-
dto.chatRequestId
|
|
754
|
+
dto.chatRequestId,
|
|
755
|
+
combination
|
|
741
756
|
);
|
|
742
757
|
return {
|
|
743
758
|
autoConfirmed,
|
|
@@ -773,16 +788,17 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
773
788
|
const fullReferenceName = getToolFullReferenceName(tool.data);
|
|
774
789
|
prepared.confirmationMessages = {
|
|
775
790
|
...prepared.confirmationMessages,
|
|
776
|
-
title: ( localize(
|
|
777
|
-
message: ( localize(
|
|
778
|
-
disclaimer: tool.data.id
|
|
779
|
-
|
|
791
|
+
title: ( localize(6619, "Confirm tool execution")),
|
|
792
|
+
message: ( localize(6620, "Run the '{0}' tool?", fullReferenceName)),
|
|
793
|
+
disclaimer: ( toolIdsThatCannotBeAutoApproved.has(tool.data.id)) ? undefined : ( new MarkdownString(( localize(
|
|
794
|
+
6621,
|
|
780
795
|
"Auto approval for '{0}' is restricted via {1}.",
|
|
781
796
|
getToolFullReferenceName(tool.data),
|
|
782
797
|
createMarkdownCommandLink({
|
|
783
|
-
|
|
798
|
+
text: "`" + ChatConfiguration.EligibleForAutoApproval + "`",
|
|
784
799
|
id: "workbench.action.openSettings",
|
|
785
|
-
arguments: [ChatConfiguration.EligibleForAutoApproval]
|
|
800
|
+
arguments: [ChatConfiguration.EligibleForAutoApproval],
|
|
801
|
+
tooltip: ( localize(6622, "Open settings to configure auto-approval"))
|
|
786
802
|
}, false)
|
|
787
803
|
)), {
|
|
788
804
|
isTrusted: true
|
|
@@ -791,14 +807,15 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
791
807
|
};
|
|
792
808
|
}
|
|
793
809
|
if (!isEligibleForAutoApproval && prepared?.confirmationMessages?.title) {
|
|
794
|
-
prepared.confirmationMessages.disclaimer = tool.data.id
|
|
795
|
-
|
|
810
|
+
prepared.confirmationMessages.disclaimer = ( toolIdsThatCannotBeAutoApproved.has(tool.data.id)) ? undefined : ( new MarkdownString(( localize(
|
|
811
|
+
6621,
|
|
796
812
|
"Auto approval for '{0}' is restricted via {1}.",
|
|
797
813
|
getToolFullReferenceName(tool.data),
|
|
798
814
|
createMarkdownCommandLink({
|
|
799
|
-
|
|
815
|
+
text: "`" + ChatConfiguration.EligibleForAutoApproval + "`",
|
|
800
816
|
id: "workbench.action.openSettings",
|
|
801
|
-
arguments: [ChatConfiguration.EligibleForAutoApproval]
|
|
817
|
+
arguments: [ChatConfiguration.EligibleForAutoApproval],
|
|
818
|
+
tooltip: ( localize(6622, "Open settings to configure auto-approval"))
|
|
802
819
|
}, false)
|
|
803
820
|
)), {
|
|
804
821
|
isTrusted: true
|
|
@@ -912,14 +929,36 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
912
929
|
});
|
|
913
930
|
}
|
|
914
931
|
}
|
|
915
|
-
ensureToolDetails(dto, toolResult, toolData) {
|
|
916
|
-
if (!toolResult.toolResultDetails && toolData.alwaysDisplayInputOutput) {
|
|
932
|
+
ensureToolDetails(dto, toolResult, toolData, toolInvocation) {
|
|
933
|
+
if (!toolResult.toolResultDetails && (toolData.alwaysDisplayInputOutput || (this.toolResultHasImages(toolResult) && !this.toolResultMessageHasImageFileWidgets(toolResult, toolInvocation)))) {
|
|
917
934
|
toolResult.toolResultDetails = {
|
|
918
935
|
input: this.formatToolInput(dto),
|
|
919
936
|
output: this.toolResultToIO(toolResult)
|
|
920
937
|
};
|
|
921
938
|
}
|
|
922
939
|
}
|
|
940
|
+
toolResultHasImages(toolResult) {
|
|
941
|
+
return ( toolResult.content.some(part => part.kind === "data" && part.value.mimeType?.startsWith("image/")));
|
|
942
|
+
}
|
|
943
|
+
toolResultMessageHasImageFileWidgets(toolResult, toolInvocation) {
|
|
944
|
+
const message = toolResult.toolResultMessage ?? toolInvocation?.pastTenseMessage;
|
|
945
|
+
if (!message) {
|
|
946
|
+
return false;
|
|
947
|
+
}
|
|
948
|
+
const value = typeof message === "string" ? message : message.value;
|
|
949
|
+
const linkPattern = /\[\s*\]\((?<uri>[^)]+)\)/g;
|
|
950
|
+
let match;
|
|
951
|
+
while ((match = linkPattern.exec(value)) !== null) {
|
|
952
|
+
try {
|
|
953
|
+
const parsed = ( URI.parse(match.groups.uri));
|
|
954
|
+
const mime = getMediaMime(parsed.path);
|
|
955
|
+
if (mime?.startsWith("image/")) {
|
|
956
|
+
return true;
|
|
957
|
+
}
|
|
958
|
+
} catch {}
|
|
959
|
+
}
|
|
960
|
+
return false;
|
|
961
|
+
}
|
|
923
962
|
formatToolInput(dto) {
|
|
924
963
|
return JSON.stringify(dto.parameters, undefined, 2);
|
|
925
964
|
}
|
|
@@ -967,7 +1006,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
967
1006
|
if (toolData.id === "copilot_fetchWebPage") {
|
|
968
1007
|
return true;
|
|
969
1008
|
}
|
|
970
|
-
if (toolData.id
|
|
1009
|
+
if (( toolIdsThatCannotBeAutoApproved.has(toolData.id))) {
|
|
971
1010
|
return false;
|
|
972
1011
|
}
|
|
973
1012
|
const eligibilityConfig = this._configurationService.getValue(ChatConfiguration.EligibleForAutoApproval);
|
|
@@ -997,7 +1036,8 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
997
1036
|
source,
|
|
998
1037
|
parameters,
|
|
999
1038
|
chatSessionResource,
|
|
1000
|
-
chatRequestId
|
|
1039
|
+
chatRequestId,
|
|
1040
|
+
combination
|
|
1001
1041
|
) {
|
|
1002
1042
|
const tool = this._tools.get(toolId);
|
|
1003
1043
|
if (!tool) {
|
|
@@ -1007,10 +1047,12 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
1007
1047
|
const model = this._chatService.getSession(chatSessionResource);
|
|
1008
1048
|
const request = model?.getRequests().at(-1);
|
|
1009
1049
|
if (isAutoApproveLevel(request?.modeInfo?.permissionLevel) || this._isSessionLiveAutoApproveLevel(chatSessionResource)) {
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1050
|
+
if (!(( toolIdsThatCannotBeAutoApproved.has(tool.data.id)) && getChatSessionType(chatSessionResource) !== localChatSessionType)) {
|
|
1051
|
+
return {
|
|
1052
|
+
type: ToolConfirmKind.ConfirmationNotNeeded,
|
|
1053
|
+
reason: "auto-approve-all"
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1014
1056
|
}
|
|
1015
1057
|
}
|
|
1016
1058
|
if (!this.isToolEligibleForAutoApproval(tool.data)) {
|
|
@@ -1020,7 +1062,8 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
1020
1062
|
toolId,
|
|
1021
1063
|
source,
|
|
1022
1064
|
parameters,
|
|
1023
|
-
chatSessionResource
|
|
1065
|
+
chatSessionResource,
|
|
1066
|
+
combination
|
|
1024
1067
|
});
|
|
1025
1068
|
if (reason) {
|
|
1026
1069
|
return reason;
|
|
@@ -1056,10 +1099,12 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
1056
1099
|
const model = this._chatService.getSession(chatSessionResource);
|
|
1057
1100
|
const request = model?.getRequests().at(-1);
|
|
1058
1101
|
if (isAutoApproveLevel(request?.modeInfo?.permissionLevel) || this._isSessionLiveAutoApproveLevel(chatSessionResource)) {
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1102
|
+
if (!(( toolIdsThatCannotBeAutoApproved.has(toolId)) && getChatSessionType(chatSessionResource) !== localChatSessionType)) {
|
|
1103
|
+
return {
|
|
1104
|
+
type: ToolConfirmKind.ConfirmationNotNeeded,
|
|
1105
|
+
reason: "auto-approve-all"
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1063
1108
|
}
|
|
1064
1109
|
}
|
|
1065
1110
|
if (this._configurationService.getValue(ChatConfiguration.GlobalAutoApprove) && (await this._checkGlobalAutoApprove())) {
|
|
@@ -1117,12 +1162,12 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
1117
1162
|
}));
|
|
1118
1163
|
const promptResult = await this._dialogService.prompt({
|
|
1119
1164
|
type: Severity.Warning,
|
|
1120
|
-
message: ( localize(
|
|
1165
|
+
message: ( localize(6623, "Enable global auto approve?")),
|
|
1121
1166
|
buttons: [{
|
|
1122
|
-
label: ( localize(
|
|
1167
|
+
label: ( localize(6624, "Enable")),
|
|
1123
1168
|
run: () => true
|
|
1124
1169
|
}, {
|
|
1125
|
-
label: ( localize(
|
|
1170
|
+
label: ( localize(6625, "Disable")),
|
|
1126
1171
|
run: () => false
|
|
1127
1172
|
}],
|
|
1128
1173
|
custom: {
|
|
@@ -4,6 +4,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
4
4
|
import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service";
|
|
5
5
|
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
|
|
6
6
|
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";
|
|
7
8
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
9
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
9
10
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
@@ -13,14 +14,15 @@ import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/
|
|
|
13
14
|
export declare const RenameToolId = "vscode_renameSymbol";
|
|
14
15
|
export declare class RenameTool extends Disposable implements IToolImpl {
|
|
15
16
|
private readonly _languageFeaturesService;
|
|
17
|
+
private readonly _languageService;
|
|
16
18
|
private readonly _textModelService;
|
|
17
19
|
private readonly _workspaceContextService;
|
|
18
20
|
private readonly _chatService;
|
|
19
21
|
private readonly _bulkEditService;
|
|
20
22
|
private readonly _onDidUpdateToolData;
|
|
21
23
|
readonly onDidUpdateToolData: Event<void>;
|
|
22
|
-
constructor(_languageFeaturesService: ILanguageFeaturesService, _textModelService: ITextModelService, _workspaceContextService: IWorkspaceContextService, _chatService: IChatService, _bulkEditService: IBulkEditService);
|
|
23
|
-
getToolData(): IToolData;
|
|
24
|
+
constructor(_languageFeaturesService: ILanguageFeaturesService, _languageService: ILanguageService, _textModelService: ITextModelService, _workspaceContextService: IWorkspaceContextService, _chatService: IChatService, _bulkEditService: IBulkEditService);
|
|
25
|
+
getToolData(): IToolData | undefined;
|
|
24
26
|
prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
25
27
|
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
26
28
|
private _successResult;
|
|
@@ -11,6 +11,7 @@ import { ResourceTextEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/
|
|
|
11
11
|
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
|
|
12
12
|
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
13
13
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
14
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
14
15
|
import { rename } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/rename/browser/rename';
|
|
15
16
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
17
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -38,6 +39,7 @@ If the tool returns an error, retry with corrected input - ensure the file path
|
|
|
38
39
|
let RenameTool = class RenameTool extends Disposable {
|
|
39
40
|
constructor(
|
|
40
41
|
_languageFeaturesService,
|
|
42
|
+
_languageService,
|
|
41
43
|
_textModelService,
|
|
42
44
|
_workspaceContextService,
|
|
43
45
|
_chatService,
|
|
@@ -45,6 +47,7 @@ let RenameTool = class RenameTool extends Disposable {
|
|
|
45
47
|
) {
|
|
46
48
|
super();
|
|
47
49
|
this._languageFeaturesService = _languageFeaturesService;
|
|
50
|
+
this._languageService = _languageService;
|
|
48
51
|
this._textModelService = _textModelService;
|
|
49
52
|
this._workspaceContextService = _workspaceContextService;
|
|
50
53
|
this._chatService = _chatService;
|
|
@@ -57,22 +60,27 @@ let RenameTool = class RenameTool extends Disposable {
|
|
|
57
60
|
}
|
|
58
61
|
getToolData() {
|
|
59
62
|
const languageIds = this._languageFeaturesService.renameProvider.registeredLanguageIds;
|
|
63
|
+
if (languageIds.size === 0) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
60
66
|
let modelDescription = BaseModelDescription;
|
|
67
|
+
let userDescription;
|
|
61
68
|
if (( languageIds.has("*"))) {
|
|
62
69
|
modelDescription += "\n\nSupported for all languages.";
|
|
63
|
-
|
|
70
|
+
userDescription = ( localize(6626, "Rename a symbol across the workspace"));
|
|
71
|
+
} else {
|
|
64
72
|
const sorted = [...languageIds].sort();
|
|
65
73
|
modelDescription += `\n\nCurrently supported for: ${sorted.join(", ")}.`;
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
const niceNames = ( sorted.map(id => this._languageService.getLanguageName(id) ?? id));
|
|
75
|
+
userDescription = ( localize(6627, "Rename a symbol across the workspace ({0})", niceNames.join(", ")));
|
|
68
76
|
}
|
|
69
77
|
return {
|
|
70
78
|
id: RenameToolId,
|
|
71
79
|
toolReferenceName: "rename",
|
|
72
80
|
canBeReferencedInPrompt: false,
|
|
73
81
|
icon: ThemeIcon.fromId(Codicon.rename.id),
|
|
74
|
-
displayName: ( localize(
|
|
75
|
-
userDescription
|
|
82
|
+
displayName: ( localize(6628, "Rename Symbol")),
|
|
83
|
+
userDescription,
|
|
76
84
|
modelDescription,
|
|
77
85
|
source: ToolDataSource.Internal,
|
|
78
86
|
when: ( ContextKeyExpr.has("config.chat.tools.renameTool.enabled")),
|
|
@@ -107,7 +115,7 @@ let RenameTool = class RenameTool extends Disposable {
|
|
|
107
115
|
async prepareToolInvocation(context, _token) {
|
|
108
116
|
const input = context.parameters;
|
|
109
117
|
return {
|
|
110
|
-
invocationMessage: ( localize(
|
|
118
|
+
invocationMessage: ( localize(6629, "Renaming `{0}` to `{1}`", input.symbol, input.newName))
|
|
111
119
|
};
|
|
112
120
|
}
|
|
113
121
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
@@ -195,13 +203,13 @@ let RenameTool = class RenameTool extends Disposable {
|
|
|
195
203
|
}
|
|
196
204
|
_successResult(input, fileCount, editCount) {
|
|
197
205
|
const text = editCount === 1 ? ( localize(
|
|
198
|
-
|
|
206
|
+
6630,
|
|
199
207
|
"Renamed `{0}` to `{1}` - 1 edit in {2} file.",
|
|
200
208
|
input.symbol,
|
|
201
209
|
input.newName,
|
|
202
210
|
fileCount
|
|
203
211
|
)) : ( localize(
|
|
204
|
-
|
|
212
|
+
6631,
|
|
205
213
|
"Renamed `{0}` to `{1}` - {2} edits across {3} files.",
|
|
206
214
|
input.symbol,
|
|
207
215
|
input.newName,
|
|
@@ -213,7 +221,7 @@ let RenameTool = class RenameTool extends Disposable {
|
|
|
213
221
|
return result;
|
|
214
222
|
}
|
|
215
223
|
};
|
|
216
|
-
RenameTool = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1,
|
|
224
|
+
RenameTool = ( __decorate([( __param(0, ILanguageFeaturesService)), ( __param(1, ILanguageService)), ( __param(2, ITextModelService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IChatService)), ( __param(5, IBulkEditService))], RenameTool));
|
|
217
225
|
let RenameToolContribution = class RenameToolContribution extends Disposable {
|
|
218
226
|
static {
|
|
219
227
|
this.ID = "chat.renameTool";
|
|
@@ -224,9 +232,12 @@ let RenameToolContribution = class RenameToolContribution extends Disposable {
|
|
|
224
232
|
let registration;
|
|
225
233
|
const registerRenameTool = () => {
|
|
226
234
|
registration?.dispose();
|
|
235
|
+
registration = undefined;
|
|
227
236
|
toolsService.flushToolUpdates();
|
|
228
237
|
const toolData = renameTool.getToolData();
|
|
229
|
-
|
|
238
|
+
if (toolData) {
|
|
239
|
+
registration = toolsService.registerTool(toolData, renameTool);
|
|
240
|
+
}
|
|
230
241
|
};
|
|
231
242
|
registerRenameTool();
|
|
232
243
|
this._store.add(renameTool.onDidUpdateToolData(registerRenameTool));
|
|
@@ -10,7 +10,7 @@ import { isFalsyOrWhitespace } from '@codingame/monaco-vscode-api/vscode/vs/base
|
|
|
10
10
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
11
11
|
import { isObject, assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
12
12
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
|
-
import { Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
|
+
import { Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
14
14
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
15
15
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
16
16
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
@@ -31,6 +31,7 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
|
|
|
31
31
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
32
32
|
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
33
33
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
34
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
34
35
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
35
36
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
36
37
|
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
@@ -44,7 +45,7 @@ const toolSetsSchema = {
|
|
|
44
45
|
allowComments: true,
|
|
45
46
|
allowTrailingCommas: true,
|
|
46
47
|
defaultSnippets: [{
|
|
47
|
-
label: ( localize(
|
|
48
|
+
label: ( localize(6632, "Empty tool set")),
|
|
48
49
|
body: {
|
|
49
50
|
"${1:toolSetName}": {
|
|
50
51
|
"tools": ["${2:someTool}", "${3:anotherTool}"],
|
|
@@ -54,7 +55,7 @@ const toolSetsSchema = {
|
|
|
54
55
|
}
|
|
55
56
|
}],
|
|
56
57
|
type: "object",
|
|
57
|
-
description: ( localize(
|
|
58
|
+
description: ( localize(6633, "User tool sets configuration")),
|
|
58
59
|
additionalProperties: {
|
|
59
60
|
type: "object",
|
|
60
61
|
required: ["tools"],
|
|
@@ -62,7 +63,7 @@ const toolSetsSchema = {
|
|
|
62
63
|
properties: {
|
|
63
64
|
tools: {
|
|
64
65
|
description: ( localize(
|
|
65
|
-
|
|
66
|
+
6634,
|
|
66
67
|
"A list of tools or tool sets to include in this tool set. Cannot be empty and must reference tools the way they are referenced in prompts."
|
|
67
68
|
)),
|
|
68
69
|
type: "array",
|
|
@@ -75,7 +76,7 @@ const toolSetsSchema = {
|
|
|
75
76
|
},
|
|
76
77
|
icon: {
|
|
77
78
|
description: ( localize(
|
|
78
|
-
|
|
79
|
+
6635,
|
|
79
80
|
"Icon to use for this tool set in the UI. Uses the \"\\$(name)\"-syntax, like \"\\$(zap)\""
|
|
80
81
|
)),
|
|
81
82
|
type: "string",
|
|
@@ -83,7 +84,7 @@ const toolSetsSchema = {
|
|
|
83
84
|
markdownEnumDescriptions: Array.from(getAllCodicons(), icon => `$(${icon.id})`)
|
|
84
85
|
},
|
|
85
86
|
description: {
|
|
86
|
-
description: ( localize(
|
|
87
|
+
description: ( localize(6636, "A short description of this tool set.")),
|
|
87
88
|
type: "string"
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -184,7 +185,7 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
|
|
|
184
185
|
});
|
|
185
186
|
for (const item of data) {
|
|
186
187
|
toolEnumValues.push(item.name);
|
|
187
|
-
toolEnumDescriptions.push(( localize(
|
|
188
|
+
toolEnumDescriptions.push(( localize(6637, "{1} ({0})\n\n{2}", item.sourceLabel, item.name, item.description)));
|
|
188
189
|
}
|
|
189
190
|
store.clear();
|
|
190
191
|
reg.registerSchema(toolSetSchemaId, toolSetsSchema, store);
|
|
@@ -281,17 +282,22 @@ class ConfigureToolSets extends Action2 {
|
|
|
281
282
|
constructor() {
|
|
282
283
|
super({
|
|
283
284
|
id: ConfigureToolSets.ID,
|
|
284
|
-
title: ( localize2(
|
|
285
|
-
shortTitle: ( localize(
|
|
285
|
+
title: ( localize2(6638, "Configure Tool Sets...")),
|
|
286
|
+
shortTitle: ( localize(6639, "Tool Sets")),
|
|
286
287
|
category: CHAT_CATEGORY,
|
|
287
288
|
f1: true,
|
|
288
289
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.Tools.toolsCount.greater(0))),
|
|
289
|
-
menu: {
|
|
290
|
+
menu: [{
|
|
290
291
|
id: CHAT_CONFIG_MENU_ID,
|
|
291
292
|
when: ( ContextKeyExpr.equals("view", ChatViewId)),
|
|
292
293
|
order: 11,
|
|
293
294
|
group: "2_level"
|
|
294
|
-
}
|
|
295
|
+
}, {
|
|
296
|
+
id: MenuId.ViewTitle,
|
|
297
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.equals("view", ChatViewId)), ( ContextKeyExpr.has(`config.${ChatConfiguration.ChatCustomizationMenuEnabled}`)))),
|
|
298
|
+
order: 11,
|
|
299
|
+
group: "2_level"
|
|
300
|
+
}]
|
|
295
301
|
});
|
|
296
302
|
}
|
|
297
303
|
async run(accessor) {
|
|
@@ -303,7 +309,7 @@ class ConfigureToolSets extends Action2 {
|
|
|
303
309
|
const textFileService = accessor.get(ITextFileService);
|
|
304
310
|
const picks = [];
|
|
305
311
|
picks.push({
|
|
306
|
-
label: ( localize(
|
|
312
|
+
label: ( localize(6640, "Create new tool sets file...")),
|
|
307
313
|
alwaysShow: true,
|
|
308
314
|
iconClass: ThemeIcon.asClassName(Codicon.plus)
|
|
309
315
|
});
|
|
@@ -320,7 +326,7 @@ class ConfigureToolSets extends Action2 {
|
|
|
320
326
|
}
|
|
321
327
|
const pick = await quickInputService.pick(picks, {
|
|
322
328
|
canPickMany: false,
|
|
323
|
-
placeHolder: ( localize(
|
|
329
|
+
placeHolder: ( localize(6641, "Select a tool set to configure"))
|
|
324
330
|
});
|
|
325
331
|
if (!pick) {
|
|
326
332
|
return;
|
|
@@ -328,13 +334,13 @@ class ConfigureToolSets extends Action2 {
|
|
|
328
334
|
let resource;
|
|
329
335
|
if (!pick.toolset) {
|
|
330
336
|
const name = await quickInputService.input({
|
|
331
|
-
placeHolder: ( localize(
|
|
337
|
+
placeHolder: ( localize(6642, "Type tool sets file name")),
|
|
332
338
|
validateInput: async input => {
|
|
333
339
|
if (!input) {
|
|
334
|
-
return localize(
|
|
340
|
+
return localize(6643, "Invalid file name");
|
|
335
341
|
}
|
|
336
342
|
if (!isValidBasename(input)) {
|
|
337
|
-
return localize(
|
|
343
|
+
return localize(6644, "'{0}' is not a valid file name", input);
|
|
338
344
|
}
|
|
339
345
|
return undefined;
|
|
340
346
|
}
|
|
@@ -4,6 +4,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
4
4
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
5
5
|
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
|
|
6
6
|
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";
|
|
7
8
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
9
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
9
10
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
@@ -13,14 +14,15 @@ import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/
|
|
|
13
14
|
export declare const UsagesToolId = "vscode_listCodeUsages";
|
|
14
15
|
export declare class UsagesTool extends Disposable implements IToolImpl {
|
|
15
16
|
private readonly _languageFeaturesService;
|
|
17
|
+
private readonly _languageService;
|
|
16
18
|
private readonly _modelService;
|
|
17
19
|
private readonly _searchService;
|
|
18
20
|
private readonly _textModelService;
|
|
19
21
|
private readonly _workspaceContextService;
|
|
20
22
|
private readonly _onDidUpdateToolData;
|
|
21
23
|
readonly onDidUpdateToolData: Event<void>;
|
|
22
|
-
constructor(_languageFeaturesService: ILanguageFeaturesService, _modelService: IModelService, _searchService: ISearchService, _textModelService: ITextModelService, _workspaceContextService: IWorkspaceContextService);
|
|
23
|
-
getToolData(): IToolData;
|
|
24
|
+
constructor(_languageFeaturesService: ILanguageFeaturesService, _languageService: ILanguageService, _modelService: IModelService, _searchService: ISearchService, _textModelService: ITextModelService, _workspaceContextService: IWorkspaceContextService);
|
|
25
|
+
getToolData(): IToolData | undefined;
|
|
24
26
|
prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
25
27
|
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
26
28
|
private _getLinePreviews;
|