@codingame/monaco-vscode-chat-service-override 22.1.8 → 23.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 +16 -7
- package/package.json +43 -41
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +57 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +26 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +51 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/{chatClearActions.d.ts → chatNewActions.d.ts} +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/{chatClearActions.js → chatNewActions.js} +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +101 -98
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +35 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +43 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +33 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +250 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +97 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +290 -231
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +7 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +646 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +46 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +44 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +46 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +45 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +30 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +60 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +60 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +29 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +365 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +3 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +58 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +6 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +38 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +83 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +370 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +349 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +787 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +211 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatUsageWidget.css +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +54 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +31 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +16 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +29 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +37 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +15 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +96 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +66 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +77 -71
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +91 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +458 -138
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +212 -150
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +96 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +15 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +33 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +688 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +15 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +126 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +38 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +28 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +24 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +25 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +30 -29
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +10 -19
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +61 -43
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +28 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +254 -165
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.d.ts +10 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +20 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +13 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +51 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +74 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +83 -53
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +136 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +18 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +357 -157
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +55 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +235 -108
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +50 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +11 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +18 -30
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +62 -139
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +16 -15
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +119 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +6 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +192 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +21 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +8 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +18 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +18 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +24 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +33 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +42 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +14 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +227 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +133 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +36 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +75 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +71 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +28 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +366 -363
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +123 -0
- package/vscode/src/vs/base/common/yaml.d.ts +0 -74
- package/vscode/src/vs/base/common/yaml.js +0 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +0 -239
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.js +0 -435
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +0 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +0 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +0 -380
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +0 -137
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +0 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +0 -176
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +0 -206
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +0 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +0 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.js +0 -102
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.d.ts +0 -97
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.js +0 -247
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +0 -118
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.js +0 -55
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.js +0 -66
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js
CHANGED
|
@@ -30,11 +30,13 @@ import { TextEditorSelectionRevealType } from '@codingame/monaco-vscode-api/vsco
|
|
|
30
30
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
31
31
|
import { EditorsOrder, isDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
32
32
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
|
-
import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '@codingame/monaco-vscode-
|
|
34
|
-
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
33
|
+
import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overviewRulerAddedForeground, minimapGutterAddedBackground, overviewRulerDeletedForeground, minimapGutterDeletedBackground } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
35
34
|
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
36
|
-
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
37
35
|
import { isTextDiffEditorForEntry } from './chatEditing.js';
|
|
36
|
+
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
37
|
+
import { AcceptHunkAction, RejectHunkAction } from './chatEditingEditorActions.js';
|
|
38
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
39
|
+
import { ctxCursorInChangeRange } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
38
40
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
39
41
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
40
42
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
@@ -46,10 +48,9 @@ registerCss(chatEditorController);
|
|
|
46
48
|
let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
47
49
|
static { ChatEditingCodeEditorIntegration_1 = this; }
|
|
48
50
|
static { this._diffLineDecorationData = ModelDecorationOptions.register({ description: 'diff-line-decoration' }); }
|
|
49
|
-
constructor(_entry, _editor, documentDiffInfo, renderDiffImmediately,
|
|
51
|
+
constructor(_entry, _editor, documentDiffInfo, renderDiffImmediately, _editorService, _accessibilitySignalsService, contextKeyService, instantiationService) {
|
|
50
52
|
this._entry = _entry;
|
|
51
53
|
this._editor = _editor;
|
|
52
|
-
this._chatAgentService = _chatAgentService;
|
|
53
54
|
this._editorService = _editorService;
|
|
54
55
|
this._accessibilitySignalsService = _accessibilitySignalsService;
|
|
55
56
|
this._currentIndex = observableValue(this, -1);
|
|
@@ -129,21 +130,28 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
129
130
|
this._updateDiffRendering(diff, reviewMode, isDiffEditor);
|
|
130
131
|
}
|
|
131
132
|
}));
|
|
133
|
+
const _ctxCursorInChangeRange = ctxCursorInChangeRange.bindTo(contextKeyService);
|
|
132
134
|
this._store.add(autorun(r => {
|
|
133
135
|
const position = codeEditorObs.positions.read(r)?.at(0);
|
|
134
136
|
if (!position || !enabledObs.read(r)) {
|
|
137
|
+
_ctxCursorInChangeRange.reset();
|
|
135
138
|
return;
|
|
136
139
|
}
|
|
137
140
|
const diff = documentDiffInfo.read(r);
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
const changeAtCursor = diff.changes.find(m => m.modified.contains(position.lineNumber) || m.modified.isEmpty && m.modified.startLineNumber === position.lineNumber);
|
|
142
|
+
_ctxCursorInChangeRange.set(!!changeAtCursor);
|
|
143
|
+
if (changeAtCursor) {
|
|
144
|
+
let signal;
|
|
145
|
+
if (changeAtCursor.modified.isEmpty) {
|
|
146
|
+
signal = AccessibilitySignal.diffLineDeleted;
|
|
147
|
+
}
|
|
148
|
+
else if (changeAtCursor.original.isEmpty) {
|
|
149
|
+
signal = AccessibilitySignal.diffLineInserted;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
signal = AccessibilitySignal.diffLineModified;
|
|
153
|
+
}
|
|
154
|
+
this._accessibilitySignalsService.playSignal(signal, { source: 'chatEditingEditor.cursorPositionChanged' });
|
|
147
155
|
}
|
|
148
156
|
}));
|
|
149
157
|
this._store.add(autorun(r => {
|
|
@@ -359,6 +367,16 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
359
367
|
const widget = this._diffHunkWidgets[idx];
|
|
360
368
|
toggleWidget(widget);
|
|
361
369
|
}));
|
|
370
|
+
this._diffHunksRenderStore.add(this._editor.onMouseUp(e => {
|
|
371
|
+
if (e.target.type === MouseTargetType.CONTENT_VIEW_ZONE) {
|
|
372
|
+
const zone = e.target.detail;
|
|
373
|
+
const idx = this._viewZones.findIndex(id => id === zone.viewZoneId);
|
|
374
|
+
if (idx >= 0) {
|
|
375
|
+
this._editor.setPosition(e.target.position);
|
|
376
|
+
this._editor.focus();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}));
|
|
362
380
|
this._diffHunksRenderStore.add(this._editor.onMouseMove(e => {
|
|
363
381
|
if (e.target.type === MouseTargetType.OVERLAY_WIDGET) {
|
|
364
382
|
const id = e.target.detail;
|
|
@@ -500,19 +518,11 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
500
518
|
}
|
|
501
519
|
const isDiffEditor = this._editor.getOption(EditorOption.inDiffEditor);
|
|
502
520
|
if (show !== undefined ? show : !isDiffEditor) {
|
|
503
|
-
const defaultAgentName = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Chat)?.fullName;
|
|
504
521
|
const diffEditor = await this._editorService.openEditor({
|
|
505
522
|
original: { resource: this._entry.originalURI },
|
|
506
523
|
modified: { resource: this._entry.modifiedURI },
|
|
507
524
|
options: { selection },
|
|
508
|
-
label:
|
|
509
|
-
? ( localize(
|
|
510
|
-
5063,
|
|
511
|
-
'{0} (changes from {1})',
|
|
512
|
-
basename(this._entry.modifiedURI),
|
|
513
|
-
defaultAgentName
|
|
514
|
-
))
|
|
515
|
-
: ( localize(5064, '{0} (changes from chat)', basename(this._entry.modifiedURI)))
|
|
525
|
+
label: ( localize(5138, '{0} (changes from chat)', basename(this._entry.modifiedURI)))
|
|
516
526
|
});
|
|
517
527
|
if (diffEditor && diffEditor.input) {
|
|
518
528
|
diffEditor.getControl()?.setSelection(selection);
|
|
@@ -545,9 +555,9 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
545
555
|
}
|
|
546
556
|
};
|
|
547
557
|
ChatEditingCodeEditorIntegration = ChatEditingCodeEditorIntegration_1 = ( __decorate([
|
|
548
|
-
( __param(4,
|
|
549
|
-
( __param(5,
|
|
550
|
-
( __param(6,
|
|
558
|
+
( __param(4, IEditorService)),
|
|
559
|
+
( __param(5, IAccessibilitySignalService)),
|
|
560
|
+
( __param(6, IContextKeyService)),
|
|
551
561
|
( __param(7, IInstantiationService))
|
|
552
562
|
], ChatEditingCodeEditorIntegration));
|
|
553
563
|
let DiffHunkWidget = class DiffHunkWidget {
|
|
@@ -571,6 +581,16 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
571
581
|
renderShortTitle: true,
|
|
572
582
|
arg: this,
|
|
573
583
|
},
|
|
584
|
+
actionViewItemProvider: (action, options) => {
|
|
585
|
+
if (action.id === AcceptHunkAction.ID || action.id === RejectHunkAction.ID) {
|
|
586
|
+
return new (class extends ActionViewItem {
|
|
587
|
+
constructor() {
|
|
588
|
+
super(undefined, action, { ...options, keybindingNotRenderedWithLabel: true, icon: false, label: true });
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
return undefined;
|
|
593
|
+
}
|
|
574
594
|
});
|
|
575
595
|
this._store.add(toolbar);
|
|
576
596
|
this._store.add(toolbar.actionRunner.onWillRun(_ => _editor.focus()));
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Action2, IAction2Options } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
3
3
|
import { IChatEditingSession, IModifiedFileEntry, IModifiedFileEntryEditorIntegration } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
4
4
|
declare abstract class ChatEditingEditorAction extends Action2 {
|
|
5
5
|
constructor(desc: Readonly<IAction2Options>);
|
|
6
|
-
run(accessor: ServicesAccessor, ...args:
|
|
7
|
-
abstract runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, integration: IModifiedFileEntryEditorIntegration, ...args:
|
|
6
|
+
run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void>;
|
|
7
|
+
abstract runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, integration: IModifiedFileEntryEditorIntegration, ...args: unknown[]): Promise<void> | void;
|
|
8
8
|
}
|
|
9
9
|
declare abstract class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
10
10
|
private _keep;
|
|
@@ -19,14 +19,27 @@ export declare class RejectAction extends KeepOrUndoAction {
|
|
|
19
19
|
static readonly ID = "chatEditor.action.reject";
|
|
20
20
|
constructor();
|
|
21
21
|
}
|
|
22
|
+
declare abstract class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
23
|
+
private readonly _accept;
|
|
24
|
+
constructor(_accept: boolean);
|
|
25
|
+
runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, ctrl: IModifiedFileEntryEditorIntegration, ...args: unknown[]): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare class AcceptHunkAction extends AcceptRejectHunkAction {
|
|
28
|
+
static readonly ID = "chatEditor.action.acceptHunk";
|
|
29
|
+
constructor();
|
|
30
|
+
}
|
|
31
|
+
export declare class RejectHunkAction extends AcceptRejectHunkAction {
|
|
32
|
+
static readonly ID = "chatEditor.action.undoHunk";
|
|
33
|
+
constructor();
|
|
34
|
+
}
|
|
22
35
|
export declare class ReviewChangesAction extends ChatEditingEditorAction {
|
|
23
36
|
constructor();
|
|
24
|
-
runChatEditingCommand(_accessor: ServicesAccessor, _session: IChatEditingSession, entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration, ..._args:
|
|
37
|
+
runChatEditingCommand(_accessor: ServicesAccessor, _session: IChatEditingSession, entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration, ..._args: unknown[]): void;
|
|
25
38
|
}
|
|
26
39
|
export declare class AcceptAllEditsAction extends ChatEditingEditorAction {
|
|
27
40
|
static readonly ID = "chatEditor.action.acceptAllEdits";
|
|
28
41
|
constructor();
|
|
29
|
-
runChatEditingCommand(_accessor: ServicesAccessor, session: IChatEditingSession, _entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration, ..._args:
|
|
42
|
+
runChatEditingCommand(_accessor: ServicesAccessor, session: IChatEditingSession, _entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration, ..._args: unknown[]): Promise<void>;
|
|
30
43
|
}
|
|
31
44
|
export declare function registerChatEditorActions(): void;
|
|
32
45
|
export declare const navigationBearingFakeActionId = "chatEditor.navigation.bearings";
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js
CHANGED
|
@@ -8,19 +8,20 @@ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
8
8
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
9
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
10
10
|
import { IListService } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService.service';
|
|
11
|
-
import { resolveCommandsContext } from '@codingame/monaco-vscode-
|
|
11
|
+
import { resolveCommandsContext } from '@codingame/monaco-vscode-a6a3e03d-2b1a-5e17-b904-ed5d40c14550-common/vscode/vs/workbench/browser/parts/editor/editorCommandsContext';
|
|
12
12
|
import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
13
13
|
import { EditorResourceAccessor, SideBySideEditor, TEXT_DIFF_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
14
14
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
15
15
|
import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
16
16
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
|
-
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-
|
|
17
|
+
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
18
18
|
import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_FOCUSED } from '@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
19
19
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
20
20
|
import { ModifiedFileEntryState, CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
21
21
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
23
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
24
|
+
import { ctxReviewModeEnabled, ctxHasEditorModification, ctxIsGlobalEditingSession, ctxIsCurrentlyBeingModified, ctxCursorInChangeRange } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
24
25
|
|
|
25
26
|
class ChatEditingEditorAction extends Action2 {
|
|
26
27
|
constructor(desc) {
|
|
@@ -54,8 +55,8 @@ class NavigateAction extends ChatEditingEditorAction {
|
|
|
54
55
|
? 'chatEditor.action.navigateNext'
|
|
55
56
|
: 'chatEditor.action.navigatePrevious',
|
|
56
57
|
title: next
|
|
57
|
-
? ( localize2(
|
|
58
|
-
: ( localize2(
|
|
58
|
+
? ( localize2(5139, 'Go to Next Chat Edit'))
|
|
59
|
+
: ( localize2(5140, 'Go to Previous Chat Edit')),
|
|
59
60
|
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
60
61
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ctxHasEditorModification)),
|
|
61
62
|
keybinding: {
|
|
@@ -127,15 +128,15 @@ class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
|
127
128
|
super({
|
|
128
129
|
id,
|
|
129
130
|
title: _keep
|
|
130
|
-
? ( localize2(
|
|
131
|
-
: ( localize2(
|
|
131
|
+
? ( localize2(5141, 'Keep Chat Edits'))
|
|
132
|
+
: ( localize2(5142, 'Undo Chat Edits')),
|
|
132
133
|
shortTitle: _keep
|
|
133
|
-
? ( localize2(
|
|
134
|
-
: ( localize2(
|
|
134
|
+
? ( localize2(5143, 'Keep'))
|
|
135
|
+
: ( localize2(5144, 'Undo')),
|
|
135
136
|
tooltip: _keep
|
|
136
|
-
? ( localize2(
|
|
137
|
-
: ( localize2(
|
|
138
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
137
|
+
? ( localize2(5145, 'Keep Chat Edits in this File'))
|
|
138
|
+
: ( localize2(5146, 'Undo Chat Edits in this File')),
|
|
139
|
+
precondition: ( ContextKeyExpr.and(ctxIsGlobalEditingSession, ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
139
140
|
icon: _keep
|
|
140
141
|
? Codicon.check
|
|
141
142
|
: Codicon.discard,
|
|
@@ -151,8 +152,7 @@ class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
|
151
152
|
id: MenuId.ChatEditingEditorContent,
|
|
152
153
|
group: 'a_resolve',
|
|
153
154
|
order: _keep ? 0 : 1,
|
|
154
|
-
when:
|
|
155
|
-
ContextKeyExpr.and(ctxIsGlobalEditingSession, !_keep ? ctxReviewModeEnabled : undefined))))
|
|
155
|
+
when: !_keep ? ctxReviewModeEnabled : undefined
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
this._keep = _keep;
|
|
@@ -180,16 +180,18 @@ class RejectAction extends KeepOrUndoAction {
|
|
|
180
180
|
super(RejectAction.ID, false);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
+
const acceptHunkId = 'chatEditor.action.acceptHunk';
|
|
184
|
+
const undoHunkId = 'chatEditor.action.undoHunk';
|
|
183
185
|
class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
184
186
|
constructor(_accept) {
|
|
185
187
|
super({
|
|
186
|
-
id: _accept ?
|
|
187
|
-
title: _accept ? ( localize2(
|
|
188
|
+
id: _accept ? acceptHunkId : undoHunkId,
|
|
189
|
+
title: _accept ? ( localize2(5147, 'Keep this Change')) : ( localize2(5148, 'Undo this Change')),
|
|
190
|
+
shortTitle: _accept ? ( localize2(5149, 'Keep')) : ( localize2(5150, 'Undo')),
|
|
188
191
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
189
|
-
icon: _accept ? Codicon.check : Codicon.discard,
|
|
190
192
|
f1: true,
|
|
191
193
|
keybinding: {
|
|
192
|
-
when: ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_CELL_LIST_FOCUSED)),
|
|
194
|
+
when: ( ContextKeyExpr.and(ctxCursorInChangeRange, ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_CELL_LIST_FOCUSED)))),
|
|
193
195
|
weight: KeybindingWeight.WorkbenchContrib + 1,
|
|
194
196
|
primary: _accept
|
|
195
197
|
? KeyMod.CtrlCmd | KeyCode.KeyY
|
|
@@ -215,11 +217,23 @@ class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
219
|
}
|
|
220
|
+
class AcceptHunkAction extends AcceptRejectHunkAction {
|
|
221
|
+
static { this.ID = acceptHunkId; }
|
|
222
|
+
constructor() {
|
|
223
|
+
super(true);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
class RejectHunkAction extends AcceptRejectHunkAction {
|
|
227
|
+
static { this.ID = undoHunkId; }
|
|
228
|
+
constructor() {
|
|
229
|
+
super(false);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
218
232
|
class ToggleDiffAction extends ChatEditingEditorAction {
|
|
219
233
|
constructor() {
|
|
220
234
|
super({
|
|
221
235
|
id: 'chatEditor.action.toggleDiff',
|
|
222
|
-
title: ( localize2(
|
|
236
|
+
title: ( localize2(5151, 'Toggle Diff Editor for Chat Edits')),
|
|
223
237
|
category: CHAT_CATEGORY,
|
|
224
238
|
toggled: {
|
|
225
239
|
condition: ( ContextKeyExpr.or(EditorContextKeys.inDiffEditor, ( ActiveEditorContext.isEqualTo(TEXT_DIFF_EDITOR_ID)))),
|
|
@@ -251,7 +265,7 @@ class ToggleAccessibleDiffViewAction extends ChatEditingEditorAction {
|
|
|
251
265
|
constructor() {
|
|
252
266
|
super({
|
|
253
267
|
id: 'chatEditor.action.showAccessibleDiffView',
|
|
254
|
-
title: ( localize2(
|
|
268
|
+
title: ( localize2(5152, 'Show Accessible Diff View for Chat Edits')),
|
|
255
269
|
f1: true,
|
|
256
270
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
257
271
|
keybinding: {
|
|
@@ -269,7 +283,7 @@ class ReviewChangesAction extends ChatEditingEditorAction {
|
|
|
269
283
|
constructor() {
|
|
270
284
|
super({
|
|
271
285
|
id: 'chatEditor.action.reviewChanges',
|
|
272
|
-
title: ( localize2(
|
|
286
|
+
title: ( localize2(5153, "Review")),
|
|
273
287
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
274
288
|
menu: [{
|
|
275
289
|
id: MenuId.ChatEditingEditorContent,
|
|
@@ -288,8 +302,8 @@ class AcceptAllEditsAction extends ChatEditingEditorAction {
|
|
|
288
302
|
constructor() {
|
|
289
303
|
super({
|
|
290
304
|
id: AcceptAllEditsAction.ID,
|
|
291
|
-
title: ( localize2(
|
|
292
|
-
tooltip: ( localize2(
|
|
305
|
+
title: ( localize2(5154, 'Keep All Chat Edits')),
|
|
306
|
+
tooltip: ( localize2(5155, 'Keep All Chat Edits in this Session')),
|
|
293
307
|
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
294
308
|
icon: Codicon.checkAll,
|
|
295
309
|
f1: true,
|
|
@@ -308,7 +322,7 @@ class MultiDiffAcceptDiscardAction extends Action2 {
|
|
|
308
322
|
constructor(accept) {
|
|
309
323
|
super({
|
|
310
324
|
id: accept ? 'chatEditing.multidiff.acceptAllFiles' : 'chatEditing.multidiff.discardAllFiles',
|
|
311
|
-
title: accept ? ( localize(
|
|
325
|
+
title: accept ? ( localize(5156, 'Keep All Edits')) : ( localize(5157, 'Undo All Edits')),
|
|
312
326
|
icon: accept ? Codicon.check : Codicon.discard,
|
|
313
327
|
menu: {
|
|
314
328
|
when: ( ContextKeyExpr.equals('resourceScheme', CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)),
|
|
@@ -333,7 +347,7 @@ class MultiDiffAcceptDiscardAction extends Action2 {
|
|
|
333
347
|
if (!(editor instanceof MultiDiffEditorInput) || !editor.resource) {
|
|
334
348
|
return;
|
|
335
349
|
}
|
|
336
|
-
const session = chatEditingService.getEditingSession(editor.resource.authority);
|
|
350
|
+
const session = chatEditingService.getEditingSession(LocalChatSessionUri.forSession(editor.resource.authority));
|
|
337
351
|
if (this.accept) {
|
|
338
352
|
await session?.accept();
|
|
339
353
|
}
|
|
@@ -353,12 +367,8 @@ function registerChatEditorActions() {
|
|
|
353
367
|
registerAction2(AcceptAction);
|
|
354
368
|
registerAction2(RejectAction);
|
|
355
369
|
registerAction2(AcceptAllEditsAction);
|
|
356
|
-
registerAction2(
|
|
357
|
-
|
|
358
|
-
});
|
|
359
|
-
registerAction2(class RejectHunkAction extends AcceptRejectHunkAction {
|
|
360
|
-
constructor() { super(false); }
|
|
361
|
-
});
|
|
370
|
+
registerAction2(AcceptHunkAction);
|
|
371
|
+
registerAction2(RejectHunkAction);
|
|
362
372
|
registerAction2(ToggleDiffAction);
|
|
363
373
|
registerAction2(ToggleAccessibleDiffViewAction);
|
|
364
374
|
registerAction2(class extends MultiDiffAcceptDiscardAction {
|
|
@@ -370,7 +380,7 @@ function registerChatEditorActions() {
|
|
|
370
380
|
MenuRegistry.appendMenuItem(MenuId.ChatEditingEditorContent, {
|
|
371
381
|
command: {
|
|
372
382
|
id: navigationBearingFakeActionId,
|
|
373
|
-
title: ( localize(
|
|
383
|
+
title: ( localize(5158, "Navigation Status")),
|
|
374
384
|
precondition: ( ContextKeyExpr.false()),
|
|
375
385
|
},
|
|
376
386
|
group: 'navigate',
|
|
@@ -380,4 +390,4 @@ function registerChatEditorActions() {
|
|
|
380
390
|
}
|
|
381
391
|
const navigationBearingFakeActionId = 'chatEditor.navigation.bearings';
|
|
382
392
|
|
|
383
|
-
export { AcceptAction, AcceptAllEditsAction, RejectAction, ReviewChangesAction, navigationBearingFakeActionId, registerChatEditorActions };
|
|
393
|
+
export { AcceptAction, AcceptAllEditsAction, AcceptHunkAction, RejectAction, RejectHunkAction, ReviewChangesAction, navigationBearingFakeActionId, registerChatEditorActions };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js
CHANGED
|
@@ -16,7 +16,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
16
16
|
import { navigationBearingFakeActionId, AcceptAction, RejectAction } from './chatEditingEditorActions.js';
|
|
17
17
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
18
18
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
19
|
-
import { EditorGroupView } from '@codingame/monaco-vscode-
|
|
19
|
+
import { EditorGroupView } from '@codingame/monaco-vscode-09f99a3e-bf90-51d4-ab34-acea412359d2-common/vscode/vs/workbench/browser/parts/editor/editorGroupView';
|
|
20
20
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
21
21
|
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
22
22
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -58,13 +58,13 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
58
58
|
});
|
|
59
59
|
const requestMessage = derived(r => {
|
|
60
60
|
const session = this._session.read(r);
|
|
61
|
-
const chatModel = this._chatService.getSession(session?.
|
|
61
|
+
const chatModel = session?.chatSessionResource && this._chatService.getSession(session?.chatSessionResource);
|
|
62
62
|
if (!session || !chatModel) {
|
|
63
63
|
return undefined;
|
|
64
64
|
}
|
|
65
65
|
const response = this._entry.read(r)?.lastModifyingResponse.read(r);
|
|
66
66
|
if (!response) {
|
|
67
|
-
return { message: ( localize(
|
|
67
|
+
return { message: ( localize(5166, "Working...")) };
|
|
68
68
|
}
|
|
69
69
|
const lastPart = observableFromEventOpts({ equalsFn: equals }, response.onDidChange, () => response.response.value)
|
|
70
70
|
.read(r)
|
|
@@ -77,7 +77,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
77
77
|
return { message: lastPart.content };
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
|
-
return { message: ( localize(
|
|
80
|
+
return { message: ( localize(5166, "Working...")) };
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
const progressNode = createElement('div');
|
|
@@ -154,10 +154,10 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
154
154
|
const { changeCount, activeIdx } = that._navigationBearings.read(r);
|
|
155
155
|
if (changeCount > 0) {
|
|
156
156
|
const n = activeIdx === -1 ? '1' : `${activeIdx + 1}`;
|
|
157
|
-
this.label.innerText = ( localize(
|
|
157
|
+
this.label.innerText = ( localize(5167, "{0} of {1}", n, changeCount));
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
|
-
this.label.innerText = ( localize(
|
|
160
|
+
this.label.innerText = ( localize(5168, "—"));
|
|
161
161
|
}
|
|
162
162
|
this.updateTooltip();
|
|
163
163
|
}));
|
|
@@ -169,21 +169,21 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
169
169
|
}
|
|
170
170
|
let result;
|
|
171
171
|
if (changeCount === 1 && entriesCount === 1) {
|
|
172
|
-
result = ( localize(
|
|
172
|
+
result = ( localize(5169, "1 change in 1 file"));
|
|
173
173
|
}
|
|
174
174
|
else if (changeCount === 1) {
|
|
175
|
-
result = ( localize(
|
|
175
|
+
result = ( localize(5170, "1 change in {0} files", entriesCount));
|
|
176
176
|
}
|
|
177
177
|
else if (entriesCount === 1) {
|
|
178
|
-
result = ( localize(
|
|
178
|
+
result = ( localize(5171, "{0} changes in 1 file", changeCount));
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
181
|
-
result = ( localize(
|
|
181
|
+
result = ( localize(5172, "{0} changes in {1} files", changeCount, entriesCount));
|
|
182
182
|
}
|
|
183
183
|
if (!that._isBusy.get()) {
|
|
184
184
|
return result;
|
|
185
185
|
}
|
|
186
|
-
return localize(
|
|
186
|
+
return localize(5173, "{0} - Working...", result);
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
189
|
}
|
|
@@ -232,7 +232,7 @@ let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
|
232
232
|
if (!kb) {
|
|
233
233
|
return value;
|
|
234
234
|
}
|
|
235
|
-
return localize(
|
|
235
|
+
return localize(5174, "{0} ({1})", value, kb.getLabel());
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
}
|
|
@@ -298,7 +298,7 @@ let ChatEditingOverlayController = class ChatEditingOverlayController {
|
|
|
298
298
|
if (!session) {
|
|
299
299
|
return false;
|
|
300
300
|
}
|
|
301
|
-
const chatModel = chatService.getSession(session.
|
|
301
|
+
const chatModel = chatService.getSession(session.chatSessionResource);
|
|
302
302
|
return chatModel.requestInProgressObs.read(r);
|
|
303
303
|
});
|
|
304
304
|
this._store.add(autorun(r => {
|
|
@@ -308,7 +308,7 @@ let ChatEditingOverlayController = class ChatEditingOverlayController {
|
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
const { session, entry } = data;
|
|
311
|
-
if (!session.isGlobalEditingSession
|
|
311
|
+
if (!session.isGlobalEditingSession) {
|
|
312
312
|
hide();
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
@@ -3,6 +3,8 @@ import { ITransaction } from "@codingame/monaco-vscode-api/vscode/vs/base/common
|
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { Location, TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
5
5
|
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
6
|
+
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
7
|
+
import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
|
|
6
8
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
7
9
|
import { IResolvedTextEditorModel } from "@codingame/monaco-vscode-model-service-override/vscode/vs/editor/common/services/resolverService";
|
|
8
10
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
@@ -18,35 +20,52 @@ import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workben
|
|
|
18
20
|
import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
|
|
19
21
|
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
20
22
|
import { ChatEditKind, IModifiedEntryTelemetryInfo, IModifiedFileEntry, IModifiedFileEntryEditorIntegration, ISnapshotEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
21
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-
|
|
23
|
+
import { IChatResponseModel } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
22
24
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
23
25
|
import { AbstractChatEditingModifiedFileEntry } from "./chatEditingModifiedFileEntry.js";
|
|
26
|
+
interface IMultiDiffEntryDelegate {
|
|
27
|
+
collapse: (transaction: ITransaction | undefined) => void;
|
|
28
|
+
}
|
|
24
29
|
export declare class ChatEditingModifiedDocumentEntry extends AbstractChatEditingModifiedFileEntry implements IModifiedFileEntry {
|
|
25
30
|
private readonly _multiDiffEntryDelegate;
|
|
26
31
|
private readonly _textFileService;
|
|
32
|
+
private readonly _editorWorkerService;
|
|
27
33
|
readonly initialContent: string;
|
|
28
34
|
private readonly originalModel;
|
|
29
35
|
private readonly modifiedModel;
|
|
30
36
|
private readonly _docFileEditorModel;
|
|
31
37
|
get changesCount(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<number>;
|
|
38
|
+
get diffInfo(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<{
|
|
39
|
+
originalModel: ITextModel;
|
|
40
|
+
modifiedModel: ITextModel;
|
|
41
|
+
keep: (changes: import("@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping").DetailedLineRangeMapping) => Promise<boolean>;
|
|
42
|
+
undo: (changes: import("@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping").DetailedLineRangeMapping) => Promise<boolean>;
|
|
43
|
+
identical: boolean;
|
|
44
|
+
quitEarly: boolean;
|
|
45
|
+
changes: readonly import("@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping").DetailedLineRangeMapping[];
|
|
46
|
+
moves: readonly import("@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/linesDiffComputer").MovedText[];
|
|
47
|
+
}>;
|
|
32
48
|
get linesAdded(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<number>;
|
|
33
49
|
get linesRemoved(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservable<number>;
|
|
34
50
|
readonly originalURI: URI;
|
|
35
51
|
private readonly _textModelChangeService;
|
|
36
|
-
constructor(resourceRef: IReference<IResolvedTextEditorModel>, _multiDiffEntryDelegate:
|
|
37
|
-
collapse: (transaction: ITransaction | undefined) => void;
|
|
38
|
-
}, telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, initialContent: string | undefined, markerService: IMarkerService, modelService: IModelService, textModelService: ITextModelService, languageService: ILanguageService, configService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, _textFileService: ITextFileService, fileService: IFileService, undoRedoService: IUndoRedoService, instantiationService: IInstantiationService, aiEditTelemetryService: IAiEditTelemetryService);
|
|
52
|
+
constructor(resourceRef: IReference<IResolvedTextEditorModel>, _multiDiffEntryDelegate: IMultiDiffEntryDelegate, telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, initialContent: string | undefined, markerService: IMarkerService, modelService: IModelService, textModelService: ITextModelService, languageService: ILanguageService, configService: IConfigurationService, fileConfigService: IFilesConfigurationService, chatService: IChatService, _textFileService: ITextFileService, fileService: IFileService, undoRedoService: IUndoRedoService, instantiationService: IInstantiationService, aiEditTelemetryService: IAiEditTelemetryService, _editorWorkerService: IEditorWorkerService);
|
|
39
53
|
equalsSnapshot(snapshot: ISnapshotEntry | undefined): boolean;
|
|
40
|
-
createSnapshot(requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
|
|
54
|
+
createSnapshot(sessionId: string, requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
|
|
55
|
+
getCurrentContents(): string;
|
|
41
56
|
hasModificationAt(location: Location): boolean;
|
|
42
57
|
restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
|
|
43
58
|
resetToInitialContent(): Promise<void>;
|
|
44
59
|
protected _areOriginalAndModifiedIdentical(): Promise<boolean>;
|
|
45
60
|
protected _resetEditsState(tx: ITransaction): void;
|
|
46
61
|
protected _createUndoRedoElement(response: IChatResponseModel): IUndoRedoElement;
|
|
47
|
-
acceptAgentEdits(resource: URI, textEdits: (TextEdit | ICellEditOperation)[], isLastEdits: boolean, responseModel: IChatResponseModel): Promise<void>;
|
|
62
|
+
acceptAgentEdits(resource: URI, textEdits: (TextEdit | ICellEditOperation)[], isLastEdits: boolean, responseModel: IChatResponseModel | undefined): Promise<void>;
|
|
48
63
|
protected _doAccept(): Promise<void>;
|
|
49
64
|
protected _doReject(): Promise<void>;
|
|
50
65
|
protected _createEditorIntegration(editor: IEditorPane): IModifiedFileEntryEditorIntegration;
|
|
51
66
|
private _shouldAutoSave;
|
|
67
|
+
computeEditsFromSnapshots(beforeSnapshot: string, afterSnapshot: string): Promise<(TextEdit | ICellEditOperation)[]>;
|
|
68
|
+
save(): Promise<void>;
|
|
69
|
+
revertToDisk(): Promise<void>;
|
|
52
70
|
}
|
|
71
|
+
export {};
|