@codingame/monaco-vscode-chat-service-override 20.1.1 → 20.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/package.json +36 -36
  2. package/vscode/src/vs/base/common/decorators/cancelPreviousCalls.d.ts +73 -0
  3. package/vscode/src/vs/base/common/policy.d.ts +27 -0
  4. package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +41 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +10 -0
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +11 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +5 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +6 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +15 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +11 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +11 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +6 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +44 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNewNotebookContentEdits.d.ts +11 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +5 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.d.ts +13 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +19 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +4 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css +5 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +6 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +22 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +10 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +14 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +19 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +45 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +13 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +22 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +3 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +3 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +3 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +23 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.d.ts +3 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +3 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.d.ts +9 -0
  35. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +9 -0
  36. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +8 -0
  37. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +11 -0
  38. package/vscode/src/vs/workbench/contrib/chat/common/promptFileReferenceErrors.d.ts +54 -0
  39. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/asyncDecoder.d.ts +18 -0
  40. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseDecoder.d.ts +102 -0
  41. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseToken.d.ts +42 -0
  42. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/compositeToken.d.ts +14 -0
  43. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/constants.d.ts +4 -0
  44. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/frontMatterDecoder.d.ts +13 -0
  45. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterArray.d.ts +19 -0
  46. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecord.d.ts +30 -0
  47. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordName.d.ts +12 -0
  48. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordNameWithDelimiter.d.ts +15 -0
  49. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterSequence.d.ts +32 -1
  50. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterString.d.ts +9 -0
  51. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterValue.d.ts +41 -1
  52. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterArray.d.ts +9 -0
  53. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterBoolean.d.ts +20 -0
  54. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterRecord.d.ts +61 -0
  55. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterSequence.d.ts +18 -0
  56. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterString.d.ts +12 -0
  57. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterToken.d.ts +12 -0
  58. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/linesDecoder.d.ts +44 -0
  59. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/carriageReturn.d.ts +19 -0
  60. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/line.d.ts +7 -0
  61. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/newLine.d.ts +19 -0
  62. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/markdownDecoder.d.ts +10 -0
  63. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownComment.d.ts +20 -0
  64. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownImage.d.ts +10 -0
  65. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownLink.d.ts +54 -0
  66. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownComment.d.ts +10 -0
  67. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownImage.d.ts +39 -1
  68. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownLink.d.ts +39 -1
  69. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownToken.d.ts +4 -0
  70. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/markdownExtensionsDecoder.d.ts +14 -0
  71. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/parsers/frontMatterHeader.d.ts +29 -0
  72. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterHeader.d.ts +18 -0
  73. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterMarker.d.ts +16 -0
  74. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/markdownExtensionsToken.d.ts +3 -0
  75. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/parserBase.d.ts +64 -1
  76. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/simpleDecoder.d.ts +15 -0
  77. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/angleBrackets.d.ts +29 -0
  78. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/at.d.ts +13 -0
  79. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/brackets.d.ts +29 -0
  80. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/colon.d.ts +13 -0
  81. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/comma.d.ts +13 -0
  82. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/curlyBraces.d.ts +29 -0
  83. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dash.d.ts +13 -0
  84. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dollarSign.d.ts +13 -0
  85. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/doubleQuote.d.ts +17 -0
  86. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/exclamationMark.d.ts +13 -0
  87. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/formFeed.d.ts +13 -0
  88. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/hash.d.ts +13 -0
  89. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/parentheses.d.ts +29 -0
  90. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/quote.d.ts +17 -0
  91. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/simpleToken.d.ts +24 -0
  92. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/slash.d.ts +13 -0
  93. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/space.d.ts +13 -0
  94. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tab.d.ts +13 -0
  95. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/verticalTab.d.ts +13 -0
  96. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/word.d.ts +24 -1
  97. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/textToken.d.ts +4 -0
  98. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStream.d.ts +37 -0
  99. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStreamFromTextModel.d.ts +3 -0
  100. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptCodec.d.ts +30 -0
  101. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptDecoder.d.ts +15 -0
  102. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptAtMentionParser.d.ts +16 -0
  103. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptSlashCommandParser.d.ts +16 -0
  104. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptTemplateVariableParser.d.ts +21 -0
  105. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptVariableParser.d.ts +26 -0
  106. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/fileReference.d.ts +11 -0
  107. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptAtMention.d.ts +17 -1
  108. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptSlashCommand.d.ts +17 -1
  109. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptTemplateVariable.d.ts +19 -1
  110. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptToken.d.ts +3 -0
  111. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptVariable.d.ts +39 -2
  112. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/configMigration.d.ts +8 -0
  113. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/filePromptContentsProvider.d.ts +15 -0
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/promptContentsProviderBase.d.ts +70 -0
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +20 -0
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +10 -0
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.d.ts +14 -0
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderHovers.d.ts +3 -0
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkDiagnosticsProvider.d.ts +13 -0
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +6 -0
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptPathAutocompletion.d.ts +45 -0
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceBase.d.ts +12 -0
  123. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceManagerBase.d.ts +19 -0
  124. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.d.ts +144 -0
  125. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/diagnostics.d.ts +18 -0
  126. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase.d.ts +71 -0
  127. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/instructionsHeader.d.ts +12 -0
  128. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/applyTo.d.ts +10 -0
  129. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/enum.d.ts +13 -0
  130. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/record.d.ts +42 -0
  131. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.d.ts +12 -0
  132. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/description.d.ts +7 -0
  133. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.d.ts +7 -0
  134. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/model.d.ts +4 -0
  135. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/tools.d.ts +26 -0
  136. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/modeHeader.d.ts +15 -0
  137. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.d.ts +26 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptParser.d.ts +10 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +7 -0
  140. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/topError.d.ts +3 -0
  141. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.d.ts +6 -0
  142. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +24 -0
  143. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/objectCache.d.ts +83 -0
  144. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/observableDisposable.d.ts +31 -0
  145. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +39 -0
  146. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +3 -0
  147. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +5 -0
  148. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +5 -0
  149. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.service.d.ts +6 -0
  150. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +17 -0
  151. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +8 -0
  152. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatControllerHolder.d.ts +4 -0
  153. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.d.ts +7 -3
  154. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +22 -0
  155. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +8 -0
  156. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +6 -0
  157. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +7 -0
  158. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/taskHelpers.d.ts +13 -0
  159. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +4 -0
