@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
|
@@ -29,14 +29,14 @@ import { IDecorationsService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
29
29
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
30
30
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
31
31
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
32
|
-
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-
|
|
32
|
+
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService';
|
|
33
33
|
import { IMultiDiffSourceResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service';
|
|
34
34
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
35
35
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
36
36
|
import { chatEditingAgentSupportsReadonlyReferencesContextKey, ChatEditingSessionState, ModifiedFileEntryState, CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME, parseChatMultiDiffUri, chatEditingResourceContextKey, inChatEditingSessionContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
37
|
-
import { isCellTextEditOperationArray } from '@codingame/monaco-vscode-
|
|
37
|
+
import { isCellTextEditOperationArray } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
38
38
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
39
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-
|
|
39
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
40
40
|
import { AbstractChatEditingModifiedFileEntry } from './chatEditingModifiedFileEntry.js';
|
|
41
41
|
import { ChatEditingSession } from './chatEditingSession.js';
|
|
42
42
|
import { ChatEditingTextModelContentProvider, ChatEditingSnapshotTextModelContentProvider } from './chatEditingTextModelContentProviders.js';
|
|
@@ -97,7 +97,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
97
97
|
}
|
|
98
98
|
e.join(storageTask, {
|
|
99
99
|
id: 'join.chatEditingSession',
|
|
100
|
-
label: ( localize(
|
|
100
|
+
label: ( localize(5261, "Saving chat edits history"))
|
|
101
101
|
});
|
|
102
102
|
}));
|
|
103
103
|
}
|
|
@@ -105,16 +105,8 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
105
105
|
dispose(this._sessionsObs.get());
|
|
106
106
|
super.dispose();
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
await this._restoringEditingSession;
|
|
111
|
-
}
|
|
112
|
-
const session = this.getEditingSession(chatModel.sessionResource);
|
|
113
|
-
if (session) {
|
|
114
|
-
return session;
|
|
115
|
-
}
|
|
116
|
-
const result = await this.createEditingSession(chatModel, true);
|
|
117
|
-
return result;
|
|
108
|
+
startOrContinueGlobalEditingSession(chatModel) {
|
|
109
|
+
return this.getEditingSession(chatModel.sessionResource) || this.createEditingSession(chatModel, true);
|
|
118
110
|
}
|
|
119
111
|
_lookupEntry(uri) {
|
|
120
112
|
for (const item of Iterable.concat(this.editingSessionsObs.get())) {
|
|
@@ -129,16 +121,15 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
129
121
|
return this.editingSessionsObs.get()
|
|
130
122
|
.find(candidate => isEqual(candidate.chatSessionResource, chatSessionResource));
|
|
131
123
|
}
|
|
132
|
-
|
|
124
|
+
createEditingSession(chatModel, global = false) {
|
|
133
125
|
return this._createEditingSession(chatModel, global, undefined);
|
|
134
126
|
}
|
|
135
|
-
|
|
127
|
+
transferEditingSession(chatModel, session) {
|
|
136
128
|
return this._createEditingSession(chatModel, session.isGlobalEditingSession, session);
|
|
137
129
|
}
|
|
138
|
-
|
|
130
|
+
_createEditingSession(chatModel, global, initFrom) {
|
|
139
131
|
assertType(this.getEditingSession(chatModel.sessionResource) === undefined, 'CANNOT have more than one editing session per chat session');
|
|
140
|
-
const session = this._instantiationService.createInstance(ChatEditingSession, chatModel.
|
|
141
|
-
await session.init(initFrom);
|
|
132
|
+
const session = this._instantiationService.createInstance(ChatEditingSession, chatModel.sessionResource, global, this._lookupEntry.bind(this), initFrom);
|
|
142
133
|
const list = this._sessionsObs.get();
|
|
143
134
|
const removeSession = list.unshift(session);
|
|
144
135
|
const store = ( new DisposableStore());
|
|
@@ -155,7 +146,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
155
146
|
installAutoApplyObserver(session, chatModel) {
|
|
156
147
|
if (!chatModel) {
|
|
157
148
|
throw ( new ErrorNoTelemetry(
|
|
158
|
-
`Edit session was created for a non-existing chat session: ${session.
|
|
149
|
+
`Edit session was created for a non-existing chat session: ${session.chatSessionResource}`
|
|
159
150
|
));
|
|
160
151
|
}
|
|
161
152
|
const observerDisposables = ( new DisposableStore());
|
|
@@ -189,7 +180,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
189
180
|
if (this.notebookService.getNotebookTextModel(uri) || uri.scheme === Schemas.untitled || (await this._fileService.exists(uri).catch(() => false))) {
|
|
190
181
|
const activeUri = this._editorService.activeEditorPane?.input.resource;
|
|
191
182
|
const inactive = editorDidChange
|
|
192
|
-
|| this._editorService.activeEditorPane?.input instanceof ChatEditorInput && this._editorService.activeEditorPane.input.
|
|
183
|
+
|| this._editorService.activeEditorPane?.input instanceof ChatEditorInput && isEqual(this._editorService.activeEditorPane.input.sessionResource, session.chatSessionResource)
|
|
193
184
|
|| Boolean(activeUri && session.entries.get().find(entry => isEqual(activeUri, entry.modifiedURI)));
|
|
194
185
|
this._editorService.openEditor({ resource: uri, options: { inactive, preserveFocus: true, pinned: true } });
|
|
195
186
|
}
|
|
@@ -332,7 +323,7 @@ class ChatDecorationsProvider extends Disposable {
|
|
|
332
323
|
constructor(_sessions) {
|
|
333
324
|
super();
|
|
334
325
|
this._sessions = _sessions;
|
|
335
|
-
this.label = ( localize(
|
|
326
|
+
this.label = ( localize(5262, "Chat Editing"));
|
|
336
327
|
this._currentEntries = derived(this, (r) => {
|
|
337
328
|
const sessions = this._sessions.read(r);
|
|
338
329
|
if (!sessions) {
|
|
@@ -371,7 +362,7 @@ class ChatDecorationsProvider extends Disposable {
|
|
|
371
362
|
return {
|
|
372
363
|
weight: 1000,
|
|
373
364
|
letter: Codicon.diffModified,
|
|
374
|
-
tooltip: ( localize(
|
|
365
|
+
tooltip: ( localize(5263, "Pending changes from chat")),
|
|
375
366
|
bubble: true
|
|
376
367
|
};
|
|
377
368
|
}
|
|
@@ -389,7 +380,7 @@ let ChatEditingMultiDiffSourceResolver = class ChatEditingMultiDiffSourceResolve
|
|
|
389
380
|
async resolveDiffSource(uri) {
|
|
390
381
|
const parsed = parseChatMultiDiffUri(uri);
|
|
391
382
|
const thisSession = derived(this, r => {
|
|
392
|
-
return this._editingSessionsObs.read(r).find(candidate => candidate.
|
|
383
|
+
return this._editingSessionsObs.read(r).find(candidate => isEqual(candidate.chatSessionResource, parsed.chatSessionResource));
|
|
393
384
|
});
|
|
394
385
|
return this._instantiationService.createInstance(ChatEditingMultiDiffSource, thisSession, parsed.showPreviousChanges);
|
|
395
386
|
}
|
|
@@ -14,13 +14,11 @@ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
14
14
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
15
15
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
16
16
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
17
|
-
import { ChatEditingSessionState, IChatEditingSession, IModifiedFileEntry, IStreamingEdits } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
18
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-
|
|
17
|
+
import { ChatEditingSessionState, IChatEditingSession, IEditSessionEntryDiff, IModifiedFileEntry, IStreamingEdits } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
18
|
+
import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
19
19
|
import { IChatProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
20
|
-
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
21
20
|
import { AbstractChatEditingModifiedFileEntry } from "./chatEditingModifiedFileEntry.js";
|
|
22
21
|
export declare class ChatEditingSession extends Disposable implements IChatEditingSession {
|
|
23
|
-
readonly chatSessionId: string;
|
|
24
22
|
readonly chatSessionResource: URI;
|
|
25
23
|
readonly isGlobalEditingSession: boolean;
|
|
26
24
|
private _lookupExternalEntry;
|
|
@@ -31,7 +29,6 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
31
29
|
readonly _bulkEditService: IBulkEditService;
|
|
32
30
|
private readonly _editorGroupsService;
|
|
33
31
|
private readonly _editorService;
|
|
34
|
-
private readonly _chatService;
|
|
35
32
|
private readonly _notebookService;
|
|
36
33
|
private readonly _accessibilitySignalService;
|
|
37
34
|
private readonly _logService;
|
|
@@ -50,23 +47,28 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
50
47
|
*/
|
|
51
48
|
private readonly _externalEditOperations;
|
|
52
49
|
private readonly _entriesObs;
|
|
53
|
-
|
|
50
|
+
readonly entries: IObservable<readonly IModifiedFileEntry[]>;
|
|
54
51
|
private _editorPane;
|
|
55
52
|
get state(): IObservable<ChatEditingSessionState>;
|
|
56
53
|
readonly canUndo: IObservable<boolean>;
|
|
57
54
|
readonly canRedo: IObservable<boolean>;
|
|
55
|
+
get requestDisablement(): IObservable<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel").IChatRequestDisablement[]>;
|
|
58
56
|
private readonly _onDidDispose;
|
|
59
57
|
get onDidDispose(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
60
|
-
constructor(
|
|
58
|
+
constructor(chatSessionResource: URI, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, transferFrom: IChatEditingSession | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _notebookService: INotebookService, _accessibilitySignalService: IAccessibilitySignalService, _logService: ILogService, configurationService: IConfigurationService);
|
|
61
59
|
private _getTimelineDelegate;
|
|
62
|
-
|
|
60
|
+
private _init;
|
|
63
61
|
private _getEntry;
|
|
64
62
|
getEntry(uri: URI): IModifiedFileEntry | undefined;
|
|
65
63
|
readEntry(uri: URI, reader: IReader | undefined): IModifiedFileEntry | undefined;
|
|
66
64
|
storeState(): Promise<void>;
|
|
67
65
|
private _getStoredState;
|
|
68
|
-
getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable<
|
|
69
|
-
getEntryDiffBetweenRequests(uri: URI, startRequestId: string, stopRequestId: string): IObservable<
|
|
66
|
+
getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable<IEditSessionEntryDiff | undefined> | undefined;
|
|
67
|
+
getEntryDiffBetweenRequests(uri: URI, startRequestId: string, stopRequestId: string): IObservable<IEditSessionEntryDiff | undefined>;
|
|
68
|
+
getDiffsForFilesInSession(): IObservable<readonly IEditSessionEntryDiff[]>;
|
|
69
|
+
getDiffForSession(): IObservable<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService").IEditSessionDiffStats>;
|
|
70
|
+
getDiffsForFilesInRequest(requestId: string): IObservable<readonly IEditSessionEntryDiff[]>;
|
|
71
|
+
hasEditsInRequest(requestId: string, reader?: IReader): boolean;
|
|
70
72
|
createSnapshot(requestId: string, undoStop: string | undefined): void;
|
|
71
73
|
getSnapshotContents(requestId: string, uri: URI, stopId: string | undefined): Promise<VSBuffer | undefined>;
|
|
72
74
|
getSnapshotModel(requestId: string, undoStop: string | undefined, snapshotUri: URI): Promise<ITextModel | null>;
|
|
@@ -83,7 +85,7 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
83
85
|
dispose(): void;
|
|
84
86
|
private get isDisposed();
|
|
85
87
|
startStreamingEdits(resource: URI, responseModel: IChatResponseModel, inUndoStop: string | undefined): IStreamingEdits;
|
|
86
|
-
startExternalEdits(responseModel: IChatResponseModel, operationId: number, resources: URI[]): Promise<IChatProgress[]>;
|
|
88
|
+
startExternalEdits(responseModel: IChatResponseModel, operationId: number, resources: URI[], undoStopId: string): Promise<IChatProgress[]>;
|
|
87
89
|
stopExternalEdits(responseModel: IChatResponseModel, operationId: number): Promise<IChatProgress[]>;
|
|
88
90
|
undoInteraction(): Promise<void>;
|
|
89
91
|
redoInteraction(): Promise<void>;
|
|
@@ -13,7 +13,6 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
|
|
|
13
13
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
14
14
|
import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
15
15
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
16
|
-
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
17
16
|
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
|
|
18
17
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
19
18
|
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
@@ -29,11 +28,10 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
29
28
|
import { DiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/diffEditorInput';
|
|
30
29
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
31
30
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
32
|
-
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-
|
|
31
|
+
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
33
32
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
34
33
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
35
|
-
import { ChatEditingSessionState, ModifiedFileEntryState, getMultiDiffSourceUri, ChatEditKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
36
|
-
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
34
|
+
import { ChatEditingSessionState, ModifiedFileEntryState, getMultiDiffSourceUri, chatEditingSessionIsReady, ChatEditKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
37
35
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
38
36
|
import { ChatEditingCheckpointTimelineImpl } from './chatEditingCheckpointTimelineImpl.js';
|
|
39
37
|
import { ChatEditingModifiedDocumentEntry } from './chatEditingModifiedDocumentEntry.js';
|
|
@@ -43,7 +41,7 @@ import { FileOperationType } from './chatEditingOperations.js';
|
|
|
43
41
|
import { ChatEditingSessionStorage } from './chatEditingSessionStorage.js';
|
|
44
42
|
import { ChatEditingTextModelContentProvider } from './chatEditingTextModelContentProviders.js';
|
|
45
43
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
46
|
-
import {
|
|
44
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
47
45
|
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
48
46
|
|
|
49
47
|
var ChatEditingSession_1;
|
|
@@ -77,7 +75,7 @@ class ThrottledSequencer extends Sequencer {
|
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
|
-
function createOpeningEditCodeBlock(uri, isNotebook) {
|
|
78
|
+
function createOpeningEditCodeBlock(uri, isNotebook, undoStopId) {
|
|
81
79
|
return [
|
|
82
80
|
{
|
|
83
81
|
kind: 'markdownContent',
|
|
@@ -86,7 +84,8 @@ function createOpeningEditCodeBlock(uri, isNotebook) {
|
|
|
86
84
|
{
|
|
87
85
|
kind: 'codeblockUri',
|
|
88
86
|
uri,
|
|
89
|
-
isEdit: true
|
|
87
|
+
isEdit: true,
|
|
88
|
+
undoStopId
|
|
90
89
|
},
|
|
91
90
|
{
|
|
92
91
|
kind: 'markdownContent',
|
|
@@ -110,19 +109,18 @@ function createOpeningEditCodeBlock(uri, isNotebook) {
|
|
|
110
109
|
];
|
|
111
110
|
}
|
|
112
111
|
let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends Disposable {
|
|
113
|
-
get entries() {
|
|
114
|
-
return this._entriesObs;
|
|
115
|
-
}
|
|
116
112
|
get state() {
|
|
117
113
|
return this._state;
|
|
118
114
|
}
|
|
115
|
+
get requestDisablement() {
|
|
116
|
+
return this._timeline.requestDisablement;
|
|
117
|
+
}
|
|
119
118
|
get onDidDispose() {
|
|
120
119
|
this._assertNotDisposed();
|
|
121
120
|
return this._onDidDispose.event;
|
|
122
121
|
}
|
|
123
|
-
constructor(
|
|
122
|
+
constructor(chatSessionResource, isGlobalEditingSession, _lookupExternalEntry, transferFrom, _instantiationService, _modelService, _languageService, _textModelService, _bulkEditService, _editorGroupsService, _editorService, _notebookService, _accessibilitySignalService, _logService, configurationService) {
|
|
124
123
|
super();
|
|
125
|
-
this.chatSessionId = chatSessionId;
|
|
126
124
|
this.chatSessionResource = chatSessionResource;
|
|
127
125
|
this.isGlobalEditingSession = isGlobalEditingSession;
|
|
128
126
|
this._lookupExternalEntry = _lookupExternalEntry;
|
|
@@ -133,7 +131,6 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
133
131
|
this._bulkEditService = _bulkEditService;
|
|
134
132
|
this._editorGroupsService = _editorGroupsService;
|
|
135
133
|
this._editorService = _editorService;
|
|
136
|
-
this._chatService = _chatService;
|
|
137
134
|
this._notebookService = _notebookService;
|
|
138
135
|
this._accessibilitySignalService = _accessibilitySignalService;
|
|
139
136
|
this._logService = _logService;
|
|
@@ -144,18 +141,24 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
144
141
|
this._streamingEditLocks = ( new SequencerByKey());
|
|
145
142
|
this._externalEditOperations = ( new Map());
|
|
146
143
|
this._entriesObs = observableValue(this, []);
|
|
144
|
+
this.entries = derived(reader => {
|
|
145
|
+
const state = this._state.read(reader);
|
|
146
|
+
if (state === ChatEditingSessionState.Disposed || state === ChatEditingSessionState.Initial) {
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
return this._entriesObs.read(reader);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
147
153
|
this._onDidDispose = ( new Emitter());
|
|
148
|
-
this._timeline = this._instantiationService.createInstance(ChatEditingCheckpointTimelineImpl,
|
|
154
|
+
this._timeline = this._instantiationService.createInstance(ChatEditingCheckpointTimelineImpl, chatSessionResource, this._getTimelineDelegate());
|
|
149
155
|
this.canRedo = ( this._timeline.canRedo.map(
|
|
150
156
|
(hasHistory, reader) => hasHistory && this._state.read(reader) === ChatEditingSessionState.Idle
|
|
151
157
|
));
|
|
152
158
|
this.canUndo = ( this._timeline.canUndo.map(
|
|
153
159
|
(hasHistory, reader) => hasHistory && this._state.read(reader) === ChatEditingSessionState.Idle
|
|
154
160
|
));
|
|
155
|
-
this.
|
|
156
|
-
const disabled = this._timeline.requestDisablement.read(reader);
|
|
157
|
-
this._chatService.getSession(this.chatSessionResource)?.setDisabledRequests(disabled);
|
|
158
|
-
}));
|
|
161
|
+
this._init(transferFrom);
|
|
159
162
|
}
|
|
160
163
|
_getTimelineDelegate() {
|
|
161
164
|
return {
|
|
@@ -195,26 +198,31 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
195
198
|
}
|
|
196
199
|
};
|
|
197
200
|
}
|
|
198
|
-
async
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
async _init(transferFrom) {
|
|
202
|
+
const storage = this._instantiationService.createInstance(ChatEditingSessionStorage, this.chatSessionResource);
|
|
203
|
+
let restoredSessionState;
|
|
204
|
+
if (transferFrom instanceof ChatEditingSession_1) {
|
|
205
|
+
restoredSessionState = transferFrom._getStoredState(this.chatSessionResource);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
restoredSessionState = await storage.restoreState().catch(err => {
|
|
209
|
+
this._logService.error(`Error restoring chat editing session state for ${this.chatSessionResource}`, err);
|
|
210
|
+
return undefined;
|
|
211
|
+
});
|
|
212
|
+
if (this._store.isDisposed) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
202
215
|
}
|
|
203
216
|
if (restoredSessionState) {
|
|
204
217
|
for (const [uri, content] of restoredSessionState.initialFileContents) {
|
|
205
218
|
this._initialFileContents.set(uri, content);
|
|
206
219
|
}
|
|
220
|
+
if (restoredSessionState.timeline) {
|
|
221
|
+
transaction(tx => this._timeline.restoreFromState(restoredSessionState.timeline, tx));
|
|
222
|
+
}
|
|
207
223
|
await this._initEntries(restoredSessionState.recentSnapshot);
|
|
208
|
-
transaction(tx => {
|
|
209
|
-
if (restoredSessionState.timeline) {
|
|
210
|
-
this._timeline.restoreFromState(restoredSessionState.timeline, tx);
|
|
211
|
-
}
|
|
212
|
-
this._state.set(ChatEditingSessionState.Idle, tx);
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
this._state.set(ChatEditingSessionState.Idle, undefined);
|
|
217
224
|
}
|
|
225
|
+
this._state.set(ChatEditingSessionState.Idle, undefined);
|
|
218
226
|
}
|
|
219
227
|
_getEntry(uri) {
|
|
220
228
|
uri = CellUri.parse(uri)?.notebook ?? uri;
|
|
@@ -228,13 +236,13 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
228
236
|
return this._entriesObs.read(reader).find(e => isEqual(e.modifiedURI, uri));
|
|
229
237
|
}
|
|
230
238
|
storeState() {
|
|
231
|
-
const storage = this._instantiationService.createInstance(ChatEditingSessionStorage, this.
|
|
239
|
+
const storage = this._instantiationService.createInstance(ChatEditingSessionStorage, this.chatSessionResource);
|
|
232
240
|
return storage.storeState(this._getStoredState());
|
|
233
241
|
}
|
|
234
|
-
_getStoredState(
|
|
242
|
+
_getStoredState(sessionResource = this.chatSessionResource) {
|
|
235
243
|
const entries = ( new ResourceMap());
|
|
236
244
|
for (const entry of this._entriesObs.get()) {
|
|
237
|
-
entries.set(entry.modifiedURI, entry.createSnapshot(
|
|
245
|
+
entries.set(entry.modifiedURI, entry.createSnapshot(sessionResource, undefined, undefined));
|
|
238
246
|
}
|
|
239
247
|
const state = {
|
|
240
248
|
initialFileContents: this._initialFileContents,
|
|
@@ -249,6 +257,18 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
249
257
|
getEntryDiffBetweenRequests(uri, startRequestId, stopRequestId) {
|
|
250
258
|
return this._timeline.getEntryDiffBetweenRequests(uri, startRequestId, stopRequestId);
|
|
251
259
|
}
|
|
260
|
+
getDiffsForFilesInSession() {
|
|
261
|
+
return this._timeline.getDiffsForFilesInSession();
|
|
262
|
+
}
|
|
263
|
+
getDiffForSession() {
|
|
264
|
+
return this._timeline.getDiffForSession();
|
|
265
|
+
}
|
|
266
|
+
getDiffsForFilesInRequest(requestId) {
|
|
267
|
+
return this._timeline.getDiffsForFilesInRequest(requestId);
|
|
268
|
+
}
|
|
269
|
+
hasEditsInRequest(requestId, reader) {
|
|
270
|
+
return this._timeline.hasEditsInRequest(requestId, reader);
|
|
271
|
+
}
|
|
252
272
|
createSnapshot(requestId, undoStop) {
|
|
253
273
|
const label = undoStop ? `Request ${requestId} - Stop ${undoStop}` : `Request ${requestId}`;
|
|
254
274
|
this._timeline.createCheckpoint(requestId, undoStop, label);
|
|
@@ -325,7 +345,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
325
345
|
}
|
|
326
346
|
const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
|
|
327
347
|
multiDiffSource: getMultiDiffSourceUri(this, previousChanges),
|
|
328
|
-
label: ( localize(
|
|
348
|
+
label: ( localize(5264, "Suggested Edits"))
|
|
329
349
|
}, this._instantiationService);
|
|
330
350
|
this._editorPane = await this._editorGroupsService.activeGroup.openEditor(input, { pinned: true, activation: EditorActivation.ACTIVATE });
|
|
331
351
|
}
|
|
@@ -333,7 +353,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
333
353
|
this._stopPromise ??= Promise.allSettled([this._performStop(), this.storeState()]).then(() => { });
|
|
334
354
|
await this._stopPromise;
|
|
335
355
|
if (clearState) {
|
|
336
|
-
await this._instantiationService.createInstance(ChatEditingSessionStorage, this.
|
|
356
|
+
await this._instantiationService.createInstance(ChatEditingSessionStorage, this.chatSessionResource).clearState();
|
|
337
357
|
}
|
|
338
358
|
}
|
|
339
359
|
async _performStop() {
|
|
@@ -349,7 +369,6 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
349
369
|
}
|
|
350
370
|
dispose() {
|
|
351
371
|
this._assertNotDisposed();
|
|
352
|
-
this._chatService.cancelCurrentRequestForSession(this.chatSessionResource);
|
|
353
372
|
dispose(this._entriesObs.get());
|
|
354
373
|
super.dispose();
|
|
355
374
|
this._state.set(ChatEditingSessionState.Disposed, undefined);
|
|
@@ -366,6 +385,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
366
385
|
sequencer.queue(() => startPromise.p);
|
|
367
386
|
this._baselineCreationLocks.queue(resource.path, () => startPromise.p);
|
|
368
387
|
this._streamingEditLocks.queue(( resource.toString()), async () => {
|
|
388
|
+
await chatEditingSessionIsReady(this);
|
|
369
389
|
if (!this.isDisposed) {
|
|
370
390
|
await this._acceptStreamingEditsStart(responseModel, inUndoStop, resource);
|
|
371
391
|
}
|
|
@@ -410,16 +430,13 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
410
430
|
},
|
|
411
431
|
};
|
|
412
432
|
}
|
|
413
|
-
async startExternalEdits(responseModel, operationId, resources) {
|
|
433
|
+
async startExternalEdits(responseModel, operationId, resources, undoStopId) {
|
|
414
434
|
const snapshots = ( new ResourceMap());
|
|
415
435
|
const acquiredLockPromises = [];
|
|
416
436
|
const releaseLockPromises = [];
|
|
417
|
-
const
|
|
418
|
-
const progress = [{
|
|
419
|
-
kind: 'undoStop',
|
|
420
|
-
id: undoStopId,
|
|
421
|
-
}];
|
|
437
|
+
const progress = [];
|
|
422
438
|
const telemetryInfo = this._getTelemetryInfoForModel(responseModel);
|
|
439
|
+
await chatEditingSessionIsReady(this);
|
|
423
440
|
for (const resource of resources) {
|
|
424
441
|
const releaseLock = ( new DeferredPromise());
|
|
425
442
|
releaseLockPromises.push(releaseLock);
|
|
@@ -435,7 +452,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
435
452
|
await this._acceptStreamingEditsStart(responseModel, undoStopId, resource);
|
|
436
453
|
}
|
|
437
454
|
const notebookUri = CellUri.parse(resource)?.notebook || resource;
|
|
438
|
-
progress.push(...createOpeningEditCodeBlock(resource, this._notebookService.hasSupportedNotebooks(notebookUri)));
|
|
455
|
+
progress.push(...createOpeningEditCodeBlock(resource, this._notebookService.hasSupportedNotebooks(notebookUri), undoStopId));
|
|
439
456
|
await entry?.save();
|
|
440
457
|
snapshots.set(resource, entry && this._getCurrentTextOrNotebookSnapshot(entry));
|
|
441
458
|
entry?.startExternalEdit();
|
|
@@ -618,7 +635,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
618
635
|
get modelId() { return responseModel.request?.modelId; }
|
|
619
636
|
get modeId() { return responseModel.request?.modeInfo?.modeId; }
|
|
620
637
|
get command() { return responseModel.slashCommand?.name; }
|
|
621
|
-
get
|
|
638
|
+
get sessionResource() { return responseModel.session.sessionResource; }
|
|
622
639
|
get requestId() { return responseModel.requestId; }
|
|
623
640
|
get result() { return responseModel.result; }
|
|
624
641
|
get applyCodeBlockSuggestionId() { return responseModel.request?.modeInfo?.applyCodeBlockSuggestionId; }
|
|
@@ -750,11 +767,10 @@ ChatEditingSession = ChatEditingSession_1 = ( __decorate([
|
|
|
750
767
|
( __param(8, IBulkEditService)),
|
|
751
768
|
( __param(9, IEditorGroupsService)),
|
|
752
769
|
( __param(10, IEditorService)),
|
|
753
|
-
( __param(11,
|
|
754
|
-
( __param(12,
|
|
755
|
-
( __param(13,
|
|
756
|
-
( __param(14,
|
|
757
|
-
( __param(15, IConfigurationService))
|
|
770
|
+
( __param(11, INotebookService)),
|
|
771
|
+
( __param(12, IAccessibilitySignalService)),
|
|
772
|
+
( __param(13, ILogService)),
|
|
773
|
+
( __param(14, IConfigurationService))
|
|
758
774
|
], ChatEditingSession));
|
|
759
775
|
|
|
760
776
|
export { ChatEditingSession };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts
CHANGED
|
@@ -12,12 +12,13 @@ export interface StoredSessionState {
|
|
|
12
12
|
readonly timeline: IChatEditingTimelineState | undefined;
|
|
13
13
|
}
|
|
14
14
|
export declare class ChatEditingSessionStorage {
|
|
15
|
-
private readonly
|
|
15
|
+
private readonly _chatSessionResource;
|
|
16
16
|
private readonly _fileService;
|
|
17
17
|
private readonly _environmentService;
|
|
18
18
|
private readonly _logService;
|
|
19
19
|
private readonly _workspaceContextService;
|
|
20
|
-
|
|
20
|
+
private readonly storageKey;
|
|
21
|
+
constructor(_chatSessionResource: URI, _fileService: IFileService, _environmentService: IEnvironmentService, _logService: ILogService, _workspaceContextService: IWorkspaceContextService);
|
|
21
22
|
protected _getStorageLocation(): URI;
|
|
22
23
|
restoreState(): Promise<StoredSessionState | undefined>;
|
|
23
24
|
storeState(state: StoredSessionState): Promise<void>;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js
CHANGED
|
@@ -10,20 +10,22 @@ import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
10
10
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
11
11
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
12
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
13
|
+
import { getKeyForChatSessionResource } from './chatEditingOperations.js';
|
|
13
14
|
|
|
14
15
|
const STORAGE_CONTENTS_FOLDER = 'contents';
|
|
15
16
|
const STORAGE_STATE_FILE = 'state.json';
|
|
16
17
|
let ChatEditingSessionStorage = class ChatEditingSessionStorage {
|
|
17
|
-
constructor(
|
|
18
|
-
this.
|
|
18
|
+
constructor(_chatSessionResource, _fileService, _environmentService, _logService, _workspaceContextService) {
|
|
19
|
+
this._chatSessionResource = _chatSessionResource;
|
|
19
20
|
this._fileService = _fileService;
|
|
20
21
|
this._environmentService = _environmentService;
|
|
21
22
|
this._logService = _logService;
|
|
22
23
|
this._workspaceContextService = _workspaceContextService;
|
|
24
|
+
this.storageKey = getKeyForChatSessionResource(_chatSessionResource);
|
|
23
25
|
}
|
|
24
26
|
_getStorageLocation() {
|
|
25
27
|
const workspaceId = this._workspaceContextService.getWorkspace().id;
|
|
26
|
-
return joinPath(this._environmentService.workspaceStorageHome, workspaceId, 'chatEditingSessions', this.
|
|
28
|
+
return joinPath(this._environmentService.workspaceStorageHome, workspaceId, 'chatEditingSessions', this.storageKey);
|
|
27
29
|
}
|
|
28
30
|
async restoreState() {
|
|
29
31
|
const storageLocation = this._getStorageLocation();
|
|
@@ -60,7 +62,7 @@ let ChatEditingSessionStorage = class ChatEditingSessionStorage {
|
|
|
60
62
|
requestId: entry.telemetryInfo.requestId,
|
|
61
63
|
agentId: entry.telemetryInfo.agentId,
|
|
62
64
|
command: entry.telemetryInfo.command,
|
|
63
|
-
|
|
65
|
+
sessionResource: this._chatSessionResource,
|
|
64
66
|
result: undefined,
|
|
65
67
|
modelId: entry.telemetryInfo.modelId,
|
|
66
68
|
modeId: entry.telemetryInfo.modeId,
|
|
@@ -158,7 +160,6 @@ let ChatEditingSessionStorage = class ChatEditingSessionStorage {
|
|
|
158
160
|
try {
|
|
159
161
|
const data = {
|
|
160
162
|
version: STORAGE_VERSION,
|
|
161
|
-
sessionId: this.chatSessionId,
|
|
162
163
|
initialFileContents: await serializeResourceMap(state.initialFileContents, value => addFileContent(value)),
|
|
163
164
|
timeline: state.timeline,
|
|
164
165
|
recentSnapshot: await serializeChatEditingSessionStop(state.recentSnapshot),
|
|
@@ -2,6 +2,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
2
2
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
5
|
+
import { IDocumentDiff } from "../../../../../editor/common/diff/documentDiffProvider.js";
|
|
5
6
|
import { DetailedLineRangeMapping } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping";
|
|
6
7
|
import { TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
7
8
|
import { ITextModel, ITextSnapshot } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
@@ -9,7 +10,7 @@ import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/edi
|
|
|
9
10
|
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
10
11
|
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
11
12
|
import { ModifiedFileEntryState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
12
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-
|
|
13
|
+
import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
13
14
|
type affectedLines = {
|
|
14
15
|
linesAdded: number;
|
|
15
16
|
linesRemoved: number;
|
|
@@ -83,6 +84,7 @@ export declare class ChatEditingTextModelChangeService extends Disposable {
|
|
|
83
84
|
private _mirrorEdits;
|
|
84
85
|
private _keepHunk;
|
|
85
86
|
private _undoHunk;
|
|
87
|
+
getDiffInfo(): Promise<IDocumentDiff>;
|
|
86
88
|
private _updateDiffInfoSeq;
|
|
87
89
|
hasHunkAt(range: IRange): boolean;
|
|
88
90
|
private _updateDiffInfo;
|
|
@@ -359,6 +359,13 @@ let ChatEditingTextModelChangeService = class ChatEditingTextModelChangeService
|
|
|
359
359
|
this._accessibilitySignalService.playSignal(AccessibilitySignal.editsUndone, { allowManyInParallel: true });
|
|
360
360
|
return true;
|
|
361
361
|
}
|
|
362
|
+
async getDiffInfo() {
|
|
363
|
+
if (!this._diffOperation) {
|
|
364
|
+
this._updateDiffInfoSeq();
|
|
365
|
+
}
|
|
366
|
+
await this._diffOperation;
|
|
367
|
+
return this._diffInfo.get();
|
|
368
|
+
}
|
|
362
369
|
async _updateDiffInfoSeq(notifyAction = undefined) {
|
|
363
370
|
const myDiffOperationId = ++this._diffOperationIds;
|
|
364
371
|
await Promise.resolve(this._diffOperation);
|
|
@@ -7,14 +7,14 @@ export declare class ChatEditingTextModelContentProvider implements ITextModelCo
|
|
|
7
7
|
private readonly _chatEditingService;
|
|
8
8
|
private readonly _modelService;
|
|
9
9
|
static readonly scheme = "chat-editing-text-model";
|
|
10
|
-
static getFileURI(
|
|
10
|
+
static getFileURI(chatSessionResource: URI, documentId: string, path: string): URI;
|
|
11
11
|
constructor(_chatEditingService: IChatEditingService, _modelService: IModelService);
|
|
12
12
|
provideTextContent(resource: URI): Promise<ITextModel | null>;
|
|
13
13
|
}
|
|
14
14
|
export declare class ChatEditingSnapshotTextModelContentProvider implements ITextModelContentProvider {
|
|
15
15
|
private readonly _chatEditingService;
|
|
16
16
|
private readonly _modelService;
|
|
17
|
-
static getSnapshotFileURI(
|
|
17
|
+
static getSnapshotFileURI(chatSessionResource: URI, requestId: string | undefined, undoStop: string | undefined, path: string, scheme?: string): URI;
|
|
18
18
|
constructor(_chatEditingService: IChatEditingService, _modelService: IModelService);
|
|
19
19
|
provideTextContent(resource: URI): Promise<ITextModel | null>;
|
|
20
20
|
}
|
|
@@ -3,17 +3,16 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
4
4
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
5
|
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
6
|
-
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
7
6
|
|
|
8
7
|
var ChatEditingTextModelContentProvider_1;
|
|
9
8
|
let ChatEditingTextModelContentProvider = class ChatEditingTextModelContentProvider {
|
|
10
9
|
static { ChatEditingTextModelContentProvider_1 = this; }
|
|
11
10
|
static { this.scheme = Schemas.chatEditingModel; }
|
|
12
|
-
static getFileURI(
|
|
11
|
+
static getFileURI(chatSessionResource, documentId, path) {
|
|
13
12
|
return ( URI.from({
|
|
14
13
|
scheme: ChatEditingTextModelContentProvider_1.scheme,
|
|
15
14
|
path,
|
|
16
|
-
query: JSON.stringify({ kind: 'doc', documentId,
|
|
15
|
+
query: JSON.stringify({ kind: 'doc', documentId, chatSessionResource }),
|
|
17
16
|
}));
|
|
18
17
|
}
|
|
19
18
|
constructor(_chatEditingService, _modelService) {
|
|
@@ -26,7 +25,7 @@ let ChatEditingTextModelContentProvider = class ChatEditingTextModelContentProvi
|
|
|
26
25
|
return existing;
|
|
27
26
|
}
|
|
28
27
|
const data = JSON.parse(resource.query);
|
|
29
|
-
const session = this._chatEditingService.getEditingSession(
|
|
28
|
+
const session = this._chatEditingService.getEditingSession(URI.revive(data.chatSessionResource));
|
|
30
29
|
const entry = session?.entries.get().find(candidate => candidate.entryId === data.documentId);
|
|
31
30
|
if (!entry) {
|
|
32
31
|
return null;
|
|
@@ -38,11 +37,11 @@ ChatEditingTextModelContentProvider = ChatEditingTextModelContentProvider_1 = (
|
|
|
38
37
|
( __param(1, IModelService))
|
|
39
38
|
], ChatEditingTextModelContentProvider));
|
|
40
39
|
let ChatEditingSnapshotTextModelContentProvider = class ChatEditingSnapshotTextModelContentProvider {
|
|
41
|
-
static getSnapshotFileURI(
|
|
40
|
+
static getSnapshotFileURI(chatSessionResource, requestId, undoStop, path, scheme) {
|
|
42
41
|
return ( URI.from({
|
|
43
42
|
scheme: Schemas.chatEditingSnapshotScheme,
|
|
44
43
|
path,
|
|
45
|
-
query: JSON.stringify({
|
|
44
|
+
query: JSON.stringify({ session: chatSessionResource, requestId: requestId ?? '', undoStop: undoStop ?? '', scheme }),
|
|
46
45
|
}));
|
|
47
46
|
}
|
|
48
47
|
constructor(_chatEditingService, _modelService) {
|
|
@@ -55,7 +54,7 @@ let ChatEditingSnapshotTextModelContentProvider = class ChatEditingSnapshotTextM
|
|
|
55
54
|
return existing;
|
|
56
55
|
}
|
|
57
56
|
const data = JSON.parse(resource.query);
|
|
58
|
-
const session = this._chatEditingService.getEditingSession(
|
|
57
|
+
const session = this._chatEditingService.getEditingSession(URI.revive(data.session));
|
|
59
58
|
if (!session || !data.requestId) {
|
|
60
59
|
return null;
|
|
61
60
|
}
|