@codingame/monaco-vscode-chat-service-override 21.6.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +41 -38
- package/vscode/src/vs/base/common/yaml.d.ts +74 -0
- package/vscode/src/vs/base/common/yaml.js +597 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +91 -83
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +32 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +13 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +14 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +13 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +192 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +231 -175
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +200 -127
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +73 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +38 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +17 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatLayoutService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatLayoutService.js +2 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +41 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +45 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +137 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +212 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +268 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +455 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +409 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +65 -144
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +240 -107
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +131 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +145 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/media/apple-dark.svg +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/media/apple-light.svg +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +262 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +16 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +20 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +66 -83
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +17 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +12 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +17 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +74 -200
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +150 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +9 -33
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +5 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +25 -68
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/{promptHeaderHovers.d.ts → promptHovers.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/{promptHeaderHovers.js → promptHovers.js} +77 -75
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +13 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +456 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.d.ts +7 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +28 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.d.ts +97 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.js +247 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +118 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +33 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +217 -83
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +34 -17
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +8 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +7 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +33 -33
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.d.ts +3 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +25 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +25 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +24 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +32 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +14 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +177 -107
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +113 -43
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +21 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +11 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +19 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +17 -9
- package/vscode/src/vs/base/common/decorators/cancelPreviousCalls.d.ts +0 -84
- package/vscode/src/vs/base/common/decorators/cancelPreviousCalls.js +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptFileReferenceErrors.d.ts +0 -94
- package/vscode/src/vs/workbench/contrib/chat/common/promptFileReferenceErrors.js +0 -107
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/asyncDecoder.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/asyncDecoder.js +0 -45
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseDecoder.d.ts +0 -137
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseDecoder.js +0 -150
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseToken.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseToken.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/compositeToken.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/compositeToken.js +0 -33
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/constants.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/constants.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/frontMatterDecoder.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/frontMatterDecoder.js +0 -118
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterArray.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterArray.js +0 -134
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterParserFactory.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterParserFactory.js +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecord.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecord.js +0 -134
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordName.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordName.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordNameWithDelimiter.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordNameWithDelimiter.js +0 -75
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterSequence.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterSequence.js +0 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterString.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterString.js +0 -63
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterValue.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterValue.js +0 -127
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterArray.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterArray.js +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterBoolean.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterBoolean.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterRecord.d.ts +0 -83
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterRecord.js +0 -37
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterSequence.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterSequence.js +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterString.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterString.js +0 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterToken.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterToken.js +0 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/linesDecoder.d.ts +0 -60
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/linesDecoder.js +0 -100
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/carriageReturn.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/carriageReturn.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/line.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/line.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/newLine.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/newLine.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/markdownDecoder.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/markdownDecoder.js +0 -72
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownComment.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownComment.js +0 -113
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownImage.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownImage.js +0 -68
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownLink.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownLink.js +0 -99
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownComment.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownComment.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownImage.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownImage.js +0 -54
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownLink.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownLink.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownToken.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownToken.js +0 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/markdownExtensionsDecoder.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/markdownExtensionsDecoder.js +0 -68
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/parsers/frontMatterHeader.d.ts +0 -49
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/parsers/frontMatterHeader.js +0 -199
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterHeader.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterHeader.js +0 -37
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterMarker.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterMarker.js +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/markdownExtensionsToken.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/markdownExtensionsToken.js +0 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/parserBase.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/parserBase.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/simpleDecoder.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/simpleDecoder.js +0 -66
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/angleBrackets.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/angleBrackets.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/at.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/at.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/brackets.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/brackets.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/colon.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/colon.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/comma.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/comma.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/curlyBraces.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/curlyBraces.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dash.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dash.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dollarSign.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dollarSign.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/doubleQuote.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/doubleQuote.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/exclamationMark.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/exclamationMark.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/formFeed.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/formFeed.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/hash.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/hash.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/parentheses.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/parentheses.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/quote.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/quote.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/simpleToken.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/simpleToken.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/slash.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/slash.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/space.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/space.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tab.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tab.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/verticalTab.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/verticalTab.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/word.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/word.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/textToken.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/textToken.js +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStream.d.ts +0 -62
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStream.js +0 -126
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStreamFromTextModel.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStreamFromTextModel.js +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptCodec.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptCodec.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptDecoder.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptDecoder.js +0 -109
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptAtMentionParser.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptAtMentionParser.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptSlashCommandParser.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptSlashCommandParser.js +0 -81
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptTemplateVariableParser.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptTemplateVariableParser.js +0 -100
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptVariableParser.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptVariableParser.js +0 -149
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/fileReference.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/fileReference.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptAtMention.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptAtMention.js +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptSlashCommand.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptSlashCommand.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptTemplateVariable.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptTemplateVariable.js +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptToken.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptToken.js +0 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptVariable.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptVariable.js +0 -48
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/configMigration.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/configMigration.js +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/filePromptContentsProvider.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/filePromptContentsProvider.js +0 -97
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/promptContentsProviderBase.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/promptContentsProviderBase.js +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +0 -46
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.js +0 -186
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkDiagnosticsProvider.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkDiagnosticsProvider.js +0 -54
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceBase.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceBase.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceManagerBase.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceManagerBase.js +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.d.ts +0 -216
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.js +0 -333
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/diagnostics.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/diagnostics.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase.d.ts +0 -107
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase.js +0 -101
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/instructionsHeader.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/instructionsHeader.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/applyTo.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/applyTo.js +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/record.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/record.js +0 -37
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.js +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/description.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/description.js +0 -43
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.js +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/model.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/model.js +0 -43
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/tools.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/tools.js +0 -98
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/modeHeader.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/modeHeader.js +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.js +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptParser.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptParser.js +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/topError.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/topError.js +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/objectCache.d.ts +0 -96
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/objectCache.js +0 -39
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/observableDisposable.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/observableDisposable.js +0 -41
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
4
|
-
import { FrontMatterArray } from '../tokens/frontMatterArray.js';
|
|
5
|
-
import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
6
|
-
import { VALID_INTER_RECORD_SPACING_TOKENS } from '../constants.js';
|
|
7
|
-
import { FrontMatterValueToken } from '../tokens/frontMatterToken.js';
|
|
8
|
-
import { FrontMatterSequence } from '../tokens/frontMatterSequence.js';
|
|
9
|
-
import '../../simpleCodec/tokens/at.js';
|
|
10
|
-
import '../../simpleCodec/tokens/tab.js';
|
|
11
|
-
import '../../simpleCodec/tokens/dash.js';
|
|
12
|
-
import '../../simpleCodec/tokens/hash.js';
|
|
13
|
-
import '../../simpleCodec/tokens/colon.js';
|
|
14
|
-
import '../../simpleCodec/tokens/quote.js';
|
|
15
|
-
import '../../simpleCodec/tokens/slash.js';
|
|
16
|
-
import '../../simpleCodec/tokens/space.js';
|
|
17
|
-
import { Comma } from '../../simpleCodec/tokens/comma.js';
|
|
18
|
-
import '../../simpleCodec/tokens/formFeed.js';
|
|
19
|
-
import '../../simpleCodec/tokens/dollarSign.js';
|
|
20
|
-
import '../../simpleCodec/tokens/verticalTab.js';
|
|
21
|
-
import '../../simpleCodec/tokens/doubleQuote.js';
|
|
22
|
-
import '../../simpleCodec/tokens/exclamationMark.js';
|
|
23
|
-
import { RightBracket } from '../../simpleCodec/tokens/brackets.js';
|
|
24
|
-
import '../../simpleCodec/tokens/curlyBraces.js';
|
|
25
|
-
import '../../simpleCodec/tokens/parentheses.js';
|
|
26
|
-
import '../../simpleCodec/tokens/angleBrackets.js';
|
|
27
|
-
import { ParserBase, assertNotConsumed } from '../../simpleCodec/parserBase.js';
|
|
28
|
-
|
|
29
|
-
const VALID_DELIMITER_TOKENS = ( Object.freeze([
|
|
30
|
-
...VALID_INTER_RECORD_SPACING_TOKENS,
|
|
31
|
-
Comma,
|
|
32
|
-
]));
|
|
33
|
-
class PartialFrontMatterArray extends ParserBase {
|
|
34
|
-
constructor(factory, startToken) {
|
|
35
|
-
super([startToken]);
|
|
36
|
-
this.factory = factory;
|
|
37
|
-
this.startToken = startToken;
|
|
38
|
-
this.arrayItemAllowed = true;
|
|
39
|
-
}
|
|
40
|
-
accept(token) {
|
|
41
|
-
if (this.currentValueParser !== undefined) {
|
|
42
|
-
const acceptResult = this.currentValueParser.accept(token);
|
|
43
|
-
const { result, wasTokenConsumed } = acceptResult;
|
|
44
|
-
if (result === 'failure') {
|
|
45
|
-
this.isConsumed = true;
|
|
46
|
-
return {
|
|
47
|
-
result: 'failure',
|
|
48
|
-
wasTokenConsumed,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
const { nextParser } = acceptResult;
|
|
52
|
-
if (nextParser instanceof FrontMatterValueToken) {
|
|
53
|
-
this.currentTokens.push(nextParser);
|
|
54
|
-
delete this.currentValueParser;
|
|
55
|
-
if (wasTokenConsumed === false) {
|
|
56
|
-
return this.accept(token);
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
result: 'success',
|
|
60
|
-
nextParser: this,
|
|
61
|
-
wasTokenConsumed,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
this.currentValueParser = nextParser;
|
|
65
|
-
return {
|
|
66
|
-
result: 'success',
|
|
67
|
-
nextParser: this,
|
|
68
|
-
wasTokenConsumed,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
if (token instanceof RightBracket) {
|
|
72
|
-
assert(this.currentValueParser === undefined, `Unexpected end of array. Last value is not finished.`);
|
|
73
|
-
this.currentTokens.push(token);
|
|
74
|
-
this.isConsumed = true;
|
|
75
|
-
return {
|
|
76
|
-
result: 'success',
|
|
77
|
-
nextParser: this.asArrayToken(),
|
|
78
|
-
wasTokenConsumed: true,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
for (const ValidToken of VALID_DELIMITER_TOKENS) {
|
|
82
|
-
if (token instanceof ValidToken) {
|
|
83
|
-
this.currentTokens.push(token);
|
|
84
|
-
if ((this.arrayItemAllowed === false) && token instanceof Comma) {
|
|
85
|
-
this.arrayItemAllowed = true;
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
result: 'success',
|
|
89
|
-
nextParser: this,
|
|
90
|
-
wasTokenConsumed: true,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (this.arrayItemAllowed === true) {
|
|
95
|
-
this.currentValueParser = this.factory.createValue((currentToken) => {
|
|
96
|
-
return ((currentToken instanceof RightBracket)
|
|
97
|
-
|| (currentToken instanceof Comma));
|
|
98
|
-
});
|
|
99
|
-
this.arrayItemAllowed = false;
|
|
100
|
-
return this.accept(token);
|
|
101
|
-
}
|
|
102
|
-
this.isConsumed = true;
|
|
103
|
-
return {
|
|
104
|
-
result: 'failure',
|
|
105
|
-
wasTokenConsumed: false,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
asArrayToken() {
|
|
109
|
-
const endToken = this.currentTokens[this.currentTokens.length - 1];
|
|
110
|
-
assertDefined(endToken, 'No tokens found.');
|
|
111
|
-
assert(endToken instanceof RightBracket, 'Cannot find a closing bracket of the array.');
|
|
112
|
-
const valueTokens = [];
|
|
113
|
-
for (const currentToken of this.currentTokens) {
|
|
114
|
-
if ((currentToken instanceof FrontMatterValueToken) === false) {
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
if (currentToken instanceof FrontMatterSequence) {
|
|
118
|
-
currentToken.trimEnd();
|
|
119
|
-
}
|
|
120
|
-
valueTokens.push(currentToken);
|
|
121
|
-
}
|
|
122
|
-
this.isConsumed = true;
|
|
123
|
-
return ( new FrontMatterArray([
|
|
124
|
-
this.startToken,
|
|
125
|
-
...valueTokens,
|
|
126
|
-
endToken,
|
|
127
|
-
]));
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
PartialFrontMatterArray.__decorator = ( __decorate([
|
|
131
|
-
assertNotConsumed
|
|
132
|
-
], PartialFrontMatterArray.prototype, "accept", null));
|
|
133
|
-
|
|
134
|
-
export { PartialFrontMatterArray };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BaseToken } from "../../baseToken.js";
|
|
2
|
-
import { LeftBracket } from "../../simpleCodec/tokens/brackets.js";
|
|
3
|
-
import { Word } from "../../simpleCodec/tokens/word.js";
|
|
4
|
-
import { FrontMatterRecordDelimiter, FrontMatterRecordName } from "../tokens/frontMatterRecord.js";
|
|
5
|
-
import { TQuoteToken } from "../tokens/frontMatterString.js";
|
|
6
|
-
import { PartialFrontMatterArray } from "./frontMatterArray.js";
|
|
7
|
-
import { PartialFrontMatterRecord } from "./frontMatterRecord/frontMatterRecord.js";
|
|
8
|
-
import { PartialFrontMatterRecordName } from "./frontMatterRecord/frontMatterRecordName.js";
|
|
9
|
-
import { PartialFrontMatterRecordNameWithDelimiter, TNameStopToken } from "./frontMatterRecord/frontMatterRecordNameWithDelimiter.js";
|
|
10
|
-
import { PartialFrontMatterSequence } from "./frontMatterSequence.js";
|
|
11
|
-
import { PartialFrontMatterString } from "./frontMatterString.js";
|
|
12
|
-
import { PartialFrontMatterValue } from "./frontMatterValue.js";
|
|
13
|
-
export declare class FrontMatterParserFactory {
|
|
14
|
-
createRecord(tokens: [
|
|
15
|
-
FrontMatterRecordName,
|
|
16
|
-
FrontMatterRecordDelimiter
|
|
17
|
-
]): PartialFrontMatterRecord;
|
|
18
|
-
createRecordName(startToken: Word): PartialFrontMatterRecordName;
|
|
19
|
-
createRecordNameWithDelimiter(tokens: readonly [
|
|
20
|
-
FrontMatterRecordName,
|
|
21
|
-
TNameStopToken
|
|
22
|
-
]): PartialFrontMatterRecordNameWithDelimiter;
|
|
23
|
-
createArray(startToken: LeftBracket): PartialFrontMatterArray;
|
|
24
|
-
createValue(shouldStop: (token: BaseToken) => boolean): PartialFrontMatterValue;
|
|
25
|
-
createString(startToken: TQuoteToken): PartialFrontMatterString;
|
|
26
|
-
createSequence(shouldStop: (token: BaseToken) => boolean): PartialFrontMatterSequence;
|
|
27
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { PartialFrontMatterArray } from './frontMatterArray.js';
|
|
3
|
-
import { PartialFrontMatterRecord } from './frontMatterRecord/frontMatterRecord.js';
|
|
4
|
-
import { PartialFrontMatterRecordName } from './frontMatterRecord/frontMatterRecordName.js';
|
|
5
|
-
import { PartialFrontMatterRecordNameWithDelimiter } from './frontMatterRecord/frontMatterRecordNameWithDelimiter.js';
|
|
6
|
-
import { PartialFrontMatterSequence } from './frontMatterSequence.js';
|
|
7
|
-
import { PartialFrontMatterString } from './frontMatterString.js';
|
|
8
|
-
import { PartialFrontMatterValue } from './frontMatterValue.js';
|
|
9
|
-
|
|
10
|
-
class FrontMatterParserFactory {
|
|
11
|
-
createRecord(tokens) {
|
|
12
|
-
return ( new PartialFrontMatterRecord(this, tokens));
|
|
13
|
-
}
|
|
14
|
-
createRecordName(startToken) {
|
|
15
|
-
return ( new PartialFrontMatterRecordName(this, startToken));
|
|
16
|
-
}
|
|
17
|
-
createRecordNameWithDelimiter(tokens) {
|
|
18
|
-
return ( new PartialFrontMatterRecordNameWithDelimiter(this, tokens));
|
|
19
|
-
}
|
|
20
|
-
createArray(startToken) {
|
|
21
|
-
return ( new PartialFrontMatterArray(this, startToken));
|
|
22
|
-
}
|
|
23
|
-
createValue(shouldStop) {
|
|
24
|
-
return ( new PartialFrontMatterValue(this, shouldStop));
|
|
25
|
-
}
|
|
26
|
-
createString(startToken) {
|
|
27
|
-
return ( new PartialFrontMatterString(startToken));
|
|
28
|
-
}
|
|
29
|
-
createSequence(shouldStop) {
|
|
30
|
-
return ( new PartialFrontMatterSequence(shouldStop));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { FrontMatterParserFactory };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { type TSimpleDecoderToken } from "../../../simpleCodec/simpleDecoder.js";
|
|
2
|
-
import { ParserBase, type TAcceptTokenResult } from "../../../simpleCodec/parserBase.js";
|
|
3
|
-
import { FrontMatterRecordName, FrontMatterRecordDelimiter, FrontMatterRecord } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/index";
|
|
4
|
-
import { type FrontMatterParserFactory } from "../frontMatterParserFactory.js";
|
|
5
|
-
/**
|
|
6
|
-
* Type of a next parser that can be returned by {@link PartialFrontMatterRecord}.
|
|
7
|
-
*/
|
|
8
|
-
type TNextParser = PartialFrontMatterRecord | FrontMatterRecord;
|
|
9
|
-
/**
|
|
10
|
-
* Parser for a `record` inside a Front Matter header.
|
|
11
|
-
*
|
|
12
|
-
* * E.g., `name: 'value'` in the example below:
|
|
13
|
-
*
|
|
14
|
-
* ```
|
|
15
|
-
* ---
|
|
16
|
-
* name: 'value'
|
|
17
|
-
* isExample: true
|
|
18
|
-
* ---
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare class PartialFrontMatterRecord extends ParserBase<TSimpleDecoderToken, TNextParser> {
|
|
22
|
-
private readonly factory;
|
|
23
|
-
/**
|
|
24
|
-
* Token that represents the 'name' part of the record.
|
|
25
|
-
*/
|
|
26
|
-
private readonly recordNameToken;
|
|
27
|
-
/**
|
|
28
|
-
* Token that represents the 'delimiter' part of the record.
|
|
29
|
-
*/
|
|
30
|
-
private readonly recordDelimiterToken;
|
|
31
|
-
constructor(factory: FrontMatterParserFactory, tokens: [
|
|
32
|
-
FrontMatterRecordName,
|
|
33
|
-
FrontMatterRecordDelimiter
|
|
34
|
-
]);
|
|
35
|
-
/**
|
|
36
|
-
* Current parser reference responsible for parsing the "value" part of the record.
|
|
37
|
-
*/
|
|
38
|
-
private valueParser?;
|
|
39
|
-
accept(token: TSimpleDecoderToken): TAcceptTokenResult<TNextParser>;
|
|
40
|
-
/**
|
|
41
|
-
* Convert current parser into a {@link FrontMatterRecord} token.
|
|
42
|
-
*
|
|
43
|
-
* @throws if no current parser is present, or it is not of the {@link PartialFrontMatterValue}
|
|
44
|
-
* or {@link PartialFrontMatterSequence} types
|
|
45
|
-
*/
|
|
46
|
-
asRecordToken(): FrontMatterRecord;
|
|
47
|
-
}
|
|
48
|
-
export {};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { NewLine } from '../../../linesCodec/tokens/newLine.js';
|
|
4
|
-
import { PartialFrontMatterValue } from '../frontMatterValue.js';
|
|
5
|
-
import { assertNever } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
6
|
-
import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
7
|
-
import { PartialFrontMatterSequence } from '../frontMatterSequence.js';
|
|
8
|
-
import { CarriageReturn } from '../../../linesCodec/tokens/carriageReturn.js';
|
|
9
|
-
import '../../../simpleCodec/tokens/at.js';
|
|
10
|
-
import '../../../simpleCodec/tokens/tab.js';
|
|
11
|
-
import '../../../simpleCodec/tokens/dash.js';
|
|
12
|
-
import '../../../simpleCodec/tokens/hash.js';
|
|
13
|
-
import { Word } from '../../../simpleCodec/tokens/word.js';
|
|
14
|
-
import '../../../simpleCodec/tokens/colon.js';
|
|
15
|
-
import '../../../simpleCodec/tokens/quote.js';
|
|
16
|
-
import '../../../simpleCodec/tokens/slash.js';
|
|
17
|
-
import '../../../simpleCodec/tokens/space.js';
|
|
18
|
-
import '../../../simpleCodec/tokens/comma.js';
|
|
19
|
-
import { FormFeed } from '../../../simpleCodec/tokens/formFeed.js';
|
|
20
|
-
import '../../../simpleCodec/tokens/dollarSign.js';
|
|
21
|
-
import '../../../simpleCodec/tokens/verticalTab.js';
|
|
22
|
-
import '../../../simpleCodec/tokens/doubleQuote.js';
|
|
23
|
-
import '../../../simpleCodec/tokens/exclamationMark.js';
|
|
24
|
-
import { SpacingToken } from '../../../simpleCodec/tokens/simpleToken.js';
|
|
25
|
-
import '../../../simpleCodec/tokens/brackets.js';
|
|
26
|
-
import '../../../simpleCodec/tokens/curlyBraces.js';
|
|
27
|
-
import '../../../simpleCodec/tokens/parentheses.js';
|
|
28
|
-
import '../../../simpleCodec/tokens/angleBrackets.js';
|
|
29
|
-
import { ParserBase, assertNotConsumed } from '../../../simpleCodec/parserBase.js';
|
|
30
|
-
import { FrontMatterValueToken } from '../../tokens/frontMatterToken.js';
|
|
31
|
-
import { FrontMatterRecord } from '../../tokens/frontMatterRecord.js';
|
|
32
|
-
|
|
33
|
-
class PartialFrontMatterRecord extends ParserBase {
|
|
34
|
-
constructor(factory, tokens) {
|
|
35
|
-
super(tokens);
|
|
36
|
-
this.factory = factory;
|
|
37
|
-
this.recordNameToken = tokens[0];
|
|
38
|
-
this.recordDelimiterToken = tokens[1];
|
|
39
|
-
}
|
|
40
|
-
accept(token) {
|
|
41
|
-
if (this.valueParser !== undefined) {
|
|
42
|
-
const acceptResult = this.valueParser.accept(token);
|
|
43
|
-
const { result, wasTokenConsumed } = acceptResult;
|
|
44
|
-
if (result === 'failure') {
|
|
45
|
-
this.isConsumed = true;
|
|
46
|
-
return {
|
|
47
|
-
result: 'failure',
|
|
48
|
-
wasTokenConsumed,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
const { nextParser } = acceptResult;
|
|
52
|
-
if (nextParser instanceof FrontMatterValueToken) {
|
|
53
|
-
this.currentTokens.push(nextParser);
|
|
54
|
-
delete this.valueParser;
|
|
55
|
-
this.isConsumed = true;
|
|
56
|
-
try {
|
|
57
|
-
return {
|
|
58
|
-
result: 'success',
|
|
59
|
-
nextParser: ( new FrontMatterRecord([
|
|
60
|
-
this.recordNameToken,
|
|
61
|
-
this.recordDelimiterToken,
|
|
62
|
-
nextParser,
|
|
63
|
-
])),
|
|
64
|
-
wasTokenConsumed,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
catch (_error) {
|
|
68
|
-
return {
|
|
69
|
-
result: 'failure',
|
|
70
|
-
wasTokenConsumed,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
this.valueParser = nextParser;
|
|
75
|
-
return {
|
|
76
|
-
result: 'success',
|
|
77
|
-
nextParser: this,
|
|
78
|
-
wasTokenConsumed,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
if (token instanceof SpacingToken) {
|
|
82
|
-
this.currentTokens.push(token);
|
|
83
|
-
return {
|
|
84
|
-
result: 'success',
|
|
85
|
-
nextParser: this,
|
|
86
|
-
wasTokenConsumed: true,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
if (PartialFrontMatterValue.isValueStartToken(token)) {
|
|
90
|
-
this.valueParser = this.factory.createValue(shouldEndTokenSequence);
|
|
91
|
-
return this.accept(token);
|
|
92
|
-
}
|
|
93
|
-
this.valueParser = this.factory.createSequence(shouldEndTokenSequence);
|
|
94
|
-
if (shouldEndTokenSequence(token)) {
|
|
95
|
-
const spaceTokens = this.currentTokens
|
|
96
|
-
.slice(this.startTokensCount);
|
|
97
|
-
if (spaceTokens.length === 0) {
|
|
98
|
-
spaceTokens.push(Word.newOnLine('', token.range.startLineNumber, token.range.startColumn));
|
|
99
|
-
}
|
|
100
|
-
this.valueParser.addTokens(spaceTokens);
|
|
101
|
-
return {
|
|
102
|
-
result: 'success',
|
|
103
|
-
nextParser: this.asRecordToken(),
|
|
104
|
-
wasTokenConsumed: false,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
return this.accept(token);
|
|
108
|
-
}
|
|
109
|
-
asRecordToken() {
|
|
110
|
-
assertDefined(this.valueParser, 'Current value parser must be defined.');
|
|
111
|
-
if ((this.valueParser instanceof PartialFrontMatterValue)
|
|
112
|
-
|| (this.valueParser instanceof PartialFrontMatterSequence)) {
|
|
113
|
-
const valueToken = this.valueParser.asSequenceToken();
|
|
114
|
-
this.currentTokens.push(valueToken);
|
|
115
|
-
this.isConsumed = true;
|
|
116
|
-
return ( new FrontMatterRecord([
|
|
117
|
-
this.recordNameToken,
|
|
118
|
-
this.recordDelimiterToken,
|
|
119
|
-
valueToken,
|
|
120
|
-
]));
|
|
121
|
-
}
|
|
122
|
-
assertNever(this.valueParser, `Unexpected value parser '${this.valueParser}'.`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
PartialFrontMatterRecord.__decorator = ( __decorate([
|
|
126
|
-
assertNotConsumed
|
|
127
|
-
], PartialFrontMatterRecord.prototype, "accept", null));
|
|
128
|
-
function shouldEndTokenSequence(token) {
|
|
129
|
-
return ((token instanceof NewLine)
|
|
130
|
-
|| (token instanceof CarriageReturn)
|
|
131
|
-
|| (token instanceof FormFeed));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export { PartialFrontMatterRecord };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type TSimpleDecoderToken } from "../../../simpleCodec/simpleDecoder.js";
|
|
2
|
-
import { type TRecordNameToken } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/index";
|
|
3
|
-
import { Word } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
|
|
4
|
-
import { type PartialFrontMatterRecordNameWithDelimiter } from "./frontMatterRecordNameWithDelimiter.js";
|
|
5
|
-
import { ParserBase, type TAcceptTokenResult } from "../../../simpleCodec/parserBase.js";
|
|
6
|
-
import { type FrontMatterParserFactory } from "../frontMatterParserFactory.js";
|
|
7
|
-
/**
|
|
8
|
-
* Type of a next parser that can be returned by {@link PartialFrontMatterRecordName}.
|
|
9
|
-
*/
|
|
10
|
-
type TNextParser = PartialFrontMatterRecordName | PartialFrontMatterRecordNameWithDelimiter;
|
|
11
|
-
/**
|
|
12
|
-
* Parser for a `name` part of a Front Matter record.
|
|
13
|
-
*
|
|
14
|
-
* E.g., `'name'` in the example below:
|
|
15
|
-
*
|
|
16
|
-
* ```
|
|
17
|
-
* name: 'value'
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare class PartialFrontMatterRecordName extends ParserBase<TRecordNameToken, TNextParser> {
|
|
21
|
-
private readonly factory;
|
|
22
|
-
constructor(factory: FrontMatterParserFactory, startToken: Word);
|
|
23
|
-
accept(token: TSimpleDecoderToken): TAcceptTokenResult<TNextParser>;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
4
|
-
import '../../../simpleCodec/tokens/at.js';
|
|
5
|
-
import '../../../simpleCodec/tokens/tab.js';
|
|
6
|
-
import { Dash } from '../../../simpleCodec/tokens/dash.js';
|
|
7
|
-
import '../../../simpleCodec/tokens/hash.js';
|
|
8
|
-
import { Word } from '../../../simpleCodec/tokens/word.js';
|
|
9
|
-
import { Colon } from '../../../simpleCodec/tokens/colon.js';
|
|
10
|
-
import '../../../simpleCodec/tokens/quote.js';
|
|
11
|
-
import '../../../simpleCodec/tokens/slash.js';
|
|
12
|
-
import '../../../simpleCodec/tokens/space.js';
|
|
13
|
-
import '../../../simpleCodec/tokens/comma.js';
|
|
14
|
-
import '../../../simpleCodec/tokens/formFeed.js';
|
|
15
|
-
import '../../../simpleCodec/tokens/dollarSign.js';
|
|
16
|
-
import '../../../simpleCodec/tokens/verticalTab.js';
|
|
17
|
-
import '../../../simpleCodec/tokens/doubleQuote.js';
|
|
18
|
-
import '../../../simpleCodec/tokens/exclamationMark.js';
|
|
19
|
-
import { SpacingToken } from '../../../simpleCodec/tokens/simpleToken.js';
|
|
20
|
-
import '../../../simpleCodec/tokens/brackets.js';
|
|
21
|
-
import '../../../simpleCodec/tokens/curlyBraces.js';
|
|
22
|
-
import '../../../simpleCodec/tokens/parentheses.js';
|
|
23
|
-
import '../../../simpleCodec/tokens/angleBrackets.js';
|
|
24
|
-
import { FrontMatterRecordName } from '../../tokens/frontMatterRecord.js';
|
|
25
|
-
import { ParserBase, assertNotConsumed } from '../../../simpleCodec/parserBase.js';
|
|
26
|
-
|
|
27
|
-
const VALID_NAME_TOKENS = [Word, Dash];
|
|
28
|
-
class PartialFrontMatterRecordName extends ParserBase {
|
|
29
|
-
constructor(factory, startToken) {
|
|
30
|
-
super([startToken]);
|
|
31
|
-
this.factory = factory;
|
|
32
|
-
}
|
|
33
|
-
accept(token) {
|
|
34
|
-
for (const ValidToken of VALID_NAME_TOKENS) {
|
|
35
|
-
if (token instanceof ValidToken) {
|
|
36
|
-
this.currentTokens.push(token);
|
|
37
|
-
return {
|
|
38
|
-
result: 'success',
|
|
39
|
-
nextParser: this,
|
|
40
|
-
wasTokenConsumed: true,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if ((token instanceof Colon) || (token instanceof SpacingToken)) {
|
|
45
|
-
const recordName = ( new FrontMatterRecordName(this.currentTokens));
|
|
46
|
-
this.isConsumed = true;
|
|
47
|
-
return {
|
|
48
|
-
result: 'success',
|
|
49
|
-
nextParser: this.factory.createRecordNameWithDelimiter([recordName, token]),
|
|
50
|
-
wasTokenConsumed: true,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
this.isConsumed = true;
|
|
54
|
-
return {
|
|
55
|
-
result: 'failure',
|
|
56
|
-
wasTokenConsumed: false,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
PartialFrontMatterRecordName.__decorator = ( __decorate([
|
|
61
|
-
assertNotConsumed
|
|
62
|
-
], PartialFrontMatterRecordName.prototype, "accept", null));
|
|
63
|
-
|
|
64
|
-
export { PartialFrontMatterRecordName };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type PartialFrontMatterRecord } from "./frontMatterRecord.js";
|
|
2
|
-
import { Colon, SpacingToken } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
|
|
3
|
-
import { type TSimpleDecoderToken } from "../../../simpleCodec/simpleDecoder.js";
|
|
4
|
-
import { FrontMatterRecordName } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/index";
|
|
5
|
-
import { ParserBase, type TAcceptTokenResult } from "../../../simpleCodec/parserBase.js";
|
|
6
|
-
import { type FrontMatterParserFactory } from "../frontMatterParserFactory.js";
|
|
7
|
-
/**
|
|
8
|
-
* Type for tokens that stop a front matter record name sequence.
|
|
9
|
-
*/
|
|
10
|
-
export type TNameStopToken = Colon | SpacingToken;
|
|
11
|
-
/**
|
|
12
|
-
* Type for the next parser that can be returned by {@link PartialFrontMatterRecordNameWithDelimiter}.
|
|
13
|
-
*/
|
|
14
|
-
type TNextParser = PartialFrontMatterRecordNameWithDelimiter | PartialFrontMatterRecord;
|
|
15
|
-
/**
|
|
16
|
-
* Parser for a record `name` with the `: ` delimiter.
|
|
17
|
-
*
|
|
18
|
-
* * E.g., `name:` in the example below:
|
|
19
|
-
*
|
|
20
|
-
* ```
|
|
21
|
-
* name: 'value'
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare class PartialFrontMatterRecordNameWithDelimiter extends ParserBase<FrontMatterRecordName | TNameStopToken, TNextParser> {
|
|
25
|
-
private readonly factory;
|
|
26
|
-
constructor(factory: FrontMatterParserFactory, tokens: readonly [
|
|
27
|
-
FrontMatterRecordName,
|
|
28
|
-
TNameStopToken
|
|
29
|
-
]);
|
|
30
|
-
accept(token: TSimpleDecoderToken): TAcceptTokenResult<TNextParser>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
4
|
-
import '../../../simpleCodec/tokens/at.js';
|
|
5
|
-
import '../../../simpleCodec/tokens/tab.js';
|
|
6
|
-
import '../../../simpleCodec/tokens/dash.js';
|
|
7
|
-
import '../../../simpleCodec/tokens/hash.js';
|
|
8
|
-
import { Colon } from '../../../simpleCodec/tokens/colon.js';
|
|
9
|
-
import '../../../simpleCodec/tokens/quote.js';
|
|
10
|
-
import '../../../simpleCodec/tokens/slash.js';
|
|
11
|
-
import '../../../simpleCodec/tokens/space.js';
|
|
12
|
-
import '../../../simpleCodec/tokens/comma.js';
|
|
13
|
-
import '../../../simpleCodec/tokens/formFeed.js';
|
|
14
|
-
import '../../../simpleCodec/tokens/dollarSign.js';
|
|
15
|
-
import '../../../simpleCodec/tokens/verticalTab.js';
|
|
16
|
-
import '../../../simpleCodec/tokens/doubleQuote.js';
|
|
17
|
-
import '../../../simpleCodec/tokens/exclamationMark.js';
|
|
18
|
-
import { SpacingToken } from '../../../simpleCodec/tokens/simpleToken.js';
|
|
19
|
-
import '../../../simpleCodec/tokens/brackets.js';
|
|
20
|
-
import '../../../simpleCodec/tokens/curlyBraces.js';
|
|
21
|
-
import '../../../simpleCodec/tokens/parentheses.js';
|
|
22
|
-
import '../../../simpleCodec/tokens/angleBrackets.js';
|
|
23
|
-
import { FrontMatterRecordDelimiter, FrontMatterRecordName } from '../../tokens/frontMatterRecord.js';
|
|
24
|
-
import { ParserBase, assertNotConsumed } from '../../../simpleCodec/parserBase.js';
|
|
25
|
-
|
|
26
|
-
class PartialFrontMatterRecordNameWithDelimiter extends ParserBase {
|
|
27
|
-
constructor(factory, tokens) {
|
|
28
|
-
super([...tokens]);
|
|
29
|
-
this.factory = factory;
|
|
30
|
-
}
|
|
31
|
-
accept(token) {
|
|
32
|
-
const previousToken = this.currentTokens[this.currentTokens.length - 1];
|
|
33
|
-
const isSpacingToken = (token instanceof SpacingToken);
|
|
34
|
-
if (isSpacingToken && (previousToken instanceof Colon)) {
|
|
35
|
-
const recordDelimiter = ( new FrontMatterRecordDelimiter([
|
|
36
|
-
previousToken,
|
|
37
|
-
token,
|
|
38
|
-
]));
|
|
39
|
-
const recordName = this.currentTokens[0];
|
|
40
|
-
assert(recordName instanceof FrontMatterRecordName, `Expected a front matter record name, got '${recordName}'.`);
|
|
41
|
-
this.isConsumed = true;
|
|
42
|
-
return {
|
|
43
|
-
result: 'success',
|
|
44
|
-
nextParser: this.factory.createRecord([recordName, recordDelimiter]),
|
|
45
|
-
wasTokenConsumed: true,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
if (token instanceof SpacingToken) {
|
|
49
|
-
this.currentTokens.push(token);
|
|
50
|
-
return {
|
|
51
|
-
result: 'success',
|
|
52
|
-
nextParser: this,
|
|
53
|
-
wasTokenConsumed: true,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (token instanceof Colon) {
|
|
57
|
-
this.currentTokens.push(token);
|
|
58
|
-
return {
|
|
59
|
-
result: 'success',
|
|
60
|
-
nextParser: this,
|
|
61
|
-
wasTokenConsumed: true,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
this.isConsumed = true;
|
|
65
|
-
return {
|
|
66
|
-
result: 'failure',
|
|
67
|
-
wasTokenConsumed: false,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
PartialFrontMatterRecordNameWithDelimiter.__decorator = ( __decorate([
|
|
72
|
-
assertNotConsumed
|
|
73
|
-
], PartialFrontMatterRecordNameWithDelimiter.prototype, "accept", null));
|
|
74
|
-
|
|
75
|
-
export { PartialFrontMatterRecordNameWithDelimiter };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { BaseToken } from "../../baseToken.js";
|
|
2
|
-
import { FrontMatterSequence } from "../tokens/frontMatterSequence.js";
|
|
3
|
-
import { TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
|
|
4
|
-
import { ParserBase, TAcceptTokenResult } from "../../simpleCodec/parserBase.js";
|
|
5
|
-
/**
|
|
6
|
-
* Parser responsible for parsing a "generic sequence of tokens"
|
|
7
|
-
* of an arbitrary length in a Front Matter header.
|
|
8
|
-
*/
|
|
9
|
-
export declare class PartialFrontMatterSequence extends ParserBase<TSimpleDecoderToken, PartialFrontMatterSequence | FrontMatterSequence> {
|
|
10
|
-
/**
|
|
11
|
-
* Callback function that is called to check if the current token
|
|
12
|
-
* should stop the parsing process of the current generic "value"
|
|
13
|
-
* sequence of arbitrary tokens by returning `true`.
|
|
14
|
-
*
|
|
15
|
-
* When this happens, the parser *will not consume* the token that
|
|
16
|
-
* was passed to the `shouldStop` callback or to its `accept` method.
|
|
17
|
-
* On the other hand, the parser will be "consumed" hence using it
|
|
18
|
-
* to process other tokens will yield an error.
|
|
19
|
-
*/
|
|
20
|
-
private readonly shouldStop;
|
|
21
|
-
constructor(
|
|
22
|
-
/**
|
|
23
|
-
* Callback function that is called to check if the current token
|
|
24
|
-
* should stop the parsing process of the current generic "value"
|
|
25
|
-
* sequence of arbitrary tokens by returning `true`.
|
|
26
|
-
*
|
|
27
|
-
* When this happens, the parser *will not consume* the token that
|
|
28
|
-
* was passed to the `shouldStop` callback or to its `accept` method.
|
|
29
|
-
* On the other hand, the parser will be "consumed" hence using it
|
|
30
|
-
* to process other tokens will yield an error.
|
|
31
|
-
*/
|
|
32
|
-
shouldStop: (token: BaseToken) => boolean);
|
|
33
|
-
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialFrontMatterSequence | FrontMatterSequence>;
|
|
34
|
-
/**
|
|
35
|
-
* Add provided tokens to the list of the current parsed tokens.
|
|
36
|
-
*/
|
|
37
|
-
addTokens(tokens: readonly TSimpleDecoderToken[]): this;
|
|
38
|
-
/**
|
|
39
|
-
* Convert the current parser into a {@link FrontMatterSequence} token.
|
|
40
|
-
*/
|
|
41
|
-
asSequenceToken(): FrontMatterSequence;
|
|
42
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { FrontMatterSequence } from '../tokens/frontMatterSequence.js';
|
|
4
|
-
import { ParserBase, assertNotConsumed } from '../../simpleCodec/parserBase.js';
|
|
5
|
-
|
|
6
|
-
class PartialFrontMatterSequence extends ParserBase {
|
|
7
|
-
constructor(
|
|
8
|
-
shouldStop) {
|
|
9
|
-
super([]);
|
|
10
|
-
this.shouldStop = shouldStop;
|
|
11
|
-
}
|
|
12
|
-
accept(token) {
|
|
13
|
-
if (this.shouldStop(token)) {
|
|
14
|
-
this.isConsumed = true;
|
|
15
|
-
return {
|
|
16
|
-
result: 'success',
|
|
17
|
-
nextParser: this.asSequenceToken(),
|
|
18
|
-
wasTokenConsumed: false,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
this.currentTokens.push(token);
|
|
22
|
-
return {
|
|
23
|
-
result: 'success',
|
|
24
|
-
nextParser: this,
|
|
25
|
-
wasTokenConsumed: true,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
addTokens(tokens) {
|
|
29
|
-
this.currentTokens.push(...tokens);
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
asSequenceToken() {
|
|
33
|
-
this.isConsumed = true;
|
|
34
|
-
return ( new FrontMatterSequence(this.currentTokens));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
PartialFrontMatterSequence.__decorator = ( __decorate([
|
|
38
|
-
assertNotConsumed
|
|
39
|
-
], PartialFrontMatterSequence.prototype, "accept", null));
|
|
40
|
-
|
|
41
|
-
export { PartialFrontMatterSequence };
|