@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
@@ -1,14 +1,34 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
2
  import { Word } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
3
3
  import { FrontMatterValueToken } from "./frontMatterToken.js";
4
+ /**
5
+ * Token that represents a `boolean` value in a Front Matter header.
6
+ */
4
7
  export declare class FrontMatterBoolean extends FrontMatterValueToken<"boolean", readonly [
5
8
  Word
6
9
  ]> {
10
+ /**
11
+ * Name of the `boolean` value type.
12
+ */
7
13
  readonly valueTypeName = "boolean";
14
+ /**
15
+ * Value of the `boolean` token.
16
+ */
8
17
  readonly value: boolean;
18
+ /**
19
+ * @throws if provided {@link Word} cannot be converted to a `boolean` value.
20
+ */
9
21
  constructor(token: Word);
22
+ /**
23
+ * Try creating a {@link FrontMatterBoolean} out of provided token.
24
+ * Unlike the constructor, this method does not throw, returning
25
+ * a 'null' value on failure instead.
26
+ */
10
27
  static tryFromToken(token: BaseToken): FrontMatterBoolean | null;
11
28
  equals(other: BaseToken): other is typeof this;
12
29
  toString(): string;
13
30
  }
31
+ /**
32
+ * Try to convert a {@link Word} token to a `boolean` value.
33
+ */
14
34
  export declare function asBoolean(token: Word): boolean | null;
@@ -1,22 +1,83 @@
1
1
  import { Colon, Word, Dash, SpacingToken } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
2
2
  import { FrontMatterToken, FrontMatterValueToken, type TValueTypeName } from "./frontMatterToken.js";
3
+ /**
4
+ * Type for tokens that can be used inside a record name.
5
+ */
3
6
  export type TNameToken = Word | Dash;
7
+ /**
8
+ * Token representing a `record name` inside a Front Matter record.
9
+ *
10
+ * E.g., `name` in the example below:
11
+ *
12
+ * ```
13
+ * ---
14
+ * name: 'value'
15
+ * ---
16
+ * ```
17
+ */
4
18
  export declare class FrontMatterRecordName extends FrontMatterToken<readonly TNameToken[]> {
5
19
  toString(): string;
6
20
  }
21
+ /**
22
+ * Token representing a delimiter of a record inside a Front Matter header.
23
+ *
24
+ * E.g., `: ` in the example below:
25
+ *
26
+ * ```
27
+ * ---
28
+ * name: 'value'
29
+ * ---
30
+ * ```
31
+ */
7
32
  export declare class FrontMatterRecordDelimiter extends FrontMatterToken<readonly [
8
33
  Colon,
9
34
  SpacingToken
10
35
  ]> {
11
36
  toString(): string;
12
37
  }
38
+ /**
39
+ * Token representing a `record` inside a Front Matter header.
40
+ *
41
+ * E.g., `name: 'value'` in the example below:
42
+ *
43
+ * ```
44
+ * ---
45
+ * name: 'value'
46
+ * ---
47
+ * ```
48
+ */
13
49
  export declare class FrontMatterRecord extends FrontMatterToken<readonly [
14
50
  FrontMatterRecordName,
15
51
  FrontMatterRecordDelimiter,
16
52
  FrontMatterValueToken<TValueTypeName>
17
53
  ]> {
54
+ /**
55
+ * Token that represent `name` of the record.
56
+ *
57
+ * E.g., `tools` in the example below:
58
+ *
59
+ * ```
60
+ * ---
61
+ * tools: ['value']
62
+ * ---
63
+ * ```
64
+ */
18
65
  get nameToken(): FrontMatterRecordName;
66
+ /**
67
+ * Token that represent `value` of the record.
68
+ *
69
+ * E.g., `['value']` in the example below:
70
+ *
71
+ * ```
72
+ * ---
73
+ * tools: ['value']
74
+ * ---
75
+ * ```
76
+ */
19
77
  get valueToken(): FrontMatterValueToken<TValueTypeName>;
78
+ /**
79
+ * Trim spacing tokens at the end of the record.
80
+ */
20
81
  trimValueEnd(): readonly SpacingToken[];
21
82
  toString(): string;
22
83
  }
@@ -1,9 +1,27 @@
1
1
  import { FrontMatterValueToken } from "./frontMatterToken.js";
2
2
  import { SpacingToken } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