@@ -3,18 +3,47 @@ import { FrontMatterHeader } from "../tokens/frontMatterHeader.js";
3
3
  import { TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
4
4
  import { FrontMatterMarker, TMarkerToken } from "../tokens/frontMatterMarker.js";
5
5
  import { ParserBase, TAcceptTokenResult } from "../../simpleCodec/parserBase.js";
6
+ /**
7
+ * Parses the start marker of a Front Matter header.
8
+ */
6
9
  export declare class PartialFrontMatterStartMarker extends ParserBase<TMarkerToken, PartialFrontMatterStartMarker | PartialFrontMatterHeader> {
7
10
  constructor(token: Dash);
8
11
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialFrontMatterStartMarker | PartialFrontMatterHeader>;
12
+ /**
13
+ * Check if provided dash token can be a start of a Front Matter header.
14
+ */
9
15
  static mayStartHeader(token: TSimpleDecoderToken): token is Dash;
10
16
  }
17
+ /**
18
+ * Parses a Front Matter header that already has a start marker
19
+ * and possibly some content that follows.
20
+ */
11
21
  export declare class PartialFrontMatterHeader extends ParserBase<TSimpleDecoderToken, PartialFrontMatterHeader | FrontMatterHeader> {
12
22
  readonly startMarker: FrontMatterMarker;
23
+ /**
24
+ * Parser instance for the end marker of the Front Matter header.
25
+ */
13
26
  private maybeEndMarker?;
14
27
  constructor(startMarker: FrontMatterMarker);
15
28
  get tokens(): readonly TSimpleDecoderToken[];
29
+ /**
30
+ * Convert the current token sequence into a {@link FrontMatterHeader} token.
31
+ *
32
+ * Note! that this method marks the current parser object as "consumed"
33
+ * hence it should not be used after this method is called.
34
+ */
16
35
  asFrontMatterHeader(): FrontMatterHeader;
17
36
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialFrontMatterHeader | FrontMatterHeader>;
37
+ /**
38
+ * When a end marker parser is present, we pass all tokens to it
39
+ * until it is completes the parsing process(either success or failure).
40
+ */
18
41
  private acceptEndMarkerToken;
42
+ /**
43
+ * On failure to parse the end marker, we need to continue parsing
44
+ * the header because there might be another valid end marker in
45
+ * the stream of tokens. Therefore we copy over the end marker tokens
46
+ * into the list of "content" tokens and reset the end marker parser.
47
+ */
19
48
  private handleEndMarkerParsingFailure;
20
49
  }
@@ -3,14 +3,32 @@ import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core
3
3
  import { MarkdownExtensionsToken } from "./markdownExtensionsToken.js";
4
4
  import { TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
5
5
  import { FrontMatterMarker, TMarkerToken } from "./frontMatterMarker.js";
6
+ /**
7
+ * Token that represents a `Front Matter` header in a text.
8
+ */
6
9
  export declare class FrontMatterHeader extends MarkdownExtensionsToken {
7
10
  readonly startMarker: FrontMatterMarker;
8
11
  readonly content: Text;
9
12
  readonly endMarker: FrontMatterMarker;
10
13
  constructor(range: Range, startMarker: FrontMatterMarker, content: Text, endMarker: FrontMatterMarker);
14
+ /**
15
+ * Return complete text representation of the token.
16
+ */
11
17
  get text(): string;
18
+ /**
19
+ * Range of the content of the Front Matter header.
20
+ */
12
21
  get contentRange(): Range;
22
+ /**
23
+ * Content token of the Front Matter header.
24
+ */
13
25
  get contentToken(): Text;
26
+ /**
27
+ * Create new instance of the token from the given tokens.
28
+ */
14
29
  static fromTokens(startMarkerTokens: readonly TMarkerToken[], contentTokens: readonly TSimpleDecoderToken[], endMarkerTokens: readonly TMarkerToken[]): FrontMatterHeader;
30
+ /**
31
+ * Returns a string representation of the token.
32
+ */
15
33
  toString(): string;
16
34
  }
@@ -3,12 +3,28 @@ import { Dash } from "../../simpleCodec/tokens/dash.js";
3
3
  import { NewLine } from "../../linesCodec/tokens/newLine.js";
4
4
  import { MarkdownExtensionsToken } from "./markdownExtensionsToken.js";
5
5
  import { CarriageReturn } from "../../linesCodec/tokens/carriageReturn.js";
6
+ /**
7
+ * Type for tokens inside a Front Matter header marker.
8
+ */
6
9
  export type TMarkerToken = Dash | CarriageReturn | NewLine;
10
+ /**
11
+ * Marker for the start and end of a Front Matter header.
12
+ */
7
13
  export declare class FrontMatterMarker extends MarkdownExtensionsToken {
8
14
  readonly tokens: readonly TMarkerToken[];
15
+ /**
16
+ * Returns complete text representation of the token.
17
+ */
9
18
  get text(): string;
19
+ /**
20
+ * List of {@link Dash} tokens in the marker.
21
+ */
10
22
  get dashTokens(): readonly Dash[];
11
23
  constructor(range: Range, tokens: readonly TMarkerToken[]);
24
+ /**
25
+ * Create new instance of the token from a provided
26
+ * list of tokens.
27
+ */
12
28
  static fromTokens(tokens: readonly TMarkerToken[]): FrontMatterMarker;
13
29
  toString(): string;
14
30
  }
@@ -1,3 +1,6 @@
1
1
  import { MarkdownToken } from "../../markdownCodec/tokens/markdownToken.js";
2
+ /**
3
+ * Base class for all tokens produced by the `MarkdownExtensionsDecoder`.
4
+ */
2
5
  export declare abstract class MarkdownExtensionsToken extends MarkdownToken {
3
6
  }
@@ -1,24 +1,87 @@
1
1
  import { BaseToken } from "../baseToken.js";
2
+ /**
3
+ * Common interface for a result of accepting a next token
4
+ * in a sequence.
5
+ */
2
6
  export interface IAcceptTokenResult {
7
+ /**
8
+ * The result type of accepting a next token in a sequence.
9
+ */
3
10
  result: "success" | "failure";
11
+ /**
12
+ * Whether the token to accept was consumed by the parser
13
+ * during the accept operation.
14
+ */
4
15
  wasTokenConsumed: boolean;
5
16
  }
17
+ /**
18
+ * Successful result of accepting a next token in a sequence.
19
+ */
6
20
  export interface IAcceptTokenSuccess<T> extends IAcceptTokenResult {
7
21
  result: "success";
8
22
  nextParser: T;
9
23
  }
24
+ /**
25
+ * Failure result of accepting a next token in a sequence.
26
+ */
10
27
  export interface IAcceptTokenFailure extends IAcceptTokenResult {
11
28
  result: "failure";
12
29
  }
30
+ /**
31
+ * The result of operation of accepting a next token in a sequence.
32
+ */
13
33
  export type TAcceptTokenResult<T> = IAcceptTokenSuccess<T> | IAcceptTokenFailure;
34
+ /**
35
+ * An abstract parser class that is able to parse a sequence of
36
+ * tokens into a new single entity.
37
+ */
14
38
  export declare abstract class ParserBase<TToken extends BaseToken, TNextObject> {
39
+ /**
40
+ * Set of tokens that were accumulated so far.
41
+ */
15
42
  protected readonly currentTokens: TToken[];
43
+ /**
44
+ * Whether the parser object was "consumed" and should not be used anymore.
45
+ */
16
46
  protected isConsumed: boolean;
47
+ /**
48
+ * Whether the parser object was "consumed" hence must not be used anymore.
49
+ */
17
50
  get consumed(): boolean;
51
+ /**
52
+ * Number of tokens at the initialization of the current parser.
53
+ */
18
54
  protected readonly startTokensCount: number;
19
- constructor(currentTokens?: TToken[]);
55
+ constructor(
56
+ /**
57
+ * Set of tokens that were accumulated so far.
58
+ */
59
+ currentTokens?: TToken[]);
60
+ /**
61
+ * Get the tokens that were accumulated so far.
62
+ */
20
63
  get tokens(): readonly TToken[];
64
+ /**
65
+ * Accept a new token returning parsing result:
66
+ * - successful result must include the next parser object or a fully parsed out token
67
+ * - failure result must indicate that the token was not consumed
68
+ *
69
+ * @param token The token to accept.
70
+ * @returns The parsing result.
71
+ */
21
72
  abstract accept(token: TToken): TAcceptTokenResult<TNextObject>;
73
+ /**
74
+ * A helper method that validates that the current parser object was not yet consumed,
75
+ * hence can still be used to accept new tokens in the parsing process.
76
+ *
77
+ * @throws if the parser object is already consumed.
78
+ */
22
79
  protected assertNotConsumed(): void;
23
80
  }
81
+ /**
82
+ * Decorator that validates that the current parser object was not yet consumed,
83
+ * hence can still be used to accept new tokens in the parsing process.
84
+ *
85
+ * @throws the resulting decorated method throws if the parser object was already consumed.
86
+ */
24
87
  export declare function assertNotConsumed<T extends ParserBase<BaseToken, unknown>>(_target: T, propertyKey: "accept", descriptor: PropertyDescriptor): PropertyDescriptor;
@@ -6,9 +6,24 @@ import { ISimpleTokenClass } from "./tokens/simpleToken.js";
6
6
  import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
7
7
  import { BaseDecoder } from "../baseDecoder.js";
8
8
  import { ReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/stream";
9
+ /**
10
+ * Type for all simple tokens.
11
+ */
9
12
  export type TSimpleToken = Space | Tab | VerticalTab | At | Quote | DoubleQuote | CarriageReturn | NewLine | FormFeed | TBracket | TAngleBracket | TCurlyBrace | TParenthesis | Colon | Hash | Dash | ExclamationMark | Slash | DollarSign | Comma | TLineBreakToken;
13
+ /**
14
+ * Type of tokens emitted by this decoder.
15
+ */
10
16
  export type TSimpleDecoderToken = TSimpleToken | Word;
17
+ /**
18
+ * List of well-known distinct tokens that this decoder emits (excluding
19
+ * the word stop characters defined below). Everything else is considered
20
+ * an arbitrary "text" sequence and is emitted as a single {@link Word} token.
21
+ */
11
22
  export declare const WELL_KNOWN_TOKENS: readonly ISimpleTokenClass<TSimpleToken>[];
23
+ /**
24
+ * A decoder that can decode a stream of `Line`s into a stream
25
+ * of simple token, - `Word`, `Space`, `Tab`, `NewLine`, etc.
26
+ */
12
27
  export declare class SimpleDecoder extends BaseDecoder<TSimpleDecoderToken, TLineToken> {
13
28
  constructor(stream: ReadableStream<VSBuffer>);
14
29
  protected onStreamData(line: TLineToken): void;
@@ -1,12 +1,41 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `<` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class LeftAngleBracket extends SimpleToken<"<"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "<";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "<";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
20
+ /**
21
+ * A token that represent a `>` with a `range`. The `range`
22
+ * value reflects the position of the token in the original data.
23
+ */
7
24
  export declare class RightAngleBracket extends SimpleToken<">"> {
25
+ /**
26
+ * The underlying symbol of the token.
27
+ */
8
28
  static readonly symbol: ">";
29
+ /**
30
+ * Return text representation of the token.
31
+ */
9
32
  get text(): ">";
33
+ /**
34
+ * Returns a string representation of the token.
35
+ */
10
36
  toString(): string;
11
37
  }
38
+ /**
39
+ * General angle bracket token type.
40
+ */
12
41
  export type TAngleBracket = LeftAngleBracket | RightAngleBracket;
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `@` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class At extends SimpleToken<"@"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "@";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "@";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,12 +1,41 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `[` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class LeftBracket extends SimpleToken<"["> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "[";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "[";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
20
+ /**
21
+ * A token that represent a `]` with a `range`. The `range`
22
+ * value reflects the position of the token in the original data.
23
+ */
7
24
  export declare class RightBracket extends SimpleToken<"]"> {
25
+ /**
26
+ * The underlying symbol of the token.
27
+ */
8
28
  static readonly symbol: "]";
29
+ /**
30
+ * Return text representation of the token.
31
+ */
9
32
  get text(): "]";
33
+ /**
34
+ * Returns a string representation of the token.
35
+ */
10
36
  toString(): string;
11
37
  }
38
+ /**
39
+ * General bracket token type.
40
+ */
12
41
  export type TBracket = LeftBracket | RightBracket;
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `:` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class Colon extends SimpleToken<":"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: ":";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): ":";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `,` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class Comma extends SimpleToken<","> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: ",";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): ",";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,12 +1,41 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `{` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class LeftCurlyBrace extends SimpleToken<"{"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "{";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "{";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
20
+ /**
21
+ * A token that represent a `}` with a `range`. The `range`
22
+ * value reflects the position of the token in the original data.
23
+ */
7
24
  export declare class RightCurlyBrace extends SimpleToken<"}"> {
25
+ /**
26
+ * The underlying symbol of the token.
27
+ */
8
28
  static readonly symbol: "}";
29
+ /**
30
+ * Return text representation of the token.
31
+ */
9
32
  get text(): "}";
33
+ /**
34
+ * Returns a string representation of the token.
35
+ */
10
36
  toString(): string;
11
37
  }
38
+ /**
39
+ * General curly brace token type.
40
+ */
12
41
  export type TCurlyBrace = LeftCurlyBrace | RightCurlyBrace;
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `-` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class Dash extends SimpleToken<"-"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "-";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "-";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `$` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class DollarSign extends SimpleToken<"$"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "$";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "$";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,8 +1,25 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
2
  import { SimpleToken } from "./simpleToken.js";
3
+ /**
4
+ * A token that represent a `"` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class DoubleQuote extends SimpleToken<"\""> {
8
+ /**
9
+ * The underlying symbol of the token.
10
+ */
4
11
  static readonly symbol: "\"";
12
+ /**
13
+ * Return text representation of the token.
14
+ */
5
15
  get text(): "\"";
16
+ /**
17
+ * Checks if the provided token is of the same type
18
+ * as the current one.
19
+ */
6
20
  sameType(other: BaseToken): other is typeof this;
21
+ /**
22
+ * Returns a string representation of the token.
23
+ */
7
24
  toString(): string;
8
25
  }
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `!` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class ExclamationMark extends SimpleToken<"!"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "!";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "!";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * Token that represent a `form feed` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class FormFeed extends SimpleToken<"\f"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "\f";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "\f";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,6 +1,19 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `#` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class Hash extends SimpleToken<"#"> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "#";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "#";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
@@ -1,12 +1,41 @@
1
1
  import { SimpleToken } from "./simpleToken.js";
2
+ /**
3
+ * A token that represent a `(` with a `range`. The `range`
4
+ * value reflects the position of the token in the original data.
5
+ */
2
6
  export declare class LeftParenthesis extends SimpleToken<"("> {
7
+ /**
8
+ * The underlying symbol of the token.
9
+ */
3
10
  static readonly symbol: "(";
11
+ /**
12
+ * Return text representation of the token.
13
+ */
4
14
  get text(): "(";
15
+ /**
16
+ * Returns a string representation of the token.
17
+ */
5
18
  toString(): string;
6
19
  }
20
+ /**
21
+ * A token that represent a `)` with a `range`. The `range`
22
+ * value reflects the position of the token in the original data.
23
+ */
7
24
  export declare class RightParenthesis extends SimpleToken<")"> {
25
+ /**
26
+ * The underlying symbol of the token.
27
+ */
8
28
  static readonly symbol: ")";
29
+ /**
30
+ * Return text representation of the token.
31
+ */
9
32
  get text(): ")";
33
+ /**
34
+ * Returns a string representation of the token.
35
+ */
10
36
  toString(): string;
11
37
  }
38
+ /**
39
+ * General parenthesis token type.
40
+ */
12
41
  export type TParenthesis = LeftParenthesis | RightParenthesis;
@@ -1,8 +1,25 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
2
  import { SimpleToken } from "./simpleToken.js";
3
+ /**
4
+ * A token that represent a `'` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class Quote extends SimpleToken<`'`> {
8
+ /**
9
+ * The underlying symbol of the token.
10
+ */
4
11
  static readonly symbol: "'";
12
+ /**
13
+ * Return text representation of the token.
14
+ */
5
15
  get text(): "'";
16
+ /**
17
+ * Checks if the provided token is of the same type
18
+ * as the current one.
19
+ */
6
20
  sameType(other: BaseToken): other is Quote;
21
+ /**
22
+ * Returns a string representation of the token.
23
+ */
7
24
  toString(): string;
8
25
  }
