@codingame/monaco-vscode-api 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/missing-services.js +6 -26
- package/package.json +8 -8
- package/services.d.ts +1 -1
- package/services.js +3 -3
- package/tools.d.ts +4 -0
- package/tools.js +24 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
- package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.d.ts +81 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +97 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { IConfigurationService } from "../../../../../../platform/configuration/common/configuration.service.js";
|
|
2
|
-
import { URI } from "../../../../../../base/common/uri.js";
|
|
3
|
-
import { PromptsType } from "../promptTypes.js";
|
|
4
|
-
import { IPromptSourceFolder } from "./promptFileLocations.js";
|
|
5
|
-
/**
|
|
6
|
-
* Configuration helper for the `reusable prompts` feature.
|
|
7
|
-
* @see {@link PromptsConfig.PROMPT_LOCATIONS_KEY}, {@link PromptsConfig.INSTRUCTIONS_LOCATION_KEY}, {@link PromptsConfig.MODE_LOCATION_KEY}, or {@link PromptsConfig.PROMPT_FILES_SUGGEST_KEY}.
|
|
8
|
-
*
|
|
9
|
-
* ### Functions
|
|
10
|
-
*
|
|
11
|
-
* - {@link getLocationsValue} allows to current read configuration value
|
|
12
|
-
* - {@link promptSourceFolders} gets list of source folders for prompt files
|
|
13
|
-
* - {@link getPromptFilesRecommendationsValue} gets prompt file recommendation configuration
|
|
14
|
-
*
|
|
15
|
-
* ### File Paths Resolution
|
|
16
|
-
*
|
|
17
|
-
* We resolve only `*.prompt.md` files inside the resulting source folders. Relative paths are resolved
|
|
18
|
-
* relative to:
|
|
19
|
-
*
|
|
20
|
-
* - the current workspace `root`, if applicable, in other words one of the workspace folders
|
|
21
|
-
* can be used as a prompt files source folder
|
|
22
|
-
* - root of each top-level folder in the workspace (if there are multiple workspace folders)
|
|
23
|
-
* - current root folder (if a single folder is open)
|
|
24
|
-
*
|
|
25
|
-
* ### Prompt File Suggestions
|
|
26
|
-
*
|
|
27
|
-
* The `chat.promptFilesRecommendations` setting allows configuring which prompt files to suggest in different contexts:
|
|
28
|
-
*
|
|
29
|
-
* ```json
|
|
30
|
-
* {
|
|
31
|
-
* "chat.promptFilesRecommendations": {
|
|
32
|
-
* "plan": true, // Always suggest
|
|
33
|
-
* "new-page": "resourceExtname == .js", // Suggest for JavaScript files
|
|
34
|
-
* "draft-blog": "resourceLangId == markdown", // Suggest for Markdown files
|
|
35
|
-
* "debug": false // Never suggest
|
|
36
|
-
* }
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare namespace PromptsConfig {
|
|
41
|
-
/**
|
|
42
|
-
* Configuration key for the locations of reusable prompt files.
|
|
43
|
-
*/
|
|
44
|
-
const PROMPT_LOCATIONS_KEY = "chat.promptFilesLocations";
|
|
45
|
-
/**
|
|
46
|
-
* Configuration key for the locations of instructions files.
|
|
47
|
-
*/
|
|
48
|
-
const INSTRUCTIONS_LOCATION_KEY = "chat.instructionsFilesLocations";
|
|
49
|
-
/**
|
|
50
|
-
* Configuration key for the locations of mode files.
|
|
51
|
-
* @deprecated Use {@link AGENTS_LOCATION_KEY} instead
|
|
52
|
-
*/
|
|
53
|
-
const MODE_LOCATION_KEY = "chat.modeFilesLocations";
|
|
54
|
-
/**
|
|
55
|
-
* Configuration key for the locations of agent files (with simplified path support).
|
|
56
|
-
*/
|
|
57
|
-
const AGENTS_LOCATION_KEY = "chat.agentFilesLocations";
|
|
58
|
-
/**
|
|
59
|
-
* Configuration key for the locations of skill folders.
|
|
60
|
-
*/
|
|
61
|
-
const SKILLS_LOCATION_KEY = "chat.agentSkillsLocations";
|
|
62
|
-
/**
|
|
63
|
-
* Configuration key for the locations of hook files.
|
|
64
|
-
*/
|
|
65
|
-
const HOOKS_LOCATION_KEY = "chat.hookFilesLocations";
|
|
66
|
-
/**
|
|
67
|
-
* Configuration key for prompt file suggestions.
|
|
68
|
-
*/
|
|
69
|
-
const PROMPT_FILES_SUGGEST_KEY = "chat.promptFilesRecommendations";
|
|
70
|
-
/**
|
|
71
|
-
* Configuration key for use of the copilot instructions file.
|
|
72
|
-
*/
|
|
73
|
-
const USE_COPILOT_INSTRUCTION_FILES = "github.copilot.chat.codeGeneration.useInstructionFiles";
|
|
74
|
-
/**
|
|
75
|
-
* Configuration key for the AGENTS.md.
|
|
76
|
-
*/
|
|
77
|
-
const USE_AGENT_MD = "chat.useAgentsMdFile";
|
|
78
|
-
/**
|
|
79
|
-
* Configuration key for nested AGENTS.md files.
|
|
80
|
-
*/
|
|
81
|
-
const USE_NESTED_AGENT_MD = "chat.useNestedAgentsMdFiles";
|
|
82
|
-
/**
|
|
83
|
-
* Configuration key for the CLAUDE.md.
|
|
84
|
-
*/
|
|
85
|
-
const USE_CLAUDE_MD = "chat.useClaudeMdFile";
|
|
86
|
-
/**
|
|
87
|
-
* Configuration key for agent skills usage.
|
|
88
|
-
*/
|
|
89
|
-
const USE_AGENT_SKILLS = "chat.useAgentSkills";
|
|
90
|
-
/**
|
|
91
|
-
* Configuration key for chat hooks usage.
|
|
92
|
-
*/
|
|
93
|
-
const USE_CHAT_HOOKS = "chat.useHooks";
|
|
94
|
-
/**
|
|
95
|
-
* Configuration key for enabling Claude hooks.
|
|
96
|
-
*/
|
|
97
|
-
const USE_CLAUDE_HOOKS = "chat.useClaudeHooks";
|
|
98
|
-
/**
|
|
99
|
-
* Configuration key for enabling stronger skill adherence prompt (experimental).
|
|
100
|
-
*/
|
|
101
|
-
const USE_SKILL_ADHERENCE_PROMPT = "chat.experimental.useSkillAdherencePrompt";
|
|
102
|
-
/**
|
|
103
|
-
* Configuration key for including applying instructions.
|
|
104
|
-
*/
|
|
105
|
-
const INCLUDE_APPLYING_INSTRUCTIONS = "chat.includeApplyingInstructions";
|
|
106
|
-
/**
|
|
107
|
-
* Configuration key for including referenced instructions.
|
|
108
|
-
*/
|
|
109
|
-
const INCLUDE_REFERENCED_INSTRUCTIONS = "chat.includeReferencedInstructions";
|
|
110
|
-
/**
|
|
111
|
-
* Search for configuration files in parent repositories of the workspace folder
|
|
112
|
-
*/
|
|
113
|
-
const USE_CUSTOMIZATIONS_IN_PARENT_REPOS = "chat.useCustomizationsInParentRepositories";
|
|
114
|
-
/**
|
|
115
|
-
* Get value of the `reusable prompt locations` configuration setting.
|
|
116
|
-
* @see {@link PROMPT_LOCATIONS_CONFIG_KEY}, {@link INSTRUCTIONS_LOCATIONS_CONFIG_KEY}, {@link MODE_LOCATIONS_CONFIG_KEY}, {@link SKILLS_LOCATION_KEY}.
|
|
117
|
-
*/
|
|
118
|
-
function getLocationsValue(configService: IConfigurationService, type: PromptsType): Record<string, boolean> | undefined;
|
|
119
|
-
/**
|
|
120
|
-
* Gets list of source folders for prompt files.
|
|
121
|
-
* Defaults to {@link PROMPT_DEFAULT_SOURCE_FOLDER}, {@link INSTRUCTIONS_DEFAULT_SOURCE_FOLDER}, {@link MODE_DEFAULT_SOURCE_FOLDER} or {@link SKILLS_LOCATION_KEY}.
|
|
122
|
-
*/
|
|
123
|
-
function promptSourceFolders(configService: IConfigurationService, type: PromptsType): IPromptSourceFolder[];
|
|
124
|
-
/**
|
|
125
|
-
* Get value of the prompt file recommendations configuration setting.
|
|
126
|
-
* @param configService Configuration service instance
|
|
127
|
-
* @param resource Optional resource URI to get workspace folder-specific settings
|
|
128
|
-
* @see {@link PROMPT_FILES_SUGGEST_KEY}.
|
|
129
|
-
*/
|
|
130
|
-
function getPromptFilesRecommendationsValue(configService: IConfigurationService, resource?: URI): Record<string, boolean | string> | undefined;
|
|
131
|
-
}
|
|
132
|
-
export declare function getPromptFileLocationsConfigKey(type: PromptsType): string;
|
|
133
|
-
/**
|
|
134
|
-
* Helper to parse an input value of `any` type into a boolean.
|
|
135
|
-
*
|
|
136
|
-
* @param value - input value to parse
|
|
137
|
-
* @returns `true` if the value is the boolean `true` value or a string that can
|
|
138
|
-
* be clearly mapped to a boolean (e.g., `"true"`, `"TRUE"`, `"FaLSe"`, etc.),
|
|
139
|
-
* `undefined` for rest of the values
|
|
140
|
-
*/
|
|
141
|
-
export declare function asBoolean(value: unknown): boolean | undefined;
|
|
142
|
-
/**
|
|
143
|
-
* Helper to check if a path starts with tilde (user home).
|
|
144
|
-
* Only supports Unix-style (`~/`) paths for cross-platform sharing.
|
|
145
|
-
* Backslash paths (`~\`) are not supported to ensure paths are shareable in repos.
|
|
146
|
-
*
|
|
147
|
-
* @param path - path to check
|
|
148
|
-
* @returns `true` if the path starts with `~/`
|
|
149
|
-
*/
|
|
150
|
-
export declare function isTildePath(path: string): boolean;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { PromptFileSource, PromptsType } from '../promptTypes.js';
|
|
3
|
-
import { getPromptFileDefaultLocations } from './promptFileLocations.js';
|
|
4
|
-
import { PromptsStorage } from '../service/promptsService.js';
|
|
5
|
-
|
|
6
|
-
var PromptsConfig;
|
|
7
|
-
(function(PromptsConfig) {
|
|
8
|
-
PromptsConfig.PROMPT_LOCATIONS_KEY = "chat.promptFilesLocations";
|
|
9
|
-
PromptsConfig.INSTRUCTIONS_LOCATION_KEY = "chat.instructionsFilesLocations";
|
|
10
|
-
PromptsConfig.MODE_LOCATION_KEY = "chat.modeFilesLocations";
|
|
11
|
-
PromptsConfig.AGENTS_LOCATION_KEY = "chat.agentFilesLocations";
|
|
12
|
-
PromptsConfig.SKILLS_LOCATION_KEY = "chat.agentSkillsLocations";
|
|
13
|
-
PromptsConfig.HOOKS_LOCATION_KEY = "chat.hookFilesLocations";
|
|
14
|
-
PromptsConfig.PROMPT_FILES_SUGGEST_KEY = "chat.promptFilesRecommendations";
|
|
15
|
-
PromptsConfig.USE_COPILOT_INSTRUCTION_FILES = "github.copilot.chat.codeGeneration.useInstructionFiles";
|
|
16
|
-
PromptsConfig.USE_AGENT_MD = "chat.useAgentsMdFile";
|
|
17
|
-
PromptsConfig.USE_NESTED_AGENT_MD = "chat.useNestedAgentsMdFiles";
|
|
18
|
-
PromptsConfig.USE_CLAUDE_MD = "chat.useClaudeMdFile";
|
|
19
|
-
PromptsConfig.USE_AGENT_SKILLS = "chat.useAgentSkills";
|
|
20
|
-
PromptsConfig.USE_CHAT_HOOKS = "chat.useHooks";
|
|
21
|
-
PromptsConfig.USE_CLAUDE_HOOKS = "chat.useClaudeHooks";
|
|
22
|
-
PromptsConfig.USE_SKILL_ADHERENCE_PROMPT = "chat.experimental.useSkillAdherencePrompt";
|
|
23
|
-
PromptsConfig.INCLUDE_APPLYING_INSTRUCTIONS = "chat.includeApplyingInstructions";
|
|
24
|
-
PromptsConfig.INCLUDE_REFERENCED_INSTRUCTIONS = "chat.includeReferencedInstructions";
|
|
25
|
-
PromptsConfig.USE_CUSTOMIZATIONS_IN_PARENT_REPOS = "chat.useCustomizationsInParentRepositories";
|
|
26
|
-
function getLocationsValue(configService, type) {
|
|
27
|
-
const key = getPromptFileLocationsConfigKey(type);
|
|
28
|
-
const configValue = configService.getValue(key);
|
|
29
|
-
if (configValue === undefined || configValue === null || Array.isArray(configValue)) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
if (typeof configValue === "object") {
|
|
33
|
-
const paths = {};
|
|
34
|
-
for (const [path, value] of Object.entries(configValue)) {
|
|
35
|
-
const cleanPath = path.trim();
|
|
36
|
-
const booleanValue = asBoolean(value);
|
|
37
|
-
if ((booleanValue !== undefined) && cleanPath) {
|
|
38
|
-
paths[cleanPath] = booleanValue;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return paths;
|
|
42
|
-
}
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
PromptsConfig.getLocationsValue = getLocationsValue;
|
|
46
|
-
function promptSourceFolders(configService, type) {
|
|
47
|
-
const value = getLocationsValue(configService, type);
|
|
48
|
-
const defaultSourceFolders = getPromptFileDefaultLocations(type);
|
|
49
|
-
if (value && (typeof value === "object")) {
|
|
50
|
-
const paths = [];
|
|
51
|
-
const defaultFolderPathsSet = ( new Set(( defaultSourceFolders.map(f => f.path))));
|
|
52
|
-
for (const defaultFolder of defaultSourceFolders) {
|
|
53
|
-
if (value[defaultFolder.path] !== false) {
|
|
54
|
-
paths.push(defaultFolder);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
for (const [path, enabledValue] of Object.entries(value)) {
|
|
58
|
-
if ((enabledValue === false) || ( defaultFolderPathsSet.has(path))) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
const storage = isTildePath(path) ? PromptsStorage.user : PromptsStorage.local;
|
|
62
|
-
paths.push({
|
|
63
|
-
path,
|
|
64
|
-
source: storage === PromptsStorage.local ? PromptFileSource.ConfigWorkspace : PromptFileSource.ConfigPersonal,
|
|
65
|
-
storage
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return paths;
|
|
69
|
-
}
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
PromptsConfig.promptSourceFolders = promptSourceFolders;
|
|
73
|
-
function getPromptFilesRecommendationsValue(configService, resource) {
|
|
74
|
-
const configValue = configService.getValue(PromptsConfig.PROMPT_FILES_SUGGEST_KEY, {
|
|
75
|
-
resource
|
|
76
|
-
});
|
|
77
|
-
if (!configValue || typeof configValue !== "object" || Array.isArray(configValue)) {
|
|
78
|
-
return undefined;
|
|
79
|
-
}
|
|
80
|
-
const suggestions = {};
|
|
81
|
-
for (const [promptName, value] of Object.entries(configValue)) {
|
|
82
|
-
const cleanPromptName = promptName.trim();
|
|
83
|
-
if (!cleanPromptName) {
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (typeof value === "boolean") {
|
|
87
|
-
suggestions[cleanPromptName] = value;
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
if (typeof value === "string") {
|
|
91
|
-
const cleanValue = value.trim();
|
|
92
|
-
if (cleanValue) {
|
|
93
|
-
suggestions[cleanPromptName] = cleanValue;
|
|
94
|
-
}
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
const booleanValue = asBoolean(value);
|
|
98
|
-
if (booleanValue !== undefined) {
|
|
99
|
-
suggestions[cleanPromptName] = booleanValue;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return ( Object.keys(suggestions)).length > 0 ? suggestions : undefined;
|
|
103
|
-
}
|
|
104
|
-
PromptsConfig.getPromptFilesRecommendationsValue = getPromptFilesRecommendationsValue;
|
|
105
|
-
})(PromptsConfig || (PromptsConfig = {}));
|
|
106
|
-
function getPromptFileLocationsConfigKey(type) {
|
|
107
|
-
switch (type) {
|
|
108
|
-
case PromptsType.instructions:
|
|
109
|
-
return PromptsConfig.INSTRUCTIONS_LOCATION_KEY;
|
|
110
|
-
case PromptsType.prompt:
|
|
111
|
-
return PromptsConfig.PROMPT_LOCATIONS_KEY;
|
|
112
|
-
case PromptsType.agent:
|
|
113
|
-
return PromptsConfig.AGENTS_LOCATION_KEY;
|
|
114
|
-
case PromptsType.skill:
|
|
115
|
-
return PromptsConfig.SKILLS_LOCATION_KEY;
|
|
116
|
-
case PromptsType.hook:
|
|
117
|
-
return PromptsConfig.HOOKS_LOCATION_KEY;
|
|
118
|
-
default:
|
|
119
|
-
throw ( new Error("Unknown prompt type"));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function asBoolean(value) {
|
|
123
|
-
if (typeof value === "boolean") {
|
|
124
|
-
return value;
|
|
125
|
-
}
|
|
126
|
-
if (typeof value === "string") {
|
|
127
|
-
const cleanValue = value.trim().toLowerCase();
|
|
128
|
-
if (cleanValue === "true") {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
if (cleanValue === "false") {
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
return undefined;
|
|
135
|
-
}
|
|
136
|
-
return undefined;
|
|
137
|
-
}
|
|
138
|
-
function isTildePath(path) {
|
|
139
|
-
return path.startsWith("~/");
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export { PromptsConfig, asBoolean, getPromptFileLocationsConfigKey, isTildePath };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { URI } from "../../../../../base/common/uri.js";
|
|
2
|
-
import { IHookCommand, extractHookCommandsFromItem } from "./hookSchema.js";
|
|
3
|
-
import { HookType } from "./hookTypes.js";
|
|
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;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { toHookType, extractHookCommandsFromItem } from './hookSchema.js';
|
|
3
|
-
import { HOOKS_BY_TARGET } from './hookTypes.js';
|
|
4
|
-
import { Target } from './promptTypes.js';
|
|
5
|
-
|
|
6
|
-
let _hookTypeToClaudeName;
|
|
7
|
-
function getHookTypeToClaudeNameMap() {
|
|
8
|
-
if (!_hookTypeToClaudeName) {
|
|
9
|
-
_hookTypeToClaudeName = ( new Map());
|
|
10
|
-
for (const [claudeName, hookType] of Object.entries(HOOKS_BY_TARGET[Target.Claude])) {
|
|
11
|
-
_hookTypeToClaudeName.set(hookType, claudeName);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return _hookTypeToClaudeName;
|
|
15
|
-
}
|
|
16
|
-
function resolveClaudeHookType(name) {
|
|
17
|
-
return HOOKS_BY_TARGET[Target.Claude][name];
|
|
18
|
-
}
|
|
19
|
-
function getClaudeHookTypeName(hookType) {
|
|
20
|
-
return getHookTypeToClaudeNameMap().get(hookType);
|
|
21
|
-
}
|
|
22
|
-
function parseClaudeHooks(json, workspaceRootUri, userHome) {
|
|
23
|
-
const result = ( new Map());
|
|
24
|
-
if (!json || typeof json !== "object") {
|
|
25
|
-
return {
|
|
26
|
-
hooks: result,
|
|
27
|
-
disabledAllHooks: false
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const root = json;
|
|
31
|
-
if (root.disableAllHooks === true) {
|
|
32
|
-
return {
|
|
33
|
-
hooks: result,
|
|
34
|
-
disabledAllHooks: true
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const hooks = root.hooks;
|
|
38
|
-
if (!hooks || typeof hooks !== "object") {
|
|
39
|
-
return {
|
|
40
|
-
hooks: result,
|
|
41
|
-
disabledAllHooks: false
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const hooksObj = hooks;
|
|
45
|
-
for (const originalId of ( Object.keys(hooksObj))) {
|
|
46
|
-
const hookType = resolveClaudeHookType(originalId) ?? toHookType(originalId);
|
|
47
|
-
if (!hookType) {
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
const hookArray = hooksObj[originalId];
|
|
51
|
-
if (!Array.isArray(hookArray)) {
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
const commands = [];
|
|
55
|
-
for (const item of hookArray) {
|
|
56
|
-
const extracted = extractHookCommandsFromItem(item, workspaceRootUri, userHome);
|
|
57
|
-
commands.push(...extracted);
|
|
58
|
-
}
|
|
59
|
-
if (commands.length > 0) {
|
|
60
|
-
const existing = result.get(hookType);
|
|
61
|
-
if (existing) {
|
|
62
|
-
existing.hooks.push(...commands);
|
|
63
|
-
} else {
|
|
64
|
-
result.set(hookType, {
|
|
65
|
-
hooks: commands,
|
|
66
|
-
originalId
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
hooks: result,
|
|
73
|
-
disabledAllHooks: false
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { extractHookCommandsFromItem, getClaudeHookTypeName, parseClaudeHooks, resolveClaudeHookType };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { URI } from "../../../../../base/common/uri.js";
|
|
2
|
-
import { IHookCommand } from "./hookSchema.js";
|
|
3
|
-
import { HookType } from "./hookTypes.js";
|
|
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>;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { basename, dirname } from '../../../../../base/common/path.js';
|
|
3
|
-
import { toHookType, extractHookCommandsFromItem } from './hookSchema.js';
|
|
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 };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HookType } from "./hookTypes.js";
|
|
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;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { HOOKS_BY_TARGET } from './hookTypes.js';
|
|
3
|
-
import { Target } from './promptTypes.js';
|
|
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 };
|