3
3
  import { type TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
4
+ /**
5
+ * Token represents a generic sequence of tokens in a Front Matter header.
6
+ */
4
7
  export declare class FrontMatterSequence extends FrontMatterValueToken<FrontMatterSequence, readonly TSimpleDecoderToken[]> {
8
+ /**
9
+ * @override Because this token represent a generic sequence of tokens,
10
+ * the type name is represented by the sequence of tokens itself
11
+ */
5
12
  get valueTypeName(): this;
13
+ /**
14
+ * Text of the sequence value. The method exists to provide a
15
+ * consistent interface with {@link FrontMatterString} token.
16
+ *
17
+ * Note! that this method does not automatically trim spacing tokens
18
+ * in the sequence. If you need to get a trimmed value, call
19
+ * {@link trimEnd} method first.
20
+ */
6
21
  get cleanText(): string;
22
+ /**
23
+ * Trim spacing tokens at the end of the sequence.
24
+ */
7
25
  trimEnd(): readonly SpacingToken[];
8
26
  toString(): string;
9
27
  }
@@ -1,13 +1,25 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
2
  import { FrontMatterValueToken } from "./frontMatterToken.js";
3
3
  import { Quote, DoubleQuote } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
4
+ /**
5
+ * Type for any quote token that can be used to wrap a string.
6
+ */
4
7
  export type TQuoteToken = Quote | DoubleQuote;
8
+ /**
9
+ * Token that represents a string value in a Front Matter header.
10
+ */
5
11
  export declare class FrontMatterString<TQuote extends TQuoteToken = Quote> extends FrontMatterValueToken<"quoted-string", readonly [
6
12
  TQuote,
7
13
  ...BaseToken[],
8
14
  TQuote
9
15
  ]> {
16
+ /**
17
+ * Name of the `string` value type.
18
+ */
10
19
  readonly valueTypeName = "quoted-string";
20
+ /**
21
+ * Text of the string value without the wrapping quotes.
22
+ */
11
23
  get cleanText(): string;
12
24
  toString(): string;
13
25
  }
@@ -1,9 +1,21 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
2
  import { CompositeToken } from "../../compositeToken.js";
3
3
  import { FrontMatterSequence } from "./frontMatterSequence.js";
4
+ /**
5
+ * Base class for all tokens inside a Front Matter header.
6
+ */
4
7
  export declare abstract class FrontMatterToken<TTokens extends readonly BaseToken[] = readonly BaseToken[]> extends CompositeToken<TTokens> {
5
8
  }
9
+ /**
10
+ * List of all currently supported value types.
11
+ */
6
12
  export type TValueTypeName = "quoted-string" | "boolean" | "array" | FrontMatterSequence;
13
+ /**
14
+ * Base class for all tokens that represent a `value` inside a Front Matter header.
15
+ */
7
16
  export declare abstract class FrontMatterValueToken<TTypeName extends TValueTypeName = TValueTypeName, TTokens extends readonly BaseToken[] = readonly BaseToken[]> extends FrontMatterToken<TTokens> {
17
+ /**
18
+ * Type name of the `value` represented by this token.
19
+ */
8
20
  abstract readonly valueTypeName: TTypeName;
9
21
  }
@@ -3,14 +3,58 @@ import { NewLine } from "./tokens/newLine.js";
3
3
  import { CarriageReturn } from "./tokens/carriageReturn.js";
4
4
  import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
5
5
  import { BaseDecoder } from "../baseDecoder.js";
6
+ /**
7
+ * Any line break token type.
8
+ */
6
9
  export type TLineBreakToken = CarriageReturn | NewLine;
10
+ /**
11
+ * Tokens produced by the {@link LinesDecoder}.
12
+ */
7
13
  export type TLineToken = Line | TLineBreakToken;
14
+ /**
15
+ * The `decoder` part of the `LinesCodec` and is able to transform
16
+ * data from a binary stream into a stream of text lines(`Line`).
17
+ */
8
18
  export declare class LinesDecoder extends BaseDecoder<TLineToken, VSBuffer> {
19
+ /**
20
+ * Buffered received data yet to be processed.
21
+ */
9
22
  private buffer;
23
+ /**
24
+ * The last emitted `Line` token, if any. The value is used
25
+ * to correctly emit remaining line range in the `onStreamEnd`
26
+ * method when underlying input stream ends and `buffer` still
27
+ * contains some data that must be emitted as the last line.
28
+ */
10
29
  private lastEmittedLine?;
30
+ /**
31
+ * Process data received from the input stream.
32
+ */
11
33
  protected onStreamData(chunk: VSBuffer): void;
34
+ /**
35
+ * Process buffered data.
36
+ *
37
+ * @param streamEnded Flag that indicates if the input stream has ended,
38
+ * which means that is the last call of this method.
39
+ * @throws If internal logic implementation error is detected.
40
+ */
12
41
  private processData;
42
+ /**
43
+ * Find the end of line tokens in the data buffer.
44
+ * Can return:
45
+ * - [`\r`, `\n`] tokens if the sequence is found
46
+ * - [`\r`] token if only the carriage return is found
47
+ * - [`\n`] token if only the newline is found
48
+ * - an `empty array` if no end of line tokens found
49
+ */
13
50
  private findEndOfLineTokens;
51
+ /**
52
+ * Emit a provided line as the `Line` token to the output stream.
53
+ */
14
54
  private emitLine;
55
+ /**
56
+ * Handle the end of the input stream - if the buffer still has some data,
57
+ * emit it as the last available line token before firing the `onEnd` event.
58
+ */
15
59
  protected onStreamEnd(): void;
16
60
  }
@@ -1,9 +1,28 @@
1
1
  import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
2
2
  import { SimpleToken } from "../../simpleCodec/tokens/simpleToken.js";
3
+ /**
4
+ * Token that represent a `carriage return` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class CarriageReturn extends SimpleToken<"\r"> {
8
+ /**
9
+ * The underlying symbol of the token.
10
+ */
4
11
  static readonly symbol: "\r";
12
+ /**
13
+ * The byte representation of the {@link symbol}.
14
+ */
5
15
  static readonly byte: VSBuffer;
16
+ /**
17
+ * The byte representation of the token.
18
+ */
6
19
  get byte(): VSBuffer;
20
+ /**
21
+ * Return text representation of the token.
22
+ */
7
23
  get text(): "\r";
24
+ /**
25
+ * Returns a string representation of the token.
26
+ */
8
27
  toString(): string;
9
28
  }
