@codingame/monaco-vscode-chat-service-override 22.1.9 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +17 -8
- package/package.json +43 -40
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +57 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +26 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +51 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/{chatClearActions.d.ts → chatNewActions.d.ts} +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/{chatClearActions.js → chatNewActions.js} +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +101 -98
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +35 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +43 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +34 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +250 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +97 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +290 -231
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +7 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +646 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +46 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +44 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +46 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +45 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +30 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +60 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +60 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +29 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +365 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +3 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +58 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +6 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +38 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +83 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +370 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +349 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +787 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +211 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatUsageWidget.css +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +54 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +31 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +16 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +29 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +37 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +15 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +96 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +66 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +77 -71
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +91 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +458 -138
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +212 -150
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +96 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +15 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +33 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +688 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +15 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +126 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +38 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +28 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +24 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +25 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +30 -29
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +10 -19
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +61 -43
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +28 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +254 -165
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.d.ts +10 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +20 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +13 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +51 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +74 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +83 -53
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +136 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +18 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +357 -157
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +55 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +235 -108
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +50 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +11 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +13 -15
- 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 +20 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +63 -140
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +17 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +119 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +6 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +192 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +21 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +8 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +18 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +18 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +24 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +33 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +42 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +14 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +227 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +133 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +36 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +75 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +71 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +28 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +366 -363
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +123 -0
- package/vscode/src/vs/base/common/yaml.d.ts +0 -74
- package/vscode/src/vs/base/common/yaml.js +0 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +0 -239
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.js +0 -435
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +0 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +0 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +0 -380
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +0 -137
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +0 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +0 -176
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +0 -206
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +0 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +0 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.js +0 -102
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.d.ts +0 -97
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.js +0 -247
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +0 -118
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.js +0 -55
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.js +0 -66
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
3
|
+
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
4
|
+
import { IModifiedEntryTelemetryInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
5
|
+
export declare enum FileOperationType {
|
|
6
|
+
Create = "create",
|
|
7
|
+
Delete = "delete",
|
|
8
|
+
Rename = "rename",
|
|
9
|
+
TextEdit = "textEdit",
|
|
10
|
+
NotebookEdit = "notebookEdit"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Base interface for all file operations in the checkpoint timeline
|
|
14
|
+
*/
|
|
15
|
+
export interface IFileOperation {
|
|
16
|
+
readonly type: FileOperationType;
|
|
17
|
+
readonly uri: URI;
|
|
18
|
+
readonly requestId: string;
|
|
19
|
+
readonly epoch: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Operation representing the creation of a new file
|
|
23
|
+
*/
|
|
24
|
+
export interface IFileCreateOperation extends IFileOperation {
|
|
25
|
+
readonly type: FileOperationType.Create;
|
|
26
|
+
readonly initialContent: string;
|
|
27
|
+
readonly notebookViewType?: string;
|
|
28
|
+
readonly telemetryInfo: IModifiedEntryTelemetryInfo;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Operation representing the deletion of a file
|
|
32
|
+
*/
|
|
33
|
+
export interface IFileDeleteOperation extends IFileOperation {
|
|
34
|
+
readonly type: FileOperationType.Delete;
|
|
35
|
+
readonly finalContent: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Operation representing the renaming/moving of a file
|
|
39
|
+
*/
|
|
40
|
+
export interface IFileRenameOperation extends IFileOperation {
|
|
41
|
+
readonly type: FileOperationType.Rename;
|
|
42
|
+
readonly oldUri: URI;
|
|
43
|
+
readonly newUri: URI;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Operation representing text edits applied to a file
|
|
47
|
+
*/
|
|
48
|
+
export interface ITextEditOperation extends IFileOperation {
|
|
49
|
+
readonly type: FileOperationType.TextEdit;
|
|
50
|
+
readonly edits: readonly TextEdit[];
|
|
51
|
+
/**
|
|
52
|
+
* For cell URIs, the cell index that was edited. Needed because the original
|
|
53
|
+
* edit URI only contains the `handle` which is not portable between notebooks.
|
|
54
|
+
*/
|
|
55
|
+
readonly cellIndex?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Operation representing notebook cell edits applied to a notebook
|
|
59
|
+
*/
|
|
60
|
+
export interface INotebookEditOperation extends IFileOperation {
|
|
61
|
+
readonly type: FileOperationType.NotebookEdit;
|
|
62
|
+
readonly cellEdits: readonly ICellEditOperation[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Union type of all possible file operations
|
|
66
|
+
*/
|
|
67
|
+
export type FileOperation = IFileCreateOperation | IFileDeleteOperation | IFileRenameOperation | ITextEditOperation | INotebookEditOperation;
|
|
68
|
+
/**
|
|
69
|
+
* File baseline represents the initial state of a file when first edited in a request
|
|
70
|
+
*/
|
|
71
|
+
export interface IFileBaseline {
|
|
72
|
+
readonly uri: URI;
|
|
73
|
+
readonly requestId: string;
|
|
74
|
+
readonly content: string;
|
|
75
|
+
readonly epoch: number;
|
|
76
|
+
readonly telemetryInfo: IModifiedEntryTelemetryInfo;
|
|
77
|
+
readonly notebookViewType?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface IReconstructedFileExistsState {
|
|
80
|
+
readonly exists: true;
|
|
81
|
+
readonly content: string;
|
|
82
|
+
readonly uri: URI;
|
|
83
|
+
readonly telemetryInfo: IModifiedEntryTelemetryInfo;
|
|
84
|
+
readonly notebookViewType?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface IReconstructedFileNotExistsState {
|
|
87
|
+
readonly exists: false;
|
|
88
|
+
readonly uri: URI;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The reconstructed state of a file at a specific checkpoint
|
|
92
|
+
*/
|
|
93
|
+
export type IReconstructedFileState = IReconstructedFileNotExistsState | IReconstructedFileExistsState;
|
|
94
|
+
/**
|
|
95
|
+
* Checkpoint represents a stable state that can be navigated to
|
|
96
|
+
*/
|
|
97
|
+
export interface ICheckpoint {
|
|
98
|
+
readonly checkpointId: string;
|
|
99
|
+
readonly requestId: string | undefined;
|
|
100
|
+
readonly undoStopId: string | undefined;
|
|
101
|
+
readonly epoch: number;
|
|
102
|
+
readonly label: string;
|
|
103
|
+
readonly description?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* State that can be persisted and restored for the checkpoint timeline
|
|
107
|
+
*/
|
|
108
|
+
export interface IChatEditingTimelineState {
|
|
109
|
+
readonly checkpoints: readonly ICheckpoint[];
|
|
110
|
+
readonly fileBaselines: [
|
|
111
|
+
string,
|
|
112
|
+
IFileBaseline
|
|
113
|
+
][];
|
|
114
|
+
readonly operations: readonly FileOperation[];
|
|
115
|
+
readonly currentEpoch: number;
|
|
116
|
+
readonly epochCounter: number;
|
|
117
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var FileOperationType;
|
|
4
|
+
(function (FileOperationType) {
|
|
5
|
+
FileOperationType["Create"] = "create";
|
|
6
|
+
FileOperationType["Delete"] = "delete";
|
|
7
|
+
FileOperationType["Rename"] = "rename";
|
|
8
|
+
FileOperationType["TextEdit"] = "textEdit";
|
|
9
|
+
FileOperationType["NotebookEdit"] = "notebookEdit";
|
|
10
|
+
})(FileOperationType || (FileOperationType = {}));
|
|
11
|
+
|
|
12
|
+
export { FileOperationType };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ import { IDecorationsService } from "@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
14
14
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
15
15
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
16
16
|
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
17
|
-
import { IMultiDiffSourceResolver, IResolvedMultiDiffSource } from "@codingame/monaco-vscode-
|
|
17
|
+
import { IMultiDiffSourceResolver, IResolvedMultiDiffSource } from "@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService";
|
|
18
18
|
import { IMultiDiffSourceResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service";
|
|
19
19
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
20
20
|
import { IChatEditingSession, IChatRelatedFile, IChatRelatedFilesProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
21
21
|
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
22
|
-
import { ChatModel } from "@codingame/monaco-vscode-
|
|
22
|
+
import { ChatModel } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
23
23
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
24
24
|
export declare class ChatEditingService extends Disposable implements IChatEditingService {
|
|
25
25
|
private readonly _instantiationService;
|
|
@@ -38,13 +38,15 @@ export declare class ChatEditingService extends Disposable implements IChatEditi
|
|
|
38
38
|
dispose(): void;
|
|
39
39
|
startOrContinueGlobalEditingSession(chatModel: ChatModel, waitForRestore?: boolean): Promise<IChatEditingSession>;
|
|
40
40
|
private _lookupEntry;
|
|
41
|
-
getEditingSession(
|
|
41
|
+
getEditingSession(chatSessionResource: URI): IChatEditingSession | undefined;
|
|
42
42
|
createEditingSession(chatModel: ChatModel, global?: boolean): Promise<IChatEditingSession>;
|
|
43
|
+
transferEditingSession(chatModel: ChatModel, session: IChatEditingSession): Promise<IChatEditingSession>;
|
|
44
|
+
private _createEditingSession;
|
|
43
45
|
private installAutoApplyObserver;
|
|
44
46
|
private observerEditsInResponse;
|
|
45
47
|
hasRelatedFilesProviders(): boolean;
|
|
46
48
|
registerRelatedFilesProvider(handle: number, provider: IChatRelatedFilesProvider): IDisposable;
|
|
47
|
-
getRelatedFiles(
|
|
49
|
+
getRelatedFiles(chatSessionResource: URI, prompt: string, files: URI[], token: CancellationToken): Promise<{
|
|
48
50
|
group: string;
|
|
49
51
|
files: IChatRelatedFile[];
|
|
50
52
|
}[] | undefined>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { coalesce, delta, compareBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
4
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { groupBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
|
|
5
6
|
import { ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
6
7
|
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
8
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
@@ -28,16 +29,14 @@ import { IDecorationsService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
28
29
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
29
30
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
30
31
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
31
|
-
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-
|
|
32
|
+
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService';
|
|
32
33
|
import { IMultiDiffSourceResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service';
|
|
33
34
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
34
35
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
35
|
-
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.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 {
|
|
37
|
+
import { isCellTextEditOperationArray } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/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 {
|
|
40
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
39
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
41
40
|
import { AbstractChatEditingModifiedFileEntry } from './chatEditingModifiedFileEntry.js';
|
|
42
41
|
import { ChatEditingSession } from './chatEditingSession.js';
|
|
43
42
|
import { ChatEditingTextModelContentProvider, ChatEditingSnapshotTextModelContentProvider } from './chatEditingTextModelContentProviders.js';
|
|
@@ -68,7 +67,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
68
67
|
this._register(textModelService.registerTextModelContentProvider(Schemas.chatEditingSnapshotScheme, _instantiationService.createInstance(ChatEditingSnapshotTextModelContentProvider, this)));
|
|
69
68
|
this._register(this._chatService.onDidDisposeSession((e) => {
|
|
70
69
|
if (e.reason === 'cleared') {
|
|
71
|
-
this.getEditingSession(e.
|
|
70
|
+
this.getEditingSession(e.sessionResource)?.stop();
|
|
72
71
|
}
|
|
73
72
|
}));
|
|
74
73
|
const readonlyEnabledContextKey = chatEditingAgentSupportsReadonlyReferencesContextKey.bindTo(contextKeyService);
|
|
@@ -98,7 +97,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
98
97
|
}
|
|
99
98
|
e.join(storageTask, {
|
|
100
99
|
id: 'join.chatEditingSession',
|
|
101
|
-
label: ( localize(
|
|
100
|
+
label: ( localize(5181, "Saving chat edits history"))
|
|
102
101
|
});
|
|
103
102
|
}));
|
|
104
103
|
}
|
|
@@ -110,7 +109,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
110
109
|
if (waitForRestore) {
|
|
111
110
|
await this._restoringEditingSession;
|
|
112
111
|
}
|
|
113
|
-
const session = this.getEditingSession(chatModel.
|
|
112
|
+
const session = this.getEditingSession(chatModel.sessionResource);
|
|
114
113
|
if (session) {
|
|
115
114
|
return session;
|
|
116
115
|
}
|
|
@@ -126,14 +125,20 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
126
125
|
}
|
|
127
126
|
return undefined;
|
|
128
127
|
}
|
|
129
|
-
getEditingSession(
|
|
128
|
+
getEditingSession(chatSessionResource) {
|
|
130
129
|
return this.editingSessionsObs.get()
|
|
131
|
-
.find(candidate => candidate.
|
|
130
|
+
.find(candidate => isEqual(candidate.chatSessionResource, chatSessionResource));
|
|
132
131
|
}
|
|
133
132
|
async createEditingSession(chatModel, global = false) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
return this._createEditingSession(chatModel, global, undefined);
|
|
134
|
+
}
|
|
135
|
+
async transferEditingSession(chatModel, session) {
|
|
136
|
+
return this._createEditingSession(chatModel, session.isGlobalEditingSession, session);
|
|
137
|
+
}
|
|
138
|
+
async _createEditingSession(chatModel, global, initFrom) {
|
|
139
|
+
assertType(this.getEditingSession(chatModel.sessionResource) === undefined, 'CANNOT have more than one editing session per chat session');
|
|
140
|
+
const session = this._instantiationService.createInstance(ChatEditingSession, chatModel.sessionId, chatModel.sessionResource, global, this._lookupEntry.bind(this));
|
|
141
|
+
await session.init(initFrom);
|
|
137
142
|
const list = this._sessionsObs.get();
|
|
138
143
|
const removeSession = list.unshift(session);
|
|
139
144
|
const store = ( new DisposableStore());
|
|
@@ -173,32 +178,29 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
173
178
|
const editorListener = Event.once(this._editorService.onDidActiveEditorChange)(() => {
|
|
174
179
|
editorDidChange = true;
|
|
175
180
|
});
|
|
176
|
-
const
|
|
181
|
+
const editorOpenPromises = ( new ResourceMap());
|
|
182
|
+
const openChatEditedFiles = this._configurationService.getValue('accessibility.openChatEditedFiles');
|
|
177
183
|
const ensureEditorOpen = (partUri) => {
|
|
178
184
|
const uri = CellUri.parse(partUri)?.notebook ?? partUri;
|
|
179
|
-
if ((
|
|
185
|
+
if (( editorOpenPromises.has(uri))) {
|
|
180
186
|
return;
|
|
181
187
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const inactive = editorDidChange
|
|
189
|
-
|| this._editorService.activeEditorPane?.input instanceof ChatEditorInput && this._editorService.activeEditorPane.input.sessionId === session.chatSessionId
|
|
190
|
-
|| Boolean(activeUri && session.entries.get().find(entry => isEqual(activeUri, entry.modifiedURI)));
|
|
191
|
-
if (this._configurationService.getValue('accessibility.openChatEditedFiles')) {
|
|
188
|
+
editorOpenPromises.set(uri, (async () => {
|
|
189
|
+
if (this.notebookService.getNotebookTextModel(uri) || uri.scheme === Schemas.untitled || (await this._fileService.exists(uri).catch(() => false))) {
|
|
190
|
+
const activeUri = this._editorService.activeEditorPane?.input.resource;
|
|
191
|
+
const inactive = editorDidChange
|
|
192
|
+
|| this._editorService.activeEditorPane?.input instanceof ChatEditorInput && this._editorService.activeEditorPane.input.sessionId === session.chatSessionId
|
|
193
|
+
|| Boolean(activeUri && session.entries.get().find(entry => isEqual(activeUri, entry.modifiedURI)));
|
|
192
194
|
this._editorService.openEditor({ resource: uri, options: { inactive, preserveFocus: true, pinned: true } });
|
|
193
195
|
}
|
|
194
|
-
}));
|
|
196
|
+
})());
|
|
195
197
|
};
|
|
196
198
|
const onResponseComplete = () => {
|
|
197
199
|
for (const remaining of editsSeen) {
|
|
198
200
|
remaining?.streaming.complete();
|
|
199
201
|
}
|
|
200
202
|
editsSeen.length = 0;
|
|
201
|
-
|
|
203
|
+
editorOpenPromises.clear();
|
|
202
204
|
editorListener.dispose();
|
|
203
205
|
};
|
|
204
206
|
const handleResponseParts = async () => {
|
|
@@ -215,32 +217,37 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
215
217
|
if (part.kind !== 'textEditGroup' && part.kind !== 'notebookEditGroup') {
|
|
216
218
|
continue;
|
|
217
219
|
}
|
|
218
|
-
|
|
220
|
+
if (part.isExternalEdit) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (openChatEditedFiles) {
|
|
224
|
+
ensureEditorOpen(part.uri);
|
|
225
|
+
}
|
|
219
226
|
let entry = editsSeen[i];
|
|
220
227
|
if (!entry) {
|
|
221
228
|
entry = { seen: 0, streaming: session.startStreamingEdits(CellUri.parse(part.uri)?.notebook ?? part.uri, responseModel, undoStop) };
|
|
222
229
|
editsSeen[i] = entry;
|
|
223
230
|
}
|
|
224
231
|
const isFirst = entry.seen === 0;
|
|
225
|
-
const newEdits = part.edits.slice(entry.seen)
|
|
232
|
+
const newEdits = part.edits.slice(entry.seen);
|
|
226
233
|
entry.seen = part.edits.length;
|
|
227
234
|
if (newEdits.length > 0 || isFirst) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
for (let i = 0; i < newEdits.length; i++) {
|
|
236
|
+
const edit = newEdits[i];
|
|
237
|
+
const done = part.done ? i === newEdits.length - 1 : false;
|
|
238
|
+
if (isTextEditOperationArray(edit)) {
|
|
239
|
+
entry.streaming.pushText(edit, done);
|
|
240
|
+
}
|
|
241
|
+
else if (isCellTextEditOperationArray(edit)) {
|
|
242
|
+
for (const edits of ( Object.values(groupBy(edit, e => ( e.uri.toString()))))) {
|
|
243
|
+
if (edits) {
|
|
244
|
+
entry.streaming.pushNotebookCellText(edits[0].uri, ( edits.map(e => e.edit)), done);
|
|
245
|
+
}
|
|
239
246
|
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
entry.streaming.pushNotebook(edit, done);
|
|
250
|
+
}
|
|
244
251
|
}
|
|
245
252
|
}
|
|
246
253
|
if (part.done) {
|
|
@@ -278,7 +285,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
278
285
|
this._chatRelatedFilesProviders.delete(handle);
|
|
279
286
|
});
|
|
280
287
|
}
|
|
281
|
-
async getRelatedFiles(
|
|
288
|
+
async getRelatedFiles(chatSessionResource, prompt, files, token) {
|
|
282
289
|
const providers = Array.from(( this._chatRelatedFilesProviders.values()));
|
|
283
290
|
const result = await Promise.all(( providers.map(async (provider) => {
|
|
284
291
|
try {
|
|
@@ -321,12 +328,11 @@ function observeArrayChanges(obs, compare, store) {
|
|
|
321
328
|
}));
|
|
322
329
|
return emitter.event;
|
|
323
330
|
}
|
|
324
|
-
|
|
325
|
-
constructor(_sessions
|
|
331
|
+
class ChatDecorationsProvider extends Disposable {
|
|
332
|
+
constructor(_sessions) {
|
|
326
333
|
super();
|
|
327
334
|
this._sessions = _sessions;
|
|
328
|
-
this.
|
|
329
|
-
this.label = ( localize(5105, "Chat Editing"));
|
|
335
|
+
this.label = ( localize(5182, "Chat Editing"));
|
|
330
336
|
this._currentEntries = derived(this, (r) => {
|
|
331
337
|
const sessions = this._sessions.read(r);
|
|
332
338
|
if (!sessions) {
|
|
@@ -362,20 +368,16 @@ let ChatDecorationsProvider = class ChatDecorationsProvider extends Disposable {
|
|
|
362
368
|
}
|
|
363
369
|
const isModified = ( this._modifiedUris.get().some(e => ( e.toString()) === ( uri.toString())));
|
|
364
370
|
if (isModified) {
|
|
365
|
-
const defaultAgentName = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Chat)?.fullName;
|
|
366
371
|
return {
|
|
367
372
|
weight: 1000,
|
|
368
373
|
letter: Codicon.diffModified,
|
|
369
|
-
tooltip:
|
|
374
|
+
tooltip: ( localize(5183, "Pending changes from chat")),
|
|
370
375
|
bubble: true
|
|
371
376
|
};
|
|
372
377
|
}
|
|
373
378
|
return undefined;
|
|
374
379
|
}
|
|
375
|
-
}
|
|
376
|
-
ChatDecorationsProvider = ( __decorate([
|
|
377
|
-
( __param(1, IChatAgentService))
|
|
378
|
-
], ChatDecorationsProvider));
|
|
380
|
+
}
|
|
379
381
|
let ChatEditingMultiDiffSourceResolver = class ChatEditingMultiDiffSourceResolver {
|
|
380
382
|
constructor(_editingSessionsObs, _instantiationService) {
|
|
381
383
|
this._editingSessionsObs = _editingSessionsObs;
|
|
@@ -426,5 +428,8 @@ class ChatEditingMultiDiffSource {
|
|
|
426
428
|
};
|
|
427
429
|
}
|
|
428
430
|
}
|
|
431
|
+
function isTextEditOperationArray(value) {
|
|
432
|
+
return ( value.some(e => TextEdit.isTextEdit(e)));
|
|
433
|
+
}
|
|
429
434
|
|
|
430
435
|
export { ChatEditingMultiDiffSourceResolver, ChatEditingService };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
|
|
1
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
3
|
import { IObservable, IReader } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
4
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
@@ -7,16 +8,20 @@ import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common
|
|
|
7
8
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
8
9
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
9
10
|
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
11
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
10
12
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
13
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
11
14
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
12
15
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
13
16
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
14
|
-
import { ChatEditingSessionState, IChatEditingSession, IModifiedFileEntry,
|
|
15
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-
|
|
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-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
19
|
+
import { IChatProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
16
20
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
17
21
|
import { AbstractChatEditingModifiedFileEntry } from "./chatEditingModifiedFileEntry.js";
|
|
18
22
|
export declare class ChatEditingSession extends Disposable implements IChatEditingSession {
|
|
19
23
|
readonly chatSessionId: string;
|
|
24
|
+
readonly chatSessionResource: URI;
|
|
20
25
|
readonly isGlobalEditingSession: boolean;
|
|
21
26
|
private _lookupExternalEntry;
|
|
22
27
|
private readonly _instantiationService;
|
|
@@ -29,12 +34,21 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
29
34
|
private readonly _chatService;
|
|
30
35
|
private readonly _notebookService;
|
|
31
36
|
private readonly _accessibilitySignalService;
|
|
37
|
+
private readonly _logService;
|
|
38
|
+
private readonly configurationService;
|
|
32
39
|
private readonly _state;
|
|
33
40
|
private readonly _timeline;
|
|
34
41
|
/**
|
|
35
42
|
* Contains the contents of a file when the AI first began doing edits to it.
|
|
36
43
|
*/
|
|
37
44
|
private readonly _initialFileContents;
|
|
45
|
+
private readonly _baselineCreationLocks;
|
|
46
|
+
private readonly _streamingEditLocks;
|
|
47
|
+
/**
|
|
48
|
+
* Tracks active external edit operations.
|
|
49
|
+
* Key is operationId, value contains the operation state.
|
|
50
|
+
*/
|
|
51
|
+
private readonly _externalEditOperations;
|
|
38
52
|
private readonly _entriesObs;
|
|
39
53
|
get entries(): IObservable<readonly IModifiedFileEntry[]>;
|
|
40
54
|
private _editorPane;
|
|
@@ -43,26 +57,21 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
43
57
|
readonly canRedo: IObservable<boolean>;
|
|
44
58
|
private readonly _onDidDispose;
|
|
45
59
|
get onDidDispose(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
46
|
-
constructor(chatSessionId: string, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _chatService: IChatService, _notebookService: INotebookService, _accessibilitySignalService: IAccessibilitySignalService);
|
|
47
|
-
|
|
60
|
+
constructor(chatSessionId: string, chatSessionResource: URI, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _chatService: IChatService, _notebookService: INotebookService, _accessibilitySignalService: IAccessibilitySignalService, _logService: ILogService, configurationService: IConfigurationService);
|
|
61
|
+
private _getTimelineDelegate;
|
|
62
|
+
init(transferFrom?: IChatEditingSession): Promise<void>;
|
|
48
63
|
private _getEntry;
|
|
49
64
|
getEntry(uri: URI): IModifiedFileEntry | undefined;
|
|
50
65
|
readEntry(uri: URI, reader: IReader | undefined): IModifiedFileEntry | undefined;
|
|
51
66
|
storeState(): Promise<void>;
|
|
52
|
-
private
|
|
53
|
-
getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService").IEditSessionEntryDiff | undefined
|
|
67
|
+
private _getStoredState;
|
|
68
|
+
getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService").IEditSessionEntryDiff | undefined> | undefined;
|
|
54
69
|
getEntryDiffBetweenRequests(uri: URI, startRequestId: string, stopRequestId: string): IObservable<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService").IEditSessionEntryDiff | undefined>;
|
|
55
|
-
createSnapshot(requestId: string, undoStop: string | undefined
|
|
56
|
-
|
|
57
|
-
getSnapshot(requestId: string, undoStop: string | undefined, snapshotUri: URI): ISnapshotEntry | undefined;
|
|
70
|
+
createSnapshot(requestId: string, undoStop: string | undefined): void;
|
|
71
|
+
getSnapshotContents(requestId: string, uri: URI, stopId: string | undefined): Promise<VSBuffer | undefined>;
|
|
58
72
|
getSnapshotModel(requestId: string, undoStop: string | undefined, snapshotUri: URI): Promise<ITextModel | null>;
|
|
59
73
|
getSnapshotUri(requestId: string, uri: URI, stopId: string | undefined): URI | undefined;
|
|
60
|
-
|
|
61
|
-
* A snapshot representing the state of the working set before a new request has been sent
|
|
62
|
-
*/
|
|
63
|
-
private _pendingSnapshot;
|
|
64
|
-
restoreSnapshot(requestId: string | undefined, stopId: string | undefined): Promise<void>;
|
|
65
|
-
private _restoreSnapshot;
|
|
74
|
+
restoreSnapshot(requestId: string, stopId: string | undefined): Promise<void>;
|
|
66
75
|
private _assertNotDisposed;
|
|
67
76
|
accept(...uris: URI[]): Promise<void>;
|
|
68
77
|
reject(...uris: URI[]): Promise<void>;
|
|
@@ -72,12 +81,16 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
72
81
|
stop(clearState?: boolean): Promise<void>;
|
|
73
82
|
private _performStop;
|
|
74
83
|
dispose(): void;
|
|
75
|
-
private _streamingEditLocks;
|
|
76
84
|
private get isDisposed();
|
|
77
85
|
startStreamingEdits(resource: URI, responseModel: IChatResponseModel, inUndoStop: string | undefined): IStreamingEdits;
|
|
86
|
+
startExternalEdits(responseModel: IChatResponseModel, operationId: number, resources: URI[]): Promise<IChatProgress[]>;
|
|
87
|
+
stopExternalEdits(responseModel: IChatResponseModel, operationId: number): Promise<IChatProgress[]>;
|
|
78
88
|
undoInteraction(): Promise<void>;
|
|
79
89
|
redoInteraction(): Promise<void>;
|
|
90
|
+
private _recordEditOperations;
|
|
91
|
+
private _getCurrentTextOrNotebookSnapshot;
|
|
80
92
|
private _acceptStreamingEditsStart;
|
|
93
|
+
private _initEntries;
|
|
81
94
|
private _acceptEdits;
|
|
82
95
|
private _getTelemetryInfoForModel;
|
|
83
96
|
private _resolve;
|