@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
|
@@ -12,21 +12,26 @@ import { ChatEditingNotebookSnapshotScheme } from './chatEditingModifiedNotebook
|
|
|
12
12
|
|
|
13
13
|
var ChatEditingNotebookFileSystemProvider_1;
|
|
14
14
|
let ChatEditingNotebookFileSystemProviderContrib = class ChatEditingNotebookFileSystemProviderContrib extends Disposable {
|
|
15
|
-
static {
|
|
15
|
+
static {
|
|
16
|
+
this.ID = "chatEditingNotebookFileSystemProviderContribution";
|
|
17
|
+
}
|
|
16
18
|
constructor(fileService, instantiationService) {
|
|
17
19
|
super();
|
|
18
20
|
this.fileService = fileService;
|
|
19
21
|
const fileSystemProvider = instantiationService.createInstance(ChatEditingNotebookFileSystemProvider);
|
|
20
|
-
this._register(
|
|
22
|
+
this._register(
|
|
23
|
+
this.fileService.registerProvider(ChatEditingNotebookSnapshotScheme, fileSystemProvider)
|
|
24
|
+
);
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
|
-
ChatEditingNotebookFileSystemProviderContrib = ( __decorate([
|
|
24
|
-
( __param(0, IFileService)),
|
|
25
|
-
( __param(1, IInstantiationService))
|
|
26
|
-
], ChatEditingNotebookFileSystemProviderContrib));
|
|
27
|
+
ChatEditingNotebookFileSystemProviderContrib = ( __decorate([( __param(0, IFileService)), ( __param(1, IInstantiationService))], ChatEditingNotebookFileSystemProviderContrib));
|
|
27
28
|
let ChatEditingNotebookFileSystemProvider = class ChatEditingNotebookFileSystemProvider {
|
|
28
|
-
static {
|
|
29
|
-
|
|
29
|
+
static {
|
|
30
|
+
ChatEditingNotebookFileSystemProvider_1 = this;
|
|
31
|
+
}
|
|
32
|
+
static {
|
|
33
|
+
this.registeredFiles = ( new ResourceMap());
|
|
34
|
+
}
|
|
30
35
|
static registerFile(resource, buffer) {
|
|
31
36
|
ChatEditingNotebookFileSystemProvider_1.registeredFiles.set(resource, buffer);
|
|
32
37
|
return {
|
|
@@ -55,19 +60,19 @@ let ChatEditingNotebookFileSystemProvider = class ChatEditingNotebookFileSystemP
|
|
|
55
60
|
};
|
|
56
61
|
}
|
|
57
62
|
mkdir(_resource) {
|
|
58
|
-
throw ( new Error(
|
|
63
|
+
throw ( new Error("Method not implemented1."));
|
|
59
64
|
}
|
|
60
65
|
readdir(_resource) {
|
|
61
|
-
throw ( new Error(
|
|
66
|
+
throw ( new Error("Method not implemented2."));
|
|
62
67
|
}
|
|
63
68
|
delete(_resource, _opts) {
|
|
64
|
-
throw ( new Error(
|
|
69
|
+
throw ( new Error("Method not implemented3."));
|
|
65
70
|
}
|
|
66
71
|
rename(_from, _to, _opts) {
|
|
67
|
-
throw ( new Error(
|
|
72
|
+
throw ( new Error("Method not implemented4."));
|
|
68
73
|
}
|
|
69
74
|
copy(_from, _to, _opts) {
|
|
70
|
-
throw ( new Error(
|
|
75
|
+
throw ( new Error("Method not implemented5."));
|
|
71
76
|
}
|
|
72
77
|
async readFile(resource) {
|
|
73
78
|
const buffer = ChatEditingNotebookFileSystemProvider_1.registeredFiles.get(resource);
|
|
@@ -76,42 +81,40 @@ let ChatEditingNotebookFileSystemProvider = class ChatEditingNotebookFileSystemP
|
|
|
76
81
|
}
|
|
77
82
|
const queryData = JSON.parse(resource.query);
|
|
78
83
|
if (!queryData.viewType) {
|
|
79
|
-
throw ( new Error(
|
|
84
|
+
throw ( new Error("File not found, viewType not found"));
|
|
80
85
|
}
|
|
81
86
|
const session = this._chatEditingService.getEditingSession(LocalChatSessionUri.forSession(queryData.sessionId));
|
|
82
87
|
if (!session || !queryData.requestId) {
|
|
83
|
-
throw ( new Error(
|
|
88
|
+
throw ( new Error("File not found, session not found"));
|
|
84
89
|
}
|
|
85
90
|
const snapshotEntry = await session.getSnapshotContents(queryData.requestId, resource, queryData.undoStop || undefined);
|
|
86
91
|
if (!snapshotEntry) {
|
|
87
|
-
throw ( new Error(
|
|
92
|
+
throw ( new Error("File not found, snapshot not found"));
|
|
88
93
|
}
|
|
89
94
|
return snapshotEntry.buffer;
|
|
90
95
|
}
|
|
91
96
|
writeFile(__resource, _content, _opts) {
|
|
92
|
-
throw ( new Error(
|
|
97
|
+
throw ( new Error("Method not implemented7."));
|
|
93
98
|
}
|
|
94
99
|
readFileStream(__resource, _opts, _token) {
|
|
95
|
-
throw ( new Error(
|
|
100
|
+
throw ( new Error("Method not implemented8."));
|
|
96
101
|
}
|
|
97
102
|
open(__resource, _opts) {
|
|
98
|
-
throw ( new Error(
|
|
103
|
+
throw ( new Error("Method not implemented9."));
|
|
99
104
|
}
|
|
100
105
|
close(_fd) {
|
|
101
|
-
throw ( new Error(
|
|
106
|
+
throw ( new Error("Method not implemented10."));
|
|
102
107
|
}
|
|
103
108
|
read(_fd, _pos, _data, _offset, _length) {
|
|
104
|
-
throw ( new Error(
|
|
109
|
+
throw ( new Error("Method not implemented11."));
|
|
105
110
|
}
|
|
106
111
|
write(_fd, _pos, _data, _offset, _length) {
|
|
107
|
-
throw ( new Error(
|
|
112
|
+
throw ( new Error("Method not implemented12."));
|
|
108
113
|
}
|
|
109
114
|
cloneFile(_from, __to) {
|
|
110
|
-
throw ( new Error(
|
|
115
|
+
throw ( new Error("Method not implemented13."));
|
|
111
116
|
}
|
|
112
117
|
};
|
|
113
|
-
ChatEditingNotebookFileSystemProvider = ChatEditingNotebookFileSystemProvider_1 = ( __decorate([
|
|
114
|
-
( __param(0, IChatEditingService))
|
|
115
|
-
], ChatEditingNotebookFileSystemProvider));
|
|
118
|
+
ChatEditingNotebookFileSystemProvider = ChatEditingNotebookFileSystemProvider_1 = ( __decorate([( __param(0, IChatEditingService))], ChatEditingNotebookFileSystemProvider));
|
|
116
119
|
|
|
117
120
|
export { ChatEditingNotebookFileSystemProvider, ChatEditingNotebookFileSystemProviderContrib };
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
import { CellEditType, NotebookCellsChangeType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
3
3
|
import { sortCellChanges } from './notebookCellChanges.js';
|
|
4
4
|
|
|
5
|
-
function adjustCellDiffForRevertingADeletedCell(
|
|
5
|
+
function adjustCellDiffForRevertingADeletedCell(
|
|
6
|
+
originalCellIndex,
|
|
7
|
+
cellDiffInfo,
|
|
8
|
+
cellToInsert,
|
|
9
|
+
applyEdits,
|
|
10
|
+
createModifiedCellDiffInfo
|
|
11
|
+
) {
|
|
6
12
|
cellDiffInfo = sortCellChanges(cellDiffInfo);
|
|
7
13
|
const indexOfEntry = cellDiffInfo.findIndex(d => d.originalCellIndex === originalCellIndex);
|
|
8
14
|
if (indexOfEntry === -1) {
|
|
@@ -16,15 +22,21 @@ function adjustCellDiffForRevertingADeletedCell(originalCellIndex, cellDiffInfo,
|
|
|
16
22
|
continue;
|
|
17
23
|
}
|
|
18
24
|
if (i === indexOfEntry) {
|
|
19
|
-
const edit = {
|
|
25
|
+
const edit = {
|
|
26
|
+
cells: [cellToInsert],
|
|
27
|
+
count: 0,
|
|
28
|
+
editType: CellEditType.Replace,
|
|
29
|
+
index: modifiedCellIndex + 1
|
|
30
|
+
};
|
|
20
31
|
applyEdits([edit], true, undefined, () => undefined, undefined, true);
|
|
21
32
|
cellDiffInfo[i] = createModifiedCellDiffInfo(modifiedCellIndex + 1, originalCellIndex);
|
|
22
33
|
continue;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (typeof diff.modifiedCellIndex === 'number') {
|
|
34
|
+
} else {
|
|
35
|
+
if (typeof diff.modifiedCellIndex === "number") {
|
|
26
36
|
diff.modifiedCellIndex++;
|
|
27
|
-
cellDiffInfo[i] = {
|
|
37
|
+
cellDiffInfo[i] = {
|
|
38
|
+
...diff
|
|
39
|
+
};
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
42
|
}
|
|
@@ -34,25 +46,34 @@ function adjustCellDiffForRevertingAnInsertedCell(modifiedCellIndex, cellDiffInf
|
|
|
34
46
|
if (modifiedCellIndex === -1) {
|
|
35
47
|
return cellDiffInfo;
|
|
36
48
|
}
|
|
37
|
-
cellDiffInfo = ( sortCellChanges(cellDiffInfo)
|
|
38
|
-
|
|
39
|
-
.map(d => {
|
|
40
|
-
if (d.type === 'insert' && d.modifiedCellIndex === modifiedCellIndex) {
|
|
49
|
+
cellDiffInfo = ( sortCellChanges(cellDiffInfo).filter(d => !(d.type === "insert" && d.modifiedCellIndex === modifiedCellIndex)).map(d => {
|
|
50
|
+
if (d.type === "insert" && d.modifiedCellIndex === modifiedCellIndex) {
|
|
41
51
|
return d;
|
|
42
52
|
}
|
|
43
|
-
if (d.type !==
|
|
53
|
+
if (d.type !== "delete" && d.modifiedCellIndex > modifiedCellIndex) {
|
|
44
54
|
return {
|
|
45
55
|
...d,
|
|
46
|
-
modifiedCellIndex: d.modifiedCellIndex - 1
|
|
56
|
+
modifiedCellIndex: d.modifiedCellIndex - 1
|
|
47
57
|
};
|
|
48
58
|
}
|
|
49
59
|
return d;
|
|
50
60
|
}));
|
|
51
|
-
const edit = {
|
|
61
|
+
const edit = {
|
|
62
|
+
cells: [],
|
|
63
|
+
count: 1,
|
|
64
|
+
editType: CellEditType.Replace,
|
|
65
|
+
index: modifiedCellIndex
|
|
66
|
+
};
|
|
52
67
|
applyEdits([edit], true, undefined, () => undefined, undefined, true);
|
|
53
68
|
return cellDiffInfo;
|
|
54
69
|
}
|
|
55
|
-
function adjustCellDiffForKeepingAnInsertedCell(
|
|
70
|
+
function adjustCellDiffForKeepingAnInsertedCell(
|
|
71
|
+
modifiedCellIndex,
|
|
72
|
+
cellDiffInfo,
|
|
73
|
+
cellToInsert,
|
|
74
|
+
applyEdits,
|
|
75
|
+
createModifiedCellDiffInfo
|
|
76
|
+
) {
|
|
56
77
|
cellDiffInfo = sortCellChanges(cellDiffInfo);
|
|
57
78
|
if (modifiedCellIndex === -1) {
|
|
58
79
|
return cellDiffInfo;
|
|
@@ -69,21 +90,34 @@ function adjustCellDiffForKeepingAnInsertedCell(modifiedCellIndex, cellDiffInfo,
|
|
|
69
90
|
continue;
|
|
70
91
|
}
|
|
71
92
|
if (i === indexOfEntry) {
|
|
72
|
-
const edit = {
|
|
93
|
+
const edit = {
|
|
94
|
+
cells: [cellToInsert],
|
|
95
|
+
count: 0,
|
|
96
|
+
editType: CellEditType.Replace,
|
|
97
|
+
index: originalCellIndex + 1
|
|
98
|
+
};
|
|
73
99
|
applyEdits([edit], true, undefined, () => undefined, undefined, true);
|
|
74
100
|
cellDiffInfo[i] = createModifiedCellDiffInfo(modifiedCellIndex, originalCellIndex + 1);
|
|
75
101
|
continue;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (typeof diff.originalCellIndex === 'number') {
|
|
102
|
+
} else {
|
|
103
|
+
if (typeof diff.originalCellIndex === "number") {
|
|
79
104
|
diff.originalCellIndex++;
|
|
80
|
-
cellDiffInfo[i] = {
|
|
105
|
+
cellDiffInfo[i] = {
|
|
106
|
+
...diff
|
|
107
|
+
};
|
|
81
108
|
}
|
|
82
109
|
}
|
|
83
110
|
}
|
|
84
111
|
return cellDiffInfo;
|
|
85
112
|
}
|
|
86
|
-
function adjustCellDiffAndOriginalModelBasedOnCellAddDelete(
|
|
113
|
+
function adjustCellDiffAndOriginalModelBasedOnCellAddDelete(
|
|
114
|
+
change,
|
|
115
|
+
cellDiffInfo,
|
|
116
|
+
modifiedModelCellCount,
|
|
117
|
+
originalModelCellCount,
|
|
118
|
+
applyEdits,
|
|
119
|
+
createModifiedCellDiffInfo
|
|
120
|
+
) {
|
|
87
121
|
cellDiffInfo = sortCellChanges(cellDiffInfo);
|
|
88
122
|
const numberOfCellsInserted = change[2].length;
|
|
89
123
|
const numberOfCellsDeleted = change[1];
|
|
@@ -103,14 +137,14 @@ function adjustCellDiffAndOriginalModelBasedOnCellAddDelete(change, cellDiffInfo
|
|
|
103
137
|
if (cells.length) {
|
|
104
138
|
for (let i = 0; i < cellDiffInfo.length; i++) {
|
|
105
139
|
const diff = cellDiffInfo[i];
|
|
106
|
-
if (typeof diff.modifiedCellIndex ===
|
|
140
|
+
if (typeof diff.modifiedCellIndex === "number" && diff.modifiedCellIndex === change[0]) {
|
|
107
141
|
diffEntryIndex = i;
|
|
108
|
-
if (typeof diff.originalCellIndex ===
|
|
142
|
+
if (typeof diff.originalCellIndex === "number") {
|
|
109
143
|
indexToInsertInOriginalModel = diff.originalCellIndex;
|
|
110
144
|
}
|
|
111
145
|
break;
|
|
112
146
|
}
|
|
113
|
-
if (typeof diff.originalCellIndex ===
|
|
147
|
+
if (typeof diff.originalCellIndex === "number") {
|
|
114
148
|
indexToInsertInOriginalModel = diff.originalCellIndex + 1;
|
|
115
149
|
}
|
|
116
150
|
}
|
|
@@ -136,30 +170,30 @@ function adjustCellDiffAndOriginalModelBasedOnCellAddDelete(change, cellDiffInfo
|
|
|
136
170
|
continue;
|
|
137
171
|
}
|
|
138
172
|
let changed = false;
|
|
139
|
-
if (typeof diff.modifiedCellIndex ===
|
|
173
|
+
if (typeof diff.modifiedCellIndex === "number" && ( modifiedIndexesToRemove.has(diff.modifiedCellIndex))) {
|
|
140
174
|
numberOfModifiedCellsRemovedSoFar++;
|
|
141
|
-
if (typeof diff.originalCellIndex ===
|
|
175
|
+
if (typeof diff.originalCellIndex === "number") {
|
|
142
176
|
numberOfOriginalCellsRemovedSoFar++;
|
|
143
177
|
}
|
|
144
178
|
itemsToRemove.add(diff);
|
|
145
179
|
continue;
|
|
146
180
|
}
|
|
147
|
-
if (typeof diff.modifiedCellIndex ===
|
|
181
|
+
if (typeof diff.modifiedCellIndex === "number" && numberOfModifiedCellsRemovedSoFar) {
|
|
148
182
|
diff.modifiedCellIndex -= numberOfModifiedCellsRemovedSoFar;
|
|
149
183
|
changed = true;
|
|
150
184
|
}
|
|
151
|
-
if (typeof diff.originalCellIndex ===
|
|
185
|
+
if (typeof diff.originalCellIndex === "number" && numberOfOriginalCellsRemovedSoFar) {
|
|
152
186
|
diff.originalCellIndex -= numberOfOriginalCellsRemovedSoFar;
|
|
153
187
|
changed = true;
|
|
154
188
|
}
|
|
155
189
|
if (changed) {
|
|
156
|
-
cellDiffInfo[i] = {
|
|
190
|
+
cellDiffInfo[i] = {
|
|
191
|
+
...diff
|
|
192
|
+
};
|
|
157
193
|
}
|
|
158
194
|
}
|
|
159
195
|
if (itemsToRemove.size) {
|
|
160
|
-
Array.from(itemsToRemove)
|
|
161
|
-
.filter(diff => typeof diff.originalCellIndex === 'number')
|
|
162
|
-
.forEach(diff => {
|
|
196
|
+
Array.from(itemsToRemove).filter(diff => typeof diff.originalCellIndex === "number").forEach(diff => {
|
|
163
197
|
const edit = {
|
|
164
198
|
editType: CellEditType.Replace,
|
|
165
199
|
cells: [],
|
|
@@ -178,16 +212,18 @@ function adjustCellDiffAndOriginalModelBasedOnCellAddDelete(change, cellDiffInfo
|
|
|
178
212
|
continue;
|
|
179
213
|
}
|
|
180
214
|
let changed = false;
|
|
181
|
-
if (typeof diff.modifiedCellIndex ===
|
|
215
|
+
if (typeof diff.modifiedCellIndex === "number") {
|
|
182
216
|
diff.modifiedCellIndex += numberOfCellsInserted;
|
|
183
217
|
changed = true;
|
|
184
218
|
}
|
|
185
|
-
if (typeof diff.originalCellIndex ===
|
|
219
|
+
if (typeof diff.originalCellIndex === "number") {
|
|
186
220
|
diff.originalCellIndex += numberOfCellsInserted;
|
|
187
221
|
changed = true;
|
|
188
222
|
}
|
|
189
223
|
if (changed) {
|
|
190
|
-
cellDiffInfo[i] = {
|
|
224
|
+
cellDiffInfo[i] = {
|
|
225
|
+
...diff
|
|
226
|
+
};
|
|
191
227
|
}
|
|
192
228
|
}
|
|
193
229
|
}
|
|
@@ -195,7 +231,11 @@ function adjustCellDiffAndOriginalModelBasedOnCellAddDelete(change, cellDiffInfo
|
|
|
195
231
|
const originalCellIndex = i + (indexToInsertInOriginalModel ?? 0);
|
|
196
232
|
const modifiedCellIndex = change[0] + i;
|
|
197
233
|
const unchangedCell = createModifiedCellDiffInfo(modifiedCellIndex, originalCellIndex);
|
|
198
|
-
cellDiffInfo.splice(
|
|
234
|
+
cellDiffInfo.splice(
|
|
235
|
+
(diffEntryIndex === -1 ? cellDiffInfo.length : diffEntryIndex) + i,
|
|
236
|
+
0,
|
|
237
|
+
unchangedCell
|
|
238
|
+
);
|
|
199
239
|
});
|
|
200
240
|
return cellDiffInfo;
|
|
201
241
|
}
|
|
@@ -208,35 +248,36 @@ function adjustCellDiffAndOriginalModelBasedOnCellMovements(event, cellDiffInfo)
|
|
|
208
248
|
if (indexOfEntry === -1 || indexOfEntryToPlaceBelow === -1) {
|
|
209
249
|
return undefined;
|
|
210
250
|
}
|
|
211
|
-
const entryToBeMoved = {
|
|
212
|
-
|
|
251
|
+
const entryToBeMoved = {
|
|
252
|
+
...cellDiffs[indexOfEntry]
|
|
253
|
+
};
|
|
254
|
+
const moveDirection = event.newIdx > event.index ? "down" : "up";
|
|
213
255
|
const startIndex = cellDiffs.findIndex(d => d.modifiedCellIndex === minimumIndex);
|
|
214
256
|
const endIndex = cellDiffs.findIndex(d => d.modifiedCellIndex === maximumIndex);
|
|
215
|
-
const movingExistingCell = typeof entryToBeMoved.originalCellIndex ===
|
|
257
|
+
const movingExistingCell = typeof entryToBeMoved.originalCellIndex === "number";
|
|
216
258
|
let originalCellsWereEffected = false;
|
|
217
259
|
for (let i = 0; i < cellDiffs.length; i++) {
|
|
218
260
|
const diff = cellDiffs[i];
|
|
219
261
|
let changed = false;
|
|
220
|
-
if (moveDirection ===
|
|
262
|
+
if (moveDirection === "down") {
|
|
221
263
|
if (i > startIndex && i <= endIndex) {
|
|
222
|
-
if (typeof diff.modifiedCellIndex ===
|
|
264
|
+
if (typeof diff.modifiedCellIndex === "number") {
|
|
223
265
|
changed = true;
|
|
224
266
|
diff.modifiedCellIndex = diff.modifiedCellIndex - 1;
|
|
225
267
|
}
|
|
226
|
-
if (typeof diff.originalCellIndex ===
|
|
268
|
+
if (typeof diff.originalCellIndex === "number" && movingExistingCell) {
|
|
227
269
|
diff.originalCellIndex = diff.originalCellIndex - 1;
|
|
228
270
|
originalCellsWereEffected = true;
|
|
229
271
|
changed = true;
|
|
230
272
|
}
|
|
231
273
|
}
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
274
|
+
} else {
|
|
234
275
|
if (i >= startIndex && i < endIndex) {
|
|
235
|
-
if (typeof diff.modifiedCellIndex ===
|
|
276
|
+
if (typeof diff.modifiedCellIndex === "number") {
|
|
236
277
|
changed = true;
|
|
237
278
|
diff.modifiedCellIndex = diff.modifiedCellIndex + 1;
|
|
238
279
|
}
|
|
239
|
-
if (typeof diff.originalCellIndex ===
|
|
280
|
+
if (typeof diff.originalCellIndex === "number" && movingExistingCell) {
|
|
240
281
|
diff.originalCellIndex = diff.originalCellIndex + 1;
|
|
241
282
|
originalCellsWereEffected = true;
|
|
242
283
|
changed = true;
|
|
@@ -244,26 +285,33 @@ function adjustCellDiffAndOriginalModelBasedOnCellMovements(event, cellDiffInfo)
|
|
|
244
285
|
}
|
|
245
286
|
}
|
|
246
287
|
if (changed) {
|
|
247
|
-
cellDiffs[i] = {
|
|
288
|
+
cellDiffs[i] = {
|
|
289
|
+
...diff
|
|
290
|
+
};
|
|
248
291
|
}
|
|
249
292
|
}
|
|
250
293
|
entryToBeMoved.modifiedCellIndex = event.newIdx;
|
|
251
294
|
const originalCellIndex = entryToBeMoved.originalCellIndex;
|
|
252
|
-
if (moveDirection ===
|
|
295
|
+
if (moveDirection === "down") {
|
|
253
296
|
cellDiffs.splice(endIndex + 1, 0, entryToBeMoved);
|
|
254
297
|
cellDiffs.splice(startIndex, 1);
|
|
255
|
-
if (typeof entryToBeMoved.originalCellIndex ===
|
|
256
|
-
entryToBeMoved.originalCellIndex = cellDiffs.slice(0, endIndex).reduce(
|
|
298
|
+
if (typeof entryToBeMoved.originalCellIndex === "number") {
|
|
299
|
+
entryToBeMoved.originalCellIndex = cellDiffs.slice(0, endIndex).reduce(
|
|
300
|
+
(lastOriginalIndex, diff) => typeof diff.originalCellIndex === "number" ? Math.max(lastOriginalIndex, diff.originalCellIndex) : lastOriginalIndex,
|
|
301
|
+
-1
|
|
302
|
+
) + 1;
|
|
257
303
|
}
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
304
|
+
} else {
|
|
260
305
|
cellDiffs.splice(endIndex, 1);
|
|
261
306
|
cellDiffs.splice(startIndex, 0, entryToBeMoved);
|
|
262
|
-
if (typeof entryToBeMoved.originalCellIndex ===
|
|
263
|
-
entryToBeMoved.originalCellIndex = cellDiffs.slice(0, startIndex).reduce(
|
|
307
|
+
if (typeof entryToBeMoved.originalCellIndex === "number") {
|
|
308
|
+
entryToBeMoved.originalCellIndex = cellDiffs.slice(0, startIndex).reduce(
|
|
309
|
+
(lastOriginalIndex, diff) => typeof diff.originalCellIndex === "number" ? Math.max(lastOriginalIndex, diff.originalCellIndex) : lastOriginalIndex,
|
|
310
|
+
-1
|
|
311
|
+
) + 1;
|
|
264
312
|
}
|
|
265
313
|
}
|
|
266
|
-
if (typeof entryToBeMoved.originalCellIndex ===
|
|
314
|
+
if (typeof entryToBeMoved.originalCellIndex === "number" && originalCellsWereEffected && typeof originalCellIndex === "number" && entryToBeMoved.originalCellIndex !== originalCellIndex) {
|
|
267
315
|
const edit = {
|
|
268
316
|
editType: CellEditType.Move,
|
|
269
317
|
index: originalCellIndex,
|
|
@@ -279,14 +327,17 @@ function getCorrespondingOriginalCellIndex(modifiedCellIndex, cellDiffInfo) {
|
|
|
279
327
|
return entry?.originalCellIndex;
|
|
280
328
|
}
|
|
281
329
|
function isTransientIPyNbExtensionEvent(notebookKind, e) {
|
|
282
|
-
if (notebookKind !==
|
|
330
|
+
if (notebookKind !== "jupyter-notebook") {
|
|
283
331
|
return false;
|
|
284
332
|
}
|
|
285
333
|
if (e.rawEvents.every(event => {
|
|
286
334
|
if (event.kind !== NotebookCellsChangeType.ChangeCellMetadata) {
|
|
287
335
|
return false;
|
|
288
336
|
}
|
|
289
|
-
if (JSON.stringify(event.metadata || {}) === JSON.stringify({
|
|
337
|
+
if (JSON.stringify(event.metadata || {}) === JSON.stringify({
|
|
338
|
+
execution_count: null,
|
|
339
|
+
metadata: {}
|
|
340
|
+
})) {
|
|
290
341
|
return true;
|
|
291
342
|
}
|
|
292
343
|
return true;
|
|
@@ -298,13 +349,13 @@ function isTransientIPyNbExtensionEvent(notebookKind, e) {
|
|
|
298
349
|
function calculateNotebookRewriteRatio(cellsDiff, originalModel, modifiedModel) {
|
|
299
350
|
const totalNumberOfUpdatedLines = cellsDiff.reduce((totalUpdatedLines, value) => {
|
|
300
351
|
const getUpadtedLineCount = () => {
|
|
301
|
-
if (value.type ===
|
|
352
|
+
if (value.type === "unchanged") {
|
|
302
353
|
return 0;
|
|
303
354
|
}
|
|
304
|
-
if (value.type ===
|
|
355
|
+
if (value.type === "delete") {
|
|
305
356
|
return originalModel.cells[value.originalCellIndex].textModel?.getLineCount() ?? 0;
|
|
306
357
|
}
|
|
307
|
-
if (value.type ===
|
|
358
|
+
if (value.type === "insert") {
|
|
308
359
|
return modifiedModel.cells[value.modifiedCellIndex].textModel?.getLineCount() ?? 0;
|
|
309
360
|
}
|
|
310
361
|
return value.diff.get().changes.reduce((maxLineNumber, change) => {
|
|
@@ -313,7 +364,10 @@ function calculateNotebookRewriteRatio(cellsDiff, originalModel, modifiedModel)
|
|
|
313
364
|
};
|
|
314
365
|
return totalUpdatedLines + getUpadtedLineCount();
|
|
315
366
|
}, 0);
|
|
316
|
-
const totalNumberOfLines = modifiedModel.cells.reduce(
|
|
367
|
+
const totalNumberOfLines = modifiedModel.cells.reduce(
|
|
368
|
+
(totalLines, cell) => totalLines + (cell.textModel?.getLineCount() ?? 0),
|
|
369
|
+
0
|
|
370
|
+
);
|
|
317
371
|
return totalNumberOfLines === 0 ? 0 : Math.min(1, totalNumberOfUpdatedLines / totalNumberOfLines);
|
|
318
372
|
}
|
|
319
373
|
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js
CHANGED
|
@@ -7,14 +7,14 @@ function countChanges(changes) {
|
|
|
7
7
|
return count;
|
|
8
8
|
}
|
|
9
9
|
switch (change.type) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
case "delete":
|
|
11
|
+
return count + 1;
|
|
12
|
+
case "insert":
|
|
13
|
+
return count + 1;
|
|
14
|
+
case "modified":
|
|
15
|
+
return count + diff.changes.length;
|
|
16
|
+
default:
|
|
17
|
+
return count;
|
|
18
18
|
}
|
|
19
19
|
}, 0);
|
|
20
20
|
}
|
|
@@ -22,29 +22,26 @@ function sortCellChanges(changes) {
|
|
|
22
22
|
const indexes = ( new Map());
|
|
23
23
|
changes.forEach((c, i) => indexes.set(c, i));
|
|
24
24
|
return [...changes].sort((a, b) => {
|
|
25
|
-
if ((a.type ===
|
|
26
|
-
(b.type === 'unchanged' || b.type === 'modified')) {
|
|
25
|
+
if ((a.type === "unchanged" || a.type === "modified") && (b.type === "unchanged" || b.type === "modified")) {
|
|
27
26
|
return a.modifiedCellIndex - b.modifiedCellIndex;
|
|
28
27
|
}
|
|
29
|
-
if (a.type ===
|
|
28
|
+
if (a.type === "delete" && b.type === "delete") {
|
|
30
29
|
return a.originalCellIndex - b.originalCellIndex;
|
|
31
30
|
}
|
|
32
|
-
if (a.type ===
|
|
31
|
+
if (a.type === "insert" && b.type === "insert") {
|
|
33
32
|
return a.modifiedCellIndex - b.modifiedCellIndex;
|
|
34
33
|
}
|
|
35
|
-
if (a.type ===
|
|
34
|
+
if (a.type === "delete" && b.type === "insert") {
|
|
36
35
|
return indexes.get(a) - indexes.get(b);
|
|
37
36
|
}
|
|
38
|
-
if (a.type ===
|
|
37
|
+
if (a.type === "insert" && b.type === "delete") {
|
|
39
38
|
return indexes.get(a) - indexes.get(b);
|
|
40
39
|
}
|
|
41
|
-
if ((a.type ===
|
|
40
|
+
if ((a.type === "delete" && b.type !== "insert") || (a.type !== "insert" && b.type === "delete")) {
|
|
42
41
|
return a.originalCellIndex - b.originalCellIndex;
|
|
43
42
|
}
|
|
44
|
-
const aIndex = a.type ===
|
|
45
|
-
|
|
46
|
-
const bIndex = b.type === 'delete' ? b.originalCellIndex :
|
|
47
|
-
(b.type === 'insert' ? b.modifiedCellIndex : b.modifiedCellIndex);
|
|
43
|
+
const aIndex = a.type === "delete" ? a.originalCellIndex : (a.type === "insert" ? a.modifiedCellIndex : a.modifiedCellIndex);
|
|
44
|
+
const bIndex = b.type === "delete" ? b.originalCellIndex : (b.type === "insert" ? b.modifiedCellIndex : b.modifiedCellIndex);
|
|
48
45
|
return aIndex - bIndex;
|
|
49
46
|
});
|
|
50
47
|
}
|