@@ -1,6 +1,13 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
+ /**
3
+ * Token representing a line of text with a `range` which
4
+ * reflects the line's position in the original data.
5
+ */
2
6
  export declare class Line extends BaseToken {
3
7
  readonly text: string;
4
8
  constructor(lineNumber: number, text: string);
9
+ /**
10
+ * Returns a string representation of the token.
11
+ */
5
12
  toString(): string;
6
13
  }
@@ -1,9 +1,28 @@
1
1
  import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
2
2
  import { SimpleToken } from "../../simpleCodec/tokens/simpleToken.js";
3
+ /**
4
+ * A token that represent a `new line` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class NewLine extends SimpleToken<"\n"> {
8
+ /**
9
+ * The underlying symbol of the `NewLine` token.
10
+ */
4
11
  static readonly symbol: "\n";
12
+ /**
13
+ * The byte representation of the {@link symbol}.
14
+ */
5
15
  static readonly byte: VSBuffer;
16
+ /**
17
+ * Return text representation of the token.
18
+ */
6
19
  get text(): "\n";
20
+ /**
21
+ * The byte representation of the token.
22
+ */
7
23
  get byte(): VSBuffer;
24
+ /**
25
+ * Returns a string representation of the token.
26
+ */
8
27
  toString(): string;
9
28
  }
