@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
|
@@ -7,7 +7,11 @@ import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode
|
|
|
7
7
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
8
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
9
9
|
import { IModifiedFileEntry, IModifiedFileEntryChangeHunk, IModifiedFileEntryEditorIntegration } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
10
|
+
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service";
|
|
10
11
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
12
|
+
import { IChatEditingExplanationModelManager } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service";
|
|
13
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
14
|
+
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
11
15
|
export interface IDocumentDiff2 extends IDocumentDiff {
|
|
12
16
|
originalModel: ITextModel;
|
|
13
17
|
modifiedModel: ITextModel;
|
|
@@ -19,6 +23,9 @@ export declare class ChatEditingCodeEditorIntegration implements IModifiedFileEn
|
|
|
19
23
|
private readonly _editor;
|
|
20
24
|
private readonly _editorService;
|
|
21
25
|
private readonly _accessibilitySignalsService;
|
|
26
|
+
private readonly _explanationModelManager;
|
|
27
|
+
private readonly _chatWidgetService;
|
|
28
|
+
private readonly _viewsService;
|
|
22
29
|
private static readonly _diffLineDecorationData;
|
|
23
30
|
private readonly _currentIndex;
|
|
24
31
|
readonly currentIndex: IObservable<number>;
|
|
@@ -30,7 +37,7 @@ export declare class ChatEditingCodeEditorIntegration implements IModifiedFileEn
|
|
|
30
37
|
private readonly _diffHunkWidgets;
|
|
31
38
|
private _viewZones;
|
|
32
39
|
private readonly _accessibleDiffViewVisible;
|
|
33
|
-
constructor(_entry: IModifiedFileEntry, _editor: ICodeEditor, documentDiffInfo: IObservable<IDocumentDiff2>, renderDiffImmediately: boolean, _editorService: IEditorService, _accessibilitySignalsService: IAccessibilitySignalService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService);
|
|
40
|
+
constructor(_entry: IModifiedFileEntry, _editor: ICodeEditor, documentDiffInfo: IObservable<IDocumentDiff2>, renderDiffImmediately: boolean, _editorService: IEditorService, _accessibilitySignalsService: IAccessibilitySignalService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, _chatEditingService: IChatEditingService, _explanationModelManager: IChatEditingExplanationModelManager, _chatWidgetService: IChatWidgetService, _viewsService: IViewsService);
|
|
34
41
|
dispose(): void;
|
|
35
42
|
private _clear;
|
|
36
43
|
private _clearDiffRendering;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js
CHANGED
|
@@ -32,11 +32,16 @@ import { EditorsOrder, isDiffEditorInput } from '@codingame/monaco-vscode-api/vs
|
|
|
32
32
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
33
|
import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
34
34
|
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
35
|
+
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
35
36
|
import { isTextDiffEditorForEntry } from './chatEditing.js';
|
|
36
37
|
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
37
38
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
38
39
|
import { ctxCursorInChangeRange } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
39
40
|
import { LinkedList } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedList';
|
|
41
|
+
import { ChatEditingExplanationWidgetManager } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget';
|
|
42
|
+
import { IChatEditingExplanationModelManager } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service';
|
|
43
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
44
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
40
45
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
41
46
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
42
47
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
@@ -63,13 +68,35 @@ class ObjectPool {
|
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
66
|
-
static {
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
static {
|
|
72
|
+
ChatEditingCodeEditorIntegration_1 = this;
|
|
73
|
+
}
|
|
74
|
+
static {
|
|
75
|
+
this._diffLineDecorationData = ModelDecorationOptions.register({
|
|
76
|
+
description: "diff-line-decoration"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
constructor(
|
|
80
|
+
_entry,
|
|
81
|
+
_editor,
|
|
82
|
+
documentDiffInfo,
|
|
83
|
+
renderDiffImmediately,
|
|
84
|
+
_editorService,
|
|
85
|
+
_accessibilitySignalsService,
|
|
86
|
+
contextKeyService,
|
|
87
|
+
instantiationService,
|
|
88
|
+
_chatEditingService,
|
|
89
|
+
_explanationModelManager,
|
|
90
|
+
_chatWidgetService,
|
|
91
|
+
_viewsService
|
|
92
|
+
) {
|
|
69
93
|
this._entry = _entry;
|
|
70
94
|
this._editor = _editor;
|
|
71
95
|
this._editorService = _editorService;
|
|
72
96
|
this._accessibilitySignalsService = _accessibilitySignalsService;
|
|
97
|
+
this._explanationModelManager = _explanationModelManager;
|
|
98
|
+
this._chatWidgetService = _chatWidgetService;
|
|
99
|
+
this._viewsService = _viewsService;
|
|
73
100
|
this._currentIndex = observableValue(this, -1);
|
|
74
101
|
this.currentIndex = this._currentIndex;
|
|
75
102
|
this._store = ( new DisposableStore());
|
|
@@ -82,8 +109,18 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
82
109
|
const codeEditorObs = observableCodeEditor(_editor);
|
|
83
110
|
this._diffLineDecorations = this._editor.createDecorationsCollection();
|
|
84
111
|
this._diffVisualDecorations = this._editor.createDecorationsCollection();
|
|
112
|
+
this._store.add(( new ChatEditingExplanationWidgetManager(
|
|
113
|
+
this._editor,
|
|
114
|
+
this._chatWidgetService,
|
|
115
|
+
this._viewsService,
|
|
116
|
+
this._explanationModelManager,
|
|
117
|
+
this._entry.modifiedURI
|
|
118
|
+
)));
|
|
85
119
|
const enabledObs = derived(r => {
|
|
86
|
-
if (!isEqual(
|
|
120
|
+
if (!isEqual(
|
|
121
|
+
codeEditorObs.model.read(r)?.uri,
|
|
122
|
+
documentDiffInfo.read(r).modifiedModel.uri
|
|
123
|
+
)) {
|
|
87
124
|
return false;
|
|
88
125
|
}
|
|
89
126
|
if (this._editor.getOption(EditorOption.inDiffEditor) && !instantiationService.invokeFunction(isTextDiffEditorForEntry, _entry, this._editor)) {
|
|
@@ -113,10 +150,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
113
150
|
}));
|
|
114
151
|
let lastModifyingRequestId;
|
|
115
152
|
this._store.add(autorun(r => {
|
|
116
|
-
if (enabledObs.read(r)
|
|
117
|
-
&& !_entry.isCurrentlyBeingModifiedBy.read(r)
|
|
118
|
-
&& lastModifyingRequestId !== _entry.lastModifyingRequestId
|
|
119
|
-
&& !documentDiffInfo.read(r).identical) {
|
|
153
|
+
if (enabledObs.read(r) && !_entry.isCurrentlyBeingModifiedBy.read(r) && lastModifyingRequestId !== _entry.lastModifyingRequestId && !documentDiffInfo.read(r).identical) {
|
|
120
154
|
lastModifyingRequestId = _entry.lastModifyingRequestId;
|
|
121
155
|
const position = _editor.getPosition() ?? ( new Position(1, 1));
|
|
122
156
|
const ranges = this._diffLineDecorations.getRanges();
|
|
@@ -156,20 +190,22 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
156
190
|
return;
|
|
157
191
|
}
|
|
158
192
|
const diff = documentDiffInfo.read(r);
|
|
159
|
-
const changeAtCursor = diff.changes.find(
|
|
193
|
+
const changeAtCursor = diff.changes.find(
|
|
194
|
+
m => m.modified.contains(position.lineNumber) || m.modified.isEmpty && m.modified.startLineNumber === position.lineNumber
|
|
195
|
+
);
|
|
160
196
|
_ctxCursorInChangeRange.set(!!changeAtCursor);
|
|
161
197
|
if (changeAtCursor) {
|
|
162
198
|
let signal;
|
|
163
199
|
if (changeAtCursor.modified.isEmpty) {
|
|
164
200
|
signal = AccessibilitySignal.diffLineDeleted;
|
|
165
|
-
}
|
|
166
|
-
else if (changeAtCursor.original.isEmpty) {
|
|
201
|
+
} else if (changeAtCursor.original.isEmpty) {
|
|
167
202
|
signal = AccessibilitySignal.diffLineInserted;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
203
|
+
} else {
|
|
170
204
|
signal = AccessibilitySignal.diffLineModified;
|
|
171
205
|
}
|
|
172
|
-
this._accessibilitySignalsService.playSignal(signal, {
|
|
206
|
+
this._accessibilitySignalsService.playSignal(signal, {
|
|
207
|
+
source: "chatEditingEditor.cursorPositionChanged"
|
|
208
|
+
});
|
|
173
209
|
}
|
|
174
210
|
}));
|
|
175
211
|
this._store.add(autorun(r => {
|
|
@@ -180,7 +216,17 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
180
216
|
const accessibleDiffWidget = ( new AccessibleDiffViewContainer());
|
|
181
217
|
_editor.addOverlayWidget(accessibleDiffWidget);
|
|
182
218
|
r.store.add(toDisposable(() => _editor.removeOverlayWidget(accessibleDiffWidget)));
|
|
183
|
-
r.store.add(instantiationService.createInstance(
|
|
219
|
+
r.store.add(instantiationService.createInstance(
|
|
220
|
+
AccessibleDiffViewer,
|
|
221
|
+
accessibleDiffWidget.getDomNode(),
|
|
222
|
+
enabledObs,
|
|
223
|
+
(visible, tx) => this._accessibleDiffViewVisible.set(visible, tx),
|
|
224
|
+
constObservable(true),
|
|
225
|
+
( codeEditorObs.layoutInfo.map((v, r) => v.width)),
|
|
226
|
+
( codeEditorObs.layoutInfo.map((v, r) => v.height)),
|
|
227
|
+
( documentDiffInfo.map(diff => diff.changes.slice())),
|
|
228
|
+
instantiationService.createInstance(AccessibleDiffViewerModel, documentDiffInfo, _editor)
|
|
229
|
+
));
|
|
184
230
|
}));
|
|
185
231
|
let actualOptions;
|
|
186
232
|
const restoreActualOptions = () => {
|
|
@@ -204,12 +250,16 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
204
250
|
};
|
|
205
251
|
this._editor.updateOptions({
|
|
206
252
|
readOnly: true,
|
|
207
|
-
stickyScroll: {
|
|
253
|
+
stickyScroll: {
|
|
254
|
+
enabled: false
|
|
255
|
+
},
|
|
208
256
|
codeLens: false,
|
|
209
|
-
guides: {
|
|
257
|
+
guides: {
|
|
258
|
+
indentation: false,
|
|
259
|
+
bracketPairs: false
|
|
260
|
+
}
|
|
210
261
|
});
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
262
|
+
} else {
|
|
213
263
|
restoreActualOptions();
|
|
214
264
|
}
|
|
215
265
|
}));
|
|
@@ -224,7 +274,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
224
274
|
this._currentIndex.set(-1, undefined);
|
|
225
275
|
}
|
|
226
276
|
_clearDiffRendering() {
|
|
227
|
-
this._editor.changeViewZones(
|
|
277
|
+
this._editor.changeViewZones(viewZoneChangeAccessor => {
|
|
228
278
|
for (const id of this._viewZones) {
|
|
229
279
|
viewZoneChangeAccessor.removeZone(id);
|
|
230
280
|
}
|
|
@@ -243,13 +293,19 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
243
293
|
});
|
|
244
294
|
const chatDiffWholeLineAddDecoration = ModelDecorationOptions.createDynamic({
|
|
245
295
|
...diffWholeLineAddDecoration,
|
|
246
|
-
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
|
|
296
|
+
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
|
|
247
297
|
});
|
|
248
298
|
const createOverviewDecoration = (overviewRulerColor, minimapColor) => {
|
|
249
299
|
return ModelDecorationOptions.createDynamic({
|
|
250
|
-
description:
|
|
251
|
-
overviewRuler: {
|
|
252
|
-
|
|
300
|
+
description: "chat-editing-decoration",
|
|
301
|
+
overviewRuler: {
|
|
302
|
+
color: themeColorFromId(overviewRulerColor),
|
|
303
|
+
position: OverviewRulerLane.Left
|
|
304
|
+
},
|
|
305
|
+
minimap: {
|
|
306
|
+
color: themeColorFromId(minimapColor),
|
|
307
|
+
position: MinimapPosition.Gutter
|
|
308
|
+
}
|
|
253
309
|
});
|
|
254
310
|
};
|
|
255
311
|
const modifiedDecoration = createOverviewDecoration(overviewRulerModifiedForeground, minimapGutterModifiedBackground);
|
|
@@ -258,7 +314,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
258
314
|
this._diffHunksRenderStore.clear();
|
|
259
315
|
this._diffHunkWidgets.length = 0;
|
|
260
316
|
const diffHunkDecorations = [];
|
|
261
|
-
this._editor.changeViewZones(
|
|
317
|
+
this._editor.changeViewZones(viewZoneChangeAccessor => {
|
|
262
318
|
for (const id of this._viewZones) {
|
|
263
319
|
viewZoneChangeAccessor.removeZone(id);
|
|
264
320
|
}
|
|
@@ -287,7 +343,8 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
287
343
|
)));
|
|
288
344
|
if (!(i.originalRange.isEmpty() && i.originalRange.startLineNumber === 1 && i.modifiedRange.endLineNumber === editorLineCount) && !i.modifiedRange.isEmpty()) {
|
|
289
345
|
modifiedVisualDecorations.push({
|
|
290
|
-
range: i.modifiedRange,
|
|
346
|
+
range: i.modifiedRange,
|
|
347
|
+
options: chatDiffAddDecoration
|
|
291
348
|
});
|
|
292
349
|
}
|
|
293
350
|
}
|
|
@@ -304,8 +361,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
304
361
|
range: diffEntry.modified.toInclusiveRange(),
|
|
305
362
|
options: addedDecoration
|
|
306
363
|
});
|
|
307
|
-
}
|
|
308
|
-
else if (diffEntry.modified.isEmpty) {
|
|
364
|
+
} else if (diffEntry.modified.isEmpty) {
|
|
309
365
|
modifiedVisualDecorations.push({
|
|
310
366
|
range: ( new Range(
|
|
311
367
|
diffEntry.modified.startLineNumber - 1,
|
|
@@ -315,8 +371,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
315
371
|
)),
|
|
316
372
|
options: deletedDecoration
|
|
317
373
|
});
|
|
318
|
-
}
|
|
319
|
-
else {
|
|
374
|
+
} else {
|
|
320
375
|
modifiedVisualDecorations.push({
|
|
321
376
|
range: diffEntry.modified.toInclusiveRange(),
|
|
322
377
|
options: modifiedDecoration
|
|
@@ -324,8 +379,8 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
324
379
|
}
|
|
325
380
|
let extraLines = 0;
|
|
326
381
|
if (reviewMode && !diffMode) {
|
|
327
|
-
const domNode = createElement(
|
|
328
|
-
domNode.className =
|
|
382
|
+
const domNode = createElement("div");
|
|
383
|
+
domNode.className = "chat-editing-original-zone view-lines line-delete monaco-mouse-cursor-text";
|
|
329
384
|
const result = renderLines(source, renderOptions, decorations, domNode);
|
|
330
385
|
extraLines = result.heightInLines;
|
|
331
386
|
if (!isCreatedContent) {
|
|
@@ -343,11 +398,22 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
343
398
|
if (!widget) {
|
|
344
399
|
widget = this._editor.invokeWithinContext(accessor => {
|
|
345
400
|
const instaService = accessor.get(IInstantiationService);
|
|
346
|
-
return instaService.createInstance(
|
|
401
|
+
return instaService.createInstance(
|
|
402
|
+
DiffHunkWidget,
|
|
403
|
+
this._editor,
|
|
404
|
+
diff,
|
|
405
|
+
diffEntry,
|
|
406
|
+
this._editor.getModel().getVersionId(),
|
|
407
|
+
isCreatedContent ? 0 : extraLines
|
|
408
|
+
);
|
|
347
409
|
});
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
410
|
+
} else {
|
|
411
|
+
widget.update(
|
|
412
|
+
diff,
|
|
413
|
+
diffEntry,
|
|
414
|
+
this._editor.getModel().getVersionId(),
|
|
415
|
+
isCreatedContent ? 0 : extraLines
|
|
416
|
+
);
|
|
351
417
|
}
|
|
352
418
|
this._diffHunksRenderStore.add(toDisposable(() => {
|
|
353
419
|
this._diffHunkWidgetPool.putBack(widget);
|
|
@@ -362,7 +428,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
362
428
|
Number.MAX_SAFE_INTEGER
|
|
363
429
|
)),
|
|
364
430
|
options: {
|
|
365
|
-
description:
|
|
431
|
+
description: "diff-hunk-widget",
|
|
366
432
|
stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges
|
|
367
433
|
}
|
|
368
434
|
});
|
|
@@ -386,7 +452,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
386
452
|
const idx = diffHunkDecoCollection.getRanges().findIndex(r => r.containsPosition(position));
|
|
387
453
|
return idx;
|
|
388
454
|
});
|
|
389
|
-
const toggleWidget =
|
|
455
|
+
const toggleWidget = activeWidget => {
|
|
390
456
|
const positionIdx = activeWidgetIdx.get();
|
|
391
457
|
for (let i = 0; i < this._diffHunkWidgets.length; i++) {
|
|
392
458
|
const widget = this._diffHunkWidgets[i];
|
|
@@ -413,41 +479,39 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
413
479
|
const id = e.target.detail;
|
|
414
480
|
const widget = this._diffHunkWidgets.find(w => w.getId() === id);
|
|
415
481
|
toggleWidget(widget);
|
|
416
|
-
}
|
|
417
|
-
else if (e.target.type === MouseTargetType.CONTENT_VIEW_ZONE) {
|
|
482
|
+
} else if (e.target.type === MouseTargetType.CONTENT_VIEW_ZONE) {
|
|
418
483
|
const zone = e.target.detail;
|
|
419
484
|
const idx = this._viewZones.findIndex(id => id === zone.viewZoneId);
|
|
420
485
|
toggleWidget(this._diffHunkWidgets[idx]);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
486
|
+
} else if (e.target.position) {
|
|
487
|
+
const {
|
|
488
|
+
position
|
|
489
|
+
} = e.target;
|
|
424
490
|
const idx = diffHunkDecoCollection.getRanges().findIndex(r => r.containsPosition(position));
|
|
425
491
|
toggleWidget(this._diffHunkWidgets[idx]);
|
|
426
|
-
}
|
|
427
|
-
else {
|
|
492
|
+
} else {
|
|
428
493
|
toggleWidget(undefined);
|
|
429
494
|
}
|
|
430
495
|
}));
|
|
431
|
-
this._diffHunksRenderStore.add(
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
496
|
+
this._diffHunksRenderStore.add(
|
|
497
|
+
Event.any(this._editor.onDidScrollChange, this._editor.onDidLayoutChange)(() => {
|
|
498
|
+
for (let i = 0; i < this._diffHunkWidgets.length; i++) {
|
|
499
|
+
const widget = this._diffHunkWidgets[i];
|
|
500
|
+
const range = diffHunkDecoCollection.getRange(i);
|
|
501
|
+
if (range) {
|
|
502
|
+
widget.layout(range?.startLineNumber);
|
|
503
|
+
} else {
|
|
504
|
+
widget.dispose();
|
|
505
|
+
}
|
|
440
506
|
}
|
|
441
|
-
}
|
|
442
|
-
|
|
507
|
+
})
|
|
508
|
+
);
|
|
443
509
|
}
|
|
444
510
|
enableAccessibleDiffView() {
|
|
445
511
|
this._accessibleDiffViewVisible.set(true, undefined);
|
|
446
512
|
}
|
|
447
513
|
reveal(firstOrLast, preserveFocus) {
|
|
448
|
-
const decorations = this._diffLineDecorations
|
|
449
|
-
.getRanges()
|
|
450
|
-
.sort((a, b) => Range.compareRangesUsingStarts(a, b));
|
|
514
|
+
const decorations = this._diffLineDecorations.getRanges().sort((a, b) => Range.compareRangesUsingStarts(a, b));
|
|
451
515
|
const index = firstOrLast ? 0 : decorations.length - 1;
|
|
452
516
|
const range = decorations.at(index);
|
|
453
517
|
if (range) {
|
|
@@ -471,9 +535,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
471
535
|
this._currentIndex.set(-1, undefined);
|
|
472
536
|
return false;
|
|
473
537
|
}
|
|
474
|
-
const decorations = this._diffLineDecorations
|
|
475
|
-
.getRanges()
|
|
476
|
-
.sort((a, b) => Range.compareRangesUsingStarts(a, b));
|
|
538
|
+
const decorations = this._diffLineDecorations.getRanges().sort((a, b) => Range.compareRangesUsingStarts(a, b));
|
|
477
539
|
if (decorations.length === 0) {
|
|
478
540
|
this._currentIndex.set(-1, undefined);
|
|
479
541
|
return false;
|
|
@@ -484,8 +546,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
484
546
|
if (range.containsPosition(position)) {
|
|
485
547
|
newIndex = i + (next ? 1 : -1);
|
|
486
548
|
break;
|
|
487
|
-
}
|
|
488
|
-
else if (Position.isBefore(position, range.getStartPosition())) {
|
|
549
|
+
} else if (Position.isBefore(position, range.getStartPosition())) {
|
|
489
550
|
newIndex = next ? i : i - 1;
|
|
490
551
|
break;
|
|
491
552
|
}
|
|
@@ -550,10 +611,16 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
550
611
|
const isDiffEditor = this._editor.getOption(EditorOption.inDiffEditor);
|
|
551
612
|
if (show !== undefined ? show : !isDiffEditor) {
|
|
552
613
|
const diffEditor = await this._editorService.openEditor({
|
|
553
|
-
original: {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
614
|
+
original: {
|
|
615
|
+
resource: this._entry.originalURI
|
|
616
|
+
},
|
|
617
|
+
modified: {
|
|
618
|
+
resource: this._entry.modifiedURI
|
|
619
|
+
},
|
|
620
|
+
options: {
|
|
621
|
+
selection
|
|
622
|
+
},
|
|
623
|
+
label: ( localize(5286, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
|
|
557
624
|
});
|
|
558
625
|
if (diffEditor && diffEditor.input) {
|
|
559
626
|
diffEditor.getControl()?.setSelection(selection);
|
|
@@ -563,9 +630,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
563
630
|
d.dispose();
|
|
564
631
|
const editorIdents = [];
|
|
565
632
|
for (const candidate of this._editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE)) {
|
|
566
|
-
if (isDiffEditorInput(candidate.editor)
|
|
567
|
-
&& isEqual(candidate.editor.original.resource, this._entry.originalURI)
|
|
568
|
-
&& isEqual(candidate.editor.modified.resource, this._entry.modifiedURI)) {
|
|
633
|
+
if (isDiffEditorInput(candidate.editor) && isEqual(candidate.editor.original.resource, this._entry.originalURI) && isEqual(candidate.editor.modified.resource, this._entry.modifiedURI)) {
|
|
569
634
|
editorIdents.push(candidate);
|
|
570
635
|
}
|
|
571
636
|
}
|
|
@@ -573,8 +638,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
573
638
|
}
|
|
574
639
|
});
|
|
575
640
|
}
|
|
576
|
-
}
|
|
577
|
-
else {
|
|
641
|
+
} else {
|
|
578
642
|
await this._editorService.openEditor({
|
|
579
643
|
resource: this._entry.modifiedURI,
|
|
580
644
|
options: {
|
|
@@ -585,15 +649,14 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
585
649
|
}
|
|
586
650
|
}
|
|
587
651
|
};
|
|
588
|
-
ChatEditingCodeEditorIntegration = ChatEditingCodeEditorIntegration_1 = ( __decorate([
|
|
589
|
-
( __param(4, IEditorService)),
|
|
590
|
-
( __param(5, IAccessibilitySignalService)),
|
|
591
|
-
( __param(6, IContextKeyService)),
|
|
592
|
-
( __param(7, IInstantiationService))
|
|
593
|
-
], ChatEditingCodeEditorIntegration));
|
|
652
|
+
ChatEditingCodeEditorIntegration = ChatEditingCodeEditorIntegration_1 = ( __decorate([( __param(4, IEditorService)), ( __param(5, IAccessibilitySignalService)), ( __param(6, IContextKeyService)), ( __param(7, IInstantiationService)), ( __param(8, IChatEditingService)), ( __param(9, IChatEditingExplanationModelManager)), ( __param(10, IChatWidgetService)), ( __param(11, IViewsService))], ChatEditingCodeEditorIntegration));
|
|
594
653
|
let DiffHunkWidget = class DiffHunkWidget {
|
|
595
|
-
static {
|
|
596
|
-
|
|
654
|
+
static {
|
|
655
|
+
DiffHunkWidget_1 = this;
|
|
656
|
+
}
|
|
657
|
+
static {
|
|
658
|
+
this._idPool = 0;
|
|
659
|
+
}
|
|
597
660
|
constructor(_editor, _diffInfo, _change, _versionId, _lineDelta, instaService) {
|
|
598
661
|
this._editor = _editor;
|
|
599
662
|
this._diffInfo = _diffInfo;
|
|
@@ -603,23 +666,37 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
603
666
|
this._id = `diff-change-widget-${DiffHunkWidget_1._idPool++}`;
|
|
604
667
|
this._store = ( new DisposableStore());
|
|
605
668
|
this._removed = false;
|
|
606
|
-
this._domNode = createElement(
|
|
607
|
-
this._domNode.className =
|
|
669
|
+
this._domNode = createElement("div");
|
|
670
|
+
this._domNode.className = "chat-diff-change-content-widget";
|
|
608
671
|
const toolbar = instaService.createInstance(MenuWorkbenchToolBar, this._domNode, MenuId.ChatEditingEditorHunk, {
|
|
609
|
-
telemetrySource:
|
|
672
|
+
telemetrySource: "chatEditingEditorHunk",
|
|
610
673
|
hiddenItemStrategy: HiddenItemStrategy.NoHide,
|
|
611
|
-
toolbarOptions: {
|
|
674
|
+
toolbarOptions: {
|
|
675
|
+
primaryGroup: () => true
|
|
676
|
+
},
|
|
612
677
|
menuOptions: {
|
|
613
678
|
renderShortTitle: true,
|
|
614
|
-
arg: this
|
|
679
|
+
arg: this
|
|
615
680
|
},
|
|
616
681
|
actionViewItemProvider: (action, options) => {
|
|
682
|
+
const isPrimary = action.id === "chatEditor.action.acceptHunk";
|
|
617
683
|
if (!action.class) {
|
|
618
684
|
return new (class extends ActionViewItem {
|
|
619
685
|
constructor() {
|
|
620
|
-
super(undefined, action, {
|
|
686
|
+
super(undefined, action, {
|
|
687
|
+
...options,
|
|
688
|
+
keybindingNotRenderedWithLabel: true ,
|
|
689
|
+
icon: false,
|
|
690
|
+
label: true
|
|
691
|
+
});
|
|
621
692
|
}
|
|
622
|
-
|
|
693
|
+
render(container) {
|
|
694
|
+
super.render(container);
|
|
695
|
+
if (isPrimary) {
|
|
696
|
+
this.element?.classList.add("primary");
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
})();
|
|
623
700
|
}
|
|
624
701
|
return undefined;
|
|
625
702
|
}
|
|
@@ -644,7 +721,11 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
644
721
|
}
|
|
645
722
|
layout(startLineNumber) {
|
|
646
723
|
const lineHeight = this._editor.getOption(EditorOption.lineHeight);
|
|
647
|
-
const {
|
|
724
|
+
const {
|
|
725
|
+
contentLeft,
|
|
726
|
+
contentWidth,
|
|
727
|
+
verticalScrollbarWidth
|
|
728
|
+
} = this._editor.getLayoutInfo();
|
|
648
729
|
const scrollTop = this._editor.getScrollTop();
|
|
649
730
|
this._position = {
|
|
650
731
|
stackOrdinal: 1,
|
|
@@ -656,8 +737,7 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
656
737
|
if (this._removed) {
|
|
657
738
|
this._removed = false;
|
|
658
739
|
this._editor.addOverlayWidget(this);
|
|
659
|
-
}
|
|
660
|
-
else {
|
|
740
|
+
} else {
|
|
661
741
|
this._editor.layoutOverlayWidget(this);
|
|
662
742
|
}
|
|
663
743
|
this._lastStartLineNumber = startLineNumber;
|
|
@@ -667,7 +747,7 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
667
747
|
this._removed = true;
|
|
668
748
|
}
|
|
669
749
|
toggle(show) {
|
|
670
|
-
this._domNode.classList.toggle(
|
|
750
|
+
this._domNode.classList.toggle("hover", show);
|
|
671
751
|
if (this._lastStartLineNumber) {
|
|
672
752
|
this.layout(this._lastStartLineNumber);
|
|
673
753
|
}
|
|
@@ -694,25 +774,26 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
694
774
|
return this._diffInfo.keep(this._change);
|
|
695
775
|
}
|
|
696
776
|
};
|
|
697
|
-
DiffHunkWidget = DiffHunkWidget_1 = ( __decorate([
|
|
698
|
-
( __param(5, IInstantiationService))
|
|
699
|
-
], DiffHunkWidget));
|
|
777
|
+
DiffHunkWidget = DiffHunkWidget_1 = ( __decorate([( __param(5, IInstantiationService))], DiffHunkWidget));
|
|
700
778
|
class AccessibleDiffViewContainer {
|
|
701
779
|
constructor() {
|
|
702
|
-
this._domNode = createElement(
|
|
703
|
-
this._domNode.className =
|
|
704
|
-
this._domNode.style.width =
|
|
705
|
-
this._domNode.style.position =
|
|
780
|
+
this._domNode = createElement("div");
|
|
781
|
+
this._domNode.className = "accessible-diff-view";
|
|
782
|
+
this._domNode.style.width = "100%";
|
|
783
|
+
this._domNode.style.position = "absolute";
|
|
706
784
|
}
|
|
707
785
|
getId() {
|
|
708
|
-
return
|
|
786
|
+
return "chatEdits.accessibleDiffView";
|
|
709
787
|
}
|
|
710
788
|
getDomNode() {
|
|
711
789
|
return this._domNode;
|
|
712
790
|
}
|
|
713
791
|
getPosition() {
|
|
714
792
|
return {
|
|
715
|
-
preference: {
|
|
793
|
+
preference: {
|
|
794
|
+
top: 0,
|
|
795
|
+
left: 0
|
|
796
|
+
},
|
|
716
797
|
stackOrdinal: 1
|
|
717
798
|
};
|
|
718
799
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { IObservable, ITransaction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { IDocumentDiff } from "../../../../../editor/common/diff/documentDiffProvider.js";
|
|
4
|
+
import { TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
5
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
6
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
7
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
8
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
9
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
10
|
+
import { IUndoRedoElement } from "@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo";
|
|
11
|
+
import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service";
|
|
12
|
+
import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
13
|
+
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
14
|
+
import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
|
|
15
|
+
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
16
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
17
|
+
import { IModifiedEntryTelemetryInfo, IModifiedFileEntry, IModifiedFileEntryEditorIntegration, ISnapshotEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
18
|
+
import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
19
|
+
import { AbstractChatEditingModifiedFileEntry } from "./chatEditingModifiedFileEntry.js";
|
|
20
|
+
interface IMultiDiffEntryDelegate {
|
|
21
|
+
collapse: (transaction: ITransaction | undefined) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents a file that has been deleted by the chat editing session.
|
|
25
|
+
* Unlike ChatEditingModifiedDocumentEntry, this doesn't maintain a live model
|
|
26
|
+
* since the file no longer exists on disk.
|
|
27
|
+
*/
|
|
28
|
+
export declare class ChatEditingDeletedFileEntry extends AbstractChatEditingModifiedFileEntry implements IModifiedFileEntry {
|
|
29
|
+
private readonly _multiDiffEntryDelegate;
|
|
30
|
+
private readonly _languageId;
|
|
31
|
+
private readonly _modelService;
|
|
32
|
+
private readonly _languageService;
|
|
33
|
+
readonly initialContent: string;
|
|
34
|
+
/**
|
|
35
|
+
* The original content before deletion, stored for diff display and potential restoration.
|
|
36
|
+
*/
|
|
37
|
+
private readonly _originalContent;
|
|
38
|
+
/**
|
|
39
|
+
* Lazily created model for the original content (for diff display).
|
|
40
|
+
*/
|
|
41
|
+
private _originalModel;
|
|
42
|
+
/**
|
|
43
|
+
* Lazily created empty model representing the deleted state (for diff display).
|
|
44
|
+
*/
|
|
45
|
+
private _modifiedModel;
|
|
46
|
+
readonly originalURI: URI;
|
|
47
|
+
readonly diffInfo: IObservable<IDocumentDiff>;
|
|
48
|
+
readonly linesAdded: IObservable<number>;
|
|
49
|
+
readonly linesRemoved: IObservable<number>;
|
|
50
|
+
private readonly _changesCount;
|
|
51
|
+
readonly changesCount: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<number, void>;
|
|
52
|
+
readonly isDeletion = true;
|
|
53
|
+
constructor(resource: URI, originalContent: string, _multiDiffEntryDelegate: IMultiDiffEntryDelegate, telemetryInfo: IModifiedEntryTelemetryInfo, _languageId: string, _modelService: IModelService, _languageService: ILanguageService, configService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, fileService: IFileService, undoRedoService: IUndoRedoService, instantiationService: IInstantiationService, aiEditTelemetryService: IAiEditTelemetryService);
|
|
54
|
+
dispose(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Gets or creates the original model for diff display.
|
|
57
|
+
*/
|
|
58
|
+
private _getOrCreateOriginalModel;
|
|
59
|
+
/**
|
|
60
|
+
* Gets or creates an empty model representing the deleted state.
|
|
61
|
+
*/
|
|
62
|
+
private _getOrCreateModifiedModel;
|
|
63
|
+
private _diffInfo;
|
|
64
|
+
getDiffInfo(): Promise<IDocumentDiff>;
|
|
65
|
+
equalsSnapshot(snapshot: ISnapshotEntry | undefined): boolean;
|
|
66
|
+
createSnapshot(chatSessionResource: URI, requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
|
|
67
|
+
restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
|
|
68
|
+
resetToInitialContent(): Promise<void>;
|
|
69
|
+
protected _areOriginalAndModifiedIdentical(): Promise<boolean>;
|
|
70
|
+
protected _createUndoRedoElement(response: IChatResponseModel): IUndoRedoElement;
|
|
71
|
+
acceptAgentEdits(_uri: URI, _edits: (TextEdit | ICellEditOperation)[], isLastEdits: boolean, _responseModel: IChatResponseModel | undefined): Promise<void>;
|
|
72
|
+
protected _doAccept(): Promise<void>;
|
|
73
|
+
protected _doReject(): Promise<void>;
|
|
74
|
+
protected _createEditorIntegration(_editor: IEditorPane): IModifiedFileEntryEditorIntegration;
|
|
75
|
+
computeEditsFromSnapshots(_beforeSnapshot: string, _afterSnapshot: string): Promise<(TextEdit | ICellEditOperation)[]>;
|
|
76
|
+
save(): Promise<void>;
|
|
77
|
+
revertToDisk(): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
export {};
|