@codingame/monaco-vscode-chat-service-override 23.2.2 → 24.1.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 +13 -10
- package/package.json +5 -41
- package/vscode/src/vs/platform/domWidget/browser/domWidget.d.ts +52 -0
- package/vscode/src/vs/platform/domWidget/browser/domWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +61 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +152 -0
- 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 +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +37 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +9 -9
- 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.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +6 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +44 -208
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +17 -17
- 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 +23 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +358 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +222 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +241 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +11 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +67 -230
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +65 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +186 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +115 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +389 -166
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +8 -8
- 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 +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +63 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +173 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +66 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +32 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +8 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +15 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +66 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +6 -7
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
- 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 +15 -4
- 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 +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +30 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +13 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +20 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +47 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +270 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +310 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +35 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +22 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +80 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +2 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +48 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +16 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +257 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSetup.d.ts → chatSetup/chatSetupContributions.d.ts} +4 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +622 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +359 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +667 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +260 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/chatSetup.css +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.js → chatStatus/chatStatusDashboard.js} +193 -325
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.d.ts → chatStatus/chatStatusEntry.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +190 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.d.ts → chatStatus/chatStatusItemService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatStatus/media}/chatStatus.css +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.js +108 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +57 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +478 -146
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.js +204 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.js +187 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +108 -62
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +37 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +37 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +232 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatusWidget.css +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +142 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +19 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.js +100 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +41 -15
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +208 -162
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +15 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +61 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +60 -43
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +27 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +37 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +120 -87
- 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 +49 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +293 -187
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +43 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +48 -29
- 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/inlineChat/browser/inlineChat.contribution.js +8 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +36 -41
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +142 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +3 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +78 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +26 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +23 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +4 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +26 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +32 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +15 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +38 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +32 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +5 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +128 -62
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +68 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +20 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +13 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +20 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +72 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +0 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +0 -154
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +0 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +0 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +0 -1617
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +0 -44
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +0 -313
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-dark.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-light.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/github.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/google.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.js → chatStatus/chatStatusItemService.js} +0 -0
|
@@ -6,10 +6,11 @@ import { assertNever } from '@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
6
6
|
import { ThrottledDelayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
7
7
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
8
|
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
-
import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
9
|
+
import { ResourceSet, mapsStrictEqualIgnoreOrder, ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
10
10
|
import { equals as equals$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
11
11
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
12
12
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
13
|
+
import { isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
13
14
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
14
15
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
15
16
|
import { TextModel } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
|
|
@@ -21,6 +22,7 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
21
22
|
import { CellUri, CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
22
23
|
import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
|
|
23
24
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
25
|
+
import { emptySessionEntryDiff } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
24
26
|
import { FileOperationType } from './chatEditingOperations.js';
|
|
25
27
|
import { ChatEditingSnapshotTextModelContentProvider } from './chatEditingTextModelContentProviders.js';
|
|
26
28
|
import { restoreSnapshot, createSnapshot } from './notebook/chatEditingModifiedNotebookSnapshot.js';
|
|
@@ -28,14 +30,15 @@ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
28
30
|
import { observableValueOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValueOpts';
|
|
29
31
|
import { derived, derivedOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
30
32
|
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
31
|
-
import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/promise';
|
|
32
33
|
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
34
|
+
import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/promise';
|
|
35
|
+
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
33
36
|
|
|
34
37
|
const START_REQUEST_EPOCH = '$$start';
|
|
35
38
|
const STOP_ID_EPOCH_PREFIX = '__epoch_';
|
|
36
39
|
let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl {
|
|
37
|
-
constructor(
|
|
38
|
-
this.
|
|
40
|
+
constructor(chatSessionResource, _delegate, _notebookEditorModelResolverService, _notebookService, _instantiationService, _modelService, _textModelService, _editorWorkerService, _configurationService) {
|
|
41
|
+
this.chatSessionResource = chatSessionResource;
|
|
39
42
|
this._delegate = _delegate;
|
|
40
43
|
this._notebookEditorModelResolverService = _notebookEditorModelResolverService;
|
|
41
44
|
this._notebookService = _notebookService;
|
|
@@ -49,6 +52,7 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
49
52
|
this._currentEpoch = observableValue(this, 0);
|
|
50
53
|
this._operations = observableValueOpts({ equalsFn: () => false }, []);
|
|
51
54
|
this._fileBaselines = ( new Map());
|
|
55
|
+
this._refCountedDiffs = ( new Map());
|
|
52
56
|
this._willUndoToCheckpoint = derived(reader => {
|
|
53
57
|
const currentEpoch = this._currentEpoch.read(reader);
|
|
54
58
|
const checkpoints = this._checkpoints.read(reader);
|
|
@@ -172,7 +176,7 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
getContentURIAtStop(requestId, fileURI, stopId) {
|
|
175
|
-
return ChatEditingSnapshotTextModelContentProvider.getSnapshotFileURI(this.
|
|
179
|
+
return ChatEditingSnapshotTextModelContentProvider.getSnapshotFileURI(this.chatSessionResource, requestId, stopId, fileURI.path);
|
|
176
180
|
}
|
|
177
181
|
async _navigateToEpoch(restoreToEpoch, navigateToEpoch = restoreToEpoch) {
|
|
178
182
|
const currentEpoch = this._currentEpoch.get();
|
|
@@ -222,7 +226,9 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
222
226
|
}
|
|
223
227
|
hasFileBaseline(uri, requestId) {
|
|
224
228
|
const key = this._getBaselineKey(uri, requestId);
|
|
225
|
-
return ( this._fileBaselines.has(key))
|
|
229
|
+
return ( this._fileBaselines.has(key)) || ( this._operations.get().some(
|
|
230
|
+
op => op.type === FileOperationType.Create && op.requestId === requestId && isEqual(uri, op.uri)
|
|
231
|
+
));
|
|
226
232
|
}
|
|
227
233
|
async getContentAtStop(requestId, contentURI, stopId) {
|
|
228
234
|
let toEpoch;
|
|
@@ -555,28 +561,49 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
555
561
|
const startIndex = checkpoints.findIndex(c => c.requestId === requestId && c.undoStopId === stopId);
|
|
556
562
|
return { start: checkpoints[startIndex], end: checkpoints[startIndex + 1] };
|
|
557
563
|
});
|
|
558
|
-
return this._getEntryDiffBetweenEpochs(uri, epochs);
|
|
564
|
+
return this._getEntryDiffBetweenEpochs(uri, `s\0${requestId}\0${stopId}`, epochs);
|
|
559
565
|
}
|
|
560
|
-
|
|
561
|
-
|
|
566
|
+
_getRequestEpochBounds(startRequestId, stopRequestId) {
|
|
567
|
+
return derivedOpts({ equalsFn: (a, b) => a.start === b.start && a.end === b.end }, reader => {
|
|
562
568
|
const checkpoints = this._checkpoints.read(reader);
|
|
563
569
|
const startIndex = checkpoints.findIndex(c => c.requestId === startRequestId);
|
|
564
570
|
const start = startIndex === -1 ? checkpoints[0] : checkpoints[startIndex];
|
|
565
|
-
|
|
571
|
+
let end;
|
|
572
|
+
if (stopRequestId === undefined) {
|
|
573
|
+
end = findFirst(checkpoints, c => c.requestId !== startRequestId, startIndex + 1);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
end = checkpoints.find(c => c.requestId === stopRequestId)
|
|
577
|
+
|| findFirst(checkpoints, c => c.requestId !== startRequestId, startIndex)
|
|
578
|
+
|| checkpoints[checkpoints.length - 1];
|
|
579
|
+
}
|
|
566
580
|
return { start, end };
|
|
567
581
|
});
|
|
568
|
-
return this._getEntryDiffBetweenEpochs(uri, epochs);
|
|
569
582
|
}
|
|
570
|
-
|
|
583
|
+
getEntryDiffBetweenRequests(uri, startRequestId, stopRequestId) {
|
|
584
|
+
return this._getEntryDiffBetweenEpochs(uri, `r\0${startRequestId}\0${stopRequestId}`, this._getRequestEpochBounds(startRequestId, stopRequestId));
|
|
585
|
+
}
|
|
586
|
+
_getEntryDiffBetweenEpochs(uri, cacheKey, epochs) {
|
|
587
|
+
const key = `${( uri.toString())}\0${cacheKey}`;
|
|
588
|
+
let obs = this._refCountedDiffs.get(key);
|
|
589
|
+
if (!obs) {
|
|
590
|
+
obs = this._getEntryDiffBetweenEpochsInner(uri, epochs, () => this._refCountedDiffs.delete(key));
|
|
591
|
+
this._refCountedDiffs.set(key, obs);
|
|
592
|
+
}
|
|
593
|
+
return obs;
|
|
594
|
+
}
|
|
595
|
+
_getEntryDiffBetweenEpochsInner(uri, epochs, onLastObserverRemoved) {
|
|
571
596
|
const modelRefsPromise = derived(this, (reader) => {
|
|
572
597
|
const { start, end } = epochs.read(reader);
|
|
573
598
|
if (!start) {
|
|
574
599
|
return undefined;
|
|
575
600
|
}
|
|
576
601
|
const store = reader.store.add(( new DisposableStore()));
|
|
602
|
+
const originalURI = this.getContentURIAtStop(start.requestId || START_REQUEST_EPOCH, uri, STOP_ID_EPOCH_PREFIX + start.epoch);
|
|
603
|
+
const modifiedURI = this.getContentURIAtStop(end?.requestId || start.requestId || START_REQUEST_EPOCH, uri, STOP_ID_EPOCH_PREFIX + (end?.epoch || Number.MAX_SAFE_INTEGER));
|
|
577
604
|
const promise = Promise.all([
|
|
578
|
-
this._textModelService.createModelReference(
|
|
579
|
-
this._textModelService.createModelReference(
|
|
605
|
+
this._textModelService.createModelReference(originalURI),
|
|
606
|
+
this._textModelService.createModelReference(modifiedURI),
|
|
580
607
|
]).then(refs => {
|
|
581
608
|
if (store.isDisposed) {
|
|
582
609
|
refs.forEach(r => r.dispose());
|
|
@@ -584,32 +611,52 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
584
611
|
else {
|
|
585
612
|
refs.forEach(r => store.add(r));
|
|
586
613
|
}
|
|
587
|
-
return {
|
|
614
|
+
return {
|
|
615
|
+
refs: ( refs.map(r => ({
|
|
616
|
+
model: r.object.textEditorModel,
|
|
617
|
+
onChange: observableSignalFromEvent(this, r.object.textEditorModel.onDidChangeContent.bind(r.object.textEditorModel)),
|
|
618
|
+
}))),
|
|
619
|
+
isFinal: !!end,
|
|
620
|
+
};
|
|
621
|
+
}).catch((error) => {
|
|
622
|
+
return { refs: [], isFinal: true, error };
|
|
588
623
|
});
|
|
589
|
-
return
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
return refs2?.data && {
|
|
594
|
-
isFinal: refs2.data.isFinal,
|
|
595
|
-
refs: ( refs2.data.refs.map(r => ({
|
|
596
|
-
model: r.object.textEditorModel,
|
|
597
|
-
onChange: observableSignalFromEvent(this, r.object.textEditorModel.onDidChangeContent.bind(r.object.textEditorModel)),
|
|
598
|
-
}))),
|
|
624
|
+
return {
|
|
625
|
+
originalURI,
|
|
626
|
+
modifiedURI,
|
|
627
|
+
promise: ( new ObservablePromise(promise)),
|
|
599
628
|
};
|
|
600
629
|
});
|
|
601
|
-
const diff = derived(
|
|
602
|
-
const modelsData =
|
|
630
|
+
const diff = derived(reader => {
|
|
631
|
+
const modelsData = modelRefsPromise.read(reader);
|
|
603
632
|
if (!modelsData) {
|
|
604
633
|
return;
|
|
605
634
|
}
|
|
606
|
-
const {
|
|
635
|
+
const { originalURI, modifiedURI, promise } = modelsData;
|
|
636
|
+
const promiseData = promise?.promiseResult.read(reader);
|
|
637
|
+
if (!promiseData?.data) {
|
|
638
|
+
return { originalURI, modifiedURI, promise: undefined };
|
|
639
|
+
}
|
|
640
|
+
const { refs, isFinal, error } = promiseData.data;
|
|
641
|
+
if (error) {
|
|
642
|
+
return { originalURI, modifiedURI, promise: ( new ObservablePromise(Promise.resolve(emptySessionEntryDiff(originalURI, modifiedURI)))) };
|
|
643
|
+
}
|
|
607
644
|
refs.forEach(m => m.onChange.read(reader));
|
|
608
|
-
|
|
609
|
-
return ( new ObservablePromise(promise));
|
|
645
|
+
return { originalURI, modifiedURI, promise: ( new ObservablePromise(this._computeDiff(originalURI, modifiedURI, !!isFinal))) };
|
|
610
646
|
});
|
|
611
|
-
return
|
|
612
|
-
|
|
647
|
+
return derivedOpts({ onLastObserverRemoved }, reader => {
|
|
648
|
+
const result = diff.read(reader);
|
|
649
|
+
if (!result) {
|
|
650
|
+
return undefined;
|
|
651
|
+
}
|
|
652
|
+
const promised = result.promise?.promiseResult.read(reader);
|
|
653
|
+
if (promised?.data) {
|
|
654
|
+
return promised.data;
|
|
655
|
+
}
|
|
656
|
+
if (promised?.error) {
|
|
657
|
+
return emptySessionEntryDiff(result.originalURI, result.modifiedURI);
|
|
658
|
+
}
|
|
659
|
+
return { ...emptySessionEntryDiff(result.originalURI, result.modifiedURI), isBusy: true };
|
|
613
660
|
});
|
|
614
661
|
}
|
|
615
662
|
_computeDiff(originalUri, modifiedUri, isFinal) {
|
|
@@ -622,6 +669,7 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
622
669
|
quitEarly: !diff || diff.quitEarly,
|
|
623
670
|
added: 0,
|
|
624
671
|
removed: 0,
|
|
672
|
+
isBusy: false,
|
|
625
673
|
};
|
|
626
674
|
if (diff) {
|
|
627
675
|
for (const change of diff.changes) {
|
|
@@ -632,6 +680,99 @@ let ChatEditingCheckpointTimelineImpl = class ChatEditingCheckpointTimelineImpl
|
|
|
632
680
|
return entryDiff;
|
|
633
681
|
});
|
|
634
682
|
}
|
|
683
|
+
hasEditsInRequest(requestId, reader) {
|
|
684
|
+
for (const value of ( this._fileBaselines.values())) {
|
|
685
|
+
if (value.requestId === requestId) {
|
|
686
|
+
return true;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
for (const operation of this._operations.read(reader)) {
|
|
690
|
+
if (operation.requestId === requestId) {
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
getDiffsForFilesInRequest(requestId) {
|
|
697
|
+
const boundsObservable = this._getRequestEpochBounds(requestId);
|
|
698
|
+
const startEpochs = derivedOpts({ equalsFn: mapsStrictEqualIgnoreOrder }, reader => {
|
|
699
|
+
const uris = ( new ResourceMap());
|
|
700
|
+
for (const value of ( this._fileBaselines.values())) {
|
|
701
|
+
if (value.requestId === requestId) {
|
|
702
|
+
uris.set(value.uri, value.epoch);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
const bounds = boundsObservable.read(reader);
|
|
706
|
+
for (const operation of this._operations.read(reader)) {
|
|
707
|
+
if (operation.epoch < bounds.start.epoch) {
|
|
708
|
+
continue;
|
|
709
|
+
}
|
|
710
|
+
if (bounds.end && operation.epoch >= bounds.end.epoch) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
if (operation.type === FileOperationType.Create) {
|
|
714
|
+
uris.set(operation.uri, 0);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
return uris;
|
|
718
|
+
});
|
|
719
|
+
return this._getDiffsForFilesAtEpochs(startEpochs, ( boundsObservable.map(b => b.end)));
|
|
720
|
+
}
|
|
721
|
+
_getDiffsForFilesAtEpochs(startEpochs, endCheckpointObs) {
|
|
722
|
+
const prevDiffs = ( new ResourceMap());
|
|
723
|
+
let prevEndCheckpoint = undefined;
|
|
724
|
+
const perFileDiffs = derived(this, reader => {
|
|
725
|
+
const checkpoints = this._checkpoints.read(reader);
|
|
726
|
+
const firstCheckpoint = checkpoints[0];
|
|
727
|
+
if (!firstCheckpoint) {
|
|
728
|
+
return [];
|
|
729
|
+
}
|
|
730
|
+
const endCheckpoint = endCheckpointObs.read(reader);
|
|
731
|
+
if (endCheckpoint !== prevEndCheckpoint) {
|
|
732
|
+
prevDiffs.clear();
|
|
733
|
+
prevEndCheckpoint = endCheckpoint;
|
|
734
|
+
}
|
|
735
|
+
const uris = startEpochs.read(reader);
|
|
736
|
+
const diffs = [];
|
|
737
|
+
for (const [uri, epoch] of uris) {
|
|
738
|
+
const obs = prevDiffs.get(uri) ?? this._getEntryDiffBetweenEpochs(uri, `e\0${epoch}\0${endCheckpoint?.epoch}`, constObservable({ start: checkpoints.findLast(cp => cp.epoch <= epoch) || firstCheckpoint, end: endCheckpoint }));
|
|
739
|
+
prevDiffs.set(uri, obs);
|
|
740
|
+
diffs.push(obs);
|
|
741
|
+
}
|
|
742
|
+
return diffs;
|
|
743
|
+
});
|
|
744
|
+
return ( perFileDiffs.map((diffs, reader) => {
|
|
745
|
+
return diffs.flatMap(d => d.read(reader)).filter(isDefined);
|
|
746
|
+
}));
|
|
747
|
+
}
|
|
748
|
+
getDiffsForFilesInSession() {
|
|
749
|
+
const startEpochs = derivedOpts({ equalsFn: mapsStrictEqualIgnoreOrder }, reader => {
|
|
750
|
+
const uris = ( new ResourceMap());
|
|
751
|
+
for (const baseline of ( this._fileBaselines.values())) {
|
|
752
|
+
uris.set(baseline.uri, Math.min(baseline.epoch, uris.get(baseline.uri) ?? Number.MAX_SAFE_INTEGER));
|
|
753
|
+
}
|
|
754
|
+
for (const operation of this._operations.read(reader)) {
|
|
755
|
+
if (operation.type === FileOperationType.Create) {
|
|
756
|
+
uris.set(operation.uri, 0);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
return uris;
|
|
760
|
+
});
|
|
761
|
+
return this._getDiffsForFilesAtEpochs(startEpochs, constObservable(undefined));
|
|
762
|
+
}
|
|
763
|
+
getDiffForSession() {
|
|
764
|
+
const fileDiffs = this.getDiffsForFilesInSession();
|
|
765
|
+
return derived(reader => {
|
|
766
|
+
const diffs = fileDiffs.read(reader);
|
|
767
|
+
let added = 0;
|
|
768
|
+
let removed = 0;
|
|
769
|
+
for (const diff of diffs) {
|
|
770
|
+
added += diff.added;
|
|
771
|
+
removed += diff.removed;
|
|
772
|
+
}
|
|
773
|
+
return { added, removed };
|
|
774
|
+
});
|
|
775
|
+
}
|
|
635
776
|
};
|
|
636
777
|
ChatEditingCheckpointTimelineImpl = ( __decorate([
|
|
637
778
|
( __param(2, INotebookEditorModelResolverService)),
|
|
@@ -26,6 +26,7 @@ export declare class ChatEditingCodeEditorIntegration implements IModifiedFileEn
|
|
|
26
26
|
private readonly _diffLineDecorations;
|
|
27
27
|
private readonly _diffVisualDecorations;
|
|
28
28
|
private readonly _diffHunksRenderStore;
|
|
29
|
+
private readonly _diffHunkWidgetPool;
|
|
29
30
|
private readonly _diffHunkWidgets;
|
|
30
31
|
private _viewZones;
|
|
31
32
|
private readonly _accessibleDiffViewVisible;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js
CHANGED
|
@@ -4,7 +4,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
4
4
|
import * as chatEditorController from '../media/chatEditorController.css';
|
|
5
5
|
import { createElement, getTotalWidth } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
|
-
import { DisposableStore, toDisposable
|
|
7
|
+
import { dispose, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
8
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
9
9
|
import { isEqual, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
10
10
|
import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -30,13 +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-
|
|
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/chatEditingService';
|
|
35
35
|
import { isTextDiffEditorForEntry } from './chatEditing.js';
|
|
36
36
|
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
37
|
-
import { AcceptHunkAction, RejectHunkAction } from './chatEditingEditorActions.js';
|
|
38
37
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
39
38
|
import { ctxCursorInChangeRange } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
39
|
+
import { LinkedList } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedList';
|
|
40
40
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
41
41
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
42
42
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
@@ -45,6 +45,23 @@ import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base
|
|
|
45
45
|
|
|
46
46
|
var ChatEditingCodeEditorIntegration_1, DiffHunkWidget_1;
|
|
47
47
|
registerCss(chatEditorController);
|
|
48
|
+
class ObjectPool {
|
|
49
|
+
constructor() {
|
|
50
|
+
this._free = ( new LinkedList());
|
|
51
|
+
}
|
|
52
|
+
dispose() {
|
|
53
|
+
dispose(this._free);
|
|
54
|
+
}
|
|
55
|
+
get() {
|
|
56
|
+
return this._free.shift();
|
|
57
|
+
}
|
|
58
|
+
putBack(obj) {
|
|
59
|
+
this._free.push(obj);
|
|
60
|
+
}
|
|
61
|
+
get free() {
|
|
62
|
+
return this._free;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
48
65
|
let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
49
66
|
static { ChatEditingCodeEditorIntegration_1 = this; }
|
|
50
67
|
static { this._diffLineDecorationData = ModelDecorationOptions.register({ description: 'diff-line-decoration' }); }
|
|
@@ -57,6 +74,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
57
74
|
this.currentIndex = this._currentIndex;
|
|
58
75
|
this._store = ( new DisposableStore());
|
|
59
76
|
this._diffHunksRenderStore = this._store.add(( new DisposableStore()));
|
|
77
|
+
this._diffHunkWidgetPool = this._store.add(( new ObjectPool()));
|
|
60
78
|
this._diffHunkWidgets = [];
|
|
61
79
|
this._viewZones = [];
|
|
62
80
|
this._accessibleDiffViewVisible = observableValue(this, false);
|
|
@@ -213,6 +231,9 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
213
231
|
});
|
|
214
232
|
this._viewZones = [];
|
|
215
233
|
this._diffHunksRenderStore.clear();
|
|
234
|
+
for (const widget of this._diffHunkWidgetPool.free) {
|
|
235
|
+
widget.remove();
|
|
236
|
+
}
|
|
216
237
|
this._diffVisualDecorations.clear();
|
|
217
238
|
}
|
|
218
239
|
_updateDiffRendering(diff, reviewMode, diffMode) {
|
|
@@ -318,10 +339,19 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
318
339
|
}
|
|
319
340
|
}
|
|
320
341
|
if (reviewMode || diffMode) {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
342
|
+
let widget = this._diffHunkWidgetPool.get();
|
|
343
|
+
if (!widget) {
|
|
344
|
+
widget = this._editor.invokeWithinContext(accessor => {
|
|
345
|
+
const instaService = accessor.get(IInstantiationService);
|
|
346
|
+
return instaService.createInstance(DiffHunkWidget, this._editor, diff, diffEntry, this._editor.getModel().getVersionId(), isCreatedContent ? 0 : extraLines);
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
widget.update(diff, diffEntry, this._editor.getModel().getVersionId(), isCreatedContent ? 0 : extraLines);
|
|
351
|
+
}
|
|
352
|
+
this._diffHunksRenderStore.add(toDisposable(() => {
|
|
353
|
+
this._diffHunkWidgetPool.putBack(widget);
|
|
354
|
+
}));
|
|
325
355
|
widget.layout(diffEntry.modified.startLineNumber);
|
|
326
356
|
this._diffHunkWidgets.push(widget);
|
|
327
357
|
diffHunkDecorations.push({
|
|
@@ -342,10 +372,11 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
342
372
|
});
|
|
343
373
|
const diffHunkDecoCollection = this._editor.createDecorationsCollection(diffHunkDecorations);
|
|
344
374
|
this._diffHunksRenderStore.add(toDisposable(() => {
|
|
345
|
-
dispose(this._diffHunkWidgets);
|
|
346
|
-
this._diffHunkWidgets.length = 0;
|
|
347
375
|
diffHunkDecoCollection.clear();
|
|
348
376
|
}));
|
|
377
|
+
for (const extraWidget of this._diffHunkWidgetPool.free) {
|
|
378
|
+
extraWidget.remove();
|
|
379
|
+
}
|
|
349
380
|
const positionObs = observableFromEvent(this._editor.onDidChangeCursorPosition, _ => this._editor.getPosition());
|
|
350
381
|
const activeWidgetIdx = derived(r => {
|
|
351
382
|
const position = positionObs.read(r);
|
|
@@ -522,7 +553,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
522
553
|
original: { resource: this._entry.originalURI },
|
|
523
554
|
modified: { resource: this._entry.modifiedURI },
|
|
524
555
|
options: { selection },
|
|
525
|
-
label: ( localize(
|
|
556
|
+
label: ( localize(5218, '{0} (changes from chat)', basename(this._entry.modifiedURI)))
|
|
526
557
|
});
|
|
527
558
|
if (diffEditor && diffEditor.input) {
|
|
528
559
|
diffEditor.getControl()?.setSelection(selection);
|
|
@@ -563,14 +594,15 @@ ChatEditingCodeEditorIntegration = ChatEditingCodeEditorIntegration_1 = ( __deco
|
|
|
563
594
|
let DiffHunkWidget = class DiffHunkWidget {
|
|
564
595
|
static { DiffHunkWidget_1 = this; }
|
|
565
596
|
static { this._idPool = 0; }
|
|
566
|
-
constructor(_diffInfo, _change, _versionId,
|
|
597
|
+
constructor(_editor, _diffInfo, _change, _versionId, _lineDelta, instaService) {
|
|
598
|
+
this._editor = _editor;
|
|
567
599
|
this._diffInfo = _diffInfo;
|
|
568
600
|
this._change = _change;
|
|
569
601
|
this._versionId = _versionId;
|
|
570
|
-
this._editor = _editor;
|
|
571
602
|
this._lineDelta = _lineDelta;
|
|
572
603
|
this._id = `diff-change-widget-${DiffHunkWidget_1._idPool++}`;
|
|
573
604
|
this._store = ( new DisposableStore());
|
|
605
|
+
this._removed = false;
|
|
574
606
|
this._domNode = createElement('div');
|
|
575
607
|
this._domNode.className = 'chat-diff-change-content-widget';
|
|
576
608
|
const toolbar = instaService.createInstance(MenuWorkbenchToolBar, this._domNode, MenuId.ChatEditingEditorHunk, {
|
|
@@ -582,10 +614,10 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
582
614
|
arg: this,
|
|
583
615
|
},
|
|
584
616
|
actionViewItemProvider: (action, options) => {
|
|
585
|
-
if (action.
|
|
617
|
+
if (!action.class) {
|
|
586
618
|
return new (class extends ActionViewItem {
|
|
587
619
|
constructor() {
|
|
588
|
-
super(undefined, action, { ...options, keybindingNotRenderedWithLabel: true, icon: false, label: true });
|
|
620
|
+
super(undefined, action, { ...options, keybindingNotRenderedWithLabel: true , icon: false, label: true });
|
|
589
621
|
}
|
|
590
622
|
});
|
|
591
623
|
}
|
|
@@ -596,9 +628,16 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
596
628
|
this._store.add(toolbar.actionRunner.onWillRun(_ => _editor.focus()));
|
|
597
629
|
this._editor.addOverlayWidget(this);
|
|
598
630
|
}
|
|
631
|
+
update(diffInfo, change, versionId, lineDelta) {
|
|
632
|
+
this._diffInfo = diffInfo;
|
|
633
|
+
this._change = change;
|
|
634
|
+
this._versionId = versionId;
|
|
635
|
+
this._lineDelta = lineDelta;
|
|
636
|
+
}
|
|
599
637
|
dispose() {
|
|
600
638
|
this._store.dispose();
|
|
601
639
|
this._editor.removeOverlayWidget(this);
|
|
640
|
+
this._removed = true;
|
|
602
641
|
}
|
|
603
642
|
getId() {
|
|
604
643
|
return this._id;
|
|
@@ -608,15 +647,25 @@ let DiffHunkWidget = class DiffHunkWidget {
|
|
|
608
647
|
const { contentLeft, contentWidth, verticalScrollbarWidth } = this._editor.getLayoutInfo();
|
|
609
648
|
const scrollTop = this._editor.getScrollTop();
|
|
610
649
|
this._position = {
|
|
611
|
-
|
|
650
|
+
stackOrdinal: 1,
|
|
612
651
|
preference: {
|
|
613
652
|
top: this._editor.getTopForLineNumber(startLineNumber) - scrollTop - (lineHeight * this._lineDelta),
|
|
614
653
|
left: contentLeft + contentWidth - (2 * verticalScrollbarWidth + getTotalWidth(this._domNode))
|
|
615
654
|
}
|
|
616
655
|
};
|
|
617
|
-
this.
|
|
656
|
+
if (this._removed) {
|
|
657
|
+
this._removed = false;
|
|
658
|
+
this._editor.addOverlayWidget(this);
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
this._editor.layoutOverlayWidget(this);
|
|
662
|
+
}
|
|
618
663
|
this._lastStartLineNumber = startLineNumber;
|
|
619
664
|
}
|
|
665
|
+
remove() {
|
|
666
|
+
this._editor.removeOverlayWidget(this);
|
|
667
|
+
this._removed = true;
|
|
668
|
+
}
|
|
620
669
|
toggle(show) {
|
|
621
670
|
this._domNode.classList.toggle('hover', show);
|
|
622
671
|
if (this._lastStartLineNumber) {
|
|
@@ -664,7 +713,7 @@ class AccessibleDiffViewContainer {
|
|
|
664
713
|
getPosition() {
|
|
665
714
|
return {
|
|
666
715
|
preference: { top: 0, left: 0 },
|
|
667
|
-
|
|
716
|
+
stackOrdinal: 1
|
|
668
717
|
};
|
|
669
718
|
}
|
|
670
719
|
}
|