@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
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
3
4
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import { Disposable, DisposableMap, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { Disposable, DisposableMap, toDisposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
6
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
7
|
import { clamp } from '@codingame/monaco-vscode-api/vscode/vs/base/common/numbers';
|
|
7
8
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
@@ -23,9 +24,11 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
23
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
24
25
|
import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service';
|
|
25
26
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
26
|
-
import {
|
|
27
|
+
import { ModifiedFileEntryState, ChatEditKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
27
28
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
28
29
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
|
|
30
|
+
import { observableValueOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/api';
|
|
31
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils';
|
|
29
32
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/derived';
|
|
30
33
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
31
34
|
|
|
@@ -37,7 +40,7 @@ class AutoAcceptControl {
|
|
|
37
40
|
this.cancel = cancel;
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
|
-
const pendingRewriteMinimap = registerColor('minimap.chatEditHighlight', ( transparent(editorBackground, 0.6)), ( localize(
|
|
43
|
+
const pendingRewriteMinimap = registerColor('minimap.chatEditHighlight', ( transparent(editorBackground, 0.6)), ( localize(4751, "Color of pending edit regions in the minimap")));
|
|
41
44
|
let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFileEntry extends Disposable {
|
|
42
45
|
static { AbstractChatEditingModifiedFileEntry_1 = this; }
|
|
43
46
|
static { this.scheme = 'modified-file-entry'; }
|
|
@@ -60,16 +63,22 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
60
63
|
this.entryId = `${AbstractChatEditingModifiedFileEntry_1.scheme}::${++AbstractChatEditingModifiedFileEntry_1.lastEntryId}`;
|
|
61
64
|
this._onDidDelete = this._register(( new Emitter()));
|
|
62
65
|
this.onDidDelete = this._onDidDelete.event;
|
|
63
|
-
this._stateObs = observableValue(this,
|
|
66
|
+
this._stateObs = observableValue(this, ModifiedFileEntryState.Modified);
|
|
64
67
|
this.state = this._stateObs;
|
|
65
68
|
this._isCurrentlyBeingModifiedByObs = observableValue(this, undefined);
|
|
66
69
|
this.isCurrentlyBeingModifiedBy = this._isCurrentlyBeingModifiedByObs;
|
|
70
|
+
this._lastModifyingResponseObs = observableValueOpts({ equalsFn: (a, b) => a?.requestId === b?.requestId }, undefined);
|
|
71
|
+
this.lastModifyingResponse = this._lastModifyingResponseObs;
|
|
72
|
+
this._lastModifyingResponseInProgressObs = ( this._lastModifyingResponseObs.map((value, r) => {
|
|
73
|
+
return value && observableFromEvent(this, value.onDidChange, () => !value.isComplete && !value.isPendingConfirmation).read(r);
|
|
74
|
+
}));
|
|
67
75
|
this._rewriteRatioObs = observableValue(this, 0);
|
|
68
76
|
this.rewriteRatio = this._rewriteRatioObs;
|
|
69
77
|
this._reviewModeTempObs = observableValue(this, undefined);
|
|
70
78
|
this._autoAcceptCtrl = observableValue(this, undefined);
|
|
71
79
|
this.autoAcceptController = this._autoAcceptCtrl;
|
|
72
80
|
this._refCounter = 1;
|
|
81
|
+
this._userEditScheduler = this._register(( new RunOnceScheduler(() => this._notifyAction('userModified'), 1000)));
|
|
73
82
|
this._editorIntegrations = this._register(( new DisposableMap()));
|
|
74
83
|
if (kind === ChatEditKind.Created) {
|
|
75
84
|
this.createdInRequestId = this._telemetryInfo.requestId;
|
|
@@ -92,15 +101,42 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
92
101
|
const tempValue = this._reviewModeTempObs.read(r);
|
|
93
102
|
return tempValue ?? configuredValue === 0;
|
|
94
103
|
});
|
|
104
|
+
this._store.add(toDisposable(() => this._lastModifyingResponseObs.set(undefined, undefined)));
|
|
95
105
|
const autoSaveOff = this._store.add(( new MutableDisposable()));
|
|
96
106
|
this._store.add(autorun(r => {
|
|
97
|
-
if (this.
|
|
107
|
+
if (this._lastModifyingResponseInProgressObs.read(r)) {
|
|
98
108
|
autoSaveOff.value = _fileConfigService.disableAutoSave(this.modifiedURI);
|
|
99
109
|
}
|
|
100
110
|
else {
|
|
101
111
|
autoSaveOff.clear();
|
|
102
112
|
}
|
|
103
113
|
}));
|
|
114
|
+
this._store.add(autorun(r => {
|
|
115
|
+
const inProgress = this._lastModifyingResponseInProgressObs.read(r);
|
|
116
|
+
if (inProgress === false && !this.reviewMode.read(r)) {
|
|
117
|
+
const acceptTimeout = this._autoAcceptTimeout.get() * 1000;
|
|
118
|
+
const future = Date.now() + acceptTimeout;
|
|
119
|
+
const update = () => {
|
|
120
|
+
const reviewMode = this.reviewMode.get();
|
|
121
|
+
if (reviewMode) {
|
|
122
|
+
this._autoAcceptCtrl.set(undefined, undefined);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const remain = Math.round(future - Date.now());
|
|
126
|
+
if (remain <= 0) {
|
|
127
|
+
this.accept(undefined);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const handle = setTimeout(update, 100);
|
|
131
|
+
this._autoAcceptCtrl.set(( new AutoAcceptControl(acceptTimeout, remain, () => {
|
|
132
|
+
clearTimeout(handle);
|
|
133
|
+
this._autoAcceptCtrl.set(undefined, undefined);
|
|
134
|
+
})), undefined);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
update();
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
104
140
|
}
|
|
105
141
|
dispose() {
|
|
106
142
|
if (--this._refCounter === 0) {
|
|
@@ -114,7 +150,7 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
114
150
|
enableReviewModeUntilSettled() {
|
|
115
151
|
this._reviewModeTempObs.set(true, undefined);
|
|
116
152
|
const cleanup = autorun(r => {
|
|
117
|
-
const resetConfig = this.state.read(r) !==
|
|
153
|
+
const resetConfig = this.state.read(r) !== ModifiedFileEntryState.Modified;
|
|
118
154
|
if (resetConfig) {
|
|
119
155
|
this._store.delete(cleanup);
|
|
120
156
|
this._reviewModeTempObs.set(undefined, undefined);
|
|
@@ -126,22 +162,22 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
126
162
|
this._telemetryInfo = telemetryInfo;
|
|
127
163
|
}
|
|
128
164
|
async accept(tx) {
|
|
129
|
-
if (this._stateObs.get() !==
|
|
165
|
+
if (this._stateObs.get() !== ModifiedFileEntryState.Modified) {
|
|
130
166
|
return;
|
|
131
167
|
}
|
|
132
168
|
await this._doAccept(tx);
|
|
133
|
-
this._stateObs.set(
|
|
169
|
+
this._stateObs.set(ModifiedFileEntryState.Accepted, tx);
|
|
134
170
|
this._autoAcceptCtrl.set(undefined, tx);
|
|
135
171
|
this._notifyAction('accepted');
|
|
136
172
|
}
|
|
137
173
|
async reject(tx) {
|
|
138
|
-
if (this._stateObs.get() !==
|
|
174
|
+
if (this._stateObs.get() !== ModifiedFileEntryState.Modified) {
|
|
139
175
|
return;
|
|
140
176
|
}
|
|
177
|
+
this._notifyAction('rejected');
|
|
141
178
|
await this._doReject(tx);
|
|
142
|
-
this._stateObs.set(
|
|
179
|
+
this._stateObs.set(ModifiedFileEntryState.Rejected, tx);
|
|
143
180
|
this._autoAcceptCtrl.set(undefined, tx);
|
|
144
|
-
this._notifyAction('rejected');
|
|
145
181
|
}
|
|
146
182
|
_notifyAction(outcome) {
|
|
147
183
|
this._chatService.notifyUserAction({
|
|
@@ -164,6 +200,7 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
164
200
|
acceptStreamingEditsStart(responseModel, tx) {
|
|
165
201
|
this._resetEditsState(tx);
|
|
166
202
|
this._isCurrentlyBeingModifiedByObs.set(responseModel, tx);
|
|
203
|
+
this._lastModifyingResponseObs.set(responseModel, tx);
|
|
167
204
|
this._autoAcceptCtrl.get()?.cancel();
|
|
168
205
|
const undoRedoElement = this._createUndoRedoElement(responseModel);
|
|
169
206
|
if (undoRedoElement) {
|
|
@@ -175,29 +212,6 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
175
212
|
if (await this._areOriginalAndModifiedIdentical()) {
|
|
176
213
|
this.accept(tx);
|
|
177
214
|
}
|
|
178
|
-
else if (!this.reviewMode.get() && !this._autoAcceptCtrl.get()) {
|
|
179
|
-
const acceptTimeout = this._autoAcceptTimeout.get() * 1000;
|
|
180
|
-
const future = Date.now() + acceptTimeout;
|
|
181
|
-
const update = () => {
|
|
182
|
-
const reviewMode = this.reviewMode.get();
|
|
183
|
-
if (reviewMode) {
|
|
184
|
-
this._autoAcceptCtrl.set(undefined, undefined);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
const remain = Math.round(future - Date.now());
|
|
188
|
-
if (remain <= 0) {
|
|
189
|
-
this.accept(undefined);
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
const handle = setTimeout(update, 100);
|
|
193
|
-
this._autoAcceptCtrl.set(( new AutoAcceptControl(acceptTimeout, remain, () => {
|
|
194
|
-
clearTimeout(handle);
|
|
195
|
-
this._autoAcceptCtrl.set(undefined, undefined);
|
|
196
|
-
})), undefined);
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
update();
|
|
200
|
-
}
|
|
201
215
|
}
|
|
202
216
|
_resetEditsState(tx) {
|
|
203
217
|
this._isCurrentlyBeingModifiedByObs.set(undefined, tx);
|
|
@@ -12,14 +12,14 @@ import { IUndoRedoElement } from "@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
12
12
|
import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service";
|
|
13
13
|
import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
14
14
|
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
15
|
-
import { CellDiffInfo } from "@codingame/monaco-vscode-
|
|
16
|
-
import { NotebookCellTextModel } from "@codingame/monaco-vscode-
|
|
15
|
+
import { CellDiffInfo } from "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel";
|
|
16
|
+
import { NotebookCellTextModel } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
|
|
17
17
|
import { ICellEditOperation, IResolvedNotebookEditorModel, NotebookTextModelChangedEvent, TransientOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
18
18
|
import { INotebookEditorModelResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service";
|
|
19
19
|
import { INotebookLoggingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service";
|
|
20
20
|
import { INotebookEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service";
|
|
21
21
|
import { ChatEditKind, IModifiedFileEntryEditorIntegration } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
22
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-
|
|
22
|
+
import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
23
23
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
24
24
|
import { AbstractChatEditingModifiedFileEntry, IModifiedEntryTelemetryInfo, ISnapshotEntry } from "./chatEditingModifiedFileEntry.js";
|
|
25
25
|
import { ChatEditingNotebookCellEntry } from "./notebook/chatEditingNotebookCellEntry.js";
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js
CHANGED
|
@@ -27,15 +27,15 @@ import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
27
27
|
import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
28
28
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
29
29
|
import { SnapshotContext } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
|
|
30
|
-
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-
|
|
31
|
-
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-
|
|
30
|
+
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
|
|
31
|
+
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-324f9a6e-6231-5bfc-af17-e147abd2dfd2-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
32
32
|
import { CellEditType, NotebookCellsChangeType, NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
33
|
-
import { computeDiff } from '@codingame/monaco-vscode-
|
|
33
|
+
import { computeDiff } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
|
|
34
34
|
import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
|
|
35
35
|
import { INotebookLoggingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
|
|
36
36
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
37
37
|
import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
|
|
38
|
-
import {
|
|
38
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
39
39
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
40
40
|
import { AbstractChatEditingModifiedFileEntry } from './chatEditingModifiedFileEntry.js';
|
|
41
41
|
import { getNotebookSnapshotFileURI, restoreSnapshot, createSnapshot, deserializeSnapshot, SnapshotComparer } from './notebook/chatEditingModifiedNotebookSnapshot.js';
|
|
@@ -45,7 +45,7 @@ import { ChatEditingNotebookFileSystemProvider } from './notebook/chatEditingNot
|
|
|
45
45
|
import { isTransientIPyNbExtensionEvent, adjustCellDiffAndOriginalModelBasedOnCellMovements, getCorrespondingOriginalCellIndex, adjustCellDiffAndOriginalModelBasedOnCellAddDelete, calculateNotebookRewriteRatio, adjustCellDiffForRevertingAnInsertedCell, adjustCellDiffForKeepingAnInsertedCell, adjustCellDiffForRevertingADeletedCell } from './notebook/helpers.js';
|
|
46
46
|
import { countChanges, sortCellChanges } from './notebook/notebookCellChanges.js';
|
|
47
47
|
import { observableValue, transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
|
|
48
|
-
import { ObservablePromise } from '@codingame/monaco-vscode-
|
|
48
|
+
import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/promise';
|
|
49
49
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
50
50
|
|
|
51
51
|
var ChatEditingModifiedNotebookEntry_1;
|
|
@@ -75,7 +75,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
75
75
|
disposables.add(ChatEditingNotebookFileSystemProvider.registerFile(originalUri, buffer));
|
|
76
76
|
const originalRef = await resolver.resolve(originalUri, notebook.viewType);
|
|
77
77
|
if (initialContent) {
|
|
78
|
-
|
|
78
|
+
try {
|
|
79
|
+
restoreSnapshot(originalRef.object.notebook, initialContent);
|
|
80
|
+
}
|
|
81
|
+
catch (ex) {
|
|
82
|
+
console.error(`Error restoring snapshot: ${initialContent}`, ex);
|
|
83
|
+
initialContent = createSnapshot(notebook, options.serializer.options, configurationServie);
|
|
84
|
+
}
|
|
79
85
|
}
|
|
80
86
|
else {
|
|
81
87
|
initialContent = createSnapshot(notebook, options.serializer.options, configurationServie);
|
|
@@ -196,22 +202,24 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
196
202
|
}
|
|
197
203
|
let didResetToOriginalContent = this.initialContentComparer.isEqual(this.modifiedModel);
|
|
198
204
|
const currentState = this._stateObs.get();
|
|
199
|
-
if (currentState ===
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
if (currentState === WorkingSetEntryState.Modified && didResetToOriginalContent) {
|
|
203
|
-
this._stateObs.set(WorkingSetEntryState.Rejected, undefined);
|
|
205
|
+
if (currentState === ModifiedFileEntryState.Modified && didResetToOriginalContent) {
|
|
206
|
+
this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
|
|
204
207
|
this.updateCellDiffInfo([], undefined);
|
|
205
208
|
this.initializeModelsFromDiff();
|
|
209
|
+
this._notifyAction('rejected');
|
|
206
210
|
return;
|
|
207
211
|
}
|
|
208
212
|
if (!e.rawEvents.length) {
|
|
209
213
|
return;
|
|
210
214
|
}
|
|
215
|
+
if (currentState === ModifiedFileEntryState.Rejected) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
211
218
|
if (isTransientIPyNbExtensionEvent(this.modifiedModel.notebookType, e)) {
|
|
212
219
|
return;
|
|
213
220
|
}
|
|
214
221
|
this._allEditsAreFromUs = false;
|
|
222
|
+
this._userEditScheduler.schedule();
|
|
215
223
|
for (const event of e.rawEvents.filter(event => event.kind !== NotebookCellsChangeType.ChangeCellContent)) {
|
|
216
224
|
switch (event.kind) {
|
|
217
225
|
case NotebookCellsChangeType.ChangeDocumentMetadata: {
|
|
@@ -321,8 +329,8 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
321
329
|
}
|
|
322
330
|
}
|
|
323
331
|
didResetToOriginalContent = this.initialContentComparer.isEqual(this.modifiedModel);
|
|
324
|
-
if (currentState ===
|
|
325
|
-
this._stateObs.set(
|
|
332
|
+
if (currentState === ModifiedFileEntryState.Modified && didResetToOriginalContent) {
|
|
333
|
+
this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
|
|
326
334
|
this.updateCellDiffInfo([], undefined);
|
|
327
335
|
this.initializeModelsFromDiff();
|
|
328
336
|
return;
|
|
@@ -387,11 +395,12 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
387
395
|
}
|
|
388
396
|
_createUndoRedoElement(response) {
|
|
389
397
|
const request = response.session.getRequests().find(req => req.id === response.requestId);
|
|
390
|
-
const label = request?.message.text ? ( localize(
|
|
398
|
+
const label = request?.message.text ? ( localize(4752, "Chat Edit: '{0}'", request.message.text)) : ( localize(4753, "Chat Edit"));
|
|
391
399
|
const transientOptions = this.transientOptions;
|
|
392
400
|
const outputSizeLimit = this.configurationService.getValue(NotebookSetting.outputBackupSizeLimit) * 1024;
|
|
393
401
|
let initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
|
|
394
402
|
let last = '';
|
|
403
|
+
let redoState = ModifiedFileEntryState.Rejected;
|
|
395
404
|
return {
|
|
396
405
|
type: UndoRedoElementType.Resource,
|
|
397
406
|
resource: this.modifiedURI,
|
|
@@ -400,11 +409,34 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
400
409
|
confirmBeforeUndo: false,
|
|
401
410
|
undo: async () => {
|
|
402
411
|
last = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
|
|
403
|
-
|
|
412
|
+
this._isEditFromUs = true;
|
|
413
|
+
try {
|
|
414
|
+
restoreSnapshot(this.modifiedModel, initial);
|
|
415
|
+
restoreSnapshot(this.originalModel, initial);
|
|
416
|
+
}
|
|
417
|
+
finally {
|
|
418
|
+
this._isEditFromUs = false;
|
|
419
|
+
}
|
|
420
|
+
redoState = this._stateObs.get() === ModifiedFileEntryState.Accepted ? ModifiedFileEntryState.Accepted : ModifiedFileEntryState.Rejected;
|
|
421
|
+
this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
|
|
422
|
+
this.updateCellDiffInfo([], undefined);
|
|
423
|
+
this.initializeModelsFromDiff();
|
|
424
|
+
this._notifyAction('userModified');
|
|
404
425
|
},
|
|
405
426
|
redo: async () => {
|
|
406
427
|
initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
|
|
407
|
-
|
|
428
|
+
this._isEditFromUs = true;
|
|
429
|
+
try {
|
|
430
|
+
restoreSnapshot(this.modifiedModel, last);
|
|
431
|
+
restoreSnapshot(this.originalModel, last);
|
|
432
|
+
}
|
|
433
|
+
finally {
|
|
434
|
+
this._isEditFromUs = false;
|
|
435
|
+
}
|
|
436
|
+
this._stateObs.set(redoState, undefined);
|
|
437
|
+
this.updateCellDiffInfo([], undefined);
|
|
438
|
+
this.initializeModelsFromDiff();
|
|
439
|
+
this._notifyAction('userModified');
|
|
408
440
|
}
|
|
409
441
|
};
|
|
410
442
|
}
|
|
@@ -448,7 +480,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
448
480
|
}
|
|
449
481
|
transaction((tx) => {
|
|
450
482
|
if (!isLastEdits) {
|
|
451
|
-
this._stateObs.set(
|
|
483
|
+
this._stateObs.set(ModifiedFileEntryState.Modified, tx);
|
|
452
484
|
this._isCurrentlyBeingModifiedByObs.set(responseModel, tx);
|
|
453
485
|
const newRewriteRation = Math.max(this._rewriteRatioObs.get(), calculateNotebookRewriteRatio(this._cellsDiffInfo.get(), this.originalModel, this.modifiedModel));
|
|
454
486
|
this._rewriteRatioObs.set(Math.min(1, newRewriteRation), tx);
|
|
@@ -515,8 +547,9 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
515
547
|
computeStateAfterAcceptingRejectingChanges(accepted) {
|
|
516
548
|
const currentSnapshot = createSnapshot(this.modifiedModel, this.transientOptions, this.configurationService);
|
|
517
549
|
if (( new SnapshotComparer(currentSnapshot)).isEqual(this.originalModel)) {
|
|
518
|
-
const state = accepted ?
|
|
550
|
+
const state = accepted ? ModifiedFileEntryState.Accepted : ModifiedFileEntryState.Rejected;
|
|
519
551
|
this._stateObs.set(state, undefined);
|
|
552
|
+
this._notifyAction(accepted ? 'accepted' : 'rejected');
|
|
520
553
|
}
|
|
521
554
|
}
|
|
522
555
|
createModifiedCellDiffInfo(modifiedCellIndex, originalCellIndex) {
|
|
@@ -799,10 +832,10 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
799
832
|
return;
|
|
800
833
|
}
|
|
801
834
|
const cellState = cellEntry.state.read(r);
|
|
802
|
-
if (cellState ===
|
|
835
|
+
if (cellState === ModifiedFileEntryState.Accepted) {
|
|
803
836
|
this.computeStateAfterAcceptingRejectingChanges(true);
|
|
804
837
|
}
|
|
805
|
-
else if (cellState ===
|
|
838
|
+
else if (cellState === ModifiedFileEntryState.Rejected) {
|
|
806
839
|
this.computeStateAfterAcceptingRejectingChanges(false);
|
|
807
840
|
}
|
|
808
841
|
}));
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts
CHANGED
|
@@ -13,12 +13,12 @@ import { IDecorationsService } from "@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
13
13
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
14
14
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
15
15
|
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
16
|
-
import { IMultiDiffSourceResolver, IResolvedMultiDiffSource } from "@codingame/monaco-vscode-
|
|
16
|
+
import { IMultiDiffSourceResolver, IResolvedMultiDiffSource } from "@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService";
|
|
17
17
|
import { IMultiDiffSourceResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service";
|
|
18
18
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
19
19
|
import { IChatEditingSession, IChatRelatedFile, IChatRelatedFilesProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
20
20
|
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
21
|
-
import { ChatModel } from "@codingame/monaco-vscode-
|
|
21
|
+
import { ChatModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
22
22
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
23
23
|
export declare class ChatEditingService extends Disposable implements IChatEditingService {
|
|
24
24
|
private readonly _instantiationService;
|
|
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { coalesce, delta, compareBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
4
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
5
|
import { ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
6
|
-
import {
|
|
6
|
+
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
7
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
8
8
|
import { Disposable, dispose, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
9
|
import { LinkedList } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedList';
|
|
@@ -26,16 +26,16 @@ import { IDecorationsService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
26
26
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
27
27
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
28
28
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
29
|
-
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-
|
|
29
|
+
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService';
|
|
30
30
|
import { IMultiDiffSourceResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service';
|
|
31
31
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
32
32
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
33
33
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
34
|
-
import { chatEditingSnapshotScheme, chatEditingAgentSupportsReadonlyReferencesContextKey, ChatEditingSessionState,
|
|
35
|
-
import { isCellTextEditOperation } from '@codingame/monaco-vscode-
|
|
34
|
+
import { chatEditingSnapshotScheme, chatEditingAgentSupportsReadonlyReferencesContextKey, ChatEditingSessionState, ModifiedFileEntryState, CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME, parseChatMultiDiffUri, chatEditingResourceContextKey, inChatEditingSessionContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
35
|
+
import { isCellTextEditOperation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
36
36
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
37
37
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
38
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-
|
|
38
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
39
39
|
import { AbstractChatEditingModifiedFileEntry } from './chatEditingModifiedFileEntry.js';
|
|
40
40
|
import { ChatEditingSession } from './chatEditingSession.js';
|
|
41
41
|
import { ChatEditingTextModelContentProvider, ChatEditingSnapshotTextModelContentProvider } from './chatEditingTextModelContentProviders.js';
|
|
@@ -94,7 +94,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
94
94
|
}
|
|
95
95
|
e.join(storageTask, {
|
|
96
96
|
id: 'join.chatEditingSession',
|
|
97
|
-
label: ( localize(
|
|
97
|
+
label: ( localize(4754, "Saving chat edits history"))
|
|
98
98
|
});
|
|
99
99
|
}));
|
|
100
100
|
}
|
|
@@ -165,6 +165,10 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
165
165
|
}
|
|
166
166
|
observerEditsInResponse(requestId, responseModel, session, observerDisposables) {
|
|
167
167
|
const editsSeen = [];
|
|
168
|
+
let editorDidChange = false;
|
|
169
|
+
const editorListener = Event.once(this._editorService.onDidActiveEditorChange)(() => {
|
|
170
|
+
editorDidChange = true;
|
|
171
|
+
});
|
|
168
172
|
const editedFilesExist = ( new ResourceMap());
|
|
169
173
|
const ensureEditorOpen = (partUri) => {
|
|
170
174
|
const uri = CellUri.parse(partUri)?.notebook ?? partUri;
|
|
@@ -177,8 +181,9 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
177
181
|
return;
|
|
178
182
|
}
|
|
179
183
|
const activeUri = this._editorService.activeEditorPane?.input.resource;
|
|
180
|
-
const inactive =
|
|
181
|
-
|
|
184
|
+
const inactive = editorDidChange
|
|
185
|
+
|| this._editorService.activeEditorPane?.input instanceof ChatEditorInput && this._editorService.activeEditorPane.input.sessionId === session.chatSessionId
|
|
186
|
+
|| Boolean(activeUri && session.entries.get().find(entry => isEqual(activeUri, entry.modifiedURI)));
|
|
182
187
|
this._editorService.openEditor({ resource: uri, options: { inactive, preserveFocus: true, pinned: true } });
|
|
183
188
|
}));
|
|
184
189
|
};
|
|
@@ -191,6 +196,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
191
196
|
}
|
|
192
197
|
editsSeen.length = 0;
|
|
193
198
|
editedFilesExist.clear();
|
|
199
|
+
editorListener.dispose();
|
|
194
200
|
};
|
|
195
201
|
const handleResponseParts = async () => {
|
|
196
202
|
if (responseModel.isCanceled) {
|
|
@@ -315,7 +321,7 @@ let ChatDecorationsProvider = class ChatDecorationsProvider extends Disposable {
|
|
|
315
321
|
super();
|
|
316
322
|
this._sessions = _sessions;
|
|
317
323
|
this._chatAgentService = _chatAgentService;
|
|
318
|
-
this.label = ( localize(
|
|
324
|
+
this.label = ( localize(4755, "Chat Editing"));
|
|
319
325
|
this._currentEntries = derived(this, (r) => {
|
|
320
326
|
const sessions = this._sessions.read(r);
|
|
321
327
|
if (!sessions) {
|
|
@@ -336,7 +342,7 @@ let ChatDecorationsProvider = class ChatDecorationsProvider extends Disposable {
|
|
|
336
342
|
});
|
|
337
343
|
this._modifiedUris = derived(this, (r) => {
|
|
338
344
|
const uri = this._currentEntries.read(r);
|
|
339
|
-
return ( uri.filter(entry => !entry.isCurrentlyBeingModifiedBy.read(r) && entry.state.read(r) ===
|
|
345
|
+
return ( uri.filter(entry => !entry.isCurrentlyBeingModifiedBy.read(r) && entry.state.read(r) === ModifiedFileEntryState.Modified).map(entry => entry.modifiedURI));
|
|
340
346
|
});
|
|
341
347
|
this.onDidChange = Event.any(observeArrayChanges(this._currentlyEditingUris, compareBy(uri => ( uri.toString()), compare), this._store), observeArrayChanges(this._modifiedUris, compareBy(uri => ( uri.toString()), compare), this._store));
|
|
342
348
|
}
|
|
@@ -351,11 +357,11 @@ let ChatDecorationsProvider = class ChatDecorationsProvider extends Disposable {
|
|
|
351
357
|
}
|
|
352
358
|
const isModified = ( this._modifiedUris.get().some(e => ( e.toString()) === ( uri.toString())));
|
|
353
359
|
if (isModified) {
|
|
354
|
-
const defaultAgentName = this._chatAgentService.getDefaultAgent(ChatAgentLocation.
|
|
360
|
+
const defaultAgentName = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Panel)?.fullName;
|
|
355
361
|
return {
|
|
356
362
|
weight: 1000,
|
|
357
363
|
letter: Codicon.diffModified,
|
|
358
|
-
tooltip: defaultAgentName ? ( localize(
|
|
364
|
+
tooltip: defaultAgentName ? ( localize(4756, "Pending changes from {0}", defaultAgentName)) : ( localize(4757, "Pending changes from chat")),
|
|
359
365
|
bubble: true
|
|
360
366
|
};
|
|
361
367
|
}
|
|
@@ -374,18 +380,20 @@ let ChatEditingMultiDiffSourceResolver = class ChatEditingMultiDiffSourceResolve
|
|
|
374
380
|
return uri.scheme === CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME;
|
|
375
381
|
}
|
|
376
382
|
async resolveDiffSource(uri) {
|
|
383
|
+
const parsed = parseChatMultiDiffUri(uri);
|
|
377
384
|
const thisSession = derived(this, r => {
|
|
378
|
-
return this._editingSessionsObs.read(r).find(candidate => candidate.chatSessionId ===
|
|
385
|
+
return this._editingSessionsObs.read(r).find(candidate => candidate.chatSessionId === parsed.chatSessionId);
|
|
379
386
|
});
|
|
380
|
-
return this._instantiationService.createInstance(ChatEditingMultiDiffSource, thisSession);
|
|
387
|
+
return this._instantiationService.createInstance(ChatEditingMultiDiffSource, thisSession, parsed.showPreviousChanges);
|
|
381
388
|
}
|
|
382
389
|
};
|
|
383
390
|
ChatEditingMultiDiffSourceResolver = ( __decorate([
|
|
384
391
|
( __param(1, IInstantiationService))
|
|
385
392
|
], ChatEditingMultiDiffSourceResolver));
|
|
386
393
|
class ChatEditingMultiDiffSource {
|
|
387
|
-
constructor(_currentSession) {
|
|
394
|
+
constructor(_currentSession, _showPreviousChanges) {
|
|
388
395
|
this._currentSession = _currentSession;
|
|
396
|
+
this._showPreviousChanges = _showPreviousChanges;
|
|
389
397
|
this._resources = derived(this, (reader) => {
|
|
390
398
|
const currentSession = this._currentSession.read(reader);
|
|
391
399
|
if (!currentSession) {
|
|
@@ -393,6 +401,15 @@ class ChatEditingMultiDiffSource {
|
|
|
393
401
|
}
|
|
394
402
|
const entries = currentSession.entries.read(reader);
|
|
395
403
|
return ( entries.map((entry) => {
|
|
404
|
+
if (this._showPreviousChanges) {
|
|
405
|
+
const entryDiffObs = currentSession.getEntryDiffBetweenStops(entry.modifiedURI, undefined, undefined);
|
|
406
|
+
const entryDiff = entryDiffObs?.read(reader);
|
|
407
|
+
if (entryDiff) {
|
|
408
|
+
return ( new MultiDiffEditorItem(entryDiff.originalURI, entryDiff.modifiedURI, undefined, {
|
|
409
|
+
[chatEditingResourceContextKey.key]: entry.entryId,
|
|
410
|
+
}));
|
|
411
|
+
}
|
|
412
|
+
}
|
|
396
413
|
return ( new MultiDiffEditorItem(entry.originalURI, entry.modifiedURI, undefined, {
|
|
397
414
|
[chatEditingResourceContextKey.key]: entry.entryId,
|
|
398
415
|
}));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { ResourceMap } from "@codingame/monaco-vscode-api/vscode/vs/base/common/map";
|
|
3
2
|
import { IObservable, IReader } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
4
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
4
|
import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service";
|
|
@@ -8,16 +7,16 @@ import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common
|
|
|
8
7
|
import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
|
|
9
8
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
10
9
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
10
|
+
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
11
11
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
12
12
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
13
13
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
14
14
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
15
15
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
16
|
-
import {
|
|
17
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-
|
|
16
|
+
import { ChatEditingSessionState, IChatEditingSession, IEditSessionEntryDiff, IModifiedFileEntry, IStreamingEdits } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
17
|
+
import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
18
18
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
19
19
|
import { AbstractChatEditingModifiedFileEntry, ISnapshotEntry } from "./chatEditingModifiedFileEntry.js";
|
|
20
|
-
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
21
20
|
export declare class ChatEditingSession extends Disposable implements IChatEditingSession {
|
|
22
21
|
readonly chatSessionId: string;
|
|
23
22
|
readonly isGlobalEditingSession: boolean;
|
|
@@ -40,13 +39,10 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
40
39
|
private readonly _initialFileContents;
|
|
41
40
|
private readonly _entriesObs;
|
|
42
41
|
get entries(): IObservable<readonly IModifiedFileEntry[]>;
|
|
43
|
-
private _workingSet;
|
|
44
42
|
private _editorPane;
|
|
45
43
|
get state(): IObservable<ChatEditingSessionState>;
|
|
46
44
|
readonly canUndo: IObservable<boolean>;
|
|
47
45
|
readonly canRedo: IObservable<boolean>;
|
|
48
|
-
private readonly _onDidChange;
|
|
49
|
-
get onDidChange(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<ChatEditingSessionChangeType>;
|
|
50
46
|
private readonly _onDidDispose;
|
|
51
47
|
get onDidDispose(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
52
48
|
constructor(chatSessionId: string, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _chatService: IChatService, _notebookService: INotebookService, _editorWorkerService: IEditorWorkerService, _configurationService: IConfigurationService, _accessibilitySignalService: IAccessibilitySignalService);
|
|
@@ -59,11 +55,13 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
59
55
|
private _findEditStop;
|
|
60
56
|
private _ensurePendingSnapshot;
|
|
61
57
|
private _diffsBetweenStops;
|
|
58
|
+
private _fullDiffs;
|
|
62
59
|
private readonly _ignoreTrimWhitespaceObservable;
|
|
63
60
|
private _entryDiffBetweenTextStops;
|
|
64
61
|
private _createDiffBetweenStopsObservable;
|
|
65
|
-
getEntryDiffBetweenStops(uri: URI, requestId: string, stopId: string | undefined): IObservable<IEditSessionEntryDiff | undefined>;
|
|
66
|
-
createSnapshot(requestId: string, undoStop: string | undefined): void;
|
|
62
|
+
getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable<IEditSessionEntryDiff | undefined>;
|
|
63
|
+
createSnapshot(requestId: string, undoStop: string | undefined, makeEmpty?: boolean): void;
|
|
64
|
+
private _createEmptySnapshot;
|
|
67
65
|
private _createSnapshot;
|
|
68
66
|
getSnapshot(requestId: string, undoStop: string | undefined, snapshotUri: URI): ISnapshotEntry | undefined;
|
|
69
67
|
getSnapshotModel(requestId: string, undoStop: string | undefined, snapshotUri: URI): Promise<ITextModel | null>;
|
|
@@ -71,11 +69,11 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
71
69
|
private _pendingSnapshot;
|
|
72
70
|
restoreSnapshot(requestId: string | undefined, stopId: string | undefined): Promise<void>;
|
|
73
71
|
private _restoreSnapshot;
|
|
74
|
-
remove(
|
|
72
|
+
remove(...uris: URI[]): void;
|
|
75
73
|
private _assertNotDisposed;
|
|
76
74
|
accept(...uris: URI[]): Promise<void>;
|
|
77
75
|
reject(...uris: URI[]): Promise<void>;
|
|
78
|
-
show(): Promise<void>;
|
|
76
|
+
show(previousChanges?: boolean): Promise<void>;
|
|
79
77
|
private _stopPromise;
|
|
80
78
|
stop(clearState?: boolean): Promise<void>;
|
|
81
79
|
private _performStop;
|
|
@@ -96,15 +94,3 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
96
94
|
private _createModifiedFileEntry;
|
|
97
95
|
private _collapse;
|
|
98
96
|
}
|
|
99
|
-
export interface IChatEditingSessionSnapshot {
|
|
100
|
-
readonly startIndex: number;
|
|
101
|
-
readonly requestId: string | undefined;
|
|
102
|
-
readonly stops: IChatEditingSessionStop[];
|
|
103
|
-
readonly postEdit: ResourceMap<ISnapshotEntry> | undefined;
|
|
104
|
-
}
|
|
105
|
-
interface IChatEditingSessionStop {
|
|
106
|
-
stopId: string | undefined;
|
|
107
|
-
readonly workingSet: ResourceMap<WorkingSetDisplayMetadata>;
|
|
108
|
-
readonly entries: ResourceMap<ISnapshotEntry>;
|
|
109
|
-
}
|
|
110
|
-
export {};
|