@codingame/monaco-vscode-chat-service-override 37.1.0 → 37.2.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 +15 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +104 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +827 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +71 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +95 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +286 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +130 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +907 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +167 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +46 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +356 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +1 -1
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +253 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +300 -0
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +272 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +178 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +294 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +212 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +955 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +698 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +120 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +92 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +335 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +235 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +1673 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +202 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +872 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +239 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +298 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +577 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +90 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +518 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +231 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
3
|
+
export declare const ConfirmationToolId = "vscode_get_confirmation";
|
|
4
|
+
export declare const ConfirmationToolWithOptionsId = "vscode_get_confirmation_with_options";
|
|
5
|
+
export declare const ModifiedFilesConfirmationToolId = "vscode_get_modified_files_confirmation";
|
|
6
|
+
export declare const ConfirmationToolData: IToolData;
|
|
7
|
+
export declare const ConfirmationToolWithOptionsData: IToolData;
|
|
8
|
+
export declare const ModifiedFilesConfirmationToolData: IToolData;
|
|
9
|
+
export interface IConfirmationToolParams {
|
|
10
|
+
title: string;
|
|
11
|
+
message: string;
|
|
12
|
+
confirmationType?: "basic" | "terminal";
|
|
13
|
+
terminalCommand?: string;
|
|
14
|
+
buttons?: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface IModifiedFilesConfirmationToolParams {
|
|
17
|
+
title: string;
|
|
18
|
+
message: string;
|
|
19
|
+
options: string[];
|
|
20
|
+
modifiedFiles: {
|
|
21
|
+
uri: string;
|
|
22
|
+
originalUri?: string;
|
|
23
|
+
insertions?: number;
|
|
24
|
+
deletions?: number;
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
}[];
|
|
28
|
+
}
|
|
29
|
+
export declare class ConfirmationTool implements IToolImpl {
|
|
30
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
31
|
+
invoke(invocation: IToolInvocation, countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
32
|
+
}
|
|
33
|
+
export declare class ModifiedFilesConfirmationTool implements IToolImpl {
|
|
34
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
35
|
+
invoke(invocation: IToolInvocation, countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
|
|
2
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
3
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-root/state';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
6
|
+
import { ConfirmationOptionKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-chat/state';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-terminal/state';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-resource-watch/state';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-automation/state';
|
|
11
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-automation-run/state';
|
|
12
|
+
import { ToolDataSource, ToolInvocationPresentation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
13
|
+
|
|
14
|
+
const ConfirmationToolId = "vscode_get_confirmation";
|
|
15
|
+
const ConfirmationToolWithOptionsId = "vscode_get_confirmation_with_options";
|
|
16
|
+
const ModifiedFilesConfirmationToolId = "vscode_get_modified_files_confirmation";
|
|
17
|
+
const ConfirmationToolData = {
|
|
18
|
+
id: ConfirmationToolId,
|
|
19
|
+
displayName: "Confirmation Tool",
|
|
20
|
+
modelDescription: "A tool that demonstrates different types of confirmations. Takes a title, message, and confirmation type (basic or terminal).",
|
|
21
|
+
source: ToolDataSource.Internal,
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
title: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Title for the confirmation dialog"
|
|
28
|
+
},
|
|
29
|
+
message: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Message to show in the confirmation dialog"
|
|
32
|
+
},
|
|
33
|
+
confirmationType: {
|
|
34
|
+
type: "string",
|
|
35
|
+
enum: ["basic", "terminal"],
|
|
36
|
+
description: "Type of confirmation to show - basic for simple confirmation, terminal for terminal command confirmation"
|
|
37
|
+
},
|
|
38
|
+
terminalCommand: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Terminal command to show (only used when confirmationType is \"terminal\")"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
required: ["title", "message", "confirmationType"],
|
|
44
|
+
additionalProperties: false
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const ConfirmationToolWithOptionsData = {
|
|
48
|
+
id: ConfirmationToolWithOptionsId,
|
|
49
|
+
displayName: "Confirmation Tool with Options",
|
|
50
|
+
modelDescription: "A tool that demonstrates different types of confirmations. Takes a title, message, and buttons.",
|
|
51
|
+
source: ToolDataSource.Internal,
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
title: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Title for the confirmation dialog"
|
|
58
|
+
},
|
|
59
|
+
message: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "Message to show in the confirmation dialog"
|
|
62
|
+
},
|
|
63
|
+
buttons: {
|
|
64
|
+
type: "array",
|
|
65
|
+
items: {
|
|
66
|
+
type: "string"
|
|
67
|
+
},
|
|
68
|
+
description: "Custom button labels to display."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
required: ["title", "message", "buttons"],
|
|
72
|
+
additionalProperties: false
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const ModifiedFilesConfirmationToolData = {
|
|
76
|
+
id: ModifiedFilesConfirmationToolId,
|
|
77
|
+
displayName: "Modified Files Confirmation Tool",
|
|
78
|
+
modelDescription: "A tool that shows a modified-files confirmation UI with a split primary button and a hardcoded cancel action.",
|
|
79
|
+
source: ToolDataSource.Internal,
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
title: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "Title for the confirmation dialog"
|
|
86
|
+
},
|
|
87
|
+
message: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Message to show in the confirmation dialog"
|
|
90
|
+
},
|
|
91
|
+
options: {
|
|
92
|
+
type: "array",
|
|
93
|
+
items: {
|
|
94
|
+
type: "string"
|
|
95
|
+
},
|
|
96
|
+
minItems: 1,
|
|
97
|
+
description: "Selectable option labels. The first option is used for the primary split button and the remaining options are placed in the dropdown menu."
|
|
98
|
+
},
|
|
99
|
+
modifiedFiles: {
|
|
100
|
+
type: "array",
|
|
101
|
+
items: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
uri: {
|
|
105
|
+
type: "string",
|
|
106
|
+
description: "URI of the modified file."
|
|
107
|
+
},
|
|
108
|
+
originalUri: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: "Optional original URI used when opening a diff."
|
|
111
|
+
},
|
|
112
|
+
insertions: {
|
|
113
|
+
type: "number",
|
|
114
|
+
description: "Optional number of lines added."
|
|
115
|
+
},
|
|
116
|
+
deletions: {
|
|
117
|
+
type: "number",
|
|
118
|
+
description: "Optional number of lines removed."
|
|
119
|
+
},
|
|
120
|
+
title: {
|
|
121
|
+
type: "string",
|
|
122
|
+
description: "Optional title shown in the file tooltip."
|
|
123
|
+
},
|
|
124
|
+
description: {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "Optional secondary label shown for the file entry."
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
required: ["uri"],
|
|
130
|
+
additionalProperties: false
|
|
131
|
+
},
|
|
132
|
+
description: "Modified files to show in the confirmation UI."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
required: ["title", "message", "options", "modifiedFiles"],
|
|
136
|
+
additionalProperties: false
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
class ConfirmationTool {
|
|
140
|
+
async prepareToolInvocation(context, token) {
|
|
141
|
+
const parameters = context.parameters;
|
|
142
|
+
if (!parameters.title || !parameters.message) {
|
|
143
|
+
throw ( new Error("Missing required parameters for ConfirmationTool"));
|
|
144
|
+
}
|
|
145
|
+
const confirmationType = parameters.confirmationType ?? "basic";
|
|
146
|
+
let toolSpecificData;
|
|
147
|
+
if (confirmationType === "terminal") {
|
|
148
|
+
toolSpecificData = {
|
|
149
|
+
kind: "terminal",
|
|
150
|
+
commandLine: {
|
|
151
|
+
original: parameters.terminalCommand ?? ""
|
|
152
|
+
},
|
|
153
|
+
language: "bash"
|
|
154
|
+
};
|
|
155
|
+
} else {
|
|
156
|
+
toolSpecificData = undefined;
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
confirmationMessages: {
|
|
160
|
+
title: parameters.title,
|
|
161
|
+
message: ( new MarkdownString(parameters.message)),
|
|
162
|
+
allowAutoConfirm: (parameters.buttons || []).length ? false : true,
|
|
163
|
+
customOptions: parameters.buttons?.map((label, index) => ({
|
|
164
|
+
id: label,
|
|
165
|
+
label,
|
|
166
|
+
kind: index === 0 ? ConfirmationOptionKind.Approve : ConfirmationOptionKind.Deny
|
|
167
|
+
}))
|
|
168
|
+
},
|
|
169
|
+
toolSpecificData,
|
|
170
|
+
presentation: ToolInvocationPresentation.HiddenAfterComplete
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
async invoke(invocation, countTokens, progress, token) {
|
|
174
|
+
if (invocation.selectedCustomButton) {
|
|
175
|
+
return {
|
|
176
|
+
content: [{
|
|
177
|
+
kind: "text",
|
|
178
|
+
value: invocation.selectedCustomButton
|
|
179
|
+
}]
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
content: [{
|
|
184
|
+
kind: "text",
|
|
185
|
+
value: "yes"
|
|
186
|
+
}]
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
class ModifiedFilesConfirmationTool {
|
|
191
|
+
async prepareToolInvocation(context, token) {
|
|
192
|
+
const parameters = context.parameters;
|
|
193
|
+
if (!parameters.title || !parameters.message) {
|
|
194
|
+
throw ( new Error("Missing required parameters for ModifiedFilesConfirmationTool"));
|
|
195
|
+
}
|
|
196
|
+
if (!parameters.options?.length) {
|
|
197
|
+
throw ( new Error("ModifiedFilesConfirmationTool requires at least one option"));
|
|
198
|
+
}
|
|
199
|
+
const toolSpecificData = {
|
|
200
|
+
kind: "modifiedFilesConfirmation",
|
|
201
|
+
options: parameters.options,
|
|
202
|
+
modifiedFiles: ( parameters.modifiedFiles.map(file => ({
|
|
203
|
+
uri: ( URI.parse(file.uri)).toJSON(),
|
|
204
|
+
originalUri: file.originalUri ? ( URI.parse(file.originalUri)).toJSON() : undefined,
|
|
205
|
+
insertions: file.insertions,
|
|
206
|
+
deletions: file.deletions,
|
|
207
|
+
title: file.title,
|
|
208
|
+
description: file.description
|
|
209
|
+
})))
|
|
210
|
+
};
|
|
211
|
+
return {
|
|
212
|
+
confirmationMessages: {
|
|
213
|
+
title: parameters.title,
|
|
214
|
+
message: ( new MarkdownString(parameters.message)),
|
|
215
|
+
allowAutoConfirm: false
|
|
216
|
+
},
|
|
217
|
+
toolSpecificData,
|
|
218
|
+
presentation: ToolInvocationPresentation.HiddenAfterComplete
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
async invoke(invocation, countTokens, progress, token) {
|
|
222
|
+
if (invocation.selectedCustomButton) {
|
|
223
|
+
return {
|
|
224
|
+
content: [{
|
|
225
|
+
kind: "text",
|
|
226
|
+
value: invocation.selectedCustomButton
|
|
227
|
+
}]
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
content: [{
|
|
232
|
+
kind: "text",
|
|
233
|
+
value: "yes"
|
|
234
|
+
}]
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export { ConfirmationTool, ConfirmationToolData, ConfirmationToolId, ConfirmationToolWithOptionsData, ConfirmationToolWithOptionsId, ModifiedFilesConfirmationTool, ModifiedFilesConfirmationToolData, ModifiedFilesConfirmationToolId };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
4
|
+
import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatCodeMapperService.service";
|
|
5
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
6
|
+
import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
7
|
+
export { ExtensionEditToolId, InternalEditToolId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds";
|
|
8
|
+
export declare const EditToolData: IToolData;
|
|
9
|
+
export interface EditToolParams {
|
|
10
|
+
uri: UriComponents;
|
|
11
|
+
explanation: string;
|
|
12
|
+
code: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class EditTool implements IToolImpl {
|
|
15
|
+
private readonly chatService;
|
|
16
|
+
private readonly codeMapperService;
|
|
17
|
+
private readonly notebookService;
|
|
18
|
+
constructor(chatService: IChatService, codeMapperService: ICodeMapperService, notebookService: INotebookService);
|
|
19
|
+
invoke(invocation: IToolInvocation, countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
20
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
4
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
5
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
+
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
8
|
+
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
9
|
+
import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatCodeMapperService.service';
|
|
10
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
11
|
+
import { ToolDataSource, ToolInvocationPresentation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
12
|
+
import { InternalEditToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds';
|
|
13
|
+
export { ExtensionEditToolId, InternalEditToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds';
|
|
14
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
15
|
+
|
|
16
|
+
const EditToolData = {
|
|
17
|
+
id: InternalEditToolId,
|
|
18
|
+
displayName: "",
|
|
19
|
+
modelDescription: "",
|
|
20
|
+
source: ToolDataSource.Internal
|
|
21
|
+
};
|
|
22
|
+
let EditTool = class EditTool {
|
|
23
|
+
constructor(chatService, codeMapperService, notebookService) {
|
|
24
|
+
this.chatService = chatService;
|
|
25
|
+
this.codeMapperService = codeMapperService;
|
|
26
|
+
this.notebookService = notebookService;
|
|
27
|
+
}
|
|
28
|
+
async invoke(invocation, countTokens, _progress, token) {
|
|
29
|
+
if (!invocation.context) {
|
|
30
|
+
throw ( new Error("toolInvocationToken is required for this tool"));
|
|
31
|
+
}
|
|
32
|
+
const parameters = invocation.parameters;
|
|
33
|
+
const fileUri = URI.revive(parameters.uri);
|
|
34
|
+
const uri = CellUri.parse(fileUri)?.notebook || fileUri;
|
|
35
|
+
const model = this.chatService.getSession(invocation.context.sessionResource);
|
|
36
|
+
const request = model.getRequests().at(-1);
|
|
37
|
+
model.acceptResponseProgress(request, {
|
|
38
|
+
kind: "markdownContent",
|
|
39
|
+
content: ( new MarkdownString("\n````\n"))
|
|
40
|
+
});
|
|
41
|
+
model.acceptResponseProgress(request, {
|
|
42
|
+
kind: "codeblockUri",
|
|
43
|
+
uri,
|
|
44
|
+
isEdit: true
|
|
45
|
+
});
|
|
46
|
+
model.acceptResponseProgress(request, {
|
|
47
|
+
kind: "markdownContent",
|
|
48
|
+
content: ( new MarkdownString("\n````\n"))
|
|
49
|
+
});
|
|
50
|
+
if (this.notebookService.hasSupportedNotebooks(uri) && (this.notebookService.getNotebookTextModel(uri))) {
|
|
51
|
+
model.acceptResponseProgress(request, {
|
|
52
|
+
kind: "notebookEdit",
|
|
53
|
+
edits: [],
|
|
54
|
+
uri
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
model.acceptResponseProgress(request, {
|
|
58
|
+
kind: "textEdit",
|
|
59
|
+
edits: [],
|
|
60
|
+
uri
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
const editSession = model.editingSession;
|
|
64
|
+
if (!editSession) {
|
|
65
|
+
throw ( new Error("This tool must be called from within an editing session"));
|
|
66
|
+
}
|
|
67
|
+
const result = await this.codeMapperService.mapCode({
|
|
68
|
+
codeBlocks: [{
|
|
69
|
+
code: parameters.code,
|
|
70
|
+
resource: uri,
|
|
71
|
+
markdownBeforeBlock: parameters.explanation
|
|
72
|
+
}],
|
|
73
|
+
location: "tool",
|
|
74
|
+
chatRequestId: invocation.chatRequestId,
|
|
75
|
+
chatRequestModel: invocation.modelId,
|
|
76
|
+
chatSessionResource: invocation.context.sessionResource
|
|
77
|
+
}, {
|
|
78
|
+
textEdit: (target, edits) => {
|
|
79
|
+
model.acceptResponseProgress(request, {
|
|
80
|
+
kind: "textEdit",
|
|
81
|
+
uri: target,
|
|
82
|
+
edits
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
notebookEdit(target, edits) {
|
|
86
|
+
model.acceptResponseProgress(request, {
|
|
87
|
+
kind: "notebookEdit",
|
|
88
|
+
uri: target,
|
|
89
|
+
edits
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}, token);
|
|
93
|
+
if (this.notebookService.hasSupportedNotebooks(uri) && (this.notebookService.getNotebookTextModel(uri))) {
|
|
94
|
+
model.acceptResponseProgress(request, {
|
|
95
|
+
kind: "notebookEdit",
|
|
96
|
+
uri,
|
|
97
|
+
edits: [],
|
|
98
|
+
done: true
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
model.acceptResponseProgress(request, {
|
|
102
|
+
kind: "textEdit",
|
|
103
|
+
uri,
|
|
104
|
+
edits: [],
|
|
105
|
+
done: true
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (result?.errorMessage) {
|
|
109
|
+
throw ( new Error(result.errorMessage));
|
|
110
|
+
}
|
|
111
|
+
let dispose;
|
|
112
|
+
await ( new Promise(resolve => {
|
|
113
|
+
let wasFileBeingModified = false;
|
|
114
|
+
dispose = autorun(r => {
|
|
115
|
+
const entries = editSession.entries.read(r);
|
|
116
|
+
const currentFile = entries?.find(e => isEqual(e.modifiedURI, uri));
|
|
117
|
+
if (currentFile) {
|
|
118
|
+
if (currentFile.isCurrentlyBeingModifiedBy.read(r)) {
|
|
119
|
+
wasFileBeingModified = true;
|
|
120
|
+
} else if (wasFileBeingModified) {
|
|
121
|
+
resolve(true);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
})).finally(() => {
|
|
126
|
+
dispose.dispose();
|
|
127
|
+
});
|
|
128
|
+
return {
|
|
129
|
+
content: [{
|
|
130
|
+
kind: "text",
|
|
131
|
+
value: "The file was edited successfully"
|
|
132
|
+
}]
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
async prepareToolInvocation(context, token) {
|
|
136
|
+
return {
|
|
137
|
+
presentation: ToolInvocationPresentation.Hidden
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
EditTool = ( __decorate([( __param(0, IChatService)), ( __param(1, ICodeMapperService)), ( __param(2, INotebookService))], EditTool));
|
|
142
|
+
|
|
143
|
+
export { EditTool, EditToolData };
|
package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IToolData, IToolImpl, IToolInvocation, IToolResult, IToolInvocationPreparationContext, IPreparedToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
4
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
6
|
+
import { IChatTodoListService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatTodoListService.service";
|
|
7
|
+
export declare const ManageTodoListToolToolId = "manage_todo_list";
|
|
8
|
+
export declare function createManageTodoListToolData(): IToolData;
|
|
9
|
+
export declare const ManageTodoListToolData: IToolData;
|
|
10
|
+
export declare class ManageTodoListTool extends Disposable implements IToolImpl {
|
|
11
|
+
private readonly chatTodoListService;
|
|
12
|
+
private readonly logService;
|
|
13
|
+
private readonly telemetryService;
|
|
14
|
+
constructor(chatTodoListService: IChatTodoListService, logService: ILogService, telemetryService: ITelemetryService);
|
|
15
|
+
invoke(invocation: IToolInvocation, _countTokens: any, _progress: any, _token: CancellationToken): Promise<IToolResult>;
|
|
16
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
17
|
+
private generatePastTenseMessage;
|
|
18
|
+
private handleRead;
|
|
19
|
+
private handleReadOperation;
|
|
20
|
+
private handleWriteOperation;
|
|
21
|
+
private calculateStatusCounts;
|
|
22
|
+
private formatTodoListAsMarkdownTaskList;
|
|
23
|
+
private calculateTodoChanges;
|
|
24
|
+
}
|