@codingame/monaco-vscode-api 26.1.1 → 26.1.2
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 +26 -5
- package/package.json +8 -8
- package/services.js +3 -3
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css +9 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +12 -5
- package/vscode/src/vs/platform/actions/common/actions.d.ts +1 -0
- package/vscode/src/vs/platform/actions/common/actions.js +3 -0
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +4 -0
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +5 -1
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +31 -8
- package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +7 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +12 -1
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +67 -3
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +12 -0
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +15 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileRewriter.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileRewriter.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/actions/chatContextKeys.js +80 -62
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatModes.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +70 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.js +27 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.service.d.ts +27 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/editing/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.d.ts +84 -5
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModel.js +176 -70
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatViewModel.d.ts +18 -5
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatViewModel.js +46 -4
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatAgents.service.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +68 -54
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.js +64 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.d.ts +159 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookSchema.js +387 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser.d.ts +21 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser.js +82 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptTypes.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +51 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service.d.ts +11 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptEditHelper.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptEditHelper.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +98 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +11 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +9 -9
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +65 -65
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +12 -12
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +75 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +38 -38
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +18 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +9 -9
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +41 -41
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +15 -15
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +14 -14
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +147 -147
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +170 -170
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +24 -24
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +7 -7
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +48 -48
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +29 -29
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +74 -74
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -4
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -3
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +39 -39
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands._save.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +27 -27
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +50 -50
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +7 -7
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +17 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/common/files.js +16 -16
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration.js +66 -66
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpConfiguration.js +31 -31
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +9 -9
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +23 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +8 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +29 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +13 -13
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +50 -50
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +3 -3
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +21 -21
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +15 -15
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +59 -59
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +11 -11
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +6 -6
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +12 -12
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +9 -9
- package/vscode/src/vs/workbench/contrib/search/browser/searchChatContext.js +5 -5
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +55 -55
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +2 -2
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +6 -6
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +13 -13
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalMenus.js +40 -40
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -23
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +26 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js +54 -54
- package/vscode/src/vs/workbench/contrib/terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/history/common/terminal.history.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration.js +30 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/zoom/common/terminal.zoom.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +11 -11
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +14 -14
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -16
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionsIcons.js +3 -3
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +6 -6
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +88 -88
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +5 -5
- package/vscode/src/vs/workbench/services/language/common/languageService.js +24 -24
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +4 -4
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +18 -18
- package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +9 -9
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +16 -16
- package/vscode-dts/vscode.proposed.chatHooks.d.ts +126 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +25 -1
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +35 -1
- package/vscode-dts/vscode.proposed.d.ts +1 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { IJSONSchema } from "../../../../../base/common/jsonSchema.js";
|
|
2
|
+
import { URI } from "../../../../../base/common/uri.js";
|
|
3
|
+
import { OperatingSystem } from "../../../../../base/common/platform.js";
|
|
4
|
+
/**
|
|
5
|
+
* Enum of available hook types that can be configured in hooks .json
|
|
6
|
+
*/
|
|
7
|
+
export declare enum HookType {
|
|
8
|
+
SessionStart = "SessionStart",
|
|
9
|
+
UserPromptSubmit = "UserPromptSubmit",
|
|
10
|
+
PreToolUse = "PreToolUse",
|
|
11
|
+
PostToolUse = "PostToolUse",
|
|
12
|
+
PreCompact = "PreCompact",
|
|
13
|
+
SubagentStart = "SubagentStart",
|
|
14
|
+
SubagentStop = "SubagentStop",
|
|
15
|
+
Stop = "Stop"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* String literal type derived from HookType enum values.
|
|
19
|
+
*/
|
|
20
|
+
export type HookTypeValue = `${HookType}`;
|
|
21
|
+
/**
|
|
22
|
+
* Metadata for hook types including localized labels and descriptions
|
|
23
|
+
*/
|
|
24
|
+
export declare const HOOK_TYPES: readonly [
|
|
25
|
+
{
|
|
26
|
+
readonly id: HookType.SessionStart;
|
|
27
|
+
readonly label: string;
|
|
28
|
+
readonly description: string;
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
readonly id: HookType.UserPromptSubmit;
|
|
32
|
+
readonly label: string;
|
|
33
|
+
readonly description: string;
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
readonly id: HookType.PreToolUse;
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly description: string;
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
readonly id: HookType.PostToolUse;
|
|
42
|
+
readonly label: string;
|
|
43
|
+
readonly description: string;
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
readonly id: HookType.PreCompact;
|
|
47
|
+
readonly label: string;
|
|
48
|
+
readonly description: string;
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
readonly id: HookType.SubagentStart;
|
|
52
|
+
readonly label: string;
|
|
53
|
+
readonly description: string;
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
readonly id: HookType.SubagentStop;
|
|
57
|
+
readonly label: string;
|
|
58
|
+
readonly description: string;
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
readonly id: HookType.Stop;
|
|
62
|
+
readonly label: string;
|
|
63
|
+
readonly description: string;
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* A single hook command configuration.
|
|
68
|
+
*/
|
|
69
|
+
export interface IHookCommand {
|
|
70
|
+
readonly type: "command";
|
|
71
|
+
/** Cross-platform command to execute. */
|
|
72
|
+
readonly command?: string;
|
|
73
|
+
/** Windows-specific command override. */
|
|
74
|
+
readonly windows?: string;
|
|
75
|
+
/** Linux-specific command override. */
|
|
76
|
+
readonly linux?: string;
|
|
77
|
+
/** macOS-specific command override. */
|
|
78
|
+
readonly osx?: string;
|
|
79
|
+
/** Resolved working directory URI. */
|
|
80
|
+
readonly cwd?: URI;
|
|
81
|
+
readonly env?: Record<string, string>;
|
|
82
|
+
readonly timeout?: number;
|
|
83
|
+
/** Original JSON field name that provided the windows command. */
|
|
84
|
+
readonly windowsSource?: "windows" | "powershell";
|
|
85
|
+
/** Original JSON field name that provided the linux command. */
|
|
86
|
+
readonly linuxSource?: "linux" | "bash";
|
|
87
|
+
/** Original JSON field name that provided the osx command. */
|
|
88
|
+
readonly osxSource?: "osx" | "bash";
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Collected hooks for a chat request, organized by hook type.
|
|
92
|
+
* This is passed to the extension host so it knows what hooks are available.
|
|
93
|
+
*/
|
|
94
|
+
export interface IChatRequestHooks {
|
|
95
|
+
readonly [HookType.SessionStart]?: readonly IHookCommand[];
|
|
96
|
+
readonly [HookType.UserPromptSubmit]?: readonly IHookCommand[];
|
|
97
|
+
readonly [HookType.PreToolUse]?: readonly IHookCommand[];
|
|
98
|
+
readonly [HookType.PostToolUse]?: readonly IHookCommand[];
|
|
99
|
+
readonly [HookType.PreCompact]?: readonly IHookCommand[];
|
|
100
|
+
readonly [HookType.SubagentStart]?: readonly IHookCommand[];
|
|
101
|
+
readonly [HookType.SubagentStop]?: readonly IHookCommand[];
|
|
102
|
+
readonly [HookType.Stop]?: readonly IHookCommand[];
|
|
103
|
+
}
|
|
104
|
+
export declare const hookFileSchema: IJSONSchema;
|
|
105
|
+
/**
|
|
106
|
+
* URI for the hook schema registration.
|
|
107
|
+
*/
|
|
108
|
+
export declare const HOOK_SCHEMA_URI = "vscode://schemas/hooks";
|
|
109
|
+
/**
|
|
110
|
+
* Glob pattern for hook files.
|
|
111
|
+
*/
|
|
112
|
+
export declare const HOOK_FILE_GLOB = ".github/hooks/*.json";
|
|
113
|
+
/**
|
|
114
|
+
* Normalizes a raw hook type identifier to the canonical HookType enum value.
|
|
115
|
+
* Only matches exact enum values. For tool-specific naming conventions (e.g., Claude, Copilot CLI),
|
|
116
|
+
* use the corresponding compat module's resolver function.
|
|
117
|
+
*/
|
|
118
|
+
export declare function toHookType(rawHookTypeId: string): HookType | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Gets a label for the given platform.
|
|
121
|
+
*/
|
|
122
|
+
export declare function getPlatformLabel(os: OperatingSystem): string;
|
|
123
|
+
/**
|
|
124
|
+
* Resolves the effective command for the given platform.
|
|
125
|
+
* This applies OS-specific overrides (windows, linux, osx) to get the actual command that will be executed.
|
|
126
|
+
* Similar to how launch.json handles platform-specific configurations in debugAdapter.ts.
|
|
127
|
+
*/
|
|
128
|
+
export declare function resolveEffectiveCommand(hook: IHookCommand, os: OperatingSystem): string | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Checks if the hook is using a platform-specific command override.
|
|
131
|
+
*/
|
|
132
|
+
export declare function isUsingPlatformOverride(hook: IHookCommand, os: OperatingSystem): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Gets the source shell type for the effective command on the given platform.
|
|
135
|
+
* Returns 'powershell' if the Windows command came from a powershell field,
|
|
136
|
+
* 'bash' if the Linux/macOS command came from a bash field,
|
|
137
|
+
* or undefined for default shell handling.
|
|
138
|
+
*/
|
|
139
|
+
export declare function getEffectiveCommandSource(hook: IHookCommand, os: OperatingSystem): "powershell" | "bash" | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Gets the original JSON field key name for the given platform's command.
|
|
142
|
+
* Returns the actual field name from the JSON (e.g., 'bash' instead of 'osx' if bash was used).
|
|
143
|
+
* This is used for editor focus to highlight the correct field.
|
|
144
|
+
*/
|
|
145
|
+
export declare function getEffectiveCommandFieldKey(hook: IHookCommand, os: OperatingSystem): string;
|
|
146
|
+
/**
|
|
147
|
+
* Formats a hook command for display.
|
|
148
|
+
* Resolves OS-specific overrides to show the effective command for the given platform.
|
|
149
|
+
* If using a platform-specific override, includes the platform as a prefix badge.
|
|
150
|
+
*/
|
|
151
|
+
export declare function formatHookCommandLabel(hook: IHookCommand, os: OperatingSystem): string;
|
|
152
|
+
/**
|
|
153
|
+
* Resolves a raw hook command object to the canonical IHookCommand format.
|
|
154
|
+
* Normalizes the command and resolves the cwd path relative to the workspace root.
|
|
155
|
+
* @param raw The raw hook command object from JSON
|
|
156
|
+
* @param workspaceRootUri The workspace root URI to resolve relative cwd paths against
|
|
157
|
+
* @param userHome The user's home directory path for tilde expansion
|
|
158
|
+
*/
|
|
159
|
+
export declare function resolveHookCommand(raw: Record<string, unknown>, workspaceRootUri: URI | undefined, userHome: string): IHookCommand | undefined;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
|
|
2
|
+
import { localize } from '../../../../../nls.js';
|
|
3
|
+
import { URI } from '../../../../../base/common/uri.js';
|
|
4
|
+
import { joinPath } from '../../../../../base/common/resources.js';
|
|
5
|
+
import { isAbsolute } from '../../../../../base/common/path.js';
|
|
6
|
+
import { untildify } from '../../../../../base/common/labels.js';
|
|
7
|
+
import { OperatingSystem } from '../../../../../base/common/platform.js';
|
|
8
|
+
|
|
9
|
+
var HookType;
|
|
10
|
+
(function(HookType) {
|
|
11
|
+
HookType["SessionStart"] = "SessionStart";
|
|
12
|
+
HookType["UserPromptSubmit"] = "UserPromptSubmit";
|
|
13
|
+
HookType["PreToolUse"] = "PreToolUse";
|
|
14
|
+
HookType["PostToolUse"] = "PostToolUse";
|
|
15
|
+
HookType["PreCompact"] = "PreCompact";
|
|
16
|
+
HookType["SubagentStart"] = "SubagentStart";
|
|
17
|
+
HookType["SubagentStop"] = "SubagentStop";
|
|
18
|
+
HookType["Stop"] = "Stop";
|
|
19
|
+
})(HookType || (HookType = {}));
|
|
20
|
+
const HOOK_TYPES = [{
|
|
21
|
+
id: HookType.SessionStart,
|
|
22
|
+
label: ( localize(6375, "Session Start")),
|
|
23
|
+
description: ( localize(6376, "Executed when a new agent session begins."))
|
|
24
|
+
}, {
|
|
25
|
+
id: HookType.UserPromptSubmit,
|
|
26
|
+
label: ( localize(6377, "User Prompt Submit")),
|
|
27
|
+
description: ( localize(6378, "Executed when the user submits a prompt to the agent."))
|
|
28
|
+
}, {
|
|
29
|
+
id: HookType.PreToolUse,
|
|
30
|
+
label: ( localize(6379, "Pre-Tool Use")),
|
|
31
|
+
description: ( localize(6380, "Executed before the agent uses any tool."))
|
|
32
|
+
}, {
|
|
33
|
+
id: HookType.PostToolUse,
|
|
34
|
+
label: ( localize(6381, "Post-Tool Use")),
|
|
35
|
+
description: ( localize(6382, "Executed after a tool completes execution successfully."))
|
|
36
|
+
}, {
|
|
37
|
+
id: HookType.PreCompact,
|
|
38
|
+
label: ( localize(6383, "Pre-Compact")),
|
|
39
|
+
description: ( localize(6384, "Executed before the agent compacts the conversation context."))
|
|
40
|
+
}, {
|
|
41
|
+
id: HookType.SubagentStart,
|
|
42
|
+
label: ( localize(6385, "Subagent Start")),
|
|
43
|
+
description: ( localize(6386, "Executed when a subagent is started."))
|
|
44
|
+
}, {
|
|
45
|
+
id: HookType.SubagentStop,
|
|
46
|
+
label: ( localize(6387, "Subagent Stop")),
|
|
47
|
+
description: ( localize(6388, "Executed when a subagent stops."))
|
|
48
|
+
}, {
|
|
49
|
+
id: HookType.Stop,
|
|
50
|
+
label: ( localize(6389, "Stop")),
|
|
51
|
+
description: ( localize(6390, "Executed when the agent stops."))
|
|
52
|
+
}];
|
|
53
|
+
const hookCommandSchema = {
|
|
54
|
+
type: "object",
|
|
55
|
+
additionalProperties: true,
|
|
56
|
+
required: ["type"],
|
|
57
|
+
anyOf: [{
|
|
58
|
+
required: ["command"]
|
|
59
|
+
}, {
|
|
60
|
+
required: ["windows"]
|
|
61
|
+
}, {
|
|
62
|
+
required: ["linux"]
|
|
63
|
+
}, {
|
|
64
|
+
required: ["osx"]
|
|
65
|
+
}, {
|
|
66
|
+
required: ["bash"]
|
|
67
|
+
}, {
|
|
68
|
+
required: ["powershell"]
|
|
69
|
+
}],
|
|
70
|
+
errorMessage: ( localize(
|
|
71
|
+
6391,
|
|
72
|
+
"At least one of \"command\", \"windows\", \"linux\", or \"osx\" must be specified."
|
|
73
|
+
)),
|
|
74
|
+
properties: {
|
|
75
|
+
type: {
|
|
76
|
+
type: "string",
|
|
77
|
+
enum: ["command"],
|
|
78
|
+
description: ( localize(6392, "Must be \"command\"."))
|
|
79
|
+
},
|
|
80
|
+
command: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: ( localize(
|
|
83
|
+
6393,
|
|
84
|
+
"The command to execute. This is the default cross-platform command."
|
|
85
|
+
))
|
|
86
|
+
},
|
|
87
|
+
windows: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: ( localize(
|
|
90
|
+
6394,
|
|
91
|
+
"Windows-specific command. If specified and running on Windows, this overrides the \"command\" field."
|
|
92
|
+
))
|
|
93
|
+
},
|
|
94
|
+
linux: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: ( localize(
|
|
97
|
+
6395,
|
|
98
|
+
"Linux-specific command. If specified and running on Linux, this overrides the \"command\" field."
|
|
99
|
+
))
|
|
100
|
+
},
|
|
101
|
+
osx: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: ( localize(
|
|
104
|
+
6396,
|
|
105
|
+
"macOS-specific command. If specified and running on macOS, this overrides the \"command\" field."
|
|
106
|
+
))
|
|
107
|
+
},
|
|
108
|
+
cwd: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: ( localize(6397, "Working directory for the script (relative to repository root)."))
|
|
111
|
+
},
|
|
112
|
+
env: {
|
|
113
|
+
type: "object",
|
|
114
|
+
additionalProperties: {
|
|
115
|
+
type: "string"
|
|
116
|
+
},
|
|
117
|
+
description: ( localize(
|
|
118
|
+
6398,
|
|
119
|
+
"Additional environment variables that are merged with the existing environment."
|
|
120
|
+
))
|
|
121
|
+
},
|
|
122
|
+
timeout: {
|
|
123
|
+
type: "number",
|
|
124
|
+
default: 30,
|
|
125
|
+
description: ( localize(6399, "Maximum execution time in seconds (default: 30)."))
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const hookArraySchema = {
|
|
130
|
+
type: "array",
|
|
131
|
+
items: hookCommandSchema
|
|
132
|
+
};
|
|
133
|
+
const hookFileSchema = {
|
|
134
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
135
|
+
type: "object",
|
|
136
|
+
description: ( localize(
|
|
137
|
+
6400,
|
|
138
|
+
"GitHub Copilot hook configuration file. Hooks enable executing custom shell commands at strategic points in an agent's workflow."
|
|
139
|
+
)),
|
|
140
|
+
additionalProperties: true,
|
|
141
|
+
required: ["hooks"],
|
|
142
|
+
properties: {
|
|
143
|
+
hooks: {
|
|
144
|
+
type: "object",
|
|
145
|
+
description: ( localize(6401, "Hook definitions organized by type.")),
|
|
146
|
+
additionalProperties: true,
|
|
147
|
+
properties: {
|
|
148
|
+
SessionStart: {
|
|
149
|
+
...hookArraySchema,
|
|
150
|
+
description: ( localize(
|
|
151
|
+
6402,
|
|
152
|
+
"Executed when a new agent session begins. Use to initialize environments, log session starts, validate project state, or set up temporary resources."
|
|
153
|
+
))
|
|
154
|
+
},
|
|
155
|
+
UserPromptSubmit: {
|
|
156
|
+
...hookArraySchema,
|
|
157
|
+
description: ( localize(
|
|
158
|
+
6403,
|
|
159
|
+
"Executed when the user submits a prompt to the agent. Use to log user requests for auditing and usage analysis."
|
|
160
|
+
))
|
|
161
|
+
},
|
|
162
|
+
PreToolUse: {
|
|
163
|
+
...hookArraySchema,
|
|
164
|
+
description: ( localize(
|
|
165
|
+
6404,
|
|
166
|
+
"Executed before the agent uses any tool. This is the most powerful hook as it can approve or deny tool executions. Use to block dangerous commands, enforce security policies, require approval for sensitive operations, or log tool usage."
|
|
167
|
+
))
|
|
168
|
+
},
|
|
169
|
+
PostToolUse: {
|
|
170
|
+
...hookArraySchema,
|
|
171
|
+
description: ( localize(
|
|
172
|
+
6405,
|
|
173
|
+
"Executed after a tool completes execution successfully. Use to log execution results, track usage statistics, generate audit trails, or monitor performance."
|
|
174
|
+
))
|
|
175
|
+
},
|
|
176
|
+
PreCompact: {
|
|
177
|
+
...hookArraySchema,
|
|
178
|
+
description: ( localize(
|
|
179
|
+
6406,
|
|
180
|
+
"Executed before the agent compacts the conversation context. Use to save conversation state, export important information, or prepare for context reduction."
|
|
181
|
+
))
|
|
182
|
+
},
|
|
183
|
+
SubagentStart: {
|
|
184
|
+
...hookArraySchema,
|
|
185
|
+
description: ( localize(
|
|
186
|
+
6407,
|
|
187
|
+
"Executed when a subagent is started. Use to log subagent spawning, track nested agent usage, or initialize subagent-specific resources."
|
|
188
|
+
))
|
|
189
|
+
},
|
|
190
|
+
SubagentStop: {
|
|
191
|
+
...hookArraySchema,
|
|
192
|
+
description: ( localize(
|
|
193
|
+
6408,
|
|
194
|
+
"Executed when a subagent stops. Use to log subagent completion, cleanup subagent resources, or aggregate subagent results."
|
|
195
|
+
))
|
|
196
|
+
},
|
|
197
|
+
Stop: {
|
|
198
|
+
...hookArraySchema,
|
|
199
|
+
description: ( localize(
|
|
200
|
+
6409,
|
|
201
|
+
"Executed when the agent session stops. Use to cleanup resources, generate final reports, or send completion notifications."
|
|
202
|
+
))
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
defaultSnippets: [{
|
|
208
|
+
label: ( localize(6410, "Basic hook configuration")),
|
|
209
|
+
description: ( localize(6411, "A basic hook configuration with common hooks")),
|
|
210
|
+
body: {
|
|
211
|
+
hooks: {
|
|
212
|
+
SessionStart: [{
|
|
213
|
+
type: "command",
|
|
214
|
+
command: "${1:echo \"Session started\" >> session.log}"
|
|
215
|
+
}],
|
|
216
|
+
PreToolUse: [{
|
|
217
|
+
type: "command",
|
|
218
|
+
command: "${2:./scripts/validate.sh}",
|
|
219
|
+
timeout: 15
|
|
220
|
+
}]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}]
|
|
224
|
+
};
|
|
225
|
+
const HOOK_SCHEMA_URI = "vscode://schemas/hooks";
|
|
226
|
+
const HOOK_FILE_GLOB = ".github/hooks/*.json";
|
|
227
|
+
function toHookType(rawHookTypeId) {
|
|
228
|
+
if (( Object.values(HookType)).includes(rawHookTypeId)) {
|
|
229
|
+
return rawHookTypeId;
|
|
230
|
+
}
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
function normalizeHookCommand(raw) {
|
|
234
|
+
if (raw.type !== "command") {
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
const hasCommand = typeof raw.command === "string" && raw.command.length > 0;
|
|
238
|
+
const hasBash = typeof raw.bash === "string" && raw.bash.length > 0;
|
|
239
|
+
const hasPowerShell = typeof raw.powershell === "string" && raw.powershell.length > 0;
|
|
240
|
+
const hasWindows = typeof raw.windows === "string" && raw.windows.length > 0;
|
|
241
|
+
const hasLinux = typeof raw.linux === "string" && raw.linux.length > 0;
|
|
242
|
+
const hasOsx = typeof raw.osx === "string" && raw.osx.length > 0;
|
|
243
|
+
const windows = hasWindows ? raw.windows : (hasPowerShell ? raw.powershell : undefined);
|
|
244
|
+
const linux = hasLinux ? raw.linux : (hasBash ? raw.bash : undefined);
|
|
245
|
+
const osx = hasOsx ? raw.osx : (hasBash ? raw.bash : undefined);
|
|
246
|
+
const windowsSource = hasWindows ? "windows" : (hasPowerShell ? "powershell" : undefined);
|
|
247
|
+
const linuxSource = hasLinux ? "linux" : (hasBash ? "bash" : undefined);
|
|
248
|
+
const osxSource = hasOsx ? "osx" : (hasBash ? "bash" : undefined);
|
|
249
|
+
return {
|
|
250
|
+
...(hasCommand && {
|
|
251
|
+
command: raw.command
|
|
252
|
+
}),
|
|
253
|
+
...(windows && {
|
|
254
|
+
windows
|
|
255
|
+
}),
|
|
256
|
+
...(linux && {
|
|
257
|
+
linux
|
|
258
|
+
}),
|
|
259
|
+
...(osx && {
|
|
260
|
+
osx
|
|
261
|
+
}),
|
|
262
|
+
...(windowsSource && {
|
|
263
|
+
windowsSource
|
|
264
|
+
}),
|
|
265
|
+
...(linuxSource && {
|
|
266
|
+
linuxSource
|
|
267
|
+
}),
|
|
268
|
+
...(osxSource && {
|
|
269
|
+
osxSource
|
|
270
|
+
}),
|
|
271
|
+
...(typeof raw.cwd === "string" && {
|
|
272
|
+
cwd: raw.cwd
|
|
273
|
+
}),
|
|
274
|
+
...(typeof raw.env === "object" && raw.env !== null && {
|
|
275
|
+
env: raw.env
|
|
276
|
+
}),
|
|
277
|
+
...(typeof raw.timeout !== "number" && typeof raw.timeoutSec === "number" && {
|
|
278
|
+
timeout: raw.timeoutSec
|
|
279
|
+
}),
|
|
280
|
+
...(typeof raw.timeout === "number" && {
|
|
281
|
+
timeout: raw.timeout
|
|
282
|
+
})
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function getPlatformLabel(os) {
|
|
286
|
+
if (os === OperatingSystem.Windows) {
|
|
287
|
+
return "Windows";
|
|
288
|
+
} else if (os === OperatingSystem.Macintosh) {
|
|
289
|
+
return "macOS";
|
|
290
|
+
} else if (os === OperatingSystem.Linux) {
|
|
291
|
+
return "Linux";
|
|
292
|
+
}
|
|
293
|
+
return "";
|
|
294
|
+
}
|
|
295
|
+
function resolveEffectiveCommand(hook, os) {
|
|
296
|
+
if (os === OperatingSystem.Windows && hook.windows) {
|
|
297
|
+
return hook.windows;
|
|
298
|
+
} else if (os === OperatingSystem.Macintosh && hook.osx) {
|
|
299
|
+
return hook.osx;
|
|
300
|
+
} else if (os === OperatingSystem.Linux && hook.linux) {
|
|
301
|
+
return hook.linux;
|
|
302
|
+
}
|
|
303
|
+
return hook.command;
|
|
304
|
+
}
|
|
305
|
+
function isUsingPlatformOverride(hook, os) {
|
|
306
|
+
if (os === OperatingSystem.Windows && hook.windows) {
|
|
307
|
+
return true;
|
|
308
|
+
} else if (os === OperatingSystem.Macintosh && hook.osx) {
|
|
309
|
+
return true;
|
|
310
|
+
} else if (os === OperatingSystem.Linux && hook.linux) {
|
|
311
|
+
return true;
|
|
312
|
+
}
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
function getEffectiveCommandFieldKey(hook, os) {
|
|
316
|
+
if (os === OperatingSystem.Windows && hook.windows) {
|
|
317
|
+
return hook.windowsSource ?? "windows";
|
|
318
|
+
} else if (os === OperatingSystem.Macintosh && hook.osx) {
|
|
319
|
+
return hook.osxSource ?? "osx";
|
|
320
|
+
} else if (os === OperatingSystem.Linux && hook.linux) {
|
|
321
|
+
return hook.linuxSource ?? "linux";
|
|
322
|
+
}
|
|
323
|
+
return "command";
|
|
324
|
+
}
|
|
325
|
+
function formatHookCommandLabel(hook, os) {
|
|
326
|
+
const command = resolveEffectiveCommand(hook, os);
|
|
327
|
+
if (!command) {
|
|
328
|
+
return "";
|
|
329
|
+
}
|
|
330
|
+
if (isUsingPlatformOverride(hook, os)) {
|
|
331
|
+
const platformLabel = getPlatformLabel(os);
|
|
332
|
+
return `[${platformLabel}] ${command}`;
|
|
333
|
+
}
|
|
334
|
+
return command;
|
|
335
|
+
}
|
|
336
|
+
function resolveHookCommand(raw, workspaceRootUri, userHome) {
|
|
337
|
+
const normalized = normalizeHookCommand(raw);
|
|
338
|
+
if (!normalized) {
|
|
339
|
+
return undefined;
|
|
340
|
+
}
|
|
341
|
+
let cwdUri;
|
|
342
|
+
if (normalized.cwd) {
|
|
343
|
+
const expandedCwd = untildify(normalized.cwd, userHome);
|
|
344
|
+
if (isAbsolute(expandedCwd)) {
|
|
345
|
+
cwdUri = URI.file(expandedCwd);
|
|
346
|
+
} else if (workspaceRootUri) {
|
|
347
|
+
cwdUri = joinPath(workspaceRootUri, expandedCwd);
|
|
348
|
+
}
|
|
349
|
+
} else {
|
|
350
|
+
cwdUri = workspaceRootUri;
|
|
351
|
+
}
|
|
352
|
+
return {
|
|
353
|
+
type: "command",
|
|
354
|
+
...(normalized.command && {
|
|
355
|
+
command: normalized.command
|
|
356
|
+
}),
|
|
357
|
+
...(normalized.windows && {
|
|
358
|
+
windows: normalized.windows
|
|
359
|
+
}),
|
|
360
|
+
...(normalized.linux && {
|
|
361
|
+
linux: normalized.linux
|
|
362
|
+
}),
|
|
363
|
+
...(normalized.osx && {
|
|
364
|
+
osx: normalized.osx
|
|
365
|
+
}),
|
|
366
|
+
...(normalized.windowsSource && {
|
|
367
|
+
windowsSource: normalized.windowsSource
|
|
368
|
+
}),
|
|
369
|
+
...(normalized.linuxSource && {
|
|
370
|
+
linuxSource: normalized.linuxSource
|
|
371
|
+
}),
|
|
372
|
+
...(normalized.osxSource && {
|
|
373
|
+
osxSource: normalized.osxSource
|
|
374
|
+
}),
|
|
375
|
+
...(cwdUri && {
|
|
376
|
+
cwd: cwdUri
|
|
377
|
+
}),
|
|
378
|
+
...(normalized.env && {
|
|
379
|
+
env: normalized.env
|
|
380
|
+
}),
|
|
381
|
+
...(normalized.timeout !== undefined && {
|
|
382
|
+
timeout: normalized.timeout
|
|
383
|
+
})
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export { HOOK_FILE_GLOB, HOOK_SCHEMA_URI, HOOK_TYPES, HookType, formatHookCommandLabel, getEffectiveCommandFieldKey, getPlatformLabel, hookFileSchema, isUsingPlatformOverride, resolveEffectiveCommand, resolveHookCommand, toHookType };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { URI } from "../../../../../base/common/uri.js";
|
|
2
2
|
import { Range } from "../../../../../editor/common/core/range.js";
|
|
3
|
+
import { Target } from "./service/promptsService.js";
|
|
3
4
|
export declare class PromptFileParser {
|
|
4
5
|
constructor();
|
|
5
6
|
parse(uri: URI, content: string): ParsedPromptFile;
|
|
@@ -22,6 +23,7 @@ export declare namespace PromptHeaderAttributes {
|
|
|
22
23
|
const mode = "mode";
|
|
23
24
|
const model = "model";
|
|
24
25
|
const applyTo = "applyTo";
|
|
26
|
+
const paths = "paths";
|
|
25
27
|
const tools = "tools";
|
|
26
28
|
const handOffs = "handoffs";
|
|
27
29
|
const advancedOptions = "advancedOptions";
|
|
@@ -39,15 +41,16 @@ export declare namespace PromptHeaderAttributes {
|
|
|
39
41
|
export declare namespace GithubPromptHeaderAttributes {
|
|
40
42
|
const mcpServers = "mcp-servers";
|
|
41
43
|
}
|
|
42
|
-
export declare
|
|
43
|
-
|
|
44
|
-
GitHubCopilot = "github-copilot"
|
|
44
|
+
export declare namespace ClaudeHeaderAttributes {
|
|
45
|
+
const disallowedTools = "disallowedTools";
|
|
45
46
|
}
|
|
47
|
+
export declare function isTarget(value: unknown): value is Target;
|
|
46
48
|
export declare class PromptHeader {
|
|
47
49
|
readonly range: Range;
|
|
50
|
+
readonly uri: URI;
|
|
48
51
|
private readonly linesWithEOL;
|
|
49
52
|
private _parsed;
|
|
50
|
-
constructor(range: Range, linesWithEOL: string[]);
|
|
53
|
+
constructor(range: Range, uri: URI, linesWithEOL: string[]);
|
|
51
54
|
private get _parsedHeader();
|
|
52
55
|
private asRange;
|
|
53
56
|
private asValue;
|
|
@@ -60,6 +63,12 @@ export declare class PromptHeader {
|
|
|
60
63
|
get agent(): string | undefined;
|
|
61
64
|
get model(): readonly string[] | undefined;
|
|
62
65
|
get applyTo(): string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the 'paths' attribute from the header.
|
|
68
|
+
* The `paths` field supports a list of glob patterns that scope the instruction
|
|
69
|
+
* to specific files (used by Claude rules). Returns a string array or undefined.
|
|
70
|
+
*/
|
|
71
|
+
get paths(): readonly string[] | undefined;
|
|
63
72
|
get argumentHint(): string | undefined;
|
|
64
73
|
get target(): string | undefined;
|
|
65
74
|
get infer(): boolean | undefined;
|
|
@@ -142,3 +151,11 @@ export interface IBodyVariableReference {
|
|
|
142
151
|
readonly range: Range;
|
|
143
152
|
readonly offset: number;
|
|
144
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Parses a comma-separated list of values into an array of strings.
|
|
156
|
+
* Values can be unquoted or quoted (single or double quotes).
|
|
157
|
+
*
|
|
158
|
+
* @param input A string containing comma-separated values
|
|
159
|
+
* @returns An IArrayValue containing the parsed values and their ranges
|
|
160
|
+
*/
|
|
161
|
+
export declare function parseCommaSeparatedList(stringValue: IStringValue): IArrayValue;
|