@@ -3,8 +3,18 @@ import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buf
3
3
  import { ReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/stream";
4
4
  import { TSimpleDecoderToken } from "../simpleCodec/simpleDecoder.js";
5
5
  import { BaseDecoder } from "../baseDecoder.js";
6
+ /**
7
+ * Tokens produced by this decoder.
8
+ */
6
9
  export type TMarkdownToken = MarkdownToken | TSimpleDecoderToken;
10
+ /**
11
+ * Decoder capable of parsing markdown entities (e.g., links) from a sequence of simple tokens.
12
+ */
7
13
  export declare class MarkdownDecoder extends BaseDecoder<TMarkdownToken, TSimpleDecoderToken> {
14
+ /**
15
+ * Current parser object that is responsible for parsing a sequence of tokens into
16
+ * some markdown entity. Set to `undefined` when no parsing is in progress at the moment.
17
+ */
8
18
  private current?;
9
19
  constructor(stream: ReadableStream<VSBuffer>);
10
20
  protected onStreamData(token: TSimpleDecoderToken): void;
@@ -4,10 +4,18 @@ import { TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
4
4
  import { ExclamationMark } from "../../simpleCodec/tokens/exclamationMark.js";
5
5
  import { LeftAngleBracket } from "../../simpleCodec/tokens/angleBrackets.js";
6
6
  import { ParserBase, TAcceptTokenResult } from "../../simpleCodec/parserBase.js";
7
+ /**
8
+ * The parser responsible for parsing the `<!--` sequence - the start of a `markdown comment`.
9
+ */
7
10
  export declare class PartialMarkdownCommentStart extends ParserBase<TSimpleDecoderToken, PartialMarkdownCommentStart | MarkdownCommentStart> {
8
11
  constructor(token: LeftAngleBracket);
9
12
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialMarkdownCommentStart | MarkdownCommentStart>;
10
13
  }
14
+ /**
15
+ * The parser responsible for a `markdown comment` sequence of tokens.
16
+ * E.g. `<!-- some comment` which may or may not end with `-->`. If it does,
17
+ * then the parser transitions to the {@link MarkdownComment} token.
18
+ */
11
19
  export declare class MarkdownCommentStart extends ParserBase<TSimpleDecoderToken, MarkdownCommentStart | MarkdownComment> {
12
20
  constructor(tokens: [
13
21
  LeftAngleBracket,
@@ -16,7 +24,19 @@ export declare class MarkdownCommentStart extends ParserBase<TSimpleDecoderToken
16
24
  Dash
17
25
  ]);
18
26
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<MarkdownCommentStart | MarkdownComment>;
27
+ /**
28
+ * Convert the current token sequence into a {@link MarkdownComment} token.
29
+ *
30
+ * Note! that this method marks the current parser object as "consumed"
31
+ * hence it should not be used after this method is called.
32
+ */
19
33
  asMarkdownComment(): MarkdownComment;
34
+ /**
35
+ * Get range of current token sequence.
36
+ */
20
37
  private get range();
38
+ /**
39
+ * Whether the current token sequence ends with two dashes.
40
+ */
21
41
  private get endsWithDashes();
22
42
  }
@@ -2,9 +2,19 @@ import { MarkdownImage } from "../tokens/markdownImage.js";
2
2
  import { TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
3
3
  import { ExclamationMark } from "../../simpleCodec/tokens/exclamationMark.js";
4
4
  import { ParserBase, TAcceptTokenResult } from "../../simpleCodec/parserBase.js";
5
+ /**
6
+ * The parser responsible for parsing the `markdown image` sequence of characters.
7
+ * E.g., `![alt text](./path/to/image.jpeg)` syntax.
8
+ */
5
9
  export declare class PartialMarkdownImage extends ParserBase<TSimpleDecoderToken, PartialMarkdownImage | MarkdownImage> {
10
+ /**
11
+ * Current active parser instance, if in the mode of actively parsing the markdown link sequence.
12
+ */
6
13
  private markdownLinkParser;
7
14
  constructor(token: ExclamationMark);
15
+ /**
16
+ * Get all currently available tokens of the `markdown link` sequence.
17
+ */
8
18
  get tokens(): readonly TSimpleDecoderToken[];
9
19
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialMarkdownImage | MarkdownImage>;
10
20
  }
@@ -3,15 +3,69 @@ import { TSimpleDecoderToken } from "../../simpleCodec/simpleDecoder.js";
3
3
  import { LeftBracket } from "../../simpleCodec/tokens/brackets.js";
4
4
  import { ParserBase, TAcceptTokenResult } from "../../simpleCodec/parserBase.js";
5
5
  import { LeftParenthesis } from "../../simpleCodec/tokens/parentheses.js";
6
+ /**
7
+ * The parser responsible for parsing a `markdown link caption` part of a markdown
8
+ * link (e.g., the `[caption text]` part of the `[caption text](./some/path)` link).
9
+ *
10
+ * The parsing process starts with single `[` token and collects all tokens until
11
+ * the first `]` token is encountered. In this successful case, the parser transitions
12
+ * into the {@link MarkdownLinkCaption} parser type which continues the general
13
+ * parsing process of the markdown link.
14
+ *
15
+ * Otherwise, if one of the stop characters defined in the {@link MARKDOWN_LINK_STOP_CHARACTERS}
16
+ * is encountered before the `]` token, the parsing process is aborted which is communicated to
17
+ * the caller by returning a `failure` result. In this case, the caller is assumed to be responsible
18
+ * for re-emitting the {@link tokens} accumulated so far as standalone entities since they are no
19
+ * longer represent a coherent token entity of a larger size.
20
+ */
6
21
  export declare class PartialMarkdownLinkCaption extends ParserBase<TSimpleDecoderToken, PartialMarkdownLinkCaption | MarkdownLinkCaption> {
7
22
  constructor(token: LeftBracket);
8
23
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialMarkdownLinkCaption | MarkdownLinkCaption>;
9
24
  }
25
+ /**
26
+ * The parser responsible for transitioning from a {@link PartialMarkdownLinkCaption}
27
+ * parser to the {@link PartialMarkdownLink} one, therefore serves a parser glue between
28
+ * the `[caption]` and the `(./some/path)` parts of the `[caption](./some/path)` link.
29
+ *
30
+ * The only successful case of this parser is the `(` token that initiated the process
31
+ * of parsing the `reference` part of a markdown link and in this case the parser
32
+ * transitions into the `PartialMarkdownLink` parser type.
33
+ *
34
+ * Any other character is considered a failure result. In this case, the caller is assumed
35
+ * to be responsible for re-emitting the {@link tokens} accumulated so far as standalone
36
+ * entities since they are no longer represent a coherent token entity of a larger size.
37
+ */
10
38
  export declare class MarkdownLinkCaption extends ParserBase<TSimpleDecoderToken, MarkdownLinkCaption | PartialMarkdownLink> {
11
39
  accept(token: TSimpleDecoderToken): TAcceptTokenResult<MarkdownLinkCaption | PartialMarkdownLink>;
12
40
  }
41
+ /**
42
+ * The parser responsible for parsing a `link reference` part of a markdown link
43
+ * (e.g., the `(./some/path)` part of the `[caption text](./some/path)` link).
44
+ *
45
+ * The parsing process starts with tokens that represent the `[caption]` part of a markdown
46
+ * link, followed by the `(` token. The parser collects all subsequent tokens until final closing
47
+ * parenthesis (`)`) is encountered (*\*see [1] below*). In this successful case, the parser object
48
+ * transitions into the {@link MarkdownLink} token type which signifies the end of the entire
49
+ * parsing process of the link text.
50
+ *
51
+ * Otherwise, if one of the stop characters defined in the {@link MARKDOWN_LINK_STOP_CHARACTERS}
52
+ * is encountered before the final `)` token, the parsing process is aborted which is communicated to
53
+ * the caller by returning a `failure` result. In this case, the caller is assumed to be responsible
54
+ * for re-emitting the {@link tokens} accumulated so far as standalone entities since they are no
55
+ * longer represent a coherent token entity of a larger size.
56
+ *
57
+ * `[1]` The `reference` part of the markdown link can contain any number of nested parenthesis, e.g.,
58
+ * `[caption](/some/p(th/file.md)` is a valid markdown link and a valid folder name, hence number
59
+ * of open parenthesis must match the number of closing ones and the path sequence is considered
60
+ * to be complete as soon as this requirement is met. Therefore the `final` word is used in
61
+ * the description comments above to highlight this important detail.
62
+ */
13
63
  export declare class PartialMarkdownLink extends ParserBase<TSimpleDecoderToken, PartialMarkdownLink | MarkdownLink> {
14
64
  protected readonly captionTokens: TSimpleDecoderToken[];
65
+ /**
66
+ * Number of open parenthesis in the sequence.
67
+ * See comment in the {@link accept} method for more details.
68
+ */
15
69
  private openParensCount;
16
70
  constructor(captionTokens: TSimpleDecoderToken[], token: LeftParenthesis);
17
71
  get tokens(): readonly TSimpleDecoderToken[];
@@ -1,8 +1,18 @@
1
1
  import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
2
2
  import { MarkdownToken } from "./markdownToken.js";
3
+ /**
4
+ * A token that represent a `markdown comment` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class MarkdownComment extends MarkdownToken {
4
8
  readonly text: string;
5
9
  constructor(range: Range, text: string);
10
+ /**
11
+ * Whether the comment has an end comment marker `-->`.
12
+ */
6
13
  get hasEndMarker(): boolean;
14
+ /**
15
+ * Returns a string representation of the token.
16
+ */
7
17
  toString(): string;
8
18
  }
@@ -1,12 +1,50 @@
1
1
  import { MarkdownToken } from "./markdownToken.js";
2
2
  import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
3
+ /**
4
+ * A token that represent a `markdown image` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class MarkdownImage extends MarkdownToken {
8
+ /**
9
+ * The caption of the image, including the `!` and `square brackets`.
10
+ */
4
11
  private readonly caption;
12
+ /**
13
+ * The reference of the image, including the parentheses.
14
+ */
5
15
  private readonly reference;
16
+ /**
17
+ * Check if this `markdown image link` points to a valid URL address.
18
+ */
6
19
  readonly isURL: boolean;
7
- constructor(lineNumber: number, columnNumber: number, caption: string, reference: string);
20
+ constructor(
21
+ /**
22
+ * The starting line number of the image (1-based indexing).
23
+ */
24
+ lineNumber: number,
25
+ /**
26
+ * The starting column number of the image (1-based indexing).
27
+ */
28
+ columnNumber: number,
29
+ /**
30
+ * The caption of the image, including the `!` and `square brackets`.
31
+ */
32
+ caption: string,
33
+ /**
34
+ * The reference of the image, including the parentheses.
35
+ */
36
+ reference: string);
8
37
  get text(): string;
38
+ /**
39
+ * Returns the `reference` part of the link without enclosing parentheses.
40
+ */
9
41
  get path(): string;
42
+ /**
43
+ * Get the range of the `link part` of the token.
44
+ */
10
45
  get linkRange(): IRange | undefined;
46
+ /**
47
+ * Returns a string representation of the token.
48
+ */
11
49
  toString(): string;
12
50
  }
@@ -1,12 +1,50 @@
1
1
  import { MarkdownToken } from "./markdownToken.js";
2
2
  import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
3
+ /**
4
+ * A token that represent a `markdown link` with a `range`. The `range`
5
+ * value reflects the position of the token in the original data.
6
+ */
3
7
  export declare class MarkdownLink extends MarkdownToken {
8
+ /**
9
+ * The caption of the original link, including the square brackets.
10
+ */
4
11
  readonly caption: string;
12
+ /**
13
+ * The reference of the original link, including the parentheses.
14
+ */
5
15
  readonly reference: string;
16
+ /**
17
+ * Check if this `markdown link` points to a valid URL address.
18
+ */
6
19
  readonly isURL: boolean;
7
- constructor(lineNumber: number, columnNumber: number, caption: string, reference: string);
20
+ constructor(
21
+ /**
22
+ * The starting line number of the link (1-based indexing).
23
+ */
24
+ lineNumber: number,
25
+ /**
26
+ * The starting column number of the link (1-based indexing).
27
+ */
28
+ columnNumber: number,
29
+ /**
30
+ * The caption of the original link, including the square brackets.
31
+ */
32
+ caption: string,
33
+ /**
34
+ * The reference of the original link, including the parentheses.
35
+ */
36
+ reference: string);
8
37
  get text(): string;
38
+ /**
39
+ * Returns the `reference` part of the link without enclosing parentheses.
40
+ */
9
41
  get path(): string;
42
+ /**
43
+ * Get the range of the `link part` of the token.
44
+ */
10
45
  get linkRange(): IRange | undefined;
46
+ /**
47
+ * Returns a string representation of the token.
48
+ */
11
49
  toString(): string;
12
50
  }
@@ -1,3 +1,7 @@
1
1
  import { BaseToken } from "../../baseToken.js";
2
+ /**
3
+ * Common base token that all `markdown` tokens should
4
+ * inherit from.
5
+ */
2
6
  export declare abstract class MarkdownToken extends BaseToken {
3
7
  }
@@ -3,11 +3,25 @@ import { ReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/comm
3
3
  import { BaseDecoder } from "../baseDecoder.js";
4
4
  import { MarkdownExtensionsToken } from "./tokens/markdownExtensionsToken.js";
5
5
  import { TSimpleDecoderToken } from "../simpleCodec/simpleDecoder.js";
6
+ /**
7
+ * Tokens produced by this decoder.
8
+ */
6
9
  export type TMarkdownExtensionsToken = MarkdownExtensionsToken | TSimpleDecoderToken;
10
+ /**
11
+ * Decoder responsible for decoding extensions of markdown syntax,
12
+ * e.g., a `Front Matter` header, etc.
13
+ */
7
14
  export declare class MarkdownExtensionsDecoder extends BaseDecoder<TMarkdownExtensionsToken, TSimpleDecoderToken> {
15
+ /**
16
+ * Current parser object that is responsible for parsing a sequence of tokens into
17
+ * some markdown entity. Set to `undefined` when no parsing is in progress at the moment.
18
+ */
8
19
  private current?;
9
20
  constructor(stream: ReadableStream<VSBuffer>);
10
21
  protected onStreamData(token: TSimpleDecoderToken): void;
11
22
  protected onStreamEnd(): void;
23
+ /**
24
+ * Re-emit tokens accumulated so far in the current parser object.
25
+ */
12
26
  protected reEmitCurrentTokens(): void;
13
27
  }