@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
|
@@ -2,7 +2,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
2
2
|
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { IChatAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
5
|
-
import { IChatResponseViewModel } from "@codingame/monaco-vscode-
|
|
5
|
+
import { IChatResponseViewModel } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel";
|
|
6
6
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
7
7
|
export declare class ChatAccessibilityService extends Disposable implements IChatAccessibilityService {
|
|
8
8
|
private readonly _accessibilitySignalService;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { InlineAnchorWidget } from "@codingame/monaco-vscode-
|
|
2
|
+
import { InlineAnchorWidget } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget";
|
|
3
3
|
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service";
|
|
4
4
|
export declare class ChatMarkdownAnchorService extends Disposable implements IChatMarkdownAnchorService {
|
|
5
5
|
readonly _serviceBrand: undefined;
|
|
@@ -4,7 +4,7 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
4
4
|
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
5
5
|
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
6
6
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
7
|
-
import { ChatInputPart } from '@codingame/monaco-vscode-
|
|
7
|
+
import { ChatInputPart } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
|
|
8
8
|
|
|
9
9
|
let ChatInputBoxContentProvider = class ChatInputBoxContentProvider extends Disposable {
|
|
10
10
|
constructor(textModelService, modelService, languageService) {
|
|
@@ -30,18 +30,18 @@ export declare class ChatEditingCodeEditorIntegration implements IModifiedFileEn
|
|
|
30
30
|
private readonly _diffHunkWidgets;
|
|
31
31
|
private _viewZones;
|
|
32
32
|
private readonly _accessibleDiffViewVisible;
|
|
33
|
-
constructor(_entry: IModifiedFileEntry, _editor: ICodeEditor, documentDiffInfo: IObservable<IDocumentDiff2>, _chatAgentService: IChatAgentService, _editorService: IEditorService, _accessibilitySignalsService: IAccessibilitySignalService, instantiationService: IInstantiationService);
|
|
33
|
+
constructor(_entry: IModifiedFileEntry, _editor: ICodeEditor, documentDiffInfo: IObservable<IDocumentDiff2>, renderDiffImmediately: boolean, _chatAgentService: IChatAgentService, _editorService: IEditorService, _accessibilitySignalsService: IAccessibilitySignalService, instantiationService: IInstantiationService);
|
|
34
34
|
dispose(): void;
|
|
35
35
|
private _clear;
|
|
36
36
|
private _clearDiffRendering;
|
|
37
37
|
private _updateDiffRendering;
|
|
38
38
|
enableAccessibleDiffView(): void;
|
|
39
|
-
reveal(firstOrLast: boolean): void;
|
|
39
|
+
reveal(firstOrLast: boolean, preserveFocus?: boolean): void;
|
|
40
40
|
next(wrap: boolean): boolean;
|
|
41
41
|
previous(wrap: boolean): boolean;
|
|
42
42
|
private _reveal;
|
|
43
43
|
private _findClosestWidget;
|
|
44
|
-
rejectNearestChange(closestWidget
|
|
45
|
-
acceptNearestChange(closestWidget
|
|
46
|
-
toggleDiff(widget: IModifiedFileEntryChangeHunk | undefined): Promise<void>;
|
|
44
|
+
rejectNearestChange(closestWidget?: IModifiedFileEntryChangeHunk): Promise<void>;
|
|
45
|
+
acceptNearestChange(closestWidget?: IModifiedFileEntryChangeHunk): Promise<void>;
|
|
46
|
+
toggleDiff(widget: IModifiedFileEntryChangeHunk | undefined, show?: boolean): Promise<void>;
|
|
47
47
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js
CHANGED
|
@@ -30,9 +30,9 @@ import { TextEditorSelectionRevealType } from '@codingame/monaco-vscode-api/vsco
|
|
|
30
30
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
31
31
|
import { EditorsOrder, isDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
32
32
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
|
-
import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '@codingame/monaco-vscode-
|
|
33
|
+
import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
34
34
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
35
|
-
import {
|
|
35
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
36
36
|
import { isTextDiffEditorForEntry } from './chatEditing.js';
|
|
37
37
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
38
38
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
|
|
@@ -45,7 +45,7 @@ registerCss(chatEditorController);
|
|
|
45
45
|
let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
46
46
|
static { ChatEditingCodeEditorIntegration_1 = this; }
|
|
47
47
|
static { this._diffLineDecorationData = ModelDecorationOptions.register({ description: 'diff-line-decoration' }); }
|
|
48
|
-
constructor(_entry, _editor, documentDiffInfo, _chatAgentService, _editorService, _accessibilitySignalsService, instantiationService) {
|
|
48
|
+
constructor(_entry, _editor, documentDiffInfo, renderDiffImmediately, _chatAgentService, _editorService, _accessibilitySignalsService, instantiationService) {
|
|
49
49
|
this._entry = _entry;
|
|
50
50
|
this._editor = _editor;
|
|
51
51
|
this._chatAgentService = _chatAgentService;
|
|
@@ -119,17 +119,13 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
119
119
|
this._clearDiffRendering();
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
if (!_entry.isCurrentlyBeingModifiedBy.read(r)) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
this._clearDiffRendering();
|
|
132
|
-
}
|
|
122
|
+
if (!_entry.isCurrentlyBeingModifiedBy.read(r) || renderDiffImmediately) {
|
|
123
|
+
const isDiffEditor = this._editor.getOption(EditorOption.inDiffEditor);
|
|
124
|
+
codeEditorObs.getOption(EditorOption.fontInfo).read(r);
|
|
125
|
+
codeEditorObs.getOption(EditorOption.lineHeight).read(r);
|
|
126
|
+
const reviewMode = _entry.reviewMode.read(r);
|
|
127
|
+
const diff = documentDiffInfo.read(r);
|
|
128
|
+
this._updateDiffRendering(diff, reviewMode, isDiffEditor);
|
|
133
129
|
}
|
|
134
130
|
}));
|
|
135
131
|
this._store.add(autorun(r => {
|
|
@@ -210,7 +206,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
210
206
|
this._diffHunksRenderStore.clear();
|
|
211
207
|
this._diffVisualDecorations.clear();
|
|
212
208
|
}
|
|
213
|
-
_updateDiffRendering(diff, reviewMode) {
|
|
209
|
+
_updateDiffRendering(diff, reviewMode, diffMode) {
|
|
214
210
|
const chatDiffAddDecoration = ModelDecorationOptions.createDynamic({
|
|
215
211
|
...diffAddDecoration,
|
|
216
212
|
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
|
|
@@ -296,10 +292,12 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
296
292
|
options: modifiedDecoration
|
|
297
293
|
});
|
|
298
294
|
}
|
|
299
|
-
|
|
295
|
+
let extraLines = 0;
|
|
296
|
+
if (reviewMode && !diffMode) {
|
|
300
297
|
const domNode = document.createElement('div');
|
|
301
298
|
domNode.className = 'chat-editing-original-zone view-lines line-delete monaco-mouse-cursor-text';
|
|
302
299
|
const result = renderLines(source, renderOptions, decorations, domNode);
|
|
300
|
+
extraLines = result.heightInLines;
|
|
303
301
|
if (!isCreatedContent) {
|
|
304
302
|
const viewZoneData = {
|
|
305
303
|
afterLineNumber: diffEntry.modified.startLineNumber - 1,
|
|
@@ -309,9 +307,11 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
309
307
|
};
|
|
310
308
|
this._viewZones.push(viewZoneChangeAccessor.addZone(viewZoneData));
|
|
311
309
|
}
|
|
310
|
+
}
|
|
311
|
+
if (reviewMode || diffMode) {
|
|
312
312
|
const widget = this._editor.invokeWithinContext(accessor => {
|
|
313
313
|
const instaService = accessor.get(IInstantiationService);
|
|
314
|
-
return instaService.createInstance(DiffHunkWidget, diff, diffEntry, this._editor.getModel().getVersionId(), this._editor, isCreatedContent ? 0 :
|
|
314
|
+
return instaService.createInstance(DiffHunkWidget, diff, diffEntry, this._editor.getModel().getVersionId(), this._editor, isCreatedContent ? 0 : extraLines);
|
|
315
315
|
});
|
|
316
316
|
widget.layout(diffEntry.modified.startLineNumber);
|
|
317
317
|
this._diffHunkWidgets.push(widget);
|
|
@@ -329,7 +329,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
this._diffVisualDecorations.set(modifiedVisualDecorations);
|
|
332
|
+
this._diffVisualDecorations.set(!diffMode ? modifiedVisualDecorations : []);
|
|
333
333
|
});
|
|
334
334
|
const diffHunkDecoCollection = this._editor.createDecorationsCollection(diffHunkDecorations);
|
|
335
335
|
this._diffHunksRenderStore.add(toDisposable(() => {
|
|
@@ -394,7 +394,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
394
394
|
enableAccessibleDiffView() {
|
|
395
395
|
this._accessibleDiffViewVisible.set(true, undefined);
|
|
396
396
|
}
|
|
397
|
-
reveal(firstOrLast) {
|
|
397
|
+
reveal(firstOrLast, preserveFocus) {
|
|
398
398
|
const decorations = this._diffLineDecorations
|
|
399
399
|
.getRanges()
|
|
400
400
|
.sort((a, b) => Range.compareRangesUsingStarts(a, b));
|
|
@@ -403,7 +403,9 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
403
403
|
if (range) {
|
|
404
404
|
this._editor.setPosition(range.getStartPosition());
|
|
405
405
|
this._editor.revealRange(range);
|
|
406
|
-
|
|
406
|
+
if (!preserveFocus) {
|
|
407
|
+
this._editor.focus();
|
|
408
|
+
}
|
|
407
409
|
this._currentIndex.set(index, undefined);
|
|
408
410
|
}
|
|
409
411
|
}
|
|
@@ -469,21 +471,21 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
469
471
|
}
|
|
470
472
|
return closestWidget;
|
|
471
473
|
}
|
|
472
|
-
rejectNearestChange(closestWidget) {
|
|
474
|
+
async rejectNearestChange(closestWidget) {
|
|
473
475
|
closestWidget = closestWidget ?? this._findClosestWidget();
|
|
474
476
|
if (closestWidget instanceof DiffHunkWidget) {
|
|
475
|
-
closestWidget.reject();
|
|
477
|
+
await closestWidget.reject();
|
|
476
478
|
this.next(true);
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
|
-
acceptNearestChange(closestWidget) {
|
|
481
|
+
async acceptNearestChange(closestWidget) {
|
|
480
482
|
closestWidget = closestWidget ?? this._findClosestWidget();
|
|
481
483
|
if (closestWidget instanceof DiffHunkWidget) {
|
|
482
|
-
closestWidget.accept();
|
|
484
|
+
await closestWidget.accept();
|
|
483
485
|
this.next(true);
|
|
484
486
|
}
|
|
485
487
|
}
|
|
486
|
-
async toggleDiff(widget) {
|
|
488
|
+
async toggleDiff(widget, show) {
|
|
487
489
|
if (!this._editor.hasModel()) {
|
|
488
490
|
return;
|
|
489
491
|
}
|
|
@@ -496,34 +498,26 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
496
498
|
}
|
|
497
499
|
}
|
|
498
500
|
const isDiffEditor = this._editor.getOption(EditorOption.inDiffEditor);
|
|
499
|
-
if (isDiffEditor) {
|
|
500
|
-
|
|
501
|
-
resource: this._entry.modifiedURI,
|
|
502
|
-
options: {
|
|
503
|
-
selection,
|
|
504
|
-
selectionRevealType: TextEditorSelectionRevealType.NearTopIfOutsideViewport
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
const defaultAgentName = this._chatAgentService.getDefaultAgent(ChatAgentLocation.EditingSession)?.fullName;
|
|
501
|
+
if (show !== undefined ? show : !isDiffEditor) {
|
|
502
|
+
const defaultAgentName = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Panel)?.fullName;
|
|
510
503
|
const diffEditor = await this._editorService.openEditor({
|
|
511
|
-
original: { resource: this._entry.originalURI
|
|
512
|
-
modified: { resource: this._entry.modifiedURI
|
|
504
|
+
original: { resource: this._entry.originalURI },
|
|
505
|
+
modified: { resource: this._entry.modifiedURI },
|
|
506
|
+
options: { selection },
|
|
513
507
|
label: defaultAgentName
|
|
514
508
|
? ( localize(
|
|
515
|
-
|
|
509
|
+
4716,
|
|
516
510
|
'{0} (changes from {1})',
|
|
517
511
|
basename(this._entry.modifiedURI),
|
|
518
512
|
defaultAgentName
|
|
519
513
|
))
|
|
520
|
-
: ( localize(
|
|
514
|
+
: ( localize(4717, '{0} (changes from chat)', basename(this._entry.modifiedURI)))
|
|
521
515
|
});
|
|
522
516
|
if (diffEditor && diffEditor.input) {
|
|
523
517
|
diffEditor.getControl()?.setSelection(selection);
|
|
524
518
|
const d = autorun(r => {
|
|
525
519
|
const state = this._entry.state.read(r);
|
|
526
|
-
if (state ===
|
|
520
|
+
if (state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected) {
|
|
527
521
|
d.dispose();
|
|
528
522
|
const editorIdents = [];
|
|
529
523
|
for (const candidate of this._editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE)) {
|
|
@@ -538,13 +532,22 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
538
532
|
});
|
|
539
533
|
}
|
|
540
534
|
}
|
|
535
|
+
else {
|
|
536
|
+
await this._editorService.openEditor({
|
|
537
|
+
resource: this._entry.modifiedURI,
|
|
538
|
+
options: {
|
|
539
|
+
selection,
|
|
540
|
+
selectionRevealType: TextEditorSelectionRevealType.NearTopIfOutsideViewport
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
}
|
|
541
544
|
}
|
|
542
545
|
};
|
|
543
546
|
ChatEditingCodeEditorIntegration = ChatEditingCodeEditorIntegration_1 = ( __decorate([
|
|
544
|
-
( __param(
|
|
545
|
-
( __param(
|
|
546
|
-
( __param(
|
|
547
|
-
( __param(
|
|
547
|
+
( __param(4, IChatAgentService)),
|
|
548
|
+
( __param(5, IEditorService)),
|
|
549
|
+
( __param(6, IAccessibilitySignalService)),
|
|
550
|
+
( __param(7, IInstantiationService))
|
|
548
551
|
], ChatEditingCodeEditorIntegration));
|
|
549
552
|
let DiffHunkWidget = class DiffHunkWidget {
|
|
550
553
|
static { DiffHunkWidget_1 = this; }
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ declare abstract class ChatEditingEditorAction extends Action2 {
|
|
|
6
6
|
run(accessor: ServicesAccessor, ...args: any[]): Promise<void>;
|
|
7
7
|
abstract runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, integration: IModifiedFileEntryEditorIntegration, ...args: any[]): Promise<void> | void;
|
|
8
8
|
}
|
|
9
|
-
declare abstract class
|
|
10
|
-
|
|
11
|
-
constructor(id: string,
|
|
9
|
+
declare abstract class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
10
|
+
private _keep;
|
|
11
|
+
constructor(id: string, _keep: boolean);
|
|
12
12
|
runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration): Promise<void>;
|
|
13
13
|
}
|
|
14
|
-
export declare class AcceptAction extends
|
|
14
|
+
export declare class AcceptAction extends KeepOrUndoAction {
|
|
15
15
|
static readonly ID = "chatEditor.action.accept";
|
|
16
16
|
constructor();
|
|
17
17
|
}
|
|
18
|
-
export declare class RejectAction extends
|
|
18
|
+
export declare class RejectAction extends KeepOrUndoAction {
|
|
19
19
|
static readonly ID = "chatEditor.action.reject";
|
|
20
20
|
constructor();
|
|
21
21
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js
CHANGED
|
@@ -4,15 +4,15 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
|
|
|
4
4
|
import { Action2, MenuId, registerAction2, MenuRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
5
5
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
6
6
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
7
|
-
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-
|
|
8
|
-
import { ctxReviewModeEnabled,
|
|
7
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
8
|
+
import { ctxReviewModeEnabled, ctxHasEditorModification, ctxIsGlobalEditingSession, ctxHasRequestInProgress } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
9
9
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
10
|
import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorContextKeys';
|
|
11
11
|
import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
12
12
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
|
-
import {
|
|
13
|
+
import { ModifiedFileEntryState, CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
14
14
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
15
|
-
import { resolveCommandsContext } from '@codingame/monaco-vscode-
|
|
15
|
+
import { resolveCommandsContext } from '@codingame/monaco-vscode-9c72783f-914c-50be-b9ef-da16356d81a8-common/vscode/vs/workbench/browser/parts/editor/editorCommandsContext';
|
|
16
16
|
import { IListService } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService.service';
|
|
17
17
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
18
18
|
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
@@ -20,6 +20,7 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
20
20
|
import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
21
21
|
import { EditorResourceAccessor, SideBySideEditor, TEXT_DIFF_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
22
22
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
23
|
+
import { NOTEBOOK_CELL_LIST_FOCUSED } from '@codingame/monaco-vscode-51fed910-d648-5620-9b80-9232cd79d116-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
23
24
|
|
|
24
25
|
class ChatEditingEditorAction extends Action2 {
|
|
25
26
|
constructor(desc) {
|
|
@@ -53,23 +54,23 @@ class NavigateAction extends ChatEditingEditorAction {
|
|
|
53
54
|
? 'chatEditor.action.navigateNext'
|
|
54
55
|
: 'chatEditor.action.navigatePrevious',
|
|
55
56
|
title: next
|
|
56
|
-
? ( localize2(
|
|
57
|
-
: ( localize2(
|
|
57
|
+
? ( localize2(4718, 'Go to Next Chat Edit'))
|
|
58
|
+
: ( localize2(4719, 'Go to Previous Chat Edit')),
|
|
58
59
|
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
59
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled,
|
|
60
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ctxHasEditorModification)),
|
|
60
61
|
keybinding: {
|
|
61
62
|
primary: next
|
|
62
63
|
? KeyMod.Alt | KeyCode.F5
|
|
63
64
|
: KeyMod.Alt | KeyMod.Shift | KeyCode.F5,
|
|
64
65
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
65
|
-
when: ( ContextKeyExpr.and(ctxHasEditorModification, EditorContextKeys.focus)),
|
|
66
|
+
when: ( ContextKeyExpr.and(ctxHasEditorModification, ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_CELL_LIST_FOCUSED)))),
|
|
66
67
|
},
|
|
67
68
|
f1: true,
|
|
68
69
|
menu: {
|
|
69
70
|
id: MenuId.ChatEditingEditorContent,
|
|
70
71
|
group: 'navigate',
|
|
71
72
|
order: !next ? 2 : 3,
|
|
72
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled,
|
|
73
|
+
when: ( ContextKeyExpr.and(ctxReviewModeEnabled, ctxHasEditorModification))
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
this.next = next;
|
|
@@ -99,7 +100,7 @@ async function openNextOrPreviousChange(accessor, session, entry, next) {
|
|
|
99
100
|
while (true) {
|
|
100
101
|
idx = (idx + (next ? 1 : -1) + entries.length) % entries.length;
|
|
101
102
|
newEntry = entries[idx];
|
|
102
|
-
if (newEntry.state.get() ===
|
|
103
|
+
if (newEntry.state.get() === ModifiedFileEntryState.Modified) {
|
|
103
104
|
break;
|
|
104
105
|
}
|
|
105
106
|
else if (newEntry === entry) {
|
|
@@ -121,43 +122,44 @@ async function openNextOrPreviousChange(accessor, session, entry, next) {
|
|
|
121
122
|
}
|
|
122
123
|
return true;
|
|
123
124
|
}
|
|
124
|
-
class
|
|
125
|
-
constructor(id,
|
|
125
|
+
class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
126
|
+
constructor(id, _keep) {
|
|
126
127
|
super({
|
|
127
128
|
id,
|
|
128
|
-
title:
|
|
129
|
-
? ( localize2(
|
|
130
|
-
: ( localize2(
|
|
131
|
-
shortTitle:
|
|
132
|
-
? ( localize2(
|
|
133
|
-
: ( localize2(
|
|
134
|
-
tooltip:
|
|
135
|
-
? ( localize2(
|
|
136
|
-
: ( localize2(
|
|
129
|
+
title: _keep
|
|
130
|
+
? ( localize2(4720, 'Keep Chat Edits'))
|
|
131
|
+
: ( localize2(4721, 'Undo Chat Edits')),
|
|
132
|
+
shortTitle: _keep
|
|
133
|
+
? ( localize2(4722, 'Keep'))
|
|
134
|
+
: ( localize2(4723, 'Undo')),
|
|
135
|
+
tooltip: _keep
|
|
136
|
+
? ( localize2(4724, 'Keep Chat Edits in this File'))
|
|
137
|
+
: ( localize2(4725, 'Undo Chat Edits in this File')),
|
|
137
138
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
138
|
-
icon:
|
|
139
|
+
icon: _keep
|
|
139
140
|
? Codicon.check
|
|
140
141
|
: Codicon.discard,
|
|
141
142
|
f1: true,
|
|
142
143
|
keybinding: {
|
|
143
144
|
when: EditorContextKeys.focus,
|
|
144
145
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
145
|
-
primary:
|
|
146
|
+
primary: _keep
|
|
146
147
|
? KeyMod.CtrlCmd | KeyCode.Enter
|
|
147
148
|
: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
148
149
|
},
|
|
149
150
|
menu: {
|
|
150
151
|
id: MenuId.ChatEditingEditorContent,
|
|
151
152
|
group: 'a_resolve',
|
|
152
|
-
order:
|
|
153
|
-
when: ( ContextKeyExpr.and(
|
|
153
|
+
order: _keep ? 0 : 1,
|
|
154
|
+
when: ( ContextKeyExpr.or(( ContextKeyExpr.and(( ctxIsGlobalEditingSession.negate()), ( ctxHasRequestInProgress.negate()))), (
|
|
155
|
+
ContextKeyExpr.and(ctxIsGlobalEditingSession, !_keep ? ctxReviewModeEnabled : undefined))))
|
|
154
156
|
}
|
|
155
157
|
});
|
|
156
|
-
this.
|
|
158
|
+
this._keep = _keep;
|
|
157
159
|
}
|
|
158
160
|
async runChatEditingCommand(accessor, session, entry, _integration) {
|
|
159
161
|
const instaService = accessor.get(IInstantiationService);
|
|
160
|
-
if (this.
|
|
162
|
+
if (this._keep) {
|
|
161
163
|
session.accept(entry.modifiedURI);
|
|
162
164
|
}
|
|
163
165
|
else {
|
|
@@ -166,13 +168,13 @@ class AcceptDiscardAction extends ChatEditingEditorAction {
|
|
|
166
168
|
await instaService.invokeFunction(openNextOrPreviousChange, session, entry, true);
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
|
-
class AcceptAction extends
|
|
171
|
+
class AcceptAction extends KeepOrUndoAction {
|
|
170
172
|
static { this.ID = 'chatEditor.action.accept'; }
|
|
171
173
|
constructor() {
|
|
172
174
|
super(AcceptAction.ID, true);
|
|
173
175
|
}
|
|
174
176
|
}
|
|
175
|
-
class RejectAction extends
|
|
177
|
+
class RejectAction extends KeepOrUndoAction {
|
|
176
178
|
static { this.ID = 'chatEditor.action.reject'; }
|
|
177
179
|
constructor() {
|
|
178
180
|
super(RejectAction.ID, false);
|
|
@@ -182,13 +184,13 @@ class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
|
182
184
|
constructor(_accept) {
|
|
183
185
|
super({
|
|
184
186
|
id: _accept ? 'chatEditor.action.acceptHunk' : 'chatEditor.action.undoHunk',
|
|
185
|
-
title: _accept ? ( localize2(
|
|
187
|
+
title: _accept ? ( localize2(4726, 'Keep this Change')) : ( localize2(4727, 'Undo this Change')),
|
|
186
188
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
187
189
|
icon: _accept ? Codicon.check : Codicon.discard,
|
|
188
190
|
f1: true,
|
|
189
191
|
keybinding: {
|
|
190
|
-
when: EditorContextKeys.focus,
|
|
191
|
-
weight: KeybindingWeight.WorkbenchContrib,
|
|
192
|
+
when: ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_CELL_LIST_FOCUSED)),
|
|
193
|
+
weight: KeybindingWeight.WorkbenchContrib + 1,
|
|
192
194
|
primary: _accept
|
|
193
195
|
? KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter
|
|
194
196
|
: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backspace
|
|
@@ -200,12 +202,12 @@ class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
|
200
202
|
});
|
|
201
203
|
this._accept = _accept;
|
|
202
204
|
}
|
|
203
|
-
runChatEditingCommand(_accessor, _session, _entry, ctrl, ...args) {
|
|
205
|
+
async runChatEditingCommand(_accessor, _session, _entry, ctrl, ...args) {
|
|
204
206
|
if (this._accept) {
|
|
205
|
-
ctrl.acceptNearestChange(args[0]);
|
|
207
|
+
await ctrl.acceptNearestChange(args[0]);
|
|
206
208
|
}
|
|
207
209
|
else {
|
|
208
|
-
ctrl.rejectNearestChange(args[0]);
|
|
210
|
+
await ctrl.rejectNearestChange(args[0]);
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
}
|
|
@@ -213,13 +215,13 @@ class ToggleDiffAction extends ChatEditingEditorAction {
|
|
|
213
215
|
constructor() {
|
|
214
216
|
super({
|
|
215
217
|
id: 'chatEditor.action.toggleDiff',
|
|
216
|
-
title: ( localize2(
|
|
218
|
+
title: ( localize2(4728, 'Toggle Diff Editor for Chat Edits')),
|
|
217
219
|
category: CHAT_CATEGORY,
|
|
218
220
|
toggled: {
|
|
219
221
|
condition: ( ContextKeyExpr.or(EditorContextKeys.inDiffEditor, ( ActiveEditorContext.isEqualTo(TEXT_DIFF_EDITOR_ID)))),
|
|
220
222
|
icon: Codicon.goToFile,
|
|
221
223
|
},
|
|
222
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification
|
|
224
|
+
precondition: ( ContextKeyExpr.and(ctxHasEditorModification)),
|
|
223
225
|
icon: Codicon.diffSingle,
|
|
224
226
|
keybinding: {
|
|
225
227
|
when: EditorContextKeys.focus,
|
|
@@ -233,7 +235,7 @@ class ToggleDiffAction extends ChatEditingEditorAction {
|
|
|
233
235
|
id: MenuId.ChatEditingEditorContent,
|
|
234
236
|
group: 'a_resolve',
|
|
235
237
|
order: 2,
|
|
236
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled
|
|
238
|
+
when: ( ContextKeyExpr.and(ctxReviewModeEnabled))
|
|
237
239
|
}]
|
|
238
240
|
});
|
|
239
241
|
}
|
|
@@ -245,7 +247,7 @@ class ToggleAccessibleDiffViewAction extends ChatEditingEditorAction {
|
|
|
245
247
|
constructor() {
|
|
246
248
|
super({
|
|
247
249
|
id: 'chatEditor.action.showAccessibleDiffView',
|
|
248
|
-
title: ( localize2(
|
|
250
|
+
title: ( localize2(4729, 'Show Accessible Diff View for Chat Edits')),
|
|
249
251
|
f1: true,
|
|
250
252
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
251
253
|
keybinding: {
|
|
@@ -263,7 +265,7 @@ class ReviewChangesAction extends ChatEditingEditorAction {
|
|
|
263
265
|
constructor() {
|
|
264
266
|
super({
|
|
265
267
|
id: 'chatEditor.action.reviewChanges',
|
|
266
|
-
title: ( localize2(
|
|
268
|
+
title: ( localize2(4730, "Review")),
|
|
267
269
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
268
270
|
menu: [{
|
|
269
271
|
id: MenuId.ChatEditingEditorContent,
|
|
@@ -281,7 +283,7 @@ class MultiDiffAcceptDiscardAction extends Action2 {
|
|
|
281
283
|
constructor(accept) {
|
|
282
284
|
super({
|
|
283
285
|
id: accept ? 'chatEditing.multidiff.acceptAllFiles' : 'chatEditing.multidiff.discardAllFiles',
|
|
284
|
-
title: accept ? ( localize(
|
|
286
|
+
title: accept ? ( localize(4731, 'Keep All Edits')) : ( localize(4732, 'Undo All Edits')),
|
|
285
287
|
icon: accept ? Codicon.check : Codicon.discard,
|
|
286
288
|
menu: {
|
|
287
289
|
when: ( ContextKeyExpr.equals('resourceScheme', CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)),
|
|
@@ -328,7 +330,7 @@ function registerChatEditorActions() {
|
|
|
328
330
|
registerAction2(class AcceptHunkAction extends AcceptRejectHunkAction {
|
|
329
331
|
constructor() { super(true); }
|
|
330
332
|
});
|
|
331
|
-
registerAction2(class
|
|
333
|
+
registerAction2(class RejectHunkAction extends AcceptRejectHunkAction {
|
|
332
334
|
constructor() { super(false); }
|
|
333
335
|
});
|
|
334
336
|
registerAction2(ToggleDiffAction);
|
|
@@ -342,12 +344,12 @@ function registerChatEditorActions() {
|
|
|
342
344
|
MenuRegistry.appendMenuItem(MenuId.ChatEditingEditorContent, {
|
|
343
345
|
command: {
|
|
344
346
|
id: navigationBearingFakeActionId,
|
|
345
|
-
title: ( localize(
|
|
347
|
+
title: ( localize(4733, "Navigation Status")),
|
|
346
348
|
precondition: ( ContextKeyExpr.false()),
|
|
347
349
|
},
|
|
348
350
|
group: 'navigate',
|
|
349
351
|
order: -1,
|
|
350
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled,
|
|
352
|
+
when: ( ContextKeyExpr.and(ctxReviewModeEnabled, ctxHasEditorModification)),
|
|
351
353
|
});
|
|
352
354
|
}
|
|
353
355
|
const navigationBearingFakeActionId = 'chatEditor.navigation.bearings';
|