@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.
- package/package.json +36 -36
- package/vscode/src/vs/base/common/decorators/cancelPreviousCalls.d.ts +73 -0
- package/vscode/src/vs/base/common/policy.d.ts +27 -0
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNewNotebookContentEdits.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptFileReferenceErrors.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/asyncDecoder.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseDecoder.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/baseToken.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/compositeToken.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/constants.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/frontMatterDecoder.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterArray.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecord.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordName.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterRecord/frontMatterRecordNameWithDelimiter.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterSequence.d.ts +32 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterString.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/parsers/frontMatterValue.d.ts +41 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterArray.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterBoolean.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterRecord.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterSequence.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterString.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/frontMatterToken.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/linesDecoder.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/carriageReturn.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/line.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/linesCodec/tokens/newLine.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/markdownDecoder.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownComment.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownImage.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/parsers/markdownLink.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownComment.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownImage.d.ts +39 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownLink.d.ts +39 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownCodec/tokens/markdownToken.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/markdownExtensionsDecoder.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/parsers/frontMatterHeader.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterHeader.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/frontMatterMarker.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/markdownExtensionsCodec/tokens/markdownExtensionsToken.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/parserBase.d.ts +64 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/simpleDecoder.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/angleBrackets.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/at.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/brackets.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/colon.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/comma.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/curlyBraces.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dash.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/dollarSign.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/doubleQuote.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/exclamationMark.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/formFeed.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/hash.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/parentheses.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/quote.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/simpleToken.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/slash.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/space.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tab.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/verticalTab.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/word.d.ts +24 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/textToken.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStream.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStreamFromTextModel.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptCodec.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptDecoder.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptAtMentionParser.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptSlashCommandParser.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptTemplateVariableParser.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/parsers/promptVariableParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/fileReference.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptAtMention.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptSlashCommand.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptTemplateVariable.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptToken.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptVariable.d.ts +39 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/configMigration.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/filePromptContentsProvider.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/promptContentsProviderBase.d.ts +70 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderHovers.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkDiagnosticsProvider.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptPathAutocompletion.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceBase.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/providerInstanceManagerBase.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.d.ts +144 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/diagnostics.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/instructionsHeader.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/applyTo.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/enum.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/record.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/description.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/model.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/tools.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/modeHeader.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptParser.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/topError.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/objectCache.d.ts +83 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/observableDisposable.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.service.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatControllerHolder.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/taskHelpers.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +4 -0
|
@@ -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 Slash 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 { SpacingToken } from "./simpleToken.js";
|
|
2
|
+
/**
|
|
3
|
+
* A token that represent a `space` with a `range`. The `range`
|
|
4
|
+
* value reflects the position of the token in the original data.
|
|
5
|
+
*/
|
|
2
6
|
export declare class Space extends SpacingToken<" "> {
|
|
7
|
+
/**
|
|
8
|
+
* The underlying symbol of the `Space` 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 { SpacingToken } from "./simpleToken.js";
|
|
2
|
+
/**
|
|
3
|
+
* A token that represent a `tab` with a `range`. The `range`
|
|
4
|
+
* value reflects the position of the token in the original data.
|
|
5
|
+
*/
|
|
2
6
|
export declare class Tab extends SpacingToken<"\t"> {
|
|
7
|
+
/**
|
|
8
|
+
* The underlying symbol of the token.
|
|
9
|
+
*/
|
|
3
10
|
static readonly symbol: "\t";
|
|
11
|
+
/**
|
|
12
|
+
* Return text representation of the token.
|
|
13
|
+
*/
|
|
4
14
|
get text(): "\t";
|
|
15
|
+
/**
|
|
16
|
+
* Returns a string representation of the token.
|
|
17
|
+
*/
|
|
5
18
|
toString(): string;
|
|
6
19
|
}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { SpacingToken } from "./simpleToken.js";
|
|
2
|
+
/**
|
|
3
|
+
* Token that represent a `vertical tab` with a `range`. The `range`
|
|
4
|
+
* value reflects the position of the token in the original data.
|
|
5
|
+
*/
|
|
2
6
|
export declare class VerticalTab extends SpacingToken<"\v"> {
|
|
7
|
+
/**
|
|
8
|
+
* The underlying symbol of the `VerticalTab` token.
|
|
9
|
+
*/
|
|
3
10
|
static readonly symbol: "\v";
|
|
11
|
+
/**
|
|
12
|
+
* Return text representation of the token.
|
|
13
|
+
*/
|
|
4
14
|
get text(): "\v";
|
|
15
|
+
/**
|
|
16
|
+
* Returns a string representation of the token.
|
|
17
|
+
*/
|
|
5
18
|
toString(): string;
|
|
6
19
|
}
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
import { BaseToken } from "../../baseToken.js";
|
|
2
2
|
import { Line } from "../../linesCodec/tokens/line.js";
|
|
3
3
|
import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
4
|
+
/**
|
|
5
|
+
* A token that represent a word - a set of continuous
|
|
6
|
+
* characters without stop characters, like a `space`,
|
|
7
|
+
* a `tab`, or a `new line`.
|
|
8
|
+
*/
|
|
4
9
|
export declare class Word<TText extends string = string> extends BaseToken<TText> {
|
|
10
|
+
/**
|
|
11
|
+
* The string value of the word.
|
|
12
|
+
*/
|
|
5
13
|
readonly text: TText;
|
|
6
|
-
constructor(
|
|
14
|
+
constructor(
|
|
15
|
+
/**
|
|
16
|
+
* The word range.
|
|
17
|
+
*/
|
|
18
|
+
range: Range,
|
|
19
|
+
/**
|
|
20
|
+
* The string value of the word.
|
|
21
|
+
*/
|
|
22
|
+
text: TText);
|
|
23
|
+
/**
|
|
24
|
+
* Create new `Word` token with the given `text` and the range
|
|
25
|
+
* inside the given `Line` at the specified `column number`.
|
|
26
|
+
*/
|
|
7
27
|
static newOnLine(text: string, line: Line | number, atColumnNumber: number): Word;
|
|
28
|
+
/**
|
|
29
|
+
* Returns a string representation of the token.
|
|
30
|
+
*/
|
|
8
31
|
toString(): string;
|
|
9
32
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { type BaseToken } from "./baseToken.js";
|
|
2
2
|
import { CompositeToken } from "./compositeToken.js";
|
|
3
|
+
/**
|
|
4
|
+
* Tokens that represent a sequence of tokens that does not
|
|
5
|
+
* hold an additional meaning in the text.
|
|
6
|
+
*/
|
|
3
7
|
export declare class Text<TTokens extends readonly BaseToken[] = readonly BaseToken[]> extends CompositeToken<TTokens> {
|
|
4
8
|
toString(): string;
|
|
5
9
|
}
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/utils/objectStream.d.ts
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { ObservableDisposable } from "../../../utils/observableDisposable.js";
|
|
3
3
|
import { ReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/stream";
|
|
4
|
+
/**
|
|
5
|
+
* A readable stream of provided objects.
|
|
6
|
+
*/
|
|
4
7
|
export declare class ObjectStream<T extends object> extends ObservableDisposable implements ReadableStream<T> {
|
|
5
8
|
private readonly data;
|
|
6
9
|
private readonly cancellationToken?;
|
|
10
|
+
/**
|
|
11
|
+
* Flag that indicates whether the stream has ended.
|
|
12
|
+
*/
|
|
7
13
|
private ended;
|
|
14
|
+
/**
|
|
15
|
+
* Underlying writable stream instance.
|
|
16
|
+
*/
|
|
8
17
|
private readonly stream;
|
|
18
|
+
/**
|
|
19
|
+
* Interval reference that is used to periodically send
|
|
20
|
+
* objects to the stream in the background.
|
|
21
|
+
*/
|
|
9
22
|
private timeoutHandle;
|
|
10
23
|
constructor(data: Generator<T, undefined>, cancellationToken?: CancellationToken | undefined);
|
|
24
|
+
/**
|
|
25
|
+
* Starts process of sending data to the stream.
|
|
26
|
+
*
|
|
27
|
+
* @param stopAfterFirstSend whether to continue sending data to the stream
|
|
28
|
+
* or stop sending after the first batch of data is sent instead
|
|
29
|
+
*/
|
|
11
30
|
send(stopAfterFirstSend?: boolean): void;
|
|
31
|
+
/**
|
|
32
|
+
* Stop the data sending loop.
|
|
33
|
+
*/
|
|
12
34
|
stopStream(): this;
|
|
35
|
+
/**
|
|
36
|
+
* Sends a provided number of objects to the stream.
|
|
37
|
+
*/
|
|
13
38
|
private sendData;
|
|
39
|
+
/**
|
|
40
|
+
* Ends the stream and stops sending data objects.
|
|
41
|
+
*/
|
|
14
42
|
private end;
|
|
15
43
|
pause(): void;
|
|
16
44
|
resume(): void;
|
|
@@ -19,7 +47,16 @@ export declare class ObjectStream<T extends object> extends ObservableDisposable
|
|
|
19
47
|
on(event: "data", callback: (data: T) => void): void;
|
|
20
48
|
on(event: "error", callback: (err: Error) => void): void;
|
|
21
49
|
on(event: "end", callback: () => void): void;
|
|
50
|
+
/**
|
|
51
|
+
* Cleanup send interval and destroy the stream.
|
|
52
|
+
*/
|
|
22
53
|
dispose(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Create new instance of the stream from a provided array.
|
|
56
|
+
*/
|
|
23
57
|
static fromArray<T extends object>(array: T[], cancellationToken?: CancellationToken): ObjectStream<T>;
|
|
24
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Create a generator out of a provided array.
|
|
61
|
+
*/
|
|
25
62
|
export declare function arrayToGenerator<T extends NonNullable<unknown>>(array: T[]): Generator<T, undefined>;
|
|
@@ -2,4 +2,7 @@ import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common
|
|
|
2
2
|
import { ObjectStream } from "./objectStream.js";
|
|
3
3
|
import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
|
|
4
4
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
5
|
+
/**
|
|
6
|
+
* Create new instance of the stream from a provided text model.
|
|
7
|
+
*/
|
|
5
8
|
export declare function objectStreamFromTextModel(model: ITextModel, cancellationToken?: CancellationToken): ObjectStream<VSBuffer>;
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptCodec.d.ts
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
|
|
2
2
|
import { ReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/stream";
|
|
3
3
|
import { ChatPromptDecoder, TChatPromptToken } from "./chatPromptDecoder.js";
|
|
4
|
+
/**
|
|
5
|
+
* A codec is an object capable of encoding/decoding a stream of data transforming its messages.
|
|
6
|
+
* Useful for abstracting a data transfer or protocol logic on top of a stream of bytes.
|
|
7
|
+
*
|
|
8
|
+
* For instance, if protocol messages need to be transferred over `TCP` connection, a codec that
|
|
9
|
+
* encodes the messages into a sequence of bytes before sending it to a network socket. Likewise,
|
|
10
|
+
* on the other end of the connection, the same codec can decode the sequence of bytes back into
|
|
11
|
+
* a sequence of the protocol messages.
|
|
12
|
+
*/
|
|
4
13
|
export interface ICodec<T, K> {
|
|
14
|
+
/**
|
|
15
|
+
* Encode a stream of `K`s into a stream of `T`s.
|
|
16
|
+
*/
|
|
5
17
|
encode: (value: ReadableStream<K>) => ReadableStream<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Decode a stream of `T`s into a stream of `K`s.
|
|
20
|
+
*/
|
|
6
21
|
decode: (value: ReadableStream<T>) => ReadableStream<K>;
|
|
7
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* `ChatPromptCodec` type is a `ICodec<T, K>` with specific types for
|
|
25
|
+
* stream messages and return types of the `encode`/`decode` functions.
|
|
26
|
+
* @see {@link ICodec}
|
|
27
|
+
*/
|
|
8
28
|
interface IChatPromptCodec extends ICodec<VSBuffer, TChatPromptToken> {
|
|
29
|
+
/**
|
|
30
|
+
* Decode a stream of `VSBuffer`s into a stream of `TChatPromptToken`s.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link TChatPromptToken}
|
|
33
|
+
* @see {@link VSBuffer}
|
|
34
|
+
* @see {@link ChatPromptDecoder}
|
|
35
|
+
*/
|
|
9
36
|
decode: (value: ReadableStream<VSBuffer>) => ChatPromptDecoder;
|
|
10
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Codec that is capable to encode and decode tokens of an AI chatbot prompt message.
|
|
40
|
+
*/
|
|
11
41
|
export declare const ChatPromptCodec: IChatPromptCodec;
|
|
12
42
|
export {};
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/chatPromptDecoder.d.ts
CHANGED
|
@@ -6,11 +6,26 @@ import { PromptTemplateVariable } from "./tokens/promptTemplateVariable.js";
|
|
|
6
6
|
import { BaseDecoder } from "./base/baseDecoder.js";
|
|
7
7
|
import { PromptVariable, PromptVariableWithData } from "./tokens/promptVariable.js";
|
|
8
8
|
import { TMarkdownToken } from "./base/markdownCodec/markdownDecoder.js";
|
|
9
|
+
/**
|
|
10
|
+
* Tokens produced by this decoder.
|
|
11
|
+
*/
|
|
9
12
|
export type TChatPromptToken = TMarkdownToken | (PromptVariable | PromptVariableWithData) | PromptAtMention | PromptSlashCommand | PromptTemplateVariable;
|
|
13
|
+
/**
|
|
14
|
+
* Decoder for the common chatbot prompt message syntax.
|
|
15
|
+
* For instance, the file references `#file:./path/file.md` are handled by this decoder.
|
|
16
|
+
*/
|
|
10
17
|
export declare class ChatPromptDecoder extends BaseDecoder<TChatPromptToken, TMarkdownToken> {
|
|
18
|
+
/**
|
|
19
|
+
* Currently active parser object that is used to parse a well-known sequence of
|
|
20
|
+
* tokens, for instance, a `#file:/path/to/file.md` link that consists of `hash`,
|
|
21
|
+
* `word`, and `colon` tokens sequence plus the `file path` part that follows.
|
|
22
|
+
*/
|
|
11
23
|
private current?;
|
|
12
24
|
constructor(stream: ReadableStream<VSBuffer>);
|
|
13
25
|
protected onStreamData(token: TMarkdownToken): void;
|
|
14
26
|
protected onStreamEnd(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Re-emit tokens accumulated so far in the current parser object.
|
|
29
|
+
*/
|
|
15
30
|
protected reEmitCurrentTokens(): void;
|
|
16
31
|
}
|
|
@@ -2,10 +2,26 @@ import { PromptAtMention } from "../tokens/promptAtMention.js";
|
|
|
2
2
|
import { At } from "../base/simpleCodec/tokens/at.js";
|
|
3
3
|
import { TSimpleDecoderToken } from "../base/simpleCodec/simpleDecoder.js";
|
|
4
4
|
import { ParserBase, TAcceptTokenResult } from "../base/simpleCodec/parserBase.js";
|
|
5
|
+
/**
|
|
6
|
+
* List of characters that terminate the prompt at-mention sequence.
|
|
7
|
+
*/
|
|
5
8
|
export declare const STOP_CHARACTERS: readonly string[];
|
|
9
|
+
/**
|
|
10
|
+
* List of characters that cannot be in an at-mention name (excluding the {@link STOP_CHARACTERS}).
|
|
11
|
+
*/
|
|
6
12
|
export declare const INVALID_NAME_CHARACTERS: readonly string[];
|
|
13
|
+
/**
|
|
14
|
+
* The parser responsible for parsing a `prompt @mention` sequences.
|
|
15
|
+
* E.g., `@workspace` or `@github` participant mention.
|
|
16
|
+
*/
|
|
7
17
|
export declare class PartialPromptAtMention extends ParserBase<TSimpleDecoderToken, PartialPromptAtMention | PromptAtMention> {
|
|
8
18
|
constructor(token: At);
|
|
9
19
|
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialPromptAtMention | PromptAtMention>;
|
|
20
|
+
/**
|
|
21
|
+
* Try to convert current parser instance into a fully-parsed {@link PromptAtMention} token.
|
|
22
|
+
*
|
|
23
|
+
* @throws if sequence of tokens received so far do not constitute a valid prompt variable,
|
|
24
|
+
* for instance, if there is only `1` starting `@` token is available.
|
|
25
|
+
*/
|
|
10
26
|
asPromptAtMention(): PromptAtMention;
|
|
11
27
|
}
|
|
@@ -2,10 +2,26 @@ import { PromptSlashCommand } from "../tokens/promptSlashCommand.js";
|
|
|
2
2
|
import { Slash } from "../base/simpleCodec/tokens/slash.js";
|
|
3
3
|
import { TSimpleDecoderToken } from "../base/simpleCodec/simpleDecoder.js";
|
|
4
4
|
import { ParserBase, TAcceptTokenResult } from "../base/simpleCodec/parserBase.js";
|
|
5
|
+
/**
|
|
6
|
+
* List of characters that terminate the prompt at-mention sequence.
|
|
7
|
+
*/
|
|
5
8
|
export declare const STOP_CHARACTERS: readonly string[];
|
|
9
|
+
/**
|
|
10
|
+
* List of characters that cannot be in an at-mention name (excluding the {@link STOP_CHARACTERS}).
|
|
11
|
+
*/
|
|
6
12
|
export declare const INVALID_NAME_CHARACTERS: readonly string[];
|
|
13
|
+
/**
|
|
14
|
+
* The parser responsible for parsing a `prompt /command` sequences.
|
|
15
|
+
* E.g., `/search` or `/explain` command.
|
|
16
|
+
*/
|
|
7
17
|
export declare class PartialPromptSlashCommand extends ParserBase<TSimpleDecoderToken, PartialPromptSlashCommand | PromptSlashCommand> {
|
|
8
18
|
constructor(token: Slash);
|
|
9
19
|
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialPromptSlashCommand | PromptSlashCommand>;
|
|
20
|
+
/**
|
|
21
|
+
* Try to convert current parser instance into a fully-parsed {@link PromptSlashCommand} token.
|
|
22
|
+
*
|
|
23
|
+
* @throws if sequence of tokens received so far do not constitute a valid prompt variable,
|
|
24
|
+
* for instance, if there is only `1` starting `/` token is available.
|
|
25
|
+
*/
|
|
10
26
|
asPromptSlashCommand(): PromptSlashCommand;
|
|
11
27
|
}
|
|
@@ -2,14 +2,35 @@ import { PromptTemplateVariable } from "../tokens/promptTemplateVariable.js";
|
|
|
2
2
|
import { TSimpleDecoderToken } from "../base/simpleCodec/simpleDecoder.js";
|
|
3
3
|
import { DollarSign, LeftCurlyBrace } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens";
|
|
4
4
|
import { ParserBase, TAcceptTokenResult } from "../base/simpleCodec/parserBase.js";
|
|
5
|
+
/**
|
|
6
|
+
* Parsers of the `${variable}` token sequence in a prompt text.
|
|
7
|
+
*/
|
|
5
8
|
export type TPromptTemplateVariableParser = PartialPromptTemplateVariableStart | PartialPromptTemplateVariable;
|
|
9
|
+
/**
|
|
10
|
+
* Parser that handles start sequence of a `${variable}` token sequence in
|
|
11
|
+
* a prompt text. Transitions to {@link PartialPromptTemplateVariable} parser
|
|
12
|
+
* as soon as the `${` character sequence is found.
|
|
13
|
+
*/
|
|
6
14
|
export declare class PartialPromptTemplateVariableStart extends ParserBase<DollarSign | LeftCurlyBrace, PartialPromptTemplateVariableStart | PartialPromptTemplateVariable> {
|
|
7
15
|
constructor(token: DollarSign);
|
|
8
16
|
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialPromptTemplateVariableStart | PartialPromptTemplateVariable>;
|
|
9
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Parser that handles a partial `${variable}` token sequence in a prompt text.
|
|
20
|
+
*/
|
|
10
21
|
export declare class PartialPromptTemplateVariable extends ParserBase<TSimpleDecoderToken, PartialPromptTemplateVariable | PromptTemplateVariable> {
|
|
11
22
|
constructor(tokens: (DollarSign | LeftCurlyBrace)[]);
|
|
12
23
|
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialPromptTemplateVariable | PromptTemplateVariable>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a string representation of the prompt template variable
|
|
26
|
+
* contents, if any is present.
|
|
27
|
+
*/
|
|
13
28
|
private get contents();
|
|
29
|
+
/**
|
|
30
|
+
* Try to convert current parser instance into a {@link PromptTemplateVariable} token.
|
|
31
|
+
*
|
|
32
|
+
* @throws if:
|
|
33
|
+
* - current tokens sequence cannot be converted to a valid template variable token
|
|
34
|
+
*/
|
|
14
35
|
asPromptTemplateVariable(): PromptTemplateVariable;
|
|
15
36
|
}
|
|
@@ -2,15 +2,41 @@ import { PromptVariable, PromptVariableWithData } from "../tokens/promptVariable
|
|
|
2
2
|
import { Hash } from "../base/simpleCodec/tokens/hash.js";
|
|
3
3
|
import { TSimpleDecoderToken } from "../base/simpleCodec/simpleDecoder.js";
|
|
4
4
|
import { ParserBase, TAcceptTokenResult } from "../base/simpleCodec/parserBase.js";
|
|
5
|
+
/**
|
|
6
|
+
* List of characters that terminate the prompt variable sequence.
|
|
7
|
+
*/
|
|
5
8
|
export declare const STOP_CHARACTERS: readonly string[];
|
|
9
|
+
/**
|
|
10
|
+
* List of characters that cannot be in a variable name (excluding the {@link STOP_CHARACTERS}).
|
|
11
|
+
*/
|
|
6
12
|
export declare const INVALID_NAME_CHARACTERS: readonly string[];
|
|
13
|
+
/**
|
|
14
|
+
* The parser responsible for parsing a `prompt variable name`.
|
|
15
|
+
* E.g., `#selection` or `#codebase` variable. If the `:` character follows
|
|
16
|
+
* the variable name, the parser transitions to {@link PartialPromptVariableWithData}
|
|
17
|
+
* that is also able to parse the `data` part of the variable. E.g., the `#file` part
|
|
18
|
+
* of the `#file:/path/to/something.md` sequence.
|
|
19
|
+
*/
|
|
7
20
|
export declare class PartialPromptVariableName extends ParserBase<TSimpleDecoderToken, PartialPromptVariableName | PartialPromptVariableWithData | PromptVariable> {
|
|
8
21
|
constructor(token: Hash);
|
|
9
22
|
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialPromptVariableName | PartialPromptVariableWithData | PromptVariable>;
|
|
23
|
+
/**
|
|
24
|
+
* Try to convert current parser instance into a fully-parsed {@link PromptVariable} token.
|
|
25
|
+
*
|
|
26
|
+
* @throws if sequence of tokens received so far do not constitute a valid prompt variable,
|
|
27
|
+
* for instance, if there is only `1` starting `#` token is available.
|
|
28
|
+
*/
|
|
10
29
|
asPromptVariable(): PromptVariable;
|
|
11
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* The parser responsible for parsing a `prompt variable name` with `data`.
|
|
33
|
+
* E.g., the `/path/to/something.md` part of the `#file:/path/to/something.md` sequence.
|
|
34
|
+
*/
|
|
12
35
|
export declare class PartialPromptVariableWithData extends ParserBase<TSimpleDecoderToken, PartialPromptVariableWithData | PromptVariableWithData> {
|
|
13
36
|
constructor(tokens: readonly TSimpleDecoderToken[]);
|
|
14
37
|
accept(token: TSimpleDecoderToken): TAcceptTokenResult<PartialPromptVariableWithData | PromptVariableWithData>;
|
|
38
|
+
/**
|
|
39
|
+
* Try to convert current parser instance into a fully-parsed {@link asPromptVariableWithData} token.
|
|
40
|
+
*/
|
|
15
41
|
asPromptVariableWithData(): PromptVariableWithData;
|
|
16
42
|
}
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/fileReference.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { PromptVariableWithData } from "./promptVariable.js";
|
|
2
2
|
import { IRange, Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
|
+
/**
|
|
4
|
+
* Object represents a file reference token inside a chatbot prompt.
|
|
5
|
+
*/
|
|
3
6
|
export declare class FileReference extends PromptVariableWithData {
|
|
4
7
|
readonly path: string;
|
|
5
8
|
constructor(range: Range, path: string);
|
|
9
|
+
/**
|
|
10
|
+
* Create a {@link FileReference} from a {@link PromptVariableWithData} instance.
|
|
11
|
+
* @throws if variable name is not equal to {@link VARIABLE_NAME}.
|
|
12
|
+
*/
|
|
6
13
|
static from(variable: PromptVariableWithData): FileReference;
|
|
14
|
+
/**
|
|
15
|
+
* Get the range of the `link` part of the token (e.g.,
|
|
16
|
+
* the `/path/to/file.md` part of `#file:/path/to/file.md`).
|
|
17
|
+
*/
|
|
7
18
|
get linkRange(): IRange | undefined;
|
|
8
19
|
}
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptAtMention.d.ts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { PromptToken } from "./promptToken.js";
|
|
2
2
|
import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a `@mention` token in a prompt text.
|
|
5
|
+
*/
|
|
3
6
|
export declare class PromptAtMention extends PromptToken {
|
|
7
|
+
/**
|
|
8
|
+
* The name of a mention, excluding the `@` character at the start.
|
|
9
|
+
*/
|
|
4
10
|
readonly name: string;
|
|
5
|
-
constructor(range: Range,
|
|
11
|
+
constructor(range: Range,
|
|
12
|
+
/**
|
|
13
|
+
* The name of a mention, excluding the `@` character at the start.
|
|
14
|
+
*/
|
|
15
|
+
name: string);
|
|
16
|
+
/**
|
|
17
|
+
* Get full text of the token.
|
|
18
|
+
*/
|
|
6
19
|
get text(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Return a string representation of the token.
|
|
22
|
+
*/
|
|
7
23
|
toString(): string;
|
|
8
24
|
}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { PromptToken } from "./promptToken.js";
|
|
2
2
|
import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a `/command` token in a prompt text.
|
|
5
|
+
*/
|
|
3
6
|
export declare class PromptSlashCommand extends PromptToken {
|
|
7
|
+
/**
|
|
8
|
+
* The name of a command, excluding the `/` character at the start.
|
|
9
|
+
*/
|
|
4
10
|
readonly name: string;
|
|
5
|
-
constructor(range: Range,
|
|
11
|
+
constructor(range: Range,
|
|
12
|
+
/**
|
|
13
|
+
* The name of a command, excluding the `/` character at the start.
|
|
14
|
+
*/
|
|
15
|
+
name: string);
|
|
16
|
+
/**
|
|
17
|
+
* Get full text of the token.
|
|
18
|
+
*/
|
|
6
19
|
get text(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Return a string representation of the token.
|
|
22
|
+
*/
|
|
7
23
|
toString(): string;
|
|
8
24
|
}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import { PromptToken } from "./promptToken.js";
|
|
2
2
|
import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a `${variable}` token in a prompt text.
|
|
5
|
+
*/
|
|
3
6
|
export declare class PromptTemplateVariable extends PromptToken {
|
|
7
|
+
/**
|
|
8
|
+
* The contents of the template variable, excluding
|
|
9
|
+
* the surrounding `${}` characters.
|
|
10
|
+
*/
|
|
4
11
|
readonly contents: string;
|
|
5
|
-
constructor(range: Range,
|
|
12
|
+
constructor(range: Range,
|
|
13
|
+
/**
|
|
14
|
+
* The contents of the template variable, excluding
|
|
15
|
+
* the surrounding `${}` characters.
|
|
16
|
+
*/
|
|
17
|
+
contents: string);
|
|
18
|
+
/**
|
|
19
|
+
* Get full text of the token.
|
|
20
|
+
*/
|
|
6
21
|
get text(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Return a string representation of the token.
|
|
24
|
+
*/
|
|
7
25
|
toString(): string;
|
|
8
26
|
}
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/tokens/promptVariable.d.ts
CHANGED
|
@@ -1,14 +1,51 @@
|
|
|
1
1
|
import { PromptToken } from "./promptToken.js";
|
|
2
2
|
import { IRange, Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a `#variable` token in a prompt text.
|
|
5
|
+
*/
|
|
3
6
|
export declare class PromptVariable extends PromptToken {
|
|
7
|
+
/**
|
|
8
|
+
* The name of a prompt variable, excluding the `#` character at the start.
|
|
9
|
+
*/
|
|
4
10
|
readonly name: string;
|
|
5
|
-
constructor(range: Range,
|
|
11
|
+
constructor(range: Range,
|
|
12
|
+
/**
|
|
13
|
+
* The name of a prompt variable, excluding the `#` character at the start.
|
|
14
|
+
*/
|
|
15
|
+
name: string);
|
|
16
|
+
/**
|
|
17
|
+
* Get full text of the token.
|
|
18
|
+
*/
|
|
6
19
|
get text(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Return a string representation of the token.
|
|
22
|
+
*/
|
|
7
23
|
toString(): string;
|
|
8
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Represents a {@link PromptVariable} with additional data token in a prompt text.
|
|
27
|
+
* (e.g., `#variable:/path/to/file.md`)
|
|
28
|
+
*/
|
|
9
29
|
export declare class PromptVariableWithData extends PromptVariable {
|
|
30
|
+
/**
|
|
31
|
+
* The data of the variable, excluding the starting {@link DATA_SEPARATOR} character.
|
|
32
|
+
*/
|
|
10
33
|
readonly data: string;
|
|
11
|
-
constructor(fullRange: Range,
|
|
34
|
+
constructor(fullRange: Range,
|
|
35
|
+
/**
|
|
36
|
+
* The name of the variable, excluding the starting `#` character.
|
|
37
|
+
*/
|
|
38
|
+
name: string,
|
|
39
|
+
/**
|
|
40
|
+
* The data of the variable, excluding the starting {@link DATA_SEPARATOR} character.
|
|
41
|
+
*/
|
|
42
|
+
data: string);
|
|
43
|
+
/**
|
|
44
|
+
* Get full text of the token.
|
|
45
|
+
*/
|
|
12
46
|
get text(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Range of the `data` part of the variable.
|
|
49
|
+
*/
|
|
13
50
|
get dataRange(): IRange | undefined;
|
|
14
51
|
}
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/configMigration.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
2
2
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
3
3
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
/**
|
|
5
|
+
* Contribution that migrates the old config setting value to a new one.
|
|
6
|
+
*
|
|
7
|
+
* Note! This is a temporary logic and can be removed on ~2026-04-29.
|
|
8
|
+
*/
|
|
4
9
|
export declare class ConfigMigration implements IWorkbenchContribution {
|
|
5
10
|
private readonly logService;
|
|
6
11
|
private readonly configService;
|
|
7
12
|
constructor(logService: ILogService, configService: IConfigurationService);
|
|
13
|
+
/**
|
|
14
|
+
* The main function that implements the migration logic.
|
|
15
|
+
*/
|
|
8
16
|
private migrateConfig;
|
|
9
17
|
}
|
|
@@ -7,6 +7,10 @@ import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/
|
|
|
7
7
|
import { IPromptContentsProviderOptions, PromptContentsProviderBase } from "./promptContentsProviderBase.js";
|
|
8
8
|
import { FileChangesEvent } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files";
|
|
9
9
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
10
|
+
/**
|
|
11
|
+
* Prompt contents provider for a file on the disk referenced by
|
|
12
|
+
* a provided {@link URI}.
|
|
13
|
+
*/
|
|
10
14
|
export declare class FilePromptContentProvider extends PromptContentsProviderBase<FileChangesEvent> implements IPromptContentsProvider {
|
|
11
15
|
readonly uri: URI;
|
|
12
16
|
private readonly fileService;
|
|
@@ -15,9 +19,20 @@ export declare class FilePromptContentProvider extends PromptContentsProviderBas
|
|
|
15
19
|
get sourceName(): string;
|
|
16
20
|
get languageId(): string;
|
|
17
21
|
constructor(uri: URI, options: IPromptContentsProviderOptions, fileService: IFileService, modelService: IModelService, languageService: ILanguageService);
|
|
22
|
+
/**
|
|
23
|
+
* Creates a stream of lines from the file based on the changes listed in
|
|
24
|
+
* the provided event.
|
|
25
|
+
*
|
|
26
|
+
* @param event - event that describes the changes in the file; `'full'` is
|
|
27
|
+
* the special value that means that all contents have changed
|
|
28
|
+
* @param cancellationToken - token that cancels this operation
|
|
29
|
+
*/
|
|
18
30
|
protected getContentsStream(_event: FileChangesEvent | "full", cancellationToken?: CancellationToken): Promise<VSBufferReadableStream>;
|
|
19
31
|
createNew(promptContentsSource: {
|
|
20
32
|
uri: URI;
|
|
21
33
|
}, options: IPromptContentsProviderOptions): IPromptContentsProvider;
|
|
34
|
+
/**
|
|
35
|
+
* String representation of this object.
|
|
36
|
+
*/
|
|
22
37
|
toString(): string;
|
|
23
38
|
}
|