@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,50 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IHookCommand, extractHookCommandsFromItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
|
|
3
|
+
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
4
|
+
export { extractHookCommandsFromItem };
|
|
5
|
+
/**
|
|
6
|
+
* Resolves a Claude hook type name to our abstract HookType.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveClaudeHookType(name: string): HookType | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the Claude hook type name for a given abstract HookType.
|
|
11
|
+
* Returns undefined if the hook type is not supported in Claude.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getClaudeHookTypeName(hookType: HookType): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Result of parsing Claude hooks file.
|
|
16
|
+
*/
|
|
17
|
+
export interface IParseClaudeHooksResult {
|
|
18
|
+
/**
|
|
19
|
+
* The parsed hooks by type.
|
|
20
|
+
*/
|
|
21
|
+
readonly hooks: Map<HookType, {
|
|
22
|
+
hooks: IHookCommand[];
|
|
23
|
+
originalId: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Whether all hooks from this file were disabled via `disableAllHooks: true`.
|
|
27
|
+
*/
|
|
28
|
+
readonly disabledAllHooks: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parses hooks from a Claude settings.json file.
|
|
32
|
+
* Claude format:
|
|
33
|
+
* {
|
|
34
|
+
* "hooks": {
|
|
35
|
+
* "PreToolUse": [
|
|
36
|
+
* { "matcher": "Bash", "hooks": [{ "type": "command", "command": "..." }] }
|
|
37
|
+
* ]
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* Or simpler format:
|
|
42
|
+
* {
|
|
43
|
+
* "hooks": {
|
|
44
|
+
* "PreToolUse": [{ "type": "command", "command": "..." }]
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
48
|
+
* If the file has `disableAllHooks: true` at the top level, all hooks are filtered out.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseClaudeHooks(json: unknown, workspaceRootUri: URI | undefined, userHome: string): IParseClaudeHooksResult;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
import { toHookType, extractHookCommandsFromItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
3
|
+
export { extractHookCommandsFromItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
4
|
+
import { HOOKS_BY_TARGET } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
5
|
+
import { Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
6
|
+
|
|
7
|
+
let _hookTypeToClaudeName;
|
|
8
|
+
function getHookTypeToClaudeNameMap() {
|
|
9
|
+
if (!_hookTypeToClaudeName) {
|
|
10
|
+
_hookTypeToClaudeName = ( new Map());
|
|
11
|
+
for (const [claudeName, hookType] of Object.entries(HOOKS_BY_TARGET[Target.Claude])) {
|
|
12
|
+
_hookTypeToClaudeName.set(hookType, claudeName);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return _hookTypeToClaudeName;
|
|
16
|
+
}
|
|
17
|
+
function resolveClaudeHookType(name) {
|
|
18
|
+
return HOOKS_BY_TARGET[Target.Claude][name];
|
|
19
|
+
}
|
|
20
|
+
function getClaudeHookTypeName(hookType) {
|
|
21
|
+
return getHookTypeToClaudeNameMap().get(hookType);
|
|
22
|
+
}
|
|
23
|
+
function parseClaudeHooks(json, workspaceRootUri, userHome) {
|
|
24
|
+
const result = ( new Map());
|
|
25
|
+
if (!json || typeof json !== "object") {
|
|
26
|
+
return {
|
|
27
|
+
hooks: result,
|
|
28
|
+
disabledAllHooks: false
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const root = json;
|
|
32
|
+
if (root.disableAllHooks === true) {
|
|
33
|
+
return {
|
|
34
|
+
hooks: result,
|
|
35
|
+
disabledAllHooks: true
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const hooks = root.hooks;
|
|
39
|
+
if (!hooks || typeof hooks !== "object") {
|
|
40
|
+
return {
|
|
41
|
+
hooks: result,
|
|
42
|
+
disabledAllHooks: false
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const hooksObj = hooks;
|
|
46
|
+
for (const originalId of ( Object.keys(hooksObj))) {
|
|
47
|
+
const hookType = resolveClaudeHookType(originalId) ?? toHookType(originalId);
|
|
48
|
+
if (!hookType) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const hookArray = hooksObj[originalId];
|
|
52
|
+
if (!Array.isArray(hookArray)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const commands = [];
|
|
56
|
+
for (const item of hookArray) {
|
|
57
|
+
const extracted = extractHookCommandsFromItem(item, workspaceRootUri, userHome);
|
|
58
|
+
commands.push(...extracted);
|
|
59
|
+
}
|
|
60
|
+
if (commands.length > 0) {
|
|
61
|
+
const existing = result.get(hookType);
|
|
62
|
+
if (existing) {
|
|
63
|
+
existing.hooks.push(...commands);
|
|
64
|
+
} else {
|
|
65
|
+
result.set(hookType, {
|
|
66
|
+
hooks: commands,
|
|
67
|
+
originalId
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
hooks: result,
|
|
74
|
+
disabledAllHooks: false
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { getClaudeHookTypeName, parseClaudeHooks, resolveClaudeHookType };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IHookCommand } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
|
|
3
|
+
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a hook source with its original and normalized properties.
|
|
6
|
+
* Used to display hooks from different formats in a unified view.
|
|
7
|
+
*/
|
|
8
|
+
export interface IResolvedHookEntry {
|
|
9
|
+
/** The normalized hook type (our canonical HookType enum) */
|
|
10
|
+
readonly hookType: HookType;
|
|
11
|
+
/** The original hook type ID as it appears in the source file */
|
|
12
|
+
readonly originalHookTypeId: string;
|
|
13
|
+
/** The source format this hook came from */
|
|
14
|
+
readonly sourceFormat: HookSourceFormat;
|
|
15
|
+
/** The resolved hook command */
|
|
16
|
+
readonly command: IHookCommand;
|
|
17
|
+
/** The index of this hook in its array (for editing) */
|
|
18
|
+
readonly index: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Supported hook file formats.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum HookSourceFormat {
|
|
24
|
+
/** GitHub Copilot hooks .json format */
|
|
25
|
+
Copilot = "copilot",
|
|
26
|
+
/** Claude settings.json / settings.local.json format */
|
|
27
|
+
Claude = "claude"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Determines the hook source format based on the file URI.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getHookSourceFormat(fileUri: URI): HookSourceFormat;
|
|
33
|
+
/**
|
|
34
|
+
* Checks if a file is read-only based on its source format.
|
|
35
|
+
* Claude settings files should be read-only from our perspective since they have a different format.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isReadOnlyHookSource(format: HookSourceFormat): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Parses hooks from a Copilot hooks .json file (our native format).
|
|
40
|
+
*/
|
|
41
|
+
export declare function parseCopilotHooks(json: unknown, workspaceRootUri: URI | undefined, userHome: string): Map<HookType, {
|
|
42
|
+
hooks: IHookCommand[];
|
|
43
|
+
originalId: string;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Result of parsing hooks from a file.
|
|
47
|
+
*/
|
|
48
|
+
export interface IParseHooksFromFileResult {
|
|
49
|
+
readonly format: HookSourceFormat;
|
|
50
|
+
readonly hooks: Map<HookType, {
|
|
51
|
+
hooks: IHookCommand[];
|
|
52
|
+
originalId: string;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Whether all hooks from this file were disabled via `disableAllHooks: true`.
|
|
56
|
+
*/
|
|
57
|
+
readonly disabledAllHooks: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Parses hooks from any supported format, auto-detecting the format from the file URI.
|
|
61
|
+
*/
|
|
62
|
+
export declare function parseHooksFromFile(fileUri: URI, json: unknown, workspaceRootUri: URI | undefined, userHome: string): IParseHooksFromFileResult;
|
|
63
|
+
/**
|
|
64
|
+
* Parses hooks from a file, ignoring the `disableAllHooks` flag.
|
|
65
|
+
* Used by diagnostics to show which hooks are hidden when `disableAllHooks: true` is set.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseHooksIgnoringDisableAll(fileUri: URI, json: unknown, workspaceRootUri: URI | undefined, userHome: string): IParseHooksFromFileResult;
|
|
68
|
+
/**
|
|
69
|
+
* Gets a human-readable label for a hook source format.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getHookSourceFormatLabel(format: HookSourceFormat): string;
|
|
72
|
+
/**
|
|
73
|
+
* Builds a new hook entry object in the appropriate format for the given source format.
|
|
74
|
+
* - Copilot format: `{ type: 'command', command: '' }`
|
|
75
|
+
* - Claude format: `{ matcher: '', hooks: [{ type: 'command', command: '' }] }`
|
|
76
|
+
*/
|
|
77
|
+
export declare function buildNewHookEntry(format: HookSourceFormat): Record<string, unknown>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
import { basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
3
|
+
import { toHookType, extractHookCommandsFromItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
4
|
+
import { parseClaudeHooks } from './hookClaudeCompat.js';
|
|
5
|
+
import { resolveCopilotCliHookType } from './hookCopilotCliCompat.js';
|
|
6
|
+
|
|
7
|
+
var HookSourceFormat;
|
|
8
|
+
(function(HookSourceFormat) {
|
|
9
|
+
HookSourceFormat["Copilot"] = "copilot";
|
|
10
|
+
HookSourceFormat["Claude"] = "claude";
|
|
11
|
+
})(HookSourceFormat || (HookSourceFormat = {}));
|
|
12
|
+
function getHookSourceFormat(fileUri) {
|
|
13
|
+
const filename = basename(fileUri.path).toLowerCase();
|
|
14
|
+
const dir = dirname(fileUri.path);
|
|
15
|
+
if ((filename === "settings.json" || filename === "settings.local.json") && dir.endsWith(".claude")) {
|
|
16
|
+
return HookSourceFormat.Claude;
|
|
17
|
+
}
|
|
18
|
+
return HookSourceFormat.Copilot;
|
|
19
|
+
}
|
|
20
|
+
function parseCopilotHooks(json, workspaceRootUri, userHome) {
|
|
21
|
+
const result = ( new Map());
|
|
22
|
+
if (!json || typeof json !== "object") {
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
const root = json;
|
|
26
|
+
const hooks = root.hooks;
|
|
27
|
+
if (!hooks || typeof hooks !== "object") {
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
const hooksObj = hooks;
|
|
31
|
+
for (const originalId of ( Object.keys(hooksObj))) {
|
|
32
|
+
const hookType = resolveCopilotCliHookType(originalId) ?? toHookType(originalId);
|
|
33
|
+
if (!hookType) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const hookArray = hooksObj[originalId];
|
|
37
|
+
if (!Array.isArray(hookArray)) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const commands = [];
|
|
41
|
+
for (const item of hookArray) {
|
|
42
|
+
const extracted = extractHookCommandsFromItem(item, workspaceRootUri, userHome);
|
|
43
|
+
commands.push(...extracted);
|
|
44
|
+
}
|
|
45
|
+
if (commands.length > 0) {
|
|
46
|
+
result.set(hookType, {
|
|
47
|
+
hooks: commands,
|
|
48
|
+
originalId
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
function parseHooksFromFile(fileUri, json, workspaceRootUri, userHome) {
|
|
55
|
+
const format = getHookSourceFormat(fileUri);
|
|
56
|
+
let hooks;
|
|
57
|
+
let disabledAllHooks = false;
|
|
58
|
+
switch (format) {
|
|
59
|
+
case HookSourceFormat.Claude:
|
|
60
|
+
{
|
|
61
|
+
const result = parseClaudeHooks(json, workspaceRootUri, userHome);
|
|
62
|
+
hooks = result.hooks;
|
|
63
|
+
disabledAllHooks = result.disabledAllHooks;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case HookSourceFormat.Copilot:
|
|
67
|
+
default:
|
|
68
|
+
hooks = parseCopilotHooks(json, workspaceRootUri, userHome);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
format,
|
|
73
|
+
hooks,
|
|
74
|
+
disabledAllHooks
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function parseHooksIgnoringDisableAll(fileUri, json, workspaceRootUri, userHome) {
|
|
78
|
+
const format = getHookSourceFormat(fileUri);
|
|
79
|
+
let hooks;
|
|
80
|
+
switch (format) {
|
|
81
|
+
case HookSourceFormat.Claude:
|
|
82
|
+
{
|
|
83
|
+
if (json && typeof json === "object") {
|
|
84
|
+
const {
|
|
85
|
+
disableAllHooks: _,
|
|
86
|
+
...rest
|
|
87
|
+
} = json;
|
|
88
|
+
const result = parseClaudeHooks(rest, workspaceRootUri, userHome);
|
|
89
|
+
hooks = result.hooks;
|
|
90
|
+
} else {
|
|
91
|
+
hooks = ( new Map());
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case HookSourceFormat.Copilot:
|
|
96
|
+
default:
|
|
97
|
+
hooks = parseCopilotHooks(json, workspaceRootUri, userHome);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
format,
|
|
102
|
+
hooks,
|
|
103
|
+
disabledAllHooks: true
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function buildNewHookEntry(format) {
|
|
107
|
+
const commandEntry = {
|
|
108
|
+
type: "command",
|
|
109
|
+
command: ""
|
|
110
|
+
};
|
|
111
|
+
if (format === HookSourceFormat.Claude) {
|
|
112
|
+
return {
|
|
113
|
+
matcher: "",
|
|
114
|
+
hooks: [commandEntry]
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return commandEntry;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { HookSourceFormat, buildNewHookEntry, getHookSourceFormat, parseCopilotHooks, parseHooksFromFile, parseHooksIgnoringDisableAll };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a Copilot CLI hook type name to our abstract HookType.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveCopilotCliHookType(name: string): HookType | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Gets the Copilot CLI hook type name for a given abstract HookType.
|
|
8
|
+
* Returns undefined if the hook type is not supported in Copilot CLI.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCopilotCliHookTypeName(hookType: HookType): string | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { HOOKS_BY_TARGET } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
3
|
+
import { Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
4
|
+
|
|
5
|
+
const COPILOT_CLI_HOOK_TYPE_MAP = HOOKS_BY_TARGET[Target.GitHubCopilot];
|
|
6
|
+
let _hookTypeToCopilotCliName;
|
|
7
|
+
function getHookTypeToCopilotCliNameMap() {
|
|
8
|
+
if (!_hookTypeToCopilotCliName) {
|
|
9
|
+
_hookTypeToCopilotCliName = ( new Map());
|
|
10
|
+
for (const [copilotCliName, hookType] of Object.entries(COPILOT_CLI_HOOK_TYPE_MAP)) {
|
|
11
|
+
_hookTypeToCopilotCliName.set(hookType, copilotCliName);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return _hookTypeToCopilotCliName;
|
|
15
|
+
}
|
|
16
|
+
function resolveCopilotCliHookType(name) {
|
|
17
|
+
return COPILOT_CLI_HOOK_TYPE_MAP[name];
|
|
18
|
+
}
|
|
19
|
+
function getCopilotCliHookTypeName(hookType) {
|
|
20
|
+
return getHookTypeToCopilotCliNameMap().get(hookType);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { getCopilotCliHookTypeName, resolveCopilotCliHookType };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
6
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
|
+
import { IExtensionDescription } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
8
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
9
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
|
+
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
11
|
+
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
12
|
+
import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
13
|
+
import { IExtensionPromptPath, IPromptFileContext, IPromptFileResource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
14
|
+
/**
|
|
15
|
+
* Event payload emitted by {@link ExtensionPromptFileService.onDidChange}.
|
|
16
|
+
*/
|
|
17
|
+
export interface IExtensionPromptFilesChangeEvent {
|
|
18
|
+
readonly type: PromptsType;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Owns the registry of prompt files contributed by extensions, both via
|
|
22
|
+
* static contribution points (see {@link registerContributedFile}) and via
|
|
23
|
+
* dynamic providers registered through the proposed extension API (see
|
|
24
|
+
* {@link registerPromptFileProvider}).
|
|
25
|
+
*
|
|
26
|
+
* Exposes a per-type getter ({@link getExtensionPromptFiles}) that merges
|
|
27
|
+
* both sources and applies any `when` clauses, plus a single change event
|
|
28
|
+
* ({@link onDidChange}) carrying the affected {@link PromptsType}.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ExtensionPromptFileService extends Disposable {
|
|
31
|
+
private readonly logger;
|
|
32
|
+
private readonly fileService;
|
|
33
|
+
private readonly modelService;
|
|
34
|
+
private readonly extensionService;
|
|
35
|
+
private readonly filesConfigService;
|
|
36
|
+
private readonly contextKeyService;
|
|
37
|
+
/**
|
|
38
|
+
* Files contributed via extension contribution points, keyed by type then URI.
|
|
39
|
+
*/
|
|
40
|
+
private readonly contributedFiles;
|
|
41
|
+
/**
|
|
42
|
+
* Providers registered via the proposed extension API.
|
|
43
|
+
*/
|
|
44
|
+
private readonly _promptFileProviders;
|
|
45
|
+
/**
|
|
46
|
+
* Context keys referenced by tracked `when` clauses (from contributed
|
|
47
|
+
* files and provider results). Used to know when to re-evaluate.
|
|
48
|
+
*/
|
|
49
|
+
private readonly _contributedWhenKeys;
|
|
50
|
+
private readonly _contributedWhenClauses;
|
|
51
|
+
private readonly _providerWhenClauses;
|
|
52
|
+
private readonly _onDidChange;
|
|
53
|
+
readonly onDidChange: Event<IExtensionPromptFilesChangeEvent>;
|
|
54
|
+
/**
|
|
55
|
+
* Pending URIs to mark as readonly, flushed on the next microtask.
|
|
56
|
+
* Batches multiple `registerContributedFile` calls (which happen
|
|
57
|
+
* synchronously in the extension point handler) into a single
|
|
58
|
+
* `updateReadonly` call to avoid firing `onDidChangeReadonly` per file.
|
|
59
|
+
*/
|
|
60
|
+
private _pendingReadonlyUris;
|
|
61
|
+
private _pendingReadonlyFlush;
|
|
62
|
+
constructor(logger: ILogService, fileService: IFileService, modelService: IModelService, extensionService: IExtensionService, filesConfigService: IFilesConfigurationService, contextKeyService: IContextKeyService);
|
|
63
|
+
/**
|
|
64
|
+
* Returns the merged list of extension-contributed prompt files for the
|
|
65
|
+
* given type, filtered by their `when` clause.
|
|
66
|
+
*/
|
|
67
|
+
getExtensionPromptFiles(type: PromptsType, token: CancellationToken): Promise<readonly IExtensionPromptPath[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Registers a file contributed via a static contribution point. Returns
|
|
70
|
+
* a disposable that removes the contribution.
|
|
71
|
+
*/
|
|
72
|
+
registerContributedFile(type: PromptsType, uri: URI, extension: IExtensionDescription, name?: string, description?: string, when?: string, sessionTypes?: readonly string[]): IDisposable;
|
|
73
|
+
/**
|
|
74
|
+
* Registers a prompt file provider (CustomAgentProvider, InstructionsProvider, or PromptFileProvider).
|
|
75
|
+
* This is called by the extension host bridge when an extension registers a provider via
|
|
76
|
+
* vscode.chat.registerCustomAgentProvider(), registerInstructionsProvider(), or
|
|
77
|
+
* registerPromptFileProvider().
|
|
78
|
+
*/
|
|
79
|
+
registerPromptFileProvider(extension: IExtensionDescription, type: PromptsType, provider: {
|
|
80
|
+
onDidChangePromptFiles?: Event<void>;
|
|
81
|
+
providePromptFiles: (context: IPromptFileContext, token: CancellationToken) => Promise<IPromptFileResource[] | undefined>;
|
|
82
|
+
}): IDisposable;
|
|
83
|
+
private _listFromProviders;
|
|
84
|
+
private _getProviderActivationEvent;
|
|
85
|
+
private _enqueueReadonlyUpdate;
|
|
86
|
+
private _updateContributedWhenKeys;
|
|
87
|
+
private _validateAndSanitizeSkillFile;
|
|
88
|
+
private _parsePromptFile;
|
|
89
|
+
private _sanitizeAgentSkillText;
|
|
90
|
+
private _truncateAgentSkillName;
|
|
91
|
+
private _truncateAgentSkillDescription;
|
|
92
|
+
}
|