@@ -1,12 +1,36 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
2
  import { Line } from "../../linesCodec/tokens/line.js";
3
+ /**
4
+ * Interface for a class that can be instantiated into a {@link SimpleToken}.
5
+ */
3
6
  export interface ISimpleTokenClass<TSimpleToken extends SimpleToken<string>> {
7
+ /**
8
+ * Character representing the token.
9
+ */
4
10
  readonly symbol: string;
11
+ /**
12
+ * Constructor for the token.
13
+ */
5
14
  new (...args: any[]): TSimpleToken;
6
15
  }
16
+ /**
17
+ * Base class for all "simple" tokens with a `range`.
18
+ * A simple token is the one that represents a single character.
19
+ */
7
20
  export declare abstract class SimpleToken<TSymbol extends string> extends BaseToken<TSymbol> {
21
+ /**
22
+ * The underlying symbol of the token.
23
+ */
8
24
  static readonly symbol: string;
25
+ /**
26
+ * Create new token instance with range inside
27
+ * the given `Line` at the given `column number`.
28
+ */
9
29
  static newOnLine<TSimpleToken extends SimpleToken<string>>(line: Line, atColumnNumber: number, Constructor: ISimpleTokenClass<TSimpleToken>): TSimpleToken;
10
30
  }
31
+ /**
32
+ * Base class for all tokens that represent some form of
33
+ * a spacing character, e.g. 'space', 'tab', etc.
34
+ */
11
35
  export declare abstract class SpacingToken<TSymbol extends string = string> extends SimpleToken<TSymbol> {
12
36
  }