@codingame/monaco-vscode-chat-service-override 25.1.2 → 26.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 +24 -3
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +23 -3
- package/vscode/src/vs/platform/browserElements/common/browserElements.js +13 -6
- package/vscode/src/vs/platform/domWidget/browser/domWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +42 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +218 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatTerminalOutputAccessibleView.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +165 -168
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +27 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +141 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +189 -121
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +14 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +435 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +28 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +10 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +37 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +54 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +73 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +71 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +151 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +12 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +39 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +90 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +263 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +188 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +37 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +21 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +392 -226
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +31 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +25 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +319 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +215 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +951 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agentsessionprojection.css +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +388 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +394 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +31 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +49 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +188 -151
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1012 -639
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +256 -151
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +182 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +253 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +69 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +52 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +274 -155
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +130 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +385 -160
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +53 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +112 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +19 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +31 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +39 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNewNotebookContentEdits.js +10 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +25 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +265 -203
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +114 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +16 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +44 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +119 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +152 -136
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +51 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +323 -217
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +653 -401
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +52 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +43 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +182 -136
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +548 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +222 -138
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +151 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +453 -217
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +162 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +309 -233
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +55 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +73 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +333 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +39 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +23 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +65 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +48 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +20 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +155 -159
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +24 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +521 -246
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +107 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +28 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.js +10 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.js +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatLayoutService.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +56 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +37 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +1284 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +179 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +9 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/editorHoverWrapper.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +96 -78
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +58 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +25 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +484 -292
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +65 -92
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +331 -189
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +81 -93
- package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +36 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +169 -31
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +141 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +218 -144
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatTransferService.js +20 -10
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +109 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +349 -0
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +139 -36
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +3 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +64 -51
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +49 -34
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +21 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +125 -97
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +91 -131
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +8 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +488 -222
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +32 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +58 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +717 -200
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +79 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +371 -130
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +3 -7
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +27 -21
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +7 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +26 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -60
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +115 -426
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +127 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +334 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +424 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +368 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +23 -25
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +7 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +34 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +8 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +103 -95
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +28 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +4 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +12 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +65 -54
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +86 -60
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +13 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +56 -46
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +63 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +35 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +44 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +3 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +70 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +26 -394
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +85 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +68 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +67 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +106 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +177 -97
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +136 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +128 -112
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +51 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +25 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +21 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +5 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +2 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +30 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +19 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +31 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +325 -199
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +33 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +45 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +746 -456
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +145 -98
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +88 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +120 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +25 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +58 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +47 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +0 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +0 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +0 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +0 -243
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +0 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +0 -166
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +0 -607
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +0 -255
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -396
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -379
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -117
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -141
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -961
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -447
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -251
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +0 -42
|
@@ -16,8 +16,8 @@ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/
|
|
|
16
16
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
17
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
18
18
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
19
|
-
import { NotebookDeletedCellDecorator } from '@codingame/monaco-vscode-
|
|
20
|
-
import { NotebookInsertedCellDecorator } from '@codingame/monaco-vscode-
|
|
19
|
+
import { NotebookDeletedCellDecorator } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator';
|
|
20
|
+
import { NotebookInsertedCellDecorator } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator';
|
|
21
21
|
import { NotebookModifiedCellDecorator } from '../../../../notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js';
|
|
22
22
|
import { getNotebookEditorFromEditorPane, CellEditState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
23
23
|
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
@@ -31,19 +31,40 @@ import { debouncedObservable } from '@codingame/monaco-vscode-api/vscode/vs/base
|
|
|
31
31
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
32
32
|
|
|
33
33
|
let ChatEditingNotebookEditorIntegration = class ChatEditingNotebookEditorIntegration extends Disposable {
|
|
34
|
-
constructor(
|
|
34
|
+
constructor(
|
|
35
|
+
_entry,
|
|
36
|
+
editor,
|
|
37
|
+
notebookModel,
|
|
38
|
+
originalModel,
|
|
39
|
+
cellChanges,
|
|
40
|
+
instantiationService
|
|
41
|
+
) {
|
|
35
42
|
super();
|
|
36
43
|
this.instantiationService = instantiationService;
|
|
37
44
|
const notebookEditor = getNotebookEditorFromEditorPane(editor);
|
|
38
45
|
assertType(notebookEditor);
|
|
39
46
|
this.notebookEditor = notebookEditor;
|
|
40
|
-
this.integration = this.instantiationService.createInstance(
|
|
47
|
+
this.integration = this.instantiationService.createInstance(
|
|
48
|
+
ChatEditingNotebookEditorWidgetIntegration,
|
|
49
|
+
_entry,
|
|
50
|
+
notebookEditor,
|
|
51
|
+
notebookModel,
|
|
52
|
+
originalModel,
|
|
53
|
+
cellChanges
|
|
54
|
+
);
|
|
41
55
|
this._register(editor.onDidChangeControl(() => {
|
|
42
56
|
const notebookEditor = getNotebookEditorFromEditorPane(editor);
|
|
43
57
|
if (notebookEditor && notebookEditor !== this.notebookEditor) {
|
|
44
58
|
this.notebookEditor = notebookEditor;
|
|
45
59
|
this.integration.dispose();
|
|
46
|
-
this.integration = this.instantiationService.createInstance(
|
|
60
|
+
this.integration = this.instantiationService.createInstance(
|
|
61
|
+
ChatEditingNotebookEditorWidgetIntegration,
|
|
62
|
+
_entry,
|
|
63
|
+
notebookEditor,
|
|
64
|
+
notebookModel,
|
|
65
|
+
originalModel,
|
|
66
|
+
cellChanges
|
|
67
|
+
);
|
|
47
68
|
}
|
|
48
69
|
}));
|
|
49
70
|
}
|
|
@@ -76,11 +97,20 @@ let ChatEditingNotebookEditorIntegration = class ChatEditingNotebookEditorIntegr
|
|
|
76
97
|
super.dispose();
|
|
77
98
|
}
|
|
78
99
|
};
|
|
79
|
-
ChatEditingNotebookEditorIntegration = ( __decorate([
|
|
80
|
-
( __param(5, IInstantiationService))
|
|
81
|
-
], ChatEditingNotebookEditorIntegration));
|
|
100
|
+
ChatEditingNotebookEditorIntegration = ( __decorate([( __param(5, IInstantiationService))], ChatEditingNotebookEditorIntegration));
|
|
82
101
|
let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditorWidgetIntegration extends Disposable {
|
|
83
|
-
constructor(
|
|
102
|
+
constructor(
|
|
103
|
+
_entry,
|
|
104
|
+
notebookEditor,
|
|
105
|
+
notebookModel,
|
|
106
|
+
originalModel,
|
|
107
|
+
cellChanges,
|
|
108
|
+
instantiationService,
|
|
109
|
+
_editorService,
|
|
110
|
+
notebookEditorService,
|
|
111
|
+
accessibilitySignalService,
|
|
112
|
+
logService
|
|
113
|
+
) {
|
|
84
114
|
super();
|
|
85
115
|
this._entry = _entry;
|
|
86
116
|
this.notebookEditor = notebookEditor;
|
|
@@ -93,13 +123,16 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
93
123
|
this._currentIndex = observableValue(this, -1);
|
|
94
124
|
this.currentIndex = this._currentIndex;
|
|
95
125
|
this.cellEditorIntegrations = ( new Map());
|
|
96
|
-
this.markdownEditState = observableValue(this,
|
|
126
|
+
this.markdownEditState = observableValue(this, "");
|
|
97
127
|
this.markupCellListeners = ( new Map());
|
|
98
128
|
this.sortedCellChanges = [];
|
|
99
129
|
this.changeIndexComputer = ( new PrefixSumComputer(( new Uint32Array(0))));
|
|
100
|
-
const onDidChangeVisibleRanges = debouncedObservable(observableFromEvent(
|
|
130
|
+
const onDidChangeVisibleRanges = debouncedObservable(observableFromEvent(
|
|
131
|
+
notebookEditor.onDidChangeVisibleRanges,
|
|
132
|
+
() => notebookEditor.visibleRanges
|
|
133
|
+
), 50);
|
|
101
134
|
this._register(toDisposable(() => {
|
|
102
|
-
this.markupCellListeners.forEach(
|
|
135
|
+
this.markupCellListeners.forEach(v => v.dispose());
|
|
103
136
|
}));
|
|
104
137
|
let originalReadonly = undefined;
|
|
105
138
|
const shouldBeReadonly = ( _entry.isCurrentlyBeingModifiedBy.map(value => !!value));
|
|
@@ -111,13 +144,20 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
111
144
|
}
|
|
112
145
|
if (isReadOnly) {
|
|
113
146
|
originalReadonly ??= notebookEditor.isReadOnly;
|
|
114
|
-
notebookEditor.setOptions({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
147
|
+
notebookEditor.setOptions({
|
|
148
|
+
isReadOnly: true
|
|
149
|
+
});
|
|
150
|
+
} else if (originalReadonly === false) {
|
|
151
|
+
notebookEditor.setOptions({
|
|
152
|
+
isReadOnly: false
|
|
153
|
+
});
|
|
118
154
|
const timeout = setTimeout(() => {
|
|
119
|
-
notebookEditor.setOptions({
|
|
120
|
-
|
|
155
|
+
notebookEditor.setOptions({
|
|
156
|
+
isReadOnly: true
|
|
157
|
+
});
|
|
158
|
+
notebookEditor.setOptions({
|
|
159
|
+
isReadOnly: false
|
|
160
|
+
});
|
|
121
161
|
disposable.dispose();
|
|
122
162
|
}, 100);
|
|
123
163
|
const disposable = toDisposable(() => clearTimeout(timeout));
|
|
@@ -126,13 +166,10 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
126
166
|
}));
|
|
127
167
|
let lastModifyingRequestId;
|
|
128
168
|
this._store.add(autorun(r => {
|
|
129
|
-
if (!_entry.isCurrentlyBeingModifiedBy.read(r)
|
|
130
|
-
&& !_entry.isProcessingResponse.read(r)
|
|
131
|
-
&& lastModifyingRequestId !== _entry.lastModifyingRequestId
|
|
132
|
-
&& ( cellChanges.read(r).some(c => c.type !== 'unchanged' && !c.diff.read(r).identical))) {
|
|
169
|
+
if (!_entry.isCurrentlyBeingModifiedBy.read(r) && !_entry.isProcessingResponse.read(r) && lastModifyingRequestId !== _entry.lastModifyingRequestId && ( cellChanges.read(r).some(c => c.type !== "unchanged" && !c.diff.read(r).identical))) {
|
|
133
170
|
lastModifyingRequestId = _entry.lastModifyingRequestId;
|
|
134
171
|
const visibleChange = this.sortedCellChanges.find(c => {
|
|
135
|
-
if (c.type ===
|
|
172
|
+
if (c.type === "unchanged") {
|
|
136
173
|
return false;
|
|
137
174
|
}
|
|
138
175
|
const index = c.modifiedCellIndex ?? c.originalCellIndex;
|
|
@@ -147,9 +184,9 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
147
184
|
this.sortedCellChanges = sortCellChanges(cellChanges.read(r));
|
|
148
185
|
const indexes = [];
|
|
149
186
|
for (const change of this.sortedCellChanges) {
|
|
150
|
-
indexes.push(
|
|
151
|
-
: change.type ===
|
|
152
|
-
|
|
187
|
+
indexes.push(
|
|
188
|
+
change.type === "insert" || change.type === "delete" ? 1 : change.type === "modified" ? change.diff.read(r).changes.length : 0
|
|
189
|
+
);
|
|
153
190
|
}
|
|
154
191
|
this.changeIndexComputer = ( new PrefixSumComputer(( new Uint32Array(indexes))));
|
|
155
192
|
if (this.changeIndexComputer.getTotalSum() === 0) {
|
|
@@ -161,22 +198,31 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
161
198
|
return;
|
|
162
199
|
}
|
|
163
200
|
const sortedCellChanges = sortCellChanges(cellChanges.read(r));
|
|
164
|
-
const changes = sortedCellChanges.filter(c => c.type !==
|
|
201
|
+
const changes = sortedCellChanges.filter(c => c.type !== "delete");
|
|
165
202
|
onDidChangeVisibleRanges.read(r);
|
|
166
203
|
if (!changes.length) {
|
|
167
|
-
this.cellEditorIntegrations.forEach((
|
|
168
|
-
|
|
204
|
+
this.cellEditorIntegrations.forEach((
|
|
205
|
+
{
|
|
206
|
+
diff
|
|
207
|
+
}
|
|
208
|
+
) => {
|
|
209
|
+
diff.set({
|
|
210
|
+
...diff.read(undefined),
|
|
211
|
+
...nullDocumentDiff
|
|
212
|
+
}, undefined);
|
|
169
213
|
});
|
|
170
214
|
return;
|
|
171
215
|
}
|
|
172
216
|
this.markdownEditState.read(r);
|
|
173
217
|
const validCells = ( new Set());
|
|
174
|
-
changes.forEach(
|
|
218
|
+
changes.forEach(change => {
|
|
175
219
|
if (change.modifiedCellIndex === undefined || change.modifiedCellIndex >= notebookModel.cells.length) {
|
|
176
220
|
return;
|
|
177
221
|
}
|
|
178
222
|
const cell = notebookModel.cells[change.modifiedCellIndex];
|
|
179
|
-
const editor = notebookEditor.codeEditors.find(
|
|
223
|
+
const editor = notebookEditor.codeEditors.find(
|
|
224
|
+
([vm]) => vm.handle === notebookModel.cells[change.modifiedCellIndex].handle
|
|
225
|
+
)?.[1];
|
|
180
226
|
const modifiedModel = change.modifiedModel.promiseResult.read(r)?.data;
|
|
181
227
|
const originalModel = change.originalModel.promiseResult.read(r)?.data;
|
|
182
228
|
if (!cell || !originalModel || !modifiedModel) {
|
|
@@ -185,9 +231,12 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
185
231
|
if (cell.cellKind === CellKind.Markup && !( this.markupCellListeners.has(cell.handle))) {
|
|
186
232
|
const cellModel = this.notebookEditor.getViewModel()?.viewCells.find(c => c.handle === cell.handle);
|
|
187
233
|
if (cellModel) {
|
|
188
|
-
const listener = cellModel.onDidChangeState(
|
|
234
|
+
const listener = cellModel.onDidChangeState(e => {
|
|
189
235
|
if (e.editStateChanged) {
|
|
190
|
-
setTimeout(
|
|
236
|
+
setTimeout(
|
|
237
|
+
() => this.markdownEditState.set(cellModel.handle + "-" + cellModel.getEditState(), undefined),
|
|
238
|
+
0
|
|
239
|
+
);
|
|
191
240
|
}
|
|
192
241
|
});
|
|
193
242
|
this.markupCellListeners.set(cell.handle, listener);
|
|
@@ -209,11 +258,13 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
209
258
|
if (!areDocumentDiff2Equal(currentDiff.diff.read(undefined), diff)) {
|
|
210
259
|
currentDiff.diff.set(diff, undefined);
|
|
211
260
|
}
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
261
|
+
} else {
|
|
214
262
|
const diff2 = observableValue(`diff${cell.handle}`, diff);
|
|
215
263
|
const integration = this.instantiationService.createInstance(ChatEditingCodeEditorIntegration, _entry, editor, diff2, true);
|
|
216
|
-
this.cellEditorIntegrations.set(cell, {
|
|
264
|
+
this.cellEditorIntegrations.set(cell, {
|
|
265
|
+
integration,
|
|
266
|
+
diff: diff2
|
|
267
|
+
});
|
|
217
268
|
this._register(integration);
|
|
218
269
|
this._register(editor.onDidDispose(() => {
|
|
219
270
|
this.cellEditorIntegrations.get(cell)?.integration.dispose();
|
|
@@ -240,20 +291,19 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
240
291
|
if (this.notebookEditor.textModel !== this.notebookModel || !cellsAreVisible.read(r) || !this.notebookEditor.getViewModel()) {
|
|
241
292
|
return;
|
|
242
293
|
}
|
|
243
|
-
const changes = debouncedChanges.read(r).filter(c => c.type ===
|
|
244
|
-
const modifiedChanges = changes.filter(c => c.type ===
|
|
294
|
+
const changes = debouncedChanges.read(r).filter(c => c.type === "insert" ? !c.diff.read(r).identical : true);
|
|
295
|
+
const modifiedChanges = changes.filter(c => c.type === "modified");
|
|
245
296
|
this.createDecorators();
|
|
246
|
-
if (changes.every(c => c.type ===
|
|
297
|
+
if (changes.every(c => c.type === "insert")) {
|
|
247
298
|
this.insertedCellDecorator?.apply([]);
|
|
248
299
|
this.modifiedCellDecorator?.apply([]);
|
|
249
300
|
this.deletedCellDecorator?.apply([], originalModel);
|
|
250
301
|
this.overlayToolbarDecorator?.decorate([]);
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
302
|
+
} else {
|
|
253
303
|
this.insertedCellDecorator?.apply(changes);
|
|
254
304
|
this.modifiedCellDecorator?.apply(modifiedChanges);
|
|
255
305
|
this.deletedCellDecorator?.apply(changes, originalModel);
|
|
256
|
-
this.overlayToolbarDecorator?.decorate(changes.filter(c => c.type ===
|
|
306
|
+
this.overlayToolbarDecorator?.decorate(changes.filter(c => c.type === "insert" || c.type === "modified"));
|
|
257
307
|
}
|
|
258
308
|
}));
|
|
259
309
|
}
|
|
@@ -261,7 +311,10 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
261
311
|
const currentIndex = Math.min(this._currentIndex.get(), this.changeIndexComputer.getTotalSum() - 1);
|
|
262
312
|
const index = this.changeIndexComputer.getIndexOf(currentIndex);
|
|
263
313
|
const change = this.sortedCellChanges[index.index];
|
|
264
|
-
return change ? {
|
|
314
|
+
return change ? {
|
|
315
|
+
change,
|
|
316
|
+
index: index.remainder
|
|
317
|
+
} : undefined;
|
|
265
318
|
}
|
|
266
319
|
updateCurrentIndex(change, indexInCell = 0) {
|
|
267
320
|
const index = this.sortedCellChanges.indexOf(change);
|
|
@@ -272,48 +325,65 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
272
325
|
createDecorators() {
|
|
273
326
|
const cellChanges = this.cellChanges.get();
|
|
274
327
|
const accessibilitySignalService = this.accessibilitySignalService;
|
|
275
|
-
this.insertedCellDecorator ??= this._register(
|
|
276
|
-
|
|
277
|
-
|
|
328
|
+
this.insertedCellDecorator ??= this._register(
|
|
329
|
+
this.instantiationService.createInstance(NotebookInsertedCellDecorator, this.notebookEditor)
|
|
330
|
+
);
|
|
331
|
+
this.modifiedCellDecorator ??= this._register(
|
|
332
|
+
this.instantiationService.createInstance(NotebookModifiedCellDecorator, this.notebookEditor)
|
|
333
|
+
);
|
|
334
|
+
this.overlayToolbarDecorator ??= this._register(
|
|
335
|
+
this.instantiationService.createInstance(OverlayToolbarDecorator, this.notebookEditor, this.notebookModel)
|
|
336
|
+
);
|
|
278
337
|
if (this.deletedCellDecorator) {
|
|
279
338
|
this._store.delete(this.deletedCellDecorator);
|
|
280
339
|
this.deletedCellDecorator.dispose();
|
|
281
340
|
}
|
|
282
|
-
this.deletedCellDecorator = this._register(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
341
|
+
this.deletedCellDecorator = this._register(
|
|
342
|
+
this.instantiationService.createInstance(NotebookDeletedCellDecorator, this.notebookEditor, {
|
|
343
|
+
className: "chat-diff-change-content-widget",
|
|
344
|
+
telemetrySource: "chatEditingNotebookHunk",
|
|
345
|
+
menuId: MenuId.ChatEditingEditorHunk,
|
|
346
|
+
actionViewItemProvider: (action, options) => {
|
|
347
|
+
if (!action.class) {
|
|
348
|
+
return new (class extends ActionViewItem {
|
|
349
|
+
constructor() {
|
|
350
|
+
super(undefined, action, {
|
|
351
|
+
...options,
|
|
352
|
+
keybindingNotRenderedWithLabel: true ,
|
|
353
|
+
icon: false,
|
|
354
|
+
label: true
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
})();
|
|
358
|
+
}
|
|
359
|
+
return undefined;
|
|
360
|
+
},
|
|
361
|
+
argFactory: deletedCellIndex => {
|
|
362
|
+
return {
|
|
363
|
+
accept() {
|
|
364
|
+
const entry = cellChanges.find(c => c.type === "delete" && c.originalCellIndex === deletedCellIndex);
|
|
365
|
+
if (entry) {
|
|
366
|
+
return entry.keep(entry.diff.get().changes[0]);
|
|
367
|
+
}
|
|
368
|
+
accessibilitySignalService.playSignal(AccessibilitySignal.editsKept, {
|
|
369
|
+
allowManyInParallel: true
|
|
370
|
+
});
|
|
371
|
+
return Promise.resolve(true);
|
|
372
|
+
},
|
|
373
|
+
reject() {
|
|
374
|
+
const entry = cellChanges.find(c => c.type === "delete" && c.originalCellIndex === deletedCellIndex);
|
|
375
|
+
if (entry) {
|
|
376
|
+
return entry.undo(entry.diff.get().changes[0]);
|
|
377
|
+
}
|
|
378
|
+
accessibilitySignalService.playSignal(AccessibilitySignal.editsUndone, {
|
|
379
|
+
allowManyInParallel: true
|
|
380
|
+
});
|
|
381
|
+
return Promise.resolve(true);
|
|
291
382
|
}
|
|
292
|
-
}
|
|
383
|
+
};
|
|
293
384
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
argFactory: (deletedCellIndex) => {
|
|
297
|
-
return {
|
|
298
|
-
accept() {
|
|
299
|
-
const entry = cellChanges.find(c => c.type === 'delete' && c.originalCellIndex === deletedCellIndex);
|
|
300
|
-
if (entry) {
|
|
301
|
-
return entry.keep(entry.diff.get().changes[0]);
|
|
302
|
-
}
|
|
303
|
-
accessibilitySignalService.playSignal(AccessibilitySignal.editsKept, { allowManyInParallel: true });
|
|
304
|
-
return Promise.resolve(true);
|
|
305
|
-
},
|
|
306
|
-
reject() {
|
|
307
|
-
const entry = cellChanges.find(c => c.type === 'delete' && c.originalCellIndex === deletedCellIndex);
|
|
308
|
-
if (entry) {
|
|
309
|
-
return entry.undo(entry.diff.get().changes[0]);
|
|
310
|
-
}
|
|
311
|
-
accessibilitySignalService.playSignal(AccessibilitySignal.editsUndone, { allowManyInParallel: true });
|
|
312
|
-
return Promise.resolve(true);
|
|
313
|
-
},
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
}));
|
|
385
|
+
})
|
|
386
|
+
);
|
|
317
387
|
}
|
|
318
388
|
getCell(modifiedCellIndex) {
|
|
319
389
|
const cell = this.notebookModel.cells[modifiedCellIndex];
|
|
@@ -321,7 +391,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
321
391
|
return integration;
|
|
322
392
|
}
|
|
323
393
|
reveal(firstOrLast) {
|
|
324
|
-
const changes = this.sortedCellChanges.filter(c => c.type !==
|
|
394
|
+
const changes = this.sortedCellChanges.filter(c => c.type !== "unchanged");
|
|
325
395
|
if (!changes.length) {
|
|
326
396
|
return;
|
|
327
397
|
}
|
|
@@ -330,45 +400,46 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
330
400
|
}
|
|
331
401
|
_revealFirstOrLast(change, firstOrLast = true) {
|
|
332
402
|
switch (change.type) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.blur(this.getCurrentChange()?.change);
|
|
337
|
-
const index = firstOrLast || change.type === 'insert' ? 0 : change.diff.get().changes.length - 1;
|
|
338
|
-
return this._revealChange(change, index);
|
|
339
|
-
}
|
|
340
|
-
case 'delete':
|
|
403
|
+
case "insert":
|
|
404
|
+
case "modified":
|
|
405
|
+
{
|
|
341
406
|
this.blur(this.getCurrentChange()?.change);
|
|
342
|
-
|
|
343
|
-
this.
|
|
344
|
-
|
|
407
|
+
const index = firstOrLast || change.type === "insert" ? 0 : change.diff.get().changes.length - 1;
|
|
408
|
+
return this._revealChange(change, index);
|
|
409
|
+
}
|
|
410
|
+
case "delete":
|
|
411
|
+
this.blur(this.getCurrentChange()?.change);
|
|
412
|
+
this.deletedCellDecorator?.reveal(change.originalCellIndex);
|
|
413
|
+
this.updateCurrentIndex(change);
|
|
414
|
+
return true;
|
|
345
415
|
}
|
|
346
416
|
return false;
|
|
347
417
|
}
|
|
348
418
|
_revealChange(change, indexInCell) {
|
|
349
419
|
switch (change.type) {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
break;
|
|
420
|
+
case "insert":
|
|
421
|
+
case "modified":
|
|
422
|
+
{
|
|
423
|
+
const textChange = change.diff.get().changes[indexInCell];
|
|
424
|
+
const cellViewModel = this.getCellViewModel(change);
|
|
425
|
+
if (cellViewModel) {
|
|
426
|
+
this.updateCurrentIndex(change, indexInCell);
|
|
427
|
+
this.revealChangeInView(cellViewModel, textChange?.modified, change).catch(err => {
|
|
428
|
+
this.logService.warn(`Error revealing change in view: ${err}`);
|
|
429
|
+
});
|
|
430
|
+
return true;
|
|
362
431
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
case "delete":
|
|
435
|
+
this.updateCurrentIndex(change);
|
|
436
|
+
this.deletedCellDecorator?.reveal(change.originalCellIndex);
|
|
437
|
+
return true;
|
|
367
438
|
}
|
|
368
439
|
return false;
|
|
369
440
|
}
|
|
370
441
|
getCellViewModel(change) {
|
|
371
|
-
if (change.type ===
|
|
442
|
+
if (change.type === "delete" || change.modifiedCellIndex === undefined || change.modifiedCellIndex >= this.notebookModel.cells.length) {
|
|
372
443
|
return undefined;
|
|
373
444
|
}
|
|
374
445
|
const cell = this.notebookModel.cells[change.modifiedCellIndex];
|
|
@@ -377,19 +448,20 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
377
448
|
}
|
|
378
449
|
async revealChangeInView(cell, lines, change) {
|
|
379
450
|
const targetLines = lines ?? ( new LineRange(0, 0));
|
|
380
|
-
if (change.type ===
|
|
381
|
-
cell.updateEditState(CellEditState.Editing,
|
|
451
|
+
if (change.type === "modified" && cell.cellKind === CellKind.Markup && cell.getEditState() === CellEditState.Preview) {
|
|
452
|
+
cell.updateEditState(CellEditState.Editing, "chatEditNavigation");
|
|
382
453
|
}
|
|
383
|
-
const focusTarget = cell.cellKind === CellKind.Code || change.type ===
|
|
384
|
-
await this.notebookEditor.focusNotebookCell(cell, focusTarget, {
|
|
454
|
+
const focusTarget = cell.cellKind === CellKind.Code || change.type === "modified" ? "editor" : "container";
|
|
455
|
+
await this.notebookEditor.focusNotebookCell(cell, focusTarget, {
|
|
456
|
+
focusEditorLine: targetLines.startLineNumber
|
|
457
|
+
});
|
|
385
458
|
await this.notebookEditor.revealRangeInCenterAsync(cell, ( new Range(targetLines.startLineNumber, 0, targetLines.endLineNumberExclusive, 0)));
|
|
386
459
|
}
|
|
387
460
|
revertMarkupCellState() {
|
|
388
461
|
for (const change of this.sortedCellChanges) {
|
|
389
462
|
const cellViewModel = this.getCellViewModel(change);
|
|
390
|
-
if (cellViewModel?.cellKind === CellKind.Markup && cellViewModel.getEditState() === CellEditState.Editing &&
|
|
391
|
-
|
|
392
|
-
cellViewModel.updateEditState(CellEditState.Preview, 'chatEdit');
|
|
463
|
+
if (cellViewModel?.cellKind === CellKind.Markup && cellViewModel.getEditState() === CellEditState.Editing && (cellViewModel.editStateSource === "chatEditNavigation" || cellViewModel.editStateSource === "chatEdit")) {
|
|
464
|
+
cellViewModel.updateEditState(CellEditState.Preview, "chatEdit");
|
|
393
465
|
}
|
|
394
466
|
}
|
|
395
467
|
}
|
|
@@ -398,12 +470,12 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
398
470
|
return;
|
|
399
471
|
}
|
|
400
472
|
const cellViewModel = this.getCellViewModel(change);
|
|
401
|
-
if (cellViewModel?.cellKind === CellKind.Markup && cellViewModel.getEditState() === CellEditState.Editing && cellViewModel.editStateSource ===
|
|
402
|
-
cellViewModel.updateEditState(CellEditState.Preview,
|
|
473
|
+
if (cellViewModel?.cellKind === CellKind.Markup && cellViewModel.getEditState() === CellEditState.Editing && cellViewModel.editStateSource === "chatEditNavigation") {
|
|
474
|
+
cellViewModel.updateEditState(CellEditState.Preview, "chatEditNavigation");
|
|
403
475
|
}
|
|
404
476
|
}
|
|
405
477
|
next(wrap) {
|
|
406
|
-
const changes = this.sortedCellChanges.filter(c => c.type !==
|
|
478
|
+
const changes = this.sortedCellChanges.filter(c => c.type !== "unchanged");
|
|
407
479
|
const currentChange = this.getCurrentChange();
|
|
408
480
|
if (!currentChange) {
|
|
409
481
|
const firstChange = changes[0];
|
|
@@ -413,38 +485,38 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
413
485
|
return false;
|
|
414
486
|
}
|
|
415
487
|
switch (currentChange.change.type) {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
const isLastChangeInCell = currentChange.index >= lastChangeIndex(currentChange.change);
|
|
426
|
-
const index = isLastChangeInCell ? 0 : currentChange.index + 1;
|
|
427
|
-
const change = isLastChangeInCell ? changes[changes.indexOf(currentChange.change) + 1] : currentChange.change;
|
|
428
|
-
if (change) {
|
|
429
|
-
if (isLastChangeInCell) {
|
|
430
|
-
this.blur(currentChange.change);
|
|
431
|
-
}
|
|
432
|
-
if (this._revealChange(change, index)) {
|
|
433
|
-
return true;
|
|
434
|
-
}
|
|
488
|
+
case "modified":
|
|
489
|
+
{
|
|
490
|
+
const cellIntegration = this.getCell(currentChange.change.modifiedCellIndex);
|
|
491
|
+
if (cellIntegration) {
|
|
492
|
+
if (cellIntegration.next(false)) {
|
|
493
|
+
this.updateCurrentIndex(currentChange.change, cellIntegration.currentIndex.get());
|
|
494
|
+
return true;
|
|
435
495
|
}
|
|
436
496
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
{
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
497
|
+
const isLastChangeInCell = currentChange.index >= lastChangeIndex(currentChange.change);
|
|
498
|
+
const index = isLastChangeInCell ? 0 : currentChange.index + 1;
|
|
499
|
+
const change = isLastChangeInCell ? changes[changes.indexOf(currentChange.change) + 1] : currentChange.change;
|
|
500
|
+
if (change) {
|
|
501
|
+
if (isLastChangeInCell) {
|
|
502
|
+
this.blur(currentChange.change);
|
|
503
|
+
}
|
|
504
|
+
if (this._revealChange(change, index)) {
|
|
444
505
|
return true;
|
|
445
506
|
}
|
|
446
507
|
}
|
|
447
|
-
|
|
508
|
+
}
|
|
509
|
+
break;
|
|
510
|
+
case "insert":
|
|
511
|
+
case "delete":
|
|
512
|
+
{
|
|
513
|
+
this.blur(currentChange.change);
|
|
514
|
+
const nextChange = changes[changes.indexOf(currentChange.change) + 1];
|
|
515
|
+
if (nextChange && this._revealFirstOrLast(nextChange, true)) {
|
|
516
|
+
return true;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
break;
|
|
448
520
|
}
|
|
449
521
|
if (wrap) {
|
|
450
522
|
const firstChange = changes[0];
|
|
@@ -455,7 +527,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
455
527
|
return false;
|
|
456
528
|
}
|
|
457
529
|
previous(wrap) {
|
|
458
|
-
const changes = this.sortedCellChanges.filter(c => c.type !==
|
|
530
|
+
const changes = this.sortedCellChanges.filter(c => c.type !== "unchanged");
|
|
459
531
|
const currentChange = this.getCurrentChange();
|
|
460
532
|
if (!currentChange) {
|
|
461
533
|
const lastChange = changes[changes.length - 1];
|
|
@@ -465,38 +537,38 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
465
537
|
return false;
|
|
466
538
|
}
|
|
467
539
|
switch (currentChange.change.type) {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
const isFirstChangeInCell = currentChange.index <= 0;
|
|
478
|
-
const change = isFirstChangeInCell ? changes[changes.indexOf(currentChange.change) - 1] : currentChange.change;
|
|
479
|
-
if (change) {
|
|
480
|
-
const index = isFirstChangeInCell ? lastChangeIndex(change) : currentChange.index - 1;
|
|
481
|
-
if (isFirstChangeInCell) {
|
|
482
|
-
this.blur(currentChange.change);
|
|
483
|
-
}
|
|
484
|
-
if (this._revealChange(change, index)) {
|
|
485
|
-
return true;
|
|
486
|
-
}
|
|
540
|
+
case "modified":
|
|
541
|
+
{
|
|
542
|
+
const cellIntegration = this.getCell(currentChange.change.modifiedCellIndex);
|
|
543
|
+
if (cellIntegration) {
|
|
544
|
+
if (cellIntegration.previous(false)) {
|
|
545
|
+
this.updateCurrentIndex(currentChange.change, cellIntegration.currentIndex.get());
|
|
546
|
+
return true;
|
|
487
547
|
}
|
|
488
548
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
549
|
+
const isFirstChangeInCell = currentChange.index <= 0;
|
|
550
|
+
const change = isFirstChangeInCell ? changes[changes.indexOf(currentChange.change) - 1] : currentChange.change;
|
|
551
|
+
if (change) {
|
|
552
|
+
const index = isFirstChangeInCell ? lastChangeIndex(change) : currentChange.index - 1;
|
|
553
|
+
if (isFirstChangeInCell) {
|
|
554
|
+
this.blur(currentChange.change);
|
|
555
|
+
}
|
|
556
|
+
if (this._revealChange(change, index)) {
|
|
496
557
|
return true;
|
|
497
558
|
}
|
|
498
559
|
}
|
|
499
|
-
|
|
560
|
+
}
|
|
561
|
+
break;
|
|
562
|
+
case "insert":
|
|
563
|
+
case "delete":
|
|
564
|
+
{
|
|
565
|
+
this.blur(currentChange.change);
|
|
566
|
+
const prevChange = changes[changes.indexOf(currentChange.change) - 1];
|
|
567
|
+
if (prevChange && this._revealFirstOrLast(prevChange, false)) {
|
|
568
|
+
return true;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
break;
|
|
500
572
|
}
|
|
501
573
|
if (wrap) {
|
|
502
574
|
const lastChange = changes[changes.length - 1];
|
|
@@ -523,14 +595,12 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
523
595
|
async acceptNearestChange(hunk) {
|
|
524
596
|
if (hunk) {
|
|
525
597
|
await hunk.accept();
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
598
|
+
} else {
|
|
528
599
|
const current = this.getCurrentChange();
|
|
529
600
|
const focused = this.getfocusedIntegration();
|
|
530
|
-
if (current && !focused || current?.change.type ===
|
|
601
|
+
if (current && !focused || current?.change.type === "delete") {
|
|
531
602
|
current.change.keep(current?.change.diff.get().changes[current.index]);
|
|
532
|
-
}
|
|
533
|
-
else if (focused) {
|
|
603
|
+
} else if (focused) {
|
|
534
604
|
await focused.acceptNearestChange();
|
|
535
605
|
}
|
|
536
606
|
this._currentIndex.set(this._currentIndex.get() - 1, undefined);
|
|
@@ -540,14 +610,12 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
540
610
|
async rejectNearestChange(hunk) {
|
|
541
611
|
if (hunk) {
|
|
542
612
|
await hunk.reject();
|
|
543
|
-
}
|
|
544
|
-
else {
|
|
613
|
+
} else {
|
|
545
614
|
const current = this.getCurrentChange();
|
|
546
615
|
const focused = this.getfocusedIntegration();
|
|
547
|
-
if (current && !focused || current?.change.type ===
|
|
616
|
+
if (current && !focused || current?.change.type === "delete") {
|
|
548
617
|
current.change.undo(current.change.diff.get().changes[current.index]);
|
|
549
|
-
}
|
|
550
|
-
else if (focused) {
|
|
618
|
+
} else if (focused) {
|
|
551
619
|
await focused.rejectNearestChange();
|
|
552
620
|
}
|
|
553
621
|
this._currentIndex.set(this._currentIndex.get() - 1, undefined);
|
|
@@ -556,20 +624,18 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
556
624
|
}
|
|
557
625
|
async toggleDiff(_change, _show) {
|
|
558
626
|
const diffInput = {
|
|
559
|
-
original: {
|
|
560
|
-
|
|
561
|
-
|
|
627
|
+
original: {
|
|
628
|
+
resource: this._entry.originalURI
|
|
629
|
+
},
|
|
630
|
+
modified: {
|
|
631
|
+
resource: this._entry.modifiedURI
|
|
632
|
+
},
|
|
633
|
+
label: ( localize(5347, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
|
|
562
634
|
};
|
|
563
635
|
await this._editorService.openEditor(diffInput);
|
|
564
636
|
}
|
|
565
637
|
};
|
|
566
|
-
ChatEditingNotebookEditorWidgetIntegration = ( __decorate([
|
|
567
|
-
( __param(5, IInstantiationService)),
|
|
568
|
-
( __param(6, IEditorService)),
|
|
569
|
-
( __param(7, INotebookEditorService)),
|
|
570
|
-
( __param(8, IAccessibilitySignalService)),
|
|
571
|
-
( __param(9, ILogService))
|
|
572
|
-
], ChatEditingNotebookEditorWidgetIntegration));
|
|
638
|
+
ChatEditingNotebookEditorWidgetIntegration = ( __decorate([( __param(5, IInstantiationService)), ( __param(6, IEditorService)), ( __param(7, INotebookEditorService)), ( __param(8, IAccessibilitySignalService)), ( __param(9, ILogService))], ChatEditingNotebookEditorWidgetIntegration));
|
|
573
639
|
class ChatEditingNotebookDiffEditorIntegration extends Disposable {
|
|
574
640
|
constructor(notebookDiffEditor, cellChanges) {
|
|
575
641
|
super();
|
|
@@ -583,21 +649,19 @@ class ChatEditingNotebookDiffEditorIntegration extends Disposable {
|
|
|
583
649
|
if (numberOfCellChanges.length && index >= 0 && index < numberOfCellChanges.length) {
|
|
584
650
|
const changesSoFar = countChanges(numberOfCellChanges.slice(0, index + 1));
|
|
585
651
|
this._currentIndex.set(changesSoFar - 1, undefined);
|
|
586
|
-
}
|
|
587
|
-
else {
|
|
652
|
+
} else {
|
|
588
653
|
this._currentIndex.set(-1, undefined);
|
|
589
654
|
}
|
|
590
655
|
}));
|
|
591
656
|
}
|
|
592
657
|
reveal(firstOrLast) {
|
|
593
|
-
const changes = sortCellChanges(this.cellChanges.get().filter(c => c.type !==
|
|
658
|
+
const changes = sortCellChanges(this.cellChanges.get().filter(c => c.type !== "unchanged"));
|
|
594
659
|
if (!changes.length) {
|
|
595
660
|
return undefined;
|
|
596
661
|
}
|
|
597
662
|
if (firstOrLast) {
|
|
598
663
|
this.notebookDiffEditor.firstChange();
|
|
599
|
-
}
|
|
600
|
-
else {
|
|
664
|
+
} else {
|
|
601
665
|
this.notebookDiffEditor.lastChange();
|
|
602
666
|
}
|
|
603
667
|
}
|
|
@@ -617,8 +681,7 @@ class ChatEditingNotebookDiffEditorIntegration extends Disposable {
|
|
|
617
681
|
this.notebookDiffEditor.nextChange();
|
|
618
682
|
return true;
|
|
619
683
|
}
|
|
620
|
-
enableAccessibleDiffView() {
|
|
621
|
-
}
|
|
684
|
+
enableAccessibleDiffView() {}
|
|
622
685
|
async acceptNearestChange(change) {
|
|
623
686
|
await change.accept();
|
|
624
687
|
this.next(true);
|
|
@@ -627,8 +690,7 @@ class ChatEditingNotebookDiffEditorIntegration extends Disposable {
|
|
|
627
690
|
await change.reject();
|
|
628
691
|
this.next(true);
|
|
629
692
|
}
|
|
630
|
-
async toggleDiff(_change, _show) {
|
|
631
|
-
}
|
|
693
|
+
async toggleDiff(_change, _show) {}
|
|
632
694
|
}
|
|
633
695
|
function areDocumentDiff2Equal(diff1, diff2) {
|
|
634
696
|
if (diff1.changes !== diff2.changes) {
|
|
@@ -658,7 +720,7 @@ function areDocumentDiff2Equal(diff1, diff2) {
|
|
|
658
720
|
return true;
|
|
659
721
|
}
|
|
660
722
|
function lastChangeIndex(change) {
|
|
661
|
-
if (change.type ===
|
|
723
|
+
if (change.type === "modified") {
|
|
662
724
|
return change.diff.get().changes.length - 1;
|
|
663
725
|
}
|
|
664
726
|
return 0;
|