@codingame/monaco-vscode-chat-service-override 20.4.1 → 21.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 +15 -7
- package/package.json +38 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +18 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +52 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +28 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +19 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +15 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +433 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +205 -551
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +52 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +11 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +32 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +22 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +47 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +33 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.js +74 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatLayoutService.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatLayoutService.js +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +36 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +37 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +238 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +257 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +126 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +3 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +55 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +13 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +130 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/media/apple-dark.svg +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/apple-light.svg +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +39 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +153 -168
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +127 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +111 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +66 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderDiagnosticsProvider.js +41 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderHovers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderHovers.js +55 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkDiagnosticsProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/applyTo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/string.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/mode.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/tools.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/promptHeader.js +8 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/topError.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +4 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +11 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +54 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +33 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +9 -9
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +9 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +11 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +1 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.d.ts +16 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +84 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.js +55 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +15 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +72 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +19 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +7 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +12 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +85 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +448 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.js +30 -77
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +174 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +75 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +81 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +106 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{getTerminalOutputTool.js → tools/getTerminalOutputTool.js} +5 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +59 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +452 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{runInTerminalTool.d.ts → tools/runInTerminalTool.d.ts} +11 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{runInTerminalTool.js → tools/runInTerminalTool.js} +282 -133
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/createAndRunTaskTool.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/createAndRunTaskTool.js +51 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/getTaskOutputTool.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +117 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/runTaskTool.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{task → tools/task}/runTaskTool.js +54 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +36 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminal.chatAgentTools.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminal.chatAgentTools.js +8 -0
- package/vscode/src/vs/base/common/policy.d.ts +0 -41
- package/vscode/src/vs/base/common/policy.js +0 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.js +0 -738
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +0 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptPathAutocompletion.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptPathAutocompletion.js +0 -167
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/enum.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/base/enum.js +0 -63
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.d.ts +0 -55
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.js +0 -163
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/getTaskOutputTool.js +0 -88
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/taskHelpers.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/taskHelpers.js +0 -80
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task.chatAgentTools.contribution.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task.chatAgentTools.contribution.js +0 -40
- /package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{getTerminalOutputTool.d.ts → tools/getTerminalOutputTool.d.ts} +0 -0
|
@@ -131,7 +131,7 @@ let ChatAttachmentResolveService = class ChatAttachmentResolveService {
|
|
|
131
131
|
}
|
|
132
132
|
const readFile = await this.fileService.readFile(resource);
|
|
133
133
|
if (stat.size > 30 * 1024 * 1024) {
|
|
134
|
-
this.dialogService.error(( localize(
|
|
134
|
+
this.dialogService.error(( localize(4853, 'Image is too large')), ( localize(4854, 'The image {0} is too large to be attached.', fileName)));
|
|
135
135
|
throw ( new Error('Image is too large'));
|
|
136
136
|
}
|
|
137
137
|
dataBuffer = readFile.value;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js
CHANGED
|
@@ -27,17 +27,17 @@ import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vsco
|
|
|
27
27
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
28
28
|
import { TextEditorSelectionRevealType } from '@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor';
|
|
29
29
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
30
|
-
import '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
30
|
+
import { EditorsOrder, isDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
31
31
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
32
32
|
import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
33
33
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
34
|
-
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
34
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
35
35
|
import { isTextDiffEditorForEntry } from './chatEditing.js';
|
|
36
36
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
37
37
|
import { InlineDecoration, InlineDecorationType } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/viewModel/inlineDecorations';
|
|
38
38
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
39
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
40
39
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
40
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
41
41
|
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
42
42
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
43
43
|
|
|
@@ -507,15 +507,30 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
507
507
|
options: { selection },
|
|
508
508
|
label: defaultAgentName
|
|
509
509
|
? ( localize(
|
|
510
|
-
|
|
510
|
+
5013,
|
|
511
511
|
'{0} (changes from {1})',
|
|
512
512
|
basename(this._entry.modifiedURI),
|
|
513
513
|
defaultAgentName
|
|
514
514
|
))
|
|
515
|
-
: ( localize(
|
|
515
|
+
: ( localize(5014, '{0} (changes from chat)', basename(this._entry.modifiedURI)))
|
|
516
516
|
});
|
|
517
517
|
if (diffEditor && diffEditor.input) {
|
|
518
518
|
diffEditor.getControl()?.setSelection(selection);
|
|
519
|
+
const d = autorun(r => {
|
|
520
|
+
const state = this._entry.state.read(r);
|
|
521
|
+
if (state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected) {
|
|
522
|
+
d.dispose();
|
|
523
|
+
const editorIdents = [];
|
|
524
|
+
for (const candidate of this._editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE)) {
|
|
525
|
+
if (isDiffEditorInput(candidate.editor)
|
|
526
|
+
&& isEqual(candidate.editor.original.resource, this._entry.originalURI)
|
|
527
|
+
&& isEqual(candidate.editor.modified.resource, this._entry.modifiedURI)) {
|
|
528
|
+
editorIdents.push(candidate);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
this._editorService.closeEditors(editorIdents);
|
|
532
|
+
}
|
|
533
|
+
});
|
|
519
534
|
}
|
|
520
535
|
}
|
|
521
536
|
else {
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js
CHANGED
|
@@ -12,7 +12,7 @@ import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/s
|
|
|
12
12
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
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-5e2c24a1-3217-55e8-bc90-521eaf7df5a6-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-0af61f78-dfc5-57ba-8d32-66268c8de38d-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
@@ -54,8 +54,8 @@ class NavigateAction extends ChatEditingEditorAction {
|
|
|
54
54
|
? 'chatEditor.action.navigateNext'
|
|
55
55
|
: 'chatEditor.action.navigatePrevious',
|
|
56
56
|
title: next
|
|
57
|
-
? ( localize2(
|
|
58
|
-
: ( localize2(
|
|
57
|
+
? ( localize2(5015, 'Go to Next Chat Edit'))
|
|
58
|
+
: ( localize2(5016, 'Go to Previous Chat Edit')),
|
|
59
59
|
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
60
60
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ctxHasEditorModification)),
|
|
61
61
|
keybinding: {
|
|
@@ -127,14 +127,14 @@ class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
|
127
127
|
super({
|
|
128
128
|
id,
|
|
129
129
|
title: _keep
|
|
130
|
-
? ( localize2(
|
|
131
|
-
: ( localize2(
|
|
130
|
+
? ( localize2(5017, 'Keep Chat Edits'))
|
|
131
|
+
: ( localize2(5018, 'Undo Chat Edits')),
|
|
132
132
|
shortTitle: _keep
|
|
133
|
-
? ( localize2(
|
|
134
|
-
: ( localize2(
|
|
133
|
+
? ( localize2(5019, 'Keep'))
|
|
134
|
+
: ( localize2(5020, 'Undo')),
|
|
135
135
|
tooltip: _keep
|
|
136
|
-
? ( localize2(
|
|
137
|
-
: ( localize2(
|
|
136
|
+
? ( localize2(5021, 'Keep Chat Edits in this File'))
|
|
137
|
+
: ( localize2(5022, 'Undo Chat Edits in this File')),
|
|
138
138
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
139
139
|
icon: _keep
|
|
140
140
|
? Codicon.check
|
|
@@ -184,7 +184,7 @@ class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
|
184
184
|
constructor(_accept) {
|
|
185
185
|
super({
|
|
186
186
|
id: _accept ? 'chatEditor.action.acceptHunk' : 'chatEditor.action.undoHunk',
|
|
187
|
-
title: _accept ? ( localize2(
|
|
187
|
+
title: _accept ? ( localize2(5023, 'Keep this Change')) : ( localize2(5024, 'Undo this Change')),
|
|
188
188
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
189
189
|
icon: _accept ? Codicon.check : Codicon.discard,
|
|
190
190
|
f1: true,
|
|
@@ -219,7 +219,7 @@ class ToggleDiffAction extends ChatEditingEditorAction {
|
|
|
219
219
|
constructor() {
|
|
220
220
|
super({
|
|
221
221
|
id: 'chatEditor.action.toggleDiff',
|
|
222
|
-
title: ( localize2(
|
|
222
|
+
title: ( localize2(5025, 'Toggle Diff Editor for Chat Edits')),
|
|
223
223
|
category: CHAT_CATEGORY,
|
|
224
224
|
toggled: {
|
|
225
225
|
condition: ( ContextKeyExpr.or(EditorContextKeys.inDiffEditor, ( ActiveEditorContext.isEqualTo(TEXT_DIFF_EDITOR_ID)))),
|
|
@@ -251,7 +251,7 @@ class ToggleAccessibleDiffViewAction extends ChatEditingEditorAction {
|
|
|
251
251
|
constructor() {
|
|
252
252
|
super({
|
|
253
253
|
id: 'chatEditor.action.showAccessibleDiffView',
|
|
254
|
-
title: ( localize2(
|
|
254
|
+
title: ( localize2(5026, 'Show Accessible Diff View for Chat Edits')),
|
|
255
255
|
f1: true,
|
|
256
256
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
257
257
|
keybinding: {
|
|
@@ -269,7 +269,7 @@ class ReviewChangesAction extends ChatEditingEditorAction {
|
|
|
269
269
|
constructor() {
|
|
270
270
|
super({
|
|
271
271
|
id: 'chatEditor.action.reviewChanges',
|
|
272
|
-
title: ( localize2(
|
|
272
|
+
title: ( localize2(5027, "Review")),
|
|
273
273
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
274
274
|
menu: [{
|
|
275
275
|
id: MenuId.ChatEditingEditorContent,
|
|
@@ -288,8 +288,8 @@ class AcceptAllEditsAction extends ChatEditingEditorAction {
|
|
|
288
288
|
constructor() {
|
|
289
289
|
super({
|
|
290
290
|
id: AcceptAllEditsAction.ID,
|
|
291
|
-
title: ( localize2(
|
|
292
|
-
tooltip: ( localize2(
|
|
291
|
+
title: ( localize2(5028, 'Keep All Chat Edits')),
|
|
292
|
+
tooltip: ( localize2(5029, 'Keep All Chat Edits in this Session')),
|
|
293
293
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxHasRequestInProgress.negate()))),
|
|
294
294
|
icon: Codicon.checkAll,
|
|
295
295
|
f1: true,
|
|
@@ -308,7 +308,7 @@ class MultiDiffAcceptDiscardAction extends Action2 {
|
|
|
308
308
|
constructor(accept) {
|
|
309
309
|
super({
|
|
310
310
|
id: accept ? 'chatEditing.multidiff.acceptAllFiles' : 'chatEditing.multidiff.discardAllFiles',
|
|
311
|
-
title: accept ? ( localize(
|
|
311
|
+
title: accept ? ( localize(5030, 'Keep All Edits')) : ( localize(5031, 'Undo All Edits')),
|
|
312
312
|
icon: accept ? Codicon.check : Codicon.discard,
|
|
313
313
|
menu: {
|
|
314
314
|
when: ( ContextKeyExpr.equals('resourceScheme', CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)),
|
|
@@ -370,7 +370,7 @@ function registerChatEditorActions() {
|
|
|
370
370
|
MenuRegistry.appendMenuItem(MenuId.ChatEditingEditorContent, {
|
|
371
371
|
command: {
|
|
372
372
|
id: navigationBearingFakeActionId,
|
|
373
|
-
title: ( localize(
|
|
373
|
+
title: ( localize(5032, "Navigation Status")),
|
|
374
374
|
precondition: ( ContextKeyExpr.false()),
|
|
375
375
|
},
|
|
376
376
|
group: 'navigate',
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js
CHANGED
|
@@ -64,10 +64,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
64
64
|
}
|
|
65
65
|
const response = this._entry.read(r)?.lastModifyingResponse.read(r);
|
|
66
66
|
if (!response) {
|
|
67
|
-
return { message: ( localize(
|
|
68
|
-
}
|
|
69
|
-
if (response.isPaused.read(r)) {
|
|
70
|
-
return { message: ( localize(4946, "Paused")), paused: true };
|
|
67
|
+
return { message: ( localize(5038, "Working...")) };
|
|
71
68
|
}
|
|
72
69
|
const lastPart = observableFromEventOpts({ equalsFn: equals }, response.onDidChange, () => response.response.value)
|
|
73
70
|
.read(r)
|
|
@@ -80,7 +77,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
80
77
|
return { message: lastPart.content };
|
|
81
78
|
}
|
|
82
79
|
else {
|
|
83
|
-
return { message: ( localize(
|
|
80
|
+
return { message: ( localize(5038, "Working...")) };
|
|
84
81
|
}
|
|
85
82
|
});
|
|
86
83
|
const progressNode = createElement('div');
|
|
@@ -90,7 +87,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
90
87
|
this._domNode.appendChild(progressNode);
|
|
91
88
|
this._store.add(autorun(r => {
|
|
92
89
|
const value = requestMessage.read(r);
|
|
93
|
-
const busy = this._isBusy.read(r)
|
|
90
|
+
const busy = this._isBusy.read(r);
|
|
94
91
|
this._domNode.classList.toggle('busy', busy);
|
|
95
92
|
if (!busy || !value || this._session.read(r)?.isGlobalEditingSession) {
|
|
96
93
|
textProgress.innerText = '';
|
|
@@ -157,10 +154,10 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
157
154
|
const { changeCount, activeIdx } = that._navigationBearings.read(r);
|
|
158
155
|
if (changeCount > 0) {
|
|
159
156
|
const n = activeIdx === -1 ? '1' : `${activeIdx + 1}`;
|
|
160
|
-
this.label.innerText = ( localize(
|
|
157
|
+
this.label.innerText = ( localize(5039, "{0} of {1}", n, changeCount));
|
|
161
158
|
}
|
|
162
159
|
else {
|
|
163
|
-
this.label.innerText = ( localize(
|
|
160
|
+
this.label.innerText = ( localize(5040, "—"));
|
|
164
161
|
}
|
|
165
162
|
this.updateTooltip();
|
|
166
163
|
}));
|
|
@@ -172,21 +169,21 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
172
169
|
}
|
|
173
170
|
let result;
|
|
174
171
|
if (changeCount === 1 && entriesCount === 1) {
|
|
175
|
-
result = ( localize(
|
|
172
|
+
result = ( localize(5041, "1 change in 1 file"));
|
|
176
173
|
}
|
|
177
174
|
else if (changeCount === 1) {
|
|
178
|
-
result = ( localize(
|
|
175
|
+
result = ( localize(5042, "1 change in {0} files", entriesCount));
|
|
179
176
|
}
|
|
180
177
|
else if (entriesCount === 1) {
|
|
181
|
-
result = ( localize(
|
|
178
|
+
result = ( localize(5043, "{0} changes in 1 file", changeCount));
|
|
182
179
|
}
|
|
183
180
|
else {
|
|
184
|
-
result = ( localize(
|
|
181
|
+
result = ( localize(5044, "{0} changes in {1} files", changeCount, entriesCount));
|
|
185
182
|
}
|
|
186
183
|
if (!that._isBusy.get()) {
|
|
187
184
|
return result;
|
|
188
185
|
}
|
|
189
|
-
return localize(
|
|
186
|
+
return localize(5045, "{0} - Working...", result);
|
|
190
187
|
}
|
|
191
188
|
});
|
|
192
189
|
}
|
|
@@ -235,7 +232,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
235
232
|
if (!kb) {
|
|
236
233
|
return value;
|
|
237
234
|
}
|
|
238
|
-
return localize(
|
|
235
|
+
return localize(5046, "{0} ({1})", value, kb.getLabel());
|
|
239
236
|
}
|
|
240
237
|
});
|
|
241
238
|
}
|
|
@@ -15,6 +15,7 @@ import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
15
15
|
import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
16
16
|
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
17
17
|
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
18
|
+
import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
|
|
18
19
|
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
19
20
|
import { ChatEditKind, IModifiedEntryTelemetryInfo, IModifiedFileEntry, IModifiedFileEntryEditorIntegration, ISnapshotEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
20
21
|
import { IChatResponseModel } from "@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
@@ -28,11 +29,13 @@ export declare class ChatEditingModifiedDocumentEntry extends AbstractChatEditin
|
|
|
28
29
|
private readonly modifiedModel;
|
|
29
30
|
private readonly _docFileEditorModel;
|
|
30
31
|
get changesCount(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<number>;
|
|
32
|
+
get linesAdded(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<number>;
|
|
33
|
+
get linesRemoved(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<number>;
|
|
31
34
|
readonly originalURI: URI;
|
|
32
35
|
private readonly _textModelChangeService;
|
|
33
36
|
constructor(resourceRef: IReference<IResolvedTextEditorModel>, _multiDiffEntryDelegate: {
|
|
34
37
|
collapse: (transaction: ITransaction | undefined) => void;
|
|
35
|
-
}, telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, initialContent: string | undefined, markerService: IMarkerService, modelService: IModelService, textModelService: ITextModelService, languageService: ILanguageService, configService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, _textFileService: ITextFileService, fileService: IFileService, undoRedoService: IUndoRedoService, instantiationService: IInstantiationService);
|
|
38
|
+
}, telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, initialContent: string | undefined, markerService: IMarkerService, modelService: IModelService, textModelService: ITextModelService, languageService: ILanguageService, configService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, _textFileService: ITextFileService, fileService: IFileService, undoRedoService: IUndoRedoService, instantiationService: IInstantiationService, aiEditTelemetryService: IAiEditTelemetryService);
|
|
36
39
|
equalsSnapshot(snapshot: ISnapshotEntry | undefined): boolean;
|
|
37
40
|
createSnapshot(requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
|
|
38
41
|
restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js
CHANGED
|
@@ -19,6 +19,7 @@ import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/com
|
|
|
19
19
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
20
20
|
import { stringToSnapshot, isTextFileEditorModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles';
|
|
21
21
|
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
22
|
+
import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
|
|
22
23
|
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
23
24
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
24
25
|
import { ChatEditingCodeEditorIntegration } from './chatEditingCodeEditorIntegration.js';
|
|
@@ -32,8 +33,26 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
32
33
|
get changesCount() {
|
|
33
34
|
return ( this._textModelChangeService.diffInfo.map(diff => diff.changes.length));
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
get linesAdded() {
|
|
37
|
+
return ( this._textModelChangeService.diffInfo.map(diff => {
|
|
38
|
+
let added = 0;
|
|
39
|
+
for (const c of diff.changes) {
|
|
40
|
+
added += Math.max(0, c.modified.endLineNumberExclusive - c.modified.startLineNumber);
|
|
41
|
+
}
|
|
42
|
+
return added;
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
get linesRemoved() {
|
|
46
|
+
return ( this._textModelChangeService.diffInfo.map(diff => {
|
|
47
|
+
let removed = 0;
|
|
48
|
+
for (const c of diff.changes) {
|
|
49
|
+
removed += Math.max(0, c.original.endLineNumberExclusive - c.original.startLineNumber);
|
|
50
|
+
}
|
|
51
|
+
return removed;
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
constructor(resourceRef, _multiDiffEntryDelegate, telemetryInfo, kind, initialContent, markerService, modelService, textModelService, languageService, configService, fileConfigService, chatService, _textFileService, fileService, undoRedoService, instantiationService, aiEditTelemetryService) {
|
|
55
|
+
super(resourceRef.object.textEditorModel.uri, telemetryInfo, kind, configService, fileConfigService, chatService, fileService, undoRedoService, instantiationService, aiEditTelemetryService);
|
|
37
56
|
this._multiDiffEntryDelegate = _multiDiffEntryDelegate;
|
|
38
57
|
this._textFileService = _textFileService;
|
|
39
58
|
this._docFileEditorModel = this._register(resourceRef).object;
|
|
@@ -47,7 +66,13 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
47
66
|
this._notifySessionAction(action === ModifiedFileEntryState.Accepted ? 'accepted' : 'rejected');
|
|
48
67
|
}));
|
|
49
68
|
this._register(this._textModelChangeService.onDidAcceptOrRejectLines(action => {
|
|
50
|
-
this._notifyAction({
|
|
69
|
+
this._notifyAction({
|
|
70
|
+
kind: 'chatEditingHunkAction',
|
|
71
|
+
uri: this.modifiedURI,
|
|
72
|
+
outcome: action.state,
|
|
73
|
+
languageId: this.modifiedModel.getLanguageId(),
|
|
74
|
+
...action
|
|
75
|
+
});
|
|
51
76
|
}));
|
|
52
77
|
(async () => {
|
|
53
78
|
const reference = await textModelService.createModelReference(docSnapshot.uri);
|
|
@@ -70,7 +95,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
70
95
|
if (inProgress) {
|
|
71
96
|
const res = this._lastModifyingResponseObs.read(r);
|
|
72
97
|
const req = res && res.session.getRequests().find(value => value.id === res.requestId);
|
|
73
|
-
resourceFilter.value = markerService.installResourceFilter(this.modifiedURI, req?.message.text || ( localize(
|
|
98
|
+
resourceFilter.value = markerService.installResourceFilter(this.modifiedURI, req?.message.text || ( localize(5047, "Chat Edits")));
|
|
74
99
|
}
|
|
75
100
|
else {
|
|
76
101
|
resourceFilter.clear();
|
|
@@ -112,7 +137,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
112
137
|
}
|
|
113
138
|
_createUndoRedoElement(response) {
|
|
114
139
|
const request = response.session.getRequests().find(req => req.id === response.requestId);
|
|
115
|
-
const label = request?.message.text ? ( localize(
|
|
140
|
+
const label = request?.message.text ? ( localize(5048, "Chat Edit: '{0}'", request.message.text)) : ( localize(5049, "Chat Edit"));
|
|
116
141
|
return ( new SingleModelEditStackElement(label, 'chat.edit', this.modifiedModel, null));
|
|
117
142
|
}
|
|
118
143
|
async acceptAgentEdits(resource, textEdits, isLastEdits, responseModel) {
|
|
@@ -186,7 +211,8 @@ ChatEditingModifiedDocumentEntry = ( __decorate([
|
|
|
186
211
|
( __param(12, ITextFileService)),
|
|
187
212
|
( __param(13, IFileService)),
|
|
188
213
|
( __param(14, IUndoRedoService)),
|
|
189
|
-
( __param(15, IInstantiationService))
|
|
214
|
+
( __param(15, IInstantiationService)),
|
|
215
|
+
( __param(16, IAiEditTelemetryService))
|
|
190
216
|
], ChatEditingModifiedDocumentEntry));
|
|
191
217
|
|
|
192
218
|
export { ChatEditingModifiedDocumentEntry };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { IUndoRedoElement } from "@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
11
11
|
import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service";
|
|
12
12
|
import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
13
13
|
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
14
|
+
import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
|
|
14
15
|
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
15
16
|
import { ChatEditKind, IModifiedEntryTelemetryInfo, IModifiedFileEntry, IModifiedFileEntryEditorIntegration, ISnapshotEntry, ModifiedFileEntryState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
16
17
|
import { IChatResponseModel } from "@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
@@ -31,6 +32,7 @@ export declare abstract class AbstractChatEditingModifiedFileEntry extends Dispo
|
|
|
31
32
|
protected readonly _fileService: IFileService;
|
|
32
33
|
private readonly _undoRedoService;
|
|
33
34
|
protected readonly _instantiationService: IInstantiationService;
|
|
35
|
+
private readonly _aiEditTelemetryService;
|
|
34
36
|
static readonly scheme = "modified-file-entry";
|
|
35
37
|
private static lastEntryId;
|
|
36
38
|
readonly entryId: string;
|
|
@@ -58,7 +60,7 @@ export declare abstract class AbstractChatEditingModifiedFileEntry extends Dispo
|
|
|
58
60
|
private _refCounter;
|
|
59
61
|
readonly abstract originalURI: URI;
|
|
60
62
|
protected readonly _userEditScheduler: RunOnceScheduler;
|
|
61
|
-
constructor(modifiedURI: URI, _telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, configService: IConfigurationService, _fileConfigService: IFilesConfigurationService, _chatService: IChatService, _fileService: IFileService, _undoRedoService: IUndoRedoService, _instantiationService: IInstantiationService);
|
|
63
|
+
constructor(modifiedURI: URI, _telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, configService: IConfigurationService, _fileConfigService: IFilesConfigurationService, _chatService: IChatService, _fileService: IFileService, _undoRedoService: IUndoRedoService, _instantiationService: IInstantiationService, _aiEditTelemetryService: IAiEditTelemetryService);
|
|
62
64
|
dispose(): void;
|
|
63
65
|
acquire(): this;
|
|
64
66
|
enableReviewModeUntilSettled(): void;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js
CHANGED
|
@@ -24,6 +24,8 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
24
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
25
25
|
import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service';
|
|
26
26
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
27
|
+
import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
|
|
28
|
+
import { EditDeltaInfo } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource';
|
|
27
29
|
import { ModifiedFileEntryState, ChatEditKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
28
30
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
29
31
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
@@ -40,7 +42,7 @@ class AutoAcceptControl {
|
|
|
40
42
|
this.cancel = cancel;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
const pendingRewriteMinimap = registerColor('minimap.chatEditHighlight', ( transparent(editorBackground, 0.6)), ( localize(
|
|
45
|
+
const pendingRewriteMinimap = registerColor('minimap.chatEditHighlight', ( transparent(editorBackground, 0.6)), ( localize(5050, "Color of pending edit regions in the minimap")));
|
|
44
46
|
let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFileEntry extends Disposable {
|
|
45
47
|
static { AbstractChatEditingModifiedFileEntry_1 = this; }
|
|
46
48
|
static { this.scheme = 'modified-file-entry'; }
|
|
@@ -51,7 +53,7 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
51
53
|
get lastModifyingRequestId() {
|
|
52
54
|
return this._telemetryInfo.requestId;
|
|
53
55
|
}
|
|
54
|
-
constructor(modifiedURI, _telemetryInfo, kind, configService, _fileConfigService, _chatService, _fileService, _undoRedoService, _instantiationService) {
|
|
56
|
+
constructor(modifiedURI, _telemetryInfo, kind, configService, _fileConfigService, _chatService, _fileService, _undoRedoService, _instantiationService, _aiEditTelemetryService) {
|
|
55
57
|
super();
|
|
56
58
|
this.modifiedURI = modifiedURI;
|
|
57
59
|
this._telemetryInfo = _telemetryInfo;
|
|
@@ -60,6 +62,7 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
60
62
|
this._fileService = _fileService;
|
|
61
63
|
this._undoRedoService = _undoRedoService;
|
|
62
64
|
this._instantiationService = _instantiationService;
|
|
65
|
+
this._aiEditTelemetryService = _aiEditTelemetryService;
|
|
63
66
|
this.entryId = `${AbstractChatEditingModifiedFileEntry_1.scheme}::${++AbstractChatEditingModifiedFileEntry_1.lastEntryId}`;
|
|
64
67
|
this._onDidDelete = this._register(( new Emitter()));
|
|
65
68
|
this.onDidDelete = this._onDidDelete.event;
|
|
@@ -189,9 +192,24 @@ let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFile
|
|
|
189
192
|
this._notifyAction({ kind: 'chatEditingSessionAction', uri: this.modifiedURI, hasRemainingEdits: false, outcome });
|
|
190
193
|
}
|
|
191
194
|
_notifyAction(action) {
|
|
195
|
+
if (action.kind === 'chatEditingHunkAction') {
|
|
196
|
+
this._aiEditTelemetryService.handleCodeAccepted({
|
|
197
|
+
suggestionId: undefined,
|
|
198
|
+
acceptanceMethod: 'accept',
|
|
199
|
+
presentation: 'highlightedEdit',
|
|
200
|
+
modelId: this._telemetryInfo.modelId,
|
|
201
|
+
modeId: this._telemetryInfo.modeId,
|
|
202
|
+
applyCodeBlockSuggestionId: this._telemetryInfo.applyCodeBlockSuggestionId,
|
|
203
|
+
editDeltaInfo: ( new EditDeltaInfo(action.linesAdded, action.linesRemoved, -1, -1)),
|
|
204
|
+
feature: this._telemetryInfo.feature,
|
|
205
|
+
languageId: action.languageId,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
192
208
|
this._chatService.notifyUserAction({
|
|
193
209
|
action,
|
|
194
210
|
agentId: this._telemetryInfo.agentId,
|
|
211
|
+
modelId: this._telemetryInfo.modelId,
|
|
212
|
+
modeId: this._telemetryInfo.modeId,
|
|
195
213
|
command: this._telemetryInfo.command,
|
|
196
214
|
sessionId: this._telemetryInfo.sessionId,
|
|
197
215
|
requestId: this._telemetryInfo.requestId,
|
|
@@ -234,7 +252,8 @@ AbstractChatEditingModifiedFileEntry = AbstractChatEditingModifiedFileEntry_1 =
|
|
|
234
252
|
( __param(5, IChatService)),
|
|
235
253
|
( __param(6, IFileService)),
|
|
236
254
|
( __param(7, IUndoRedoService)),
|
|
237
|
-
( __param(8, IInstantiationService))
|
|
255
|
+
( __param(8, IInstantiationService)),
|
|
256
|
+
( __param(9, IAiEditTelemetryService))
|
|
238
257
|
], AbstractChatEditingModifiedFileEntry));
|
|
239
258
|
|
|
240
259
|
export { AbstractChatEditingModifiedFileEntry, pendingRewriteMinimap };
|
|
@@ -24,6 +24,7 @@ import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
24
24
|
import { AbstractChatEditingModifiedFileEntry } from "./chatEditingModifiedFileEntry.js";
|
|
25
25
|
import { ChatEditingNotebookCellEntry } from "./notebook/chatEditingNotebookCellEntry.js";
|
|
26
26
|
import { ICellDiffInfo } from "./notebook/notebookCellChanges.js";
|
|
27
|
+
import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
|
|
27
28
|
export declare class ChatEditingModifiedNotebookEntry extends AbstractChatEditingModifiedFileEntry {
|
|
28
29
|
private readonly modifiedResourceRef;
|
|
29
30
|
private readonly _multiDiffEntryDelegate;
|
|
@@ -73,7 +74,7 @@ export declare class ChatEditingModifiedNotebookEntry extends AbstractChatEditin
|
|
|
73
74
|
private readonly initialContentComparer;
|
|
74
75
|
constructor(modifiedResourceRef: IReference<IResolvedNotebookEditorModel>, originalResourceRef: IReference<IResolvedNotebookEditorModel>, _multiDiffEntryDelegate: {
|
|
75
76
|
collapse: (transaction: ITransaction | undefined) => void;
|
|
76
|
-
}, transientOptions: TransientOptions | undefined, telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, initialContent: string, configurationService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, fileService: IFileService, instantiationService: IInstantiationService, textModelService: ITextModelService, modelService: IModelService, undoRedoService: IUndoRedoService, notebookEditorWorkerService: INotebookEditorWorkerService, loggingService: INotebookLoggingService, notebookResolver: INotebookEditorModelResolverService);
|
|
77
|
+
}, transientOptions: TransientOptions | undefined, telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, initialContent: string, configurationService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, fileService: IFileService, instantiationService: IInstantiationService, textModelService: ITextModelService, modelService: IModelService, undoRedoService: IUndoRedoService, notebookEditorWorkerService: INotebookEditorWorkerService, loggingService: INotebookLoggingService, notebookResolver: INotebookEditorModelResolverService, aiEditTelemetryService: IAiEditTelemetryService);
|
|
77
78
|
initializeModelsFromDiffImpl(cellsDiffInfo: CellDiffInfo[]): void;
|
|
78
79
|
private computeRequestId;
|
|
79
80
|
initializeModelsFromDiff(): Promise<void>;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js
CHANGED
|
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { streamToBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
4
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
5
|
import { StringSHA1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
|
|
6
|
-
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { DisposableStore, thenRegisterOrDispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { ResourceMap, ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
8
8
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
9
9
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
@@ -25,7 +25,7 @@ import { UndoRedoElementType } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
25
25
|
import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service';
|
|
26
26
|
import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
27
27
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
28
|
-
import { SnapshotContext } from '@codingame/monaco-vscode-
|
|
28
|
+
import { SnapshotContext } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
|
|
29
29
|
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
|
|
30
30
|
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
31
31
|
import { CellEditType, NotebookCellsChangeType, NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
@@ -44,6 +44,7 @@ import { ChatEditingNotebookDiffEditorIntegration, ChatEditingNotebookEditorInte
|
|
|
44
44
|
import { ChatEditingNotebookFileSystemProvider } from './notebook/chatEditingNotebookFileSystemProvider.js';
|
|
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
|
+
import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
|
|
47
48
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
48
49
|
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
49
50
|
import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/promise';
|
|
@@ -118,8 +119,8 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
118
119
|
}
|
|
119
120
|
return false;
|
|
120
121
|
}
|
|
121
|
-
constructor(modifiedResourceRef, originalResourceRef, _multiDiffEntryDelegate, transientOptions, telemetryInfo, kind, initialContent, configurationService, fileConfigService, chatService, fileService, instantiationService, textModelService, modelService, undoRedoService, notebookEditorWorkerService, loggingService, notebookResolver) {
|
|
122
|
-
super(modifiedResourceRef.object.notebook.uri, telemetryInfo, kind, configurationService, fileConfigService, chatService, fileService, undoRedoService, instantiationService);
|
|
122
|
+
constructor(modifiedResourceRef, originalResourceRef, _multiDiffEntryDelegate, transientOptions, telemetryInfo, kind, initialContent, configurationService, fileConfigService, chatService, fileService, instantiationService, textModelService, modelService, undoRedoService, notebookEditorWorkerService, loggingService, notebookResolver, aiEditTelemetryService) {
|
|
123
|
+
super(modifiedResourceRef.object.notebook.uri, telemetryInfo, kind, configurationService, fileConfigService, chatService, fileService, undoRedoService, instantiationService, aiEditTelemetryService);
|
|
123
124
|
this.modifiedResourceRef = modifiedResourceRef;
|
|
124
125
|
this._multiDiffEntryDelegate = _multiDiffEntryDelegate;
|
|
125
126
|
this.transientOptions = transientOptions;
|
|
@@ -396,7 +397,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
396
397
|
}
|
|
397
398
|
_createUndoRedoElement(response) {
|
|
398
399
|
const request = response.session.getRequests().find(req => req.id === response.requestId);
|
|
399
|
-
const label = request?.message.text ? ( localize(
|
|
400
|
+
const label = request?.message.text ? ( localize(5051, "Chat Edit: '{0}'", request.message.text)) : ( localize(5052, "Chat Edit"));
|
|
400
401
|
const transientOptions = this.transientOptions;
|
|
401
402
|
const outputSizeLimit = this.configurationService.getValue(NotebookSetting.outputBackupSizeLimit) * 1024;
|
|
402
403
|
let initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
|
|
@@ -810,15 +811,26 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
810
811
|
if (!cell) {
|
|
811
812
|
throw ( new Error('Cell not found'));
|
|
812
813
|
}
|
|
813
|
-
const model = this.cellTextModelMap.get(cell.uri)
|
|
814
|
-
|
|
815
|
-
|
|
814
|
+
const model = this.cellTextModelMap.get(cell.uri);
|
|
815
|
+
if (model) {
|
|
816
|
+
this.cellTextModelMap.set(cell.uri, model);
|
|
817
|
+
return model;
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
const textEditorModel = await thenRegisterOrDispose(this.textModelService.createModelReference(cell.uri), this._store);
|
|
821
|
+
const model = textEditorModel.object.textEditorModel;
|
|
822
|
+
this.cellTextModelMap.set(cell.uri, model);
|
|
823
|
+
return model;
|
|
824
|
+
}
|
|
816
825
|
}
|
|
817
826
|
getOrCreateModifiedTextFileEntryForCell(cell, modifiedCellModel, originalCellModel) {
|
|
818
827
|
let cellEntry = this.cellEntryMap.get(cell.uri);
|
|
819
828
|
if (cellEntry) {
|
|
820
829
|
return cellEntry;
|
|
821
830
|
}
|
|
831
|
+
if (this._store.isDisposed) {
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
822
834
|
const disposables = ( new DisposableStore());
|
|
823
835
|
cellEntry = this._register(this._instantiationService.createInstance(ChatEditingNotebookCellEntry, this.modifiedResourceRef.object.resource, cell, modifiedCellModel, originalCellModel, disposables));
|
|
824
836
|
this.cellEntryMap.set(cell.uri, cellEntry);
|
|
@@ -877,7 +889,8 @@ ChatEditingModifiedNotebookEntry = ChatEditingModifiedNotebookEntry_1 = ( __deco
|
|
|
877
889
|
( __param(14, IUndoRedoService)),
|
|
878
890
|
( __param(15, INotebookEditorWorkerService)),
|
|
879
891
|
( __param(16, INotebookLoggingService)),
|
|
880
|
-
( __param(17, INotebookEditorModelResolverService))
|
|
892
|
+
( __param(17, INotebookEditorModelResolverService)),
|
|
893
|
+
( __param(18, IAiEditTelemetryService))
|
|
881
894
|
], ChatEditingModifiedNotebookEntry));
|
|
882
895
|
function generateCellHash(cellUri) {
|
|
883
896
|
const hash = ( new StringSHA1());
|