@codingame/monaco-vscode-chat-service-override 16.1.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -6
- package/package.json +30 -27
- package/vscode/src/vs/base/common/objectCache.d.ts +1 -1
- package/vscode/src/vs/base/common/objectCache.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +41 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +410 -443
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +3 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +32 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +159 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +244 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -168
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +48 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +46 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +118 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +45 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +48 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +53 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +9 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +80 -268
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +214 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +186 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +129 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +313 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +12 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -181
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +484 -384
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +187 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +264 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +28 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +41 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +8 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +2 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +20 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +73 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +44 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +24 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +8 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +84 -80
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +27 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +74 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +65 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.js +3 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.js +14 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +17 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +223 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +28 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +20 -31
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +15 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +12 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +0 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +0 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +0 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +0 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +0 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +0 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +0 -117
- /package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.d.ts +0 -0
|
@@ -1,37 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
|
-
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
7
|
-
import { ChatRequestDynamicVariablePart, ChatRequestToolPart } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
8
|
-
import { ChatAgentLocation, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
9
|
-
import { showEditsView, showChatView } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
10
3
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
11
|
-
import { ChatDynamicVariableModel } from '@codingame/monaco-vscode-
|
|
4
|
+
import { ChatDynamicVariableModel } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables';
|
|
12
5
|
|
|
13
6
|
let ChatVariablesService = class ChatVariablesService {
|
|
14
|
-
constructor(chatWidgetService
|
|
7
|
+
constructor(chatWidgetService) {
|
|
15
8
|
this.chatWidgetService = chatWidgetService;
|
|
16
|
-
this.viewsService = viewsService;
|
|
17
|
-
this.configurationService = configurationService;
|
|
18
|
-
}
|
|
19
|
-
resolveVariables(prompt, attachedContextVariables) {
|
|
20
|
-
let resolvedVariables = [];
|
|
21
|
-
prompt.parts
|
|
22
|
-
.forEach((part, i) => {
|
|
23
|
-
if (part instanceof ChatRequestDynamicVariablePart || part instanceof ChatRequestToolPart) {
|
|
24
|
-
resolvedVariables[i] = part.toVariableEntry();
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
resolvedVariables = coalesce(resolvedVariables);
|
|
28
|
-
resolvedVariables.sort((a, b) => b.range.start - a.range.start);
|
|
29
|
-
if (attachedContextVariables) {
|
|
30
|
-
resolvedVariables.push(...attachedContextVariables);
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
variables: resolvedVariables,
|
|
34
|
-
};
|
|
35
9
|
}
|
|
36
10
|
getDynamicVariables(sessionId) {
|
|
37
11
|
const widget = this.chatWidgetService.getWidgetBySessionId(sessionId);
|
|
@@ -44,34 +18,16 @@ let ChatVariablesService = class ChatVariablesService {
|
|
|
44
18
|
}
|
|
45
19
|
return model.variables;
|
|
46
20
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const unifiedViewEnabled = !!this.configurationService.getValue(ChatConfiguration.UnifiedChatView);
|
|
52
|
-
const widget = location === ChatAgentLocation.EditingSession && !unifiedViewEnabled
|
|
53
|
-
? await showEditsView(this.viewsService)
|
|
54
|
-
: (this.chatWidgetService.lastFocusedWidget ?? (await showChatView(this.viewsService)));
|
|
55
|
-
if (!widget || !widget.viewModel) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const key = name.toLowerCase();
|
|
59
|
-
if (key === 'file' && typeof value !== 'string') {
|
|
60
|
-
const uri = URI.isUri(value) ? value : value.uri;
|
|
61
|
-
const range = 'range' in value ? value.range : undefined;
|
|
62
|
-
await widget.attachmentModel.addFile(uri, range);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (key === 'folder' && URI.isUri(value)) {
|
|
66
|
-
widget.attachmentModel.addFolder(value);
|
|
67
|
-
return;
|
|
21
|
+
getSelectedTools(sessionId) {
|
|
22
|
+
const widget = this.chatWidgetService.getWidgetBySessionId(sessionId);
|
|
23
|
+
if (!widget) {
|
|
24
|
+
return [];
|
|
68
25
|
}
|
|
26
|
+
return widget.input.selectedToolsModel.tools.get();
|
|
69
27
|
}
|
|
70
28
|
};
|
|
71
29
|
ChatVariablesService = ( __decorate([
|
|
72
|
-
( __param(0, IChatWidgetService))
|
|
73
|
-
( __param(1, IViewsService)),
|
|
74
|
-
( __param(2, IConfigurationService))
|
|
30
|
+
( __param(0, IChatWidgetService))
|
|
75
31
|
], ChatVariablesService));
|
|
76
32
|
|
|
77
33
|
export { ChatVariablesService };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
2
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
3
|
+
import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
|
|
4
|
+
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
7
|
+
import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
|
|
8
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
9
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
10
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
11
|
+
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
12
|
+
import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
13
|
+
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
14
|
+
import { IChatViewTitleActionContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatActions";
|
|
15
|
+
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
16
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
17
|
+
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
18
|
+
import { ChatWidget, IChatViewState } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatWidget";
|
|
19
|
+
import { IViewWelcomeDelegate } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController";
|
|
20
|
+
export declare const CHAT_SIDEBAR_OLD_VIEW_PANEL_ID = "workbench.panel.chatSidebar";
|
|
21
|
+
export declare const CHAT_SIDEBAR_PANEL_ID = "workbench.panel.chat";
|
|
22
|
+
export declare class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
|
|
23
|
+
private readonly chatOptions;
|
|
24
|
+
private readonly storageService;
|
|
25
|
+
private readonly chatService;
|
|
26
|
+
private readonly chatAgentService;
|
|
27
|
+
private readonly logService;
|
|
28
|
+
private readonly layoutService;
|
|
29
|
+
private _widget;
|
|
30
|
+
get widget(): ChatWidget;
|
|
31
|
+
private readonly modelDisposables;
|
|
32
|
+
private memento;
|
|
33
|
+
private readonly viewState;
|
|
34
|
+
private defaultParticipantRegistrationFailed;
|
|
35
|
+
private didUnregisterProvider;
|
|
36
|
+
private _restoringSession;
|
|
37
|
+
constructor(chatOptions: {
|
|
38
|
+
location: ChatAgentLocation.Panel;
|
|
39
|
+
}, options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, hoverService: IHoverService, storageService: IStorageService, chatService: IChatService, chatAgentService: IChatAgentService, logService: ILogService, layoutService: ILayoutService);
|
|
40
|
+
getActionsContext(): IChatViewTitleActionContext | undefined;
|
|
41
|
+
private updateModel;
|
|
42
|
+
shouldShowWelcome(): boolean;
|
|
43
|
+
private getTransferredOrPersistedSessionInfo;
|
|
44
|
+
protected renderBody(parent: HTMLElement): Promise<void>;
|
|
45
|
+
acceptInput(query?: string): void;
|
|
46
|
+
private clear;
|
|
47
|
+
loadSession(sessionId: string, viewState?: IChatViewState): Promise<void>;
|
|
48
|
+
focusInput(): void;
|
|
49
|
+
focus(): void;
|
|
50
|
+
protected layoutBody(height: number, width: number): void;
|
|
51
|
+
saveState(): void;
|
|
52
|
+
private updateViewState;
|
|
53
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { getWindow, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
7
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
9
|
+
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
10
|
+
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
11
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
12
|
+
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
13
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
14
|
+
import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
|
|
15
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
16
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
17
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
18
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
19
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
20
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
21
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
22
|
+
import { editorBackground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
|
|
23
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
|
|
24
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
|
|
25
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
|
|
26
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
27
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
28
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
29
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
30
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
31
|
+
import { ViewPane } from '@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
32
|
+
import { Memento } from '@codingame/monaco-vscode-c8227507-8e59-53d6-b50b-71c0ab384cf4-common/vscode/vs/workbench/common/memento';
|
|
33
|
+
import { SIDE_BAR_FOREGROUND } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
34
|
+
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
35
|
+
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
36
|
+
import { ChatModelInitState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
37
|
+
import { CHAT_PROVIDER_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatParticipantContribTypes';
|
|
38
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
39
|
+
import { ChatAgentLocation, ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
40
|
+
import { ChatWidget } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
41
|
+
import { ChatViewWelcomeController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController';
|
|
42
|
+
|
|
43
|
+
const CHAT_SIDEBAR_PANEL_ID = 'workbench.panel.chat';
|
|
44
|
+
let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
45
|
+
get widget() { return this._widget; }
|
|
46
|
+
constructor(chatOptions, options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, storageService, chatService, chatAgentService, logService, layoutService) {
|
|
47
|
+
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
|
|
48
|
+
this.chatOptions = chatOptions;
|
|
49
|
+
this.storageService = storageService;
|
|
50
|
+
this.chatService = chatService;
|
|
51
|
+
this.chatAgentService = chatAgentService;
|
|
52
|
+
this.logService = logService;
|
|
53
|
+
this.layoutService = layoutService;
|
|
54
|
+
this.modelDisposables = this._register(( new DisposableStore()));
|
|
55
|
+
this.defaultParticipantRegistrationFailed = false;
|
|
56
|
+
this.didUnregisterProvider = false;
|
|
57
|
+
this.memento = ( new Memento('interactive-session-view-' + CHAT_PROVIDER_ID, this.storageService));
|
|
58
|
+
this.viewState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
59
|
+
if (this.chatOptions.location === ChatAgentLocation.Panel && !this.viewState.hasMigratedCurrentSession) {
|
|
60
|
+
const editsMemento = ( new Memento(
|
|
61
|
+
'interactive-session-view-' + CHAT_PROVIDER_ID + `-edits`,
|
|
62
|
+
this.storageService
|
|
63
|
+
));
|
|
64
|
+
const lastEditsState = editsMemento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
65
|
+
if (lastEditsState.sessionId) {
|
|
66
|
+
this.logService.trace(`ChatViewPane: last edits session was ${lastEditsState.sessionId}`);
|
|
67
|
+
if (!this.chatService.isPersistedSessionEmpty(lastEditsState.sessionId)) {
|
|
68
|
+
this.logService.info(`ChatViewPane: migrating ${lastEditsState.sessionId} to unified view`);
|
|
69
|
+
this.viewState.sessionId = lastEditsState.sessionId;
|
|
70
|
+
this.viewState.inputValue = lastEditsState.inputValue;
|
|
71
|
+
this.viewState.inputState = {
|
|
72
|
+
...lastEditsState.inputState,
|
|
73
|
+
chatMode: lastEditsState.inputState?.chatMode ?? ChatMode.Edit
|
|
74
|
+
};
|
|
75
|
+
this.viewState.hasMigratedCurrentSession = true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
this._register(this.chatAgentService.onDidChangeAgents(() => {
|
|
80
|
+
if (this.chatAgentService.getDefaultAgent(this.chatOptions?.location)) {
|
|
81
|
+
if (!this._widget?.viewModel && !this._restoringSession) {
|
|
82
|
+
const info = this.getTransferredOrPersistedSessionInfo();
|
|
83
|
+
this._restoringSession =
|
|
84
|
+
(info.sessionId ? this.chatService.getOrRestoreSession(info.sessionId) : Promise.resolve(undefined)).then(async (model) => {
|
|
85
|
+
if (!this._widget) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const wasVisible = this._widget.visible;
|
|
89
|
+
try {
|
|
90
|
+
this._widget.setVisible(false);
|
|
91
|
+
await this.updateModel(model, info.inputValue || info.mode ? { inputState: { chatMode: info.mode }, inputValue: info.inputValue } : undefined);
|
|
92
|
+
this.defaultParticipantRegistrationFailed = false;
|
|
93
|
+
this.didUnregisterProvider = false;
|
|
94
|
+
this._onDidChangeViewWelcomeState.fire();
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
this.widget.setVisible(wasVisible);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
this._restoringSession.finally(() => this._restoringSession = undefined);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (this._widget?.viewModel?.initState === ChatModelInitState.Initialized) {
|
|
104
|
+
this.didUnregisterProvider = true;
|
|
105
|
+
}
|
|
106
|
+
this._onDidChangeViewWelcomeState.fire();
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
getActionsContext() {
|
|
110
|
+
return this.widget?.viewModel ? {
|
|
111
|
+
sessionId: this.widget.viewModel.sessionId,
|
|
112
|
+
$mid: MarshalledId.ChatViewContext
|
|
113
|
+
} : undefined;
|
|
114
|
+
}
|
|
115
|
+
async updateModel(model, viewState) {
|
|
116
|
+
this.modelDisposables.clear();
|
|
117
|
+
model = model ?? (this.chatService.transferredSessionData?.sessionId && this.chatService.transferredSessionData?.location === this.chatOptions.location
|
|
118
|
+
? await this.chatService.getOrRestoreSession(this.chatService.transferredSessionData.sessionId)
|
|
119
|
+
: this.chatService.startSession(this.chatOptions.location, CancellationToken.None));
|
|
120
|
+
if (!model) {
|
|
121
|
+
throw ( new Error('Could not start chat session'));
|
|
122
|
+
}
|
|
123
|
+
if (viewState) {
|
|
124
|
+
this.updateViewState(viewState);
|
|
125
|
+
}
|
|
126
|
+
this.viewState.sessionId = model.sessionId;
|
|
127
|
+
this._widget.setModel(model, { ...this.viewState });
|
|
128
|
+
this.updateActions();
|
|
129
|
+
}
|
|
130
|
+
shouldShowWelcome() {
|
|
131
|
+
const noPersistedSessions = !this.chatService.hasSessions();
|
|
132
|
+
const hasCoreAgent = ( this.chatAgentService.getAgents().some(
|
|
133
|
+
agent => agent.isCore && agent.locations.includes(this.chatOptions.location)
|
|
134
|
+
));
|
|
135
|
+
const shouldShow = !hasCoreAgent && (this.didUnregisterProvider || !this._widget?.viewModel && noPersistedSessions || this.defaultParticipantRegistrationFailed);
|
|
136
|
+
this.logService.trace(`ChatViewPane#shouldShowWelcome(${this.chatOptions.location}) = ${shouldShow}: hasCoreAgent=${hasCoreAgent} didUnregister=${this.didUnregisterProvider} || noViewModel=${!this._widget?.viewModel} && noPersistedSessions=${noPersistedSessions} || defaultParticipantRegistrationFailed=${this.defaultParticipantRegistrationFailed}`);
|
|
137
|
+
return !!shouldShow;
|
|
138
|
+
}
|
|
139
|
+
getTransferredOrPersistedSessionInfo() {
|
|
140
|
+
if (this.chatService.transferredSessionData?.location === this.chatOptions.location) {
|
|
141
|
+
const sessionId = this.chatService.transferredSessionData.sessionId;
|
|
142
|
+
return {
|
|
143
|
+
sessionId,
|
|
144
|
+
inputValue: this.chatService.transferredSessionData.inputValue,
|
|
145
|
+
mode: this.chatService.transferredSessionData.mode
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
return { sessionId: this.viewState.sessionId };
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async renderBody(parent) {
|
|
153
|
+
try {
|
|
154
|
+
super.renderBody(parent);
|
|
155
|
+
this._register(this.instantiationService.createInstance(ChatViewWelcomeController, parent, this, this.chatOptions.location));
|
|
156
|
+
const scopedInstantiationService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService]))));
|
|
157
|
+
const locationBasedColors = this.getLocationBasedColors();
|
|
158
|
+
const editorOverflowNode = this.layoutService.getContainer(getWindow(parent)).appendChild($('.chat-editor-overflow.monaco-editor'));
|
|
159
|
+
this._register({ dispose: () => editorOverflowNode.remove() });
|
|
160
|
+
this._widget = this._register(scopedInstantiationService.createInstance(ChatWidget, this.chatOptions.location, { viewId: this.id }, {
|
|
161
|
+
autoScroll: mode => mode !== ChatMode.Ask,
|
|
162
|
+
renderFollowups: this.chatOptions.location === ChatAgentLocation.Panel,
|
|
163
|
+
supportsFileReferences: true,
|
|
164
|
+
rendererOptions: {
|
|
165
|
+
renderTextEditsAsSummary: (uri) => {
|
|
166
|
+
return true;
|
|
167
|
+
},
|
|
168
|
+
referencesExpandedWhenEmptyResponse: false,
|
|
169
|
+
progressMessageAtBottomOfResponse: mode => mode !== ChatMode.Ask,
|
|
170
|
+
},
|
|
171
|
+
editorOverflowWidgetsDomNode: editorOverflowNode,
|
|
172
|
+
enableImplicitContext: this.chatOptions.location === ChatAgentLocation.Panel,
|
|
173
|
+
enableWorkingSet: 'explicit',
|
|
174
|
+
supportsChangingModes: true,
|
|
175
|
+
}, {
|
|
176
|
+
listForeground: SIDE_BAR_FOREGROUND,
|
|
177
|
+
listBackground: locationBasedColors.background,
|
|
178
|
+
overlayBackground: locationBasedColors.overlayBackground,
|
|
179
|
+
inputEditorBackground: locationBasedColors.background,
|
|
180
|
+
resultEditorBackground: editorBackground,
|
|
181
|
+
}));
|
|
182
|
+
this._register(this.onDidChangeBodyVisibility(visible => {
|
|
183
|
+
this._widget.setVisible(visible);
|
|
184
|
+
}));
|
|
185
|
+
this._register(this._widget.onDidClear(() => this.clear()));
|
|
186
|
+
this._widget.render(parent);
|
|
187
|
+
const info = this.getTransferredOrPersistedSessionInfo();
|
|
188
|
+
const disposeListener = this._register(this.chatService.onDidDisposeSession((e) => {
|
|
189
|
+
if (e.reason === 'initializationFailed') {
|
|
190
|
+
this.defaultParticipantRegistrationFailed = true;
|
|
191
|
+
disposeListener?.dispose();
|
|
192
|
+
this._onDidChangeViewWelcomeState.fire();
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
195
|
+
const model = info.sessionId ? await this.chatService.getOrRestoreSession(info.sessionId) : undefined;
|
|
196
|
+
await this.updateModel(model, info.inputValue || info.mode ? { inputState: { chatMode: info.mode }, inputValue: info.inputValue } : undefined);
|
|
197
|
+
}
|
|
198
|
+
catch (e) {
|
|
199
|
+
this.logService.error(e);
|
|
200
|
+
throw e;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
acceptInput(query) {
|
|
204
|
+
this._widget.acceptInput(query);
|
|
205
|
+
}
|
|
206
|
+
async clear() {
|
|
207
|
+
if (this.widget.viewModel) {
|
|
208
|
+
await this.chatService.clearSession(this.widget.viewModel.sessionId);
|
|
209
|
+
}
|
|
210
|
+
this.updateViewState();
|
|
211
|
+
await this.updateModel(undefined);
|
|
212
|
+
this.updateActions();
|
|
213
|
+
}
|
|
214
|
+
async loadSession(sessionId, viewState) {
|
|
215
|
+
if (this.widget.viewModel) {
|
|
216
|
+
await this.chatService.clearSession(this.widget.viewModel.sessionId);
|
|
217
|
+
}
|
|
218
|
+
const newModel = await this.chatService.getOrRestoreSession(sessionId);
|
|
219
|
+
await this.updateModel(newModel, viewState);
|
|
220
|
+
}
|
|
221
|
+
focusInput() {
|
|
222
|
+
this._widget.focusInput();
|
|
223
|
+
}
|
|
224
|
+
focus() {
|
|
225
|
+
super.focus();
|
|
226
|
+
this._widget.focusInput();
|
|
227
|
+
}
|
|
228
|
+
layoutBody(height, width) {
|
|
229
|
+
super.layoutBody(height, width);
|
|
230
|
+
this._widget.layout(height, width);
|
|
231
|
+
}
|
|
232
|
+
saveState() {
|
|
233
|
+
if (this._widget) {
|
|
234
|
+
this._widget.saveState();
|
|
235
|
+
this.updateViewState();
|
|
236
|
+
this.memento.saveMemento();
|
|
237
|
+
}
|
|
238
|
+
super.saveState();
|
|
239
|
+
}
|
|
240
|
+
updateViewState(viewState) {
|
|
241
|
+
const newViewState = viewState ?? this._widget.getViewState();
|
|
242
|
+
for (const [key, value] of Object.entries(newViewState)) {
|
|
243
|
+
this.viewState[key] = value;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
ChatViewPane = ( __decorate([
|
|
248
|
+
( __param(2, IKeybindingService)),
|
|
249
|
+
( __param(3, IContextMenuService)),
|
|
250
|
+
( __param(4, IConfigurationService)),
|
|
251
|
+
( __param(5, IContextKeyService)),
|
|
252
|
+
( __param(6, IViewDescriptorService)),
|
|
253
|
+
( __param(7, IInstantiationService)),
|
|
254
|
+
( __param(8, IOpenerService)),
|
|
255
|
+
( __param(9, IThemeService)),
|
|
256
|
+
( __param(10, IHoverService)),
|
|
257
|
+
( __param(11, IStorageService)),
|
|
258
|
+
( __param(12, IChatService)),
|
|
259
|
+
( __param(13, IChatAgentService)),
|
|
260
|
+
( __param(14, ILogService)),
|
|
261
|
+
( __param(15, ILayoutService))
|
|
262
|
+
], ChatViewPane));
|
|
263
|
+
|
|
264
|
+
export { CHAT_SIDEBAR_PANEL_ID, ChatViewPane };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { ICodeBlockActionContextProvider } from "@codingame/monaco-vscode-
|
|
2
|
+
import { ICodeBlockActionContextProvider } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
3
3
|
import { IChatCodeBlockContextProviderService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
4
4
|
export declare class ChatCodeBlockContextProviderService implements IChatCodeBlockContextProviderService {
|
|
5
5
|
_serviceBrand: undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
4
|
-
import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { Disposable, MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
5
6
|
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
6
7
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
8
|
+
import { TrackedRangeStickiness } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
7
9
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
10
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
9
11
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
@@ -18,11 +20,11 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
18
20
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
19
21
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
20
22
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
21
|
-
import { chatSlashCommandBackground, chatSlashCommandForeground } from '@codingame/monaco-vscode-
|
|
22
|
-
import { ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, ChatRequestTextPart, ChatRequestToolPart, chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-
|
|
23
|
-
import { ChatRequestParser } from '@codingame/monaco-vscode-
|
|
24
|
-
import { ChatWidget } from '@codingame/monaco-vscode-
|
|
25
|
-
import { dynamicVariableDecorationType } from '@codingame/monaco-vscode-
|
|
23
|
+
import { chatSlashCommandBackground, chatSlashCommandForeground } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/common/chatColors';
|
|
24
|
+
import { ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, ChatRequestSlashPromptPart, ChatRequestTextPart, ChatRequestToolPart, chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
25
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
26
|
+
import { ChatWidget } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
27
|
+
import { dynamicVariableDecorationType } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables';
|
|
26
28
|
|
|
27
29
|
const decorationDescription = 'chat';
|
|
28
30
|
const placeholderDecorationType = 'chat-session-detail';
|
|
@@ -42,8 +44,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
42
44
|
this.previouslyUsedAgents = ( new Set());
|
|
43
45
|
this.viewModelDisposables = this._register(( new MutableDisposable()));
|
|
44
46
|
this.codeEditorService.registerDecorationType(decorationDescription, placeholderDecorationType, {});
|
|
45
|
-
this.
|
|
46
|
-
this.updateRegisteredDecorationTypes();
|
|
47
|
+
this.registeredDecorationTypes();
|
|
47
48
|
this.updateInputEditorDecorations();
|
|
48
49
|
this._register(this.widget.inputEditor.onDidChangeModelContent(() => this.updateInputEditorDecorations()));
|
|
49
50
|
this._register(this.widget.onDidChangeParsedInput(() => this.updateInputEditorDecorations()));
|
|
@@ -65,27 +66,28 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
65
66
|
}
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
this.codeEditorService.removeDecorationType(variableTextDecorationType);
|
|
70
|
-
this.codeEditorService.removeDecorationType(dynamicVariableDecorationType);
|
|
71
|
-
this.codeEditorService.removeDecorationType(slashCommandTextDecorationType);
|
|
72
|
-
const theme = this.themeService.getColorTheme();
|
|
69
|
+
registeredDecorationTypes() {
|
|
73
70
|
this.codeEditorService.registerDecorationType(decorationDescription, slashCommandTextDecorationType, {
|
|
74
|
-
color:
|
|
75
|
-
backgroundColor:
|
|
71
|
+
color: themeColorFromId(chatSlashCommandForeground),
|
|
72
|
+
backgroundColor: themeColorFromId(chatSlashCommandBackground),
|
|
76
73
|
borderRadius: '3px'
|
|
77
74
|
});
|
|
78
75
|
this.codeEditorService.registerDecorationType(decorationDescription, variableTextDecorationType, {
|
|
79
|
-
color:
|
|
80
|
-
backgroundColor:
|
|
76
|
+
color: themeColorFromId(chatSlashCommandForeground),
|
|
77
|
+
backgroundColor: themeColorFromId(chatSlashCommandBackground),
|
|
81
78
|
borderRadius: '3px'
|
|
82
79
|
});
|
|
83
80
|
this.codeEditorService.registerDecorationType(decorationDescription, dynamicVariableDecorationType, {
|
|
84
|
-
color:
|
|
85
|
-
backgroundColor:
|
|
86
|
-
borderRadius: '3px'
|
|
81
|
+
color: themeColorFromId(chatSlashCommandForeground),
|
|
82
|
+
backgroundColor: themeColorFromId(chatSlashCommandBackground),
|
|
83
|
+
borderRadius: '3px',
|
|
84
|
+
rangeBehavior: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
|
|
87
85
|
});
|
|
88
|
-
this.
|
|
86
|
+
this._register(toDisposable(() => {
|
|
87
|
+
this.codeEditorService.removeDecorationType(variableTextDecorationType);
|
|
88
|
+
this.codeEditorService.removeDecorationType(dynamicVariableDecorationType);
|
|
89
|
+
this.codeEditorService.removeDecorationType(slashCommandTextDecorationType);
|
|
90
|
+
}));
|
|
89
91
|
}
|
|
90
92
|
getPlaceholderColor() {
|
|
91
93
|
const theme = this.themeService.getColorTheme();
|
|
@@ -124,6 +126,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
124
126
|
const agentPart = parsedRequest.find((p) => p instanceof ChatRequestAgentPart);
|
|
125
127
|
const agentSubcommandPart = parsedRequest.find((p) => p instanceof ChatRequestAgentSubcommandPart);
|
|
126
128
|
const slashCommandPart = parsedRequest.find((p) => p instanceof ChatRequestSlashCommandPart);
|
|
129
|
+
const slashPromptPart = parsedRequest.find((p) => p instanceof ChatRequestSlashPromptPart);
|
|
127
130
|
const exactlyOneSpaceAfterPart = (part) => {
|
|
128
131
|
const partIdx = parsedRequest.indexOf(part);
|
|
129
132
|
if (parsedRequest.length > partIdx + 2) {
|
|
@@ -195,6 +198,9 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
195
198
|
if (slashCommandPart) {
|
|
196
199
|
textDecorations.push({ range: slashCommandPart.editorRange });
|
|
197
200
|
}
|
|
201
|
+
if (slashPromptPart) {
|
|
202
|
+
textDecorations.push({ range: slashPromptPart.editorRange });
|
|
203
|
+
}
|
|
198
204
|
this.widget.inputEditor.setDecorationsByType(decorationDescription, slashCommandTextDecorationType, textDecorations);
|
|
199
205
|
const varDecorations = [];
|
|
200
206
|
const toolParts = parsedRequest.filter((p) => p instanceof ChatRequestToolPart);
|
|
@@ -259,7 +265,7 @@ let ChatTokenDeleter = class ChatTokenDeleter extends Disposable {
|
|
|
259
265
|
const change = e.changes[0];
|
|
260
266
|
if (!change.text && this.widget.viewModel) {
|
|
261
267
|
const previousParsedValue = parser.parseChatRequest(this.widget.viewModel.sessionId, previousInputValue, widget.location, { selectedAgent: previousSelectedAgent, mode: this.widget.input.currentMode });
|
|
262
|
-
const deletableTokens = previousParsedValue.parts.filter(p => p instanceof ChatRequestAgentPart || p instanceof ChatRequestAgentSubcommandPart || p instanceof ChatRequestSlashCommandPart || p instanceof ChatRequestToolPart);
|
|
268
|
+
const deletableTokens = previousParsedValue.parts.filter(p => p instanceof ChatRequestAgentPart || p instanceof ChatRequestAgentSubcommandPart || p instanceof ChatRequestSlashCommandPart || p instanceof ChatRequestSlashPromptPart || p instanceof ChatRequestToolPart);
|
|
263
269
|
deletableTokens.forEach(token => {
|
|
264
270
|
const deletedRangeOfToken = Range.intersectRanges(token.editorRange, change.range);
|
|
265
271
|
if (deletedRangeOfToken && Range.compareRangesUsingStarts(token.editorRange, change.range) < 0) {
|
|
@@ -5,7 +5,7 @@ import { HoverAnchor, IEditorHoverParticipant, IEditorHoverRenderContext, IHover
|
|
|
5
5
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
6
6
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
7
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
8
|
-
import { IChatAgentData } from "@codingame/monaco-vscode-
|
|
8
|
+
import { IChatAgentData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
9
9
|
export declare class ChatAgentHoverParticipant implements IEditorHoverParticipant<ChatAgentHoverPart> {
|
|
10
10
|
private readonly editor;
|
|
11
11
|
private readonly instantiationService;
|
|
@@ -6,9 +6,9 @@ import { RenderedHoverParts, HoverAnchorType, HoverParticipantRegistry } from '@
|
|
|
6
6
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
7
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
9
|
-
import { ChatAgentHover, getChatAgentHoverOptions } from '@codingame/monaco-vscode-
|
|
9
|
+
import { ChatAgentHover, getChatAgentHoverOptions } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatAgentHover';
|
|
10
10
|
import { ChatEditorHoverWrapper } from './editorHoverWrapper.js';
|
|
11
|
-
import { extractAgentAndCommand } from '@codingame/monaco-vscode-
|
|
11
|
+
import { extractAgentAndCommand } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
12
12
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
13
|
|
|
14
14
|
let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
@@ -58,7 +58,7 @@ let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
|
58
58
|
return ( new RenderedHoverParts([renderedHoverPart]));
|
|
59
59
|
}
|
|
60
60
|
getAccessibleContent(hoverPart) {
|
|
61
|
-
return localize(
|
|
61
|
+
return localize(4967, 'There is a chat agent hover part here.');
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
ChatAgentHoverParticipant = ( __decorate([
|
|
@@ -45,7 +45,8 @@ export declare class LanguageModelToolsService extends Disposable implements ILa
|
|
|
45
45
|
invokeTool(dto: IToolInvocation, countTokens: CountTokensCallback, token: CancellationToken): Promise<IToolResult>;
|
|
46
46
|
private prepareToolInvocation;
|
|
47
47
|
private ensureToolDetails;
|
|
48
|
-
private
|
|
48
|
+
private formatToolInput;
|
|
49
|
+
private toolResultToIO;
|
|
49
50
|
private shouldAutoConfirm;
|
|
50
51
|
private cleanupCallDisposables;
|
|
51
52
|
cancelToolCallsForRequest(requestId: string): void;
|