@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
|
@@ -25,12 +25,12 @@ import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode
|
|
|
25
25
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
26
26
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
27
27
|
import { ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
28
|
-
import { ChatViewId } from '@codingame/monaco-vscode-
|
|
28
|
+
import { ChatViewId } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
29
29
|
import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane } from './chatViewPane.js';
|
|
30
30
|
|
|
31
31
|
const chatViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
32
32
|
id: CHAT_SIDEBAR_PANEL_ID,
|
|
33
|
-
title: ( localize2(
|
|
33
|
+
title: ( localize2(5327, "Chat")),
|
|
34
34
|
icon: Codicon.chatSparkle,
|
|
35
35
|
ctorDescriptor: ( new SyncDescriptor(
|
|
36
36
|
ViewPaneContainer,
|
|
@@ -40,34 +40,34 @@ const chatViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).regi
|
|
|
40
40
|
hideIfEmpty: true,
|
|
41
41
|
order: 1,
|
|
42
42
|
}, ViewContainerLocation.AuxiliaryBar, { isDefault: true, doNotRegisterOpenCommand: true });
|
|
43
|
-
const chatViewDescriptor =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
order: 1
|
|
43
|
+
const chatViewDescriptor = {
|
|
44
|
+
id: ChatViewId,
|
|
45
|
+
containerIcon: chatViewContainer.icon,
|
|
46
|
+
containerTitle: chatViewContainer.title.value,
|
|
47
|
+
singleViewPaneContainerTitle: chatViewContainer.title.value,
|
|
48
|
+
name: ( localize2(5327, "Chat")),
|
|
49
|
+
canToggleVisibility: false,
|
|
50
|
+
canMoveView: true,
|
|
51
|
+
openCommandActionDescriptor: {
|
|
52
|
+
id: CHAT_SIDEBAR_PANEL_ID,
|
|
53
|
+
title: chatViewContainer.title,
|
|
54
|
+
mnemonicTitle: ( localize(5328, "&&Chat")),
|
|
55
|
+
keybindings: {
|
|
56
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyI,
|
|
57
|
+
mac: {
|
|
58
|
+
primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyI
|
|
59
|
+
}
|
|
62
60
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}]
|
|
66
|
-
(
|
|
61
|
+
order: 1
|
|
62
|
+
},
|
|
63
|
+
ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.Chat }])),
|
|
64
|
+
when: ( ContextKeyExpr.or(( ContextKeyExpr.or(ChatContextKeys.Setup.hidden, ChatContextKeys.Setup.disabled))?.negate(), ChatContextKeys.panelParticipantRegistered, ChatContextKeys.extensionInvalid))
|
|
65
|
+
};
|
|
66
|
+
( Registry.as(Extensions.ViewsRegistry)).registerViews([chatViewDescriptor], chatViewContainer);
|
|
67
67
|
const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
68
68
|
extensionPoint: 'chatParticipants',
|
|
69
69
|
jsonSchema: {
|
|
70
|
-
description: ( localize(
|
|
70
|
+
description: ( localize(5329, 'Contributes a chat participant')),
|
|
71
71
|
type: 'array',
|
|
72
72
|
items: {
|
|
73
73
|
additionalProperties: false,
|
|
@@ -76,12 +76,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
76
76
|
required: ['name', 'id'],
|
|
77
77
|
properties: {
|
|
78
78
|
id: {
|
|
79
|
-
description: ( localize(
|
|
79
|
+
description: ( localize(5330, "A unique id for this chat participant.")),
|
|
80
80
|
type: 'string'
|
|
81
81
|
},
|
|
82
82
|
name: {
|
|
83
83
|
description: ( localize(
|
|
84
|
-
|
|
84
|
+
5331,
|
|
85
85
|
"User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
|
|
86
86
|
)),
|
|
87
87
|
type: 'string',
|
|
@@ -89,37 +89,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
89
89
|
},
|
|
90
90
|
fullName: {
|
|
91
91
|
markdownDescription: ( localize(
|
|
92
|
-
|
|
92
|
+
5332,
|
|
93
93
|
"The full name of this chat participant, which is shown as the label for responses coming from this participant. If not provided, {0} is used.",
|
|
94
94
|
'`name`'
|
|
95
95
|
)),
|
|
96
96
|
type: 'string'
|
|
97
97
|
},
|
|
98
98
|
description: {
|
|
99
|
-
description: ( localize(
|
|
99
|
+
description: ( localize(5333, "A description of this chat participant, shown in the UI.")),
|
|
100
100
|
type: 'string'
|
|
101
101
|
},
|
|
102
102
|
isSticky: {
|
|
103
103
|
description: ( localize(
|
|
104
|
-
|
|
104
|
+
5334,
|
|
105
105
|
"Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
|
|
106
106
|
)),
|
|
107
107
|
type: 'boolean'
|
|
108
108
|
},
|
|
109
109
|
sampleRequest: {
|
|
110
110
|
description: ( localize(
|
|
111
|
-
|
|
111
|
+
5335,
|
|
112
112
|
"When the user clicks this participant in `/help`, this text will be submitted to the participant."
|
|
113
113
|
)),
|
|
114
114
|
type: 'string'
|
|
115
115
|
},
|
|
116
116
|
when: {
|
|
117
|
-
description: ( localize(
|
|
117
|
+
description: ( localize(5336, "A condition which must be true to enable this participant.")),
|
|
118
118
|
type: 'string'
|
|
119
119
|
},
|
|
120
120
|
disambiguation: {
|
|
121
121
|
description: ( localize(
|
|
122
|
-
|
|
122
|
+
5337,
|
|
123
123
|
"Metadata to help with automatically routing user questions to this chat participant."
|
|
124
124
|
)),
|
|
125
125
|
type: 'array',
|
|
@@ -131,21 +131,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
131
131
|
properties: {
|
|
132
132
|
category: {
|
|
133
133
|
markdownDescription: ( localize(
|
|
134
|
-
|
|
134
|
+
5338,
|
|
135
135
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
136
136
|
)),
|
|
137
137
|
type: 'string'
|
|
138
138
|
},
|
|
139
139
|
description: {
|
|
140
140
|
description: ( localize(
|
|
141
|
-
|
|
141
|
+
5339,
|
|
142
142
|
"A detailed description of the kinds of questions that are suitable for this chat participant."
|
|
143
143
|
)),
|
|
144
144
|
type: 'string'
|
|
145
145
|
},
|
|
146
146
|
examples: {
|
|
147
147
|
description: ( localize(
|
|
148
|
-
|
|
148
|
+
5340,
|
|
149
149
|
"A list of representative example questions that are suitable for this chat participant."
|
|
150
150
|
)),
|
|
151
151
|
type: 'array'
|
|
@@ -155,7 +155,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
155
155
|
},
|
|
156
156
|
commands: {
|
|
157
157
|
markdownDescription: ( localize(
|
|
158
|
-
|
|
158
|
+
5341,
|
|
159
159
|
"Commands available for this chat participant, which the user can invoke with a `/`."
|
|
160
160
|
)),
|
|
161
161
|
type: 'array',
|
|
@@ -167,36 +167,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
167
167
|
properties: {
|
|
168
168
|
name: {
|
|
169
169
|
description: ( localize(
|
|
170
|
-
|
|
170
|
+
5342,
|
|
171
171
|
"A short name by which this command is referred to in the UI, e.g. `fix` or `explain` for commands that fix an issue or explain code. The name should be unique among the commands provided by this participant."
|
|
172
172
|
)),
|
|
173
173
|
type: 'string'
|
|
174
174
|
},
|
|
175
175
|
description: {
|
|
176
|
-
description: ( localize(
|
|
176
|
+
description: ( localize(5343, "A description of this command.")),
|
|
177
177
|
type: 'string'
|
|
178
178
|
},
|
|
179
179
|
when: {
|
|
180
|
-
description: ( localize(
|
|
180
|
+
description: ( localize(5344, "A condition which must be true to enable this command.")),
|
|
181
181
|
type: 'string'
|
|
182
182
|
},
|
|
183
183
|
sampleRequest: {
|
|
184
184
|
description: ( localize(
|
|
185
|
-
|
|
185
|
+
5345,
|
|
186
186
|
"When the user clicks this command in `/help`, this text will be submitted to the participant."
|
|
187
187
|
)),
|
|
188
188
|
type: 'string'
|
|
189
189
|
},
|
|
190
190
|
isSticky: {
|
|
191
191
|
description: ( localize(
|
|
192
|
-
|
|
192
|
+
5334,
|
|
193
193
|
"Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
|
|
194
194
|
)),
|
|
195
195
|
type: 'boolean'
|
|
196
196
|
},
|
|
197
197
|
disambiguation: {
|
|
198
198
|
description: ( localize(
|
|
199
|
-
|
|
199
|
+
5346,
|
|
200
200
|
"Metadata to help with automatically routing user questions to this chat command."
|
|
201
201
|
)),
|
|
202
202
|
type: 'array',
|
|
@@ -208,21 +208,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
208
208
|
properties: {
|
|
209
209
|
category: {
|
|
210
210
|
markdownDescription: ( localize(
|
|
211
|
-
|
|
211
|
+
5347,
|
|
212
212
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
213
213
|
)),
|
|
214
214
|
type: 'string'
|
|
215
215
|
},
|
|
216
216
|
description: {
|
|
217
217
|
description: ( localize(
|
|
218
|
-
|
|
218
|
+
5348,
|
|
219
219
|
"A detailed description of the kinds of questions that are suitable for this chat command."
|
|
220
220
|
)),
|
|
221
221
|
type: 'string'
|
|
222
222
|
},
|
|
223
223
|
examples: {
|
|
224
224
|
description: ( localize(
|
|
225
|
-
|
|
225
|
+
5349,
|
|
226
226
|
"A list of representative example questions that are suitable for this chat command."
|
|
227
227
|
)),
|
|
228
228
|
type: 'array'
|
|
@@ -353,9 +353,9 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
|
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
355
|
this.registeredWelcomeView = true;
|
|
356
|
-
const showExtensionLabel = ( localize(
|
|
356
|
+
const showExtensionLabel = ( localize(5350, "Show Extension"));
|
|
357
357
|
const mainMessage = ( localize(
|
|
358
|
-
|
|
358
|
+
5351,
|
|
359
359
|
"Chat failed to load because the installed version of the Copilot Chat extension is not compatible with this version of {0}. Please ensure that the Copilot Chat extension is up to date.",
|
|
360
360
|
this.productService.nameLong
|
|
361
361
|
));
|
|
@@ -387,10 +387,10 @@ class ChatParticipantDataRenderer extends Disposable {
|
|
|
387
387
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
388
388
|
}
|
|
389
389
|
const headers = [
|
|
390
|
-
( localize(
|
|
391
|
-
( localize(
|
|
392
|
-
( localize(
|
|
393
|
-
( localize(
|
|
390
|
+
( localize(5352, "Name")),
|
|
391
|
+
( localize(5353, "Full Name")),
|
|
392
|
+
( localize(5354, "Description")),
|
|
393
|
+
( localize(5355, "Commands")),
|
|
394
394
|
];
|
|
395
395
|
const rows = ( nonDefaultContributions.map(d => {
|
|
396
396
|
return [
|
|
@@ -411,7 +411,7 @@ class ChatParticipantDataRenderer extends Disposable {
|
|
|
411
411
|
}
|
|
412
412
|
( Registry.as(Extensions$1.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
413
413
|
id: 'chatParticipants',
|
|
414
|
-
label: ( localize(
|
|
414
|
+
label: ( localize(5356, "Chat Participants")),
|
|
415
415
|
access: {
|
|
416
416
|
canToggle: false
|
|
417
417
|
},
|
|
@@ -3,7 +3,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
5
5
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
6
|
-
import { IQuickChatOpenOptions } from "@codingame/monaco-vscode-
|
|
6
|
+
import { IQuickChatOpenOptions } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
7
|
import { IQuickChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
8
8
|
export declare class QuickChatService extends Disposable implements IQuickChatService {
|
|
9
9
|
private readonly quickInputService;
|
|
@@ -6,15 +6,15 @@ import { disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
6
6
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
7
7
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
8
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
9
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
10
9
|
import { Disposable, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
-
import
|
|
12
|
-
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
13
11
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
|
+
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
14
13
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
15
14
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
15
|
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
17
|
-
import {
|
|
16
|
+
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
17
|
+
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
18
18
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
19
19
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
20
20
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
@@ -27,15 +27,16 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
|
|
|
27
27
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
28
28
|
import { quickInputBackground, quickInputForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
29
29
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
30
|
-
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
31
30
|
import { EDITOR_DRAG_AND_DROP_BACKGROUND } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
31
|
+
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
32
|
+
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
32
33
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
33
|
-
import {
|
|
34
|
+
import { isCellTextEditOperationArray } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
35
|
+
import { ChatMode } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
34
36
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
35
37
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
36
|
-
import { showChatView } from '@codingame/monaco-vscode-
|
|
37
|
-
import { ChatWidget } from '@codingame/monaco-vscode-
|
|
38
|
-
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
38
|
+
import { showChatView } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
39
|
+
import { ChatWidget } from '@codingame/monaco-vscode-a793b3ee-7ba9-5176-a019-30ec806fdd95-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
39
40
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
40
41
|
|
|
41
42
|
var QuickChat_1;
|
|
@@ -134,7 +135,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
134
135
|
static { QuickChat_1 = this; }
|
|
135
136
|
static { this.DEFAULT_MIN_HEIGHT = 200; }
|
|
136
137
|
static { this.DEFAULT_HEIGHT_OFFSET = 100; }
|
|
137
|
-
constructor(instantiationService, contextKeyService, chatService, layoutService, viewsService, chatEntitlementService) {
|
|
138
|
+
constructor(instantiationService, contextKeyService, chatService, layoutService, viewsService, chatEntitlementService, markdownRendererService) {
|
|
138
139
|
super();
|
|
139
140
|
this.instantiationService = instantiationService;
|
|
140
141
|
this.contextKeyService = contextKeyService;
|
|
@@ -142,6 +143,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
142
143
|
this.layoutService = layoutService;
|
|
143
144
|
this.viewsService = viewsService;
|
|
144
145
|
this.chatEntitlementService = chatEntitlementService;
|
|
146
|
+
this.markdownRendererService = markdownRendererService;
|
|
145
147
|
this.maintainScrollTimer = this._register(( new MutableDisposable()));
|
|
146
148
|
this._deferUpdatingDynamicLayout = false;
|
|
147
149
|
}
|
|
@@ -189,7 +191,14 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
189
191
|
IContextKeyService,
|
|
190
192
|
this._register(this.contextKeyService.createScoped(parent))
|
|
191
193
|
]))));
|
|
192
|
-
this.widget = this._register(scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Chat, { isQuickChat: true }, {
|
|
194
|
+
this.widget = this._register(scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Chat, { isQuickChat: true }, {
|
|
195
|
+
autoScroll: true,
|
|
196
|
+
renderInputOnTop: true,
|
|
197
|
+
renderStyle: 'compact',
|
|
198
|
+
menus: { inputSideToolbar: MenuId.ChatInputSide, telemetrySource: 'chatQuick' },
|
|
199
|
+
enableImplicitContext: true,
|
|
200
|
+
defaultMode: ChatMode.Ask
|
|
201
|
+
}, {
|
|
193
202
|
listForeground: quickInputForeground,
|
|
194
203
|
listBackground: quickInputBackground,
|
|
195
204
|
overlayBackground: EDITOR_DRAG_AND_DROP_BACKGROUND,
|
|
@@ -220,9 +229,8 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
220
229
|
const showDisclaimer = !sentiment.installed && anonymous && !requestInProgress;
|
|
221
230
|
disclaimerElement.classList.toggle('hidden', !showDisclaimer);
|
|
222
231
|
if (showDisclaimer) {
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
5220,
|
|
232
|
+
const renderedMarkdown = disposables.add(this.markdownRendererService.render(( new MarkdownString(( localize(
|
|
233
|
+
5364,
|
|
226
234
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
|
|
227
235
|
product.defaultChatAgent?.provider?.default?.name ?? '',
|
|
228
236
|
product.defaultChatAgent?.provider?.default?.name ?? '',
|
|
@@ -270,7 +278,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
270
278
|
return this.widget.acceptInput();
|
|
271
279
|
}
|
|
272
280
|
async openChatView() {
|
|
273
|
-
const widget = await showChatView(this.viewsService);
|
|
281
|
+
const widget = await showChatView(this.viewsService, this.layoutService);
|
|
274
282
|
if (!widget?.viewModel || !this.model) {
|
|
275
283
|
return;
|
|
276
284
|
}
|
|
@@ -289,17 +297,17 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
289
297
|
}
|
|
290
298
|
else if (item.kind === 'notebookEditGroup') {
|
|
291
299
|
for (const group of item.edits) {
|
|
292
|
-
if (
|
|
300
|
+
if (isCellTextEditOperationArray(group)) {
|
|
293
301
|
message.push({
|
|
294
302
|
kind: 'textEdit',
|
|
295
|
-
edits:
|
|
296
|
-
uri: group.uri
|
|
303
|
+
edits: ( group.map(e => e.edit)),
|
|
304
|
+
uri: group[0].uri
|
|
297
305
|
});
|
|
298
306
|
}
|
|
299
307
|
else {
|
|
300
308
|
message.push({
|
|
301
309
|
kind: 'notebookEdit',
|
|
302
|
-
edits:
|
|
310
|
+
edits: group,
|
|
303
311
|
uri: item.uri
|
|
304
312
|
});
|
|
305
313
|
}
|
|
@@ -309,7 +317,7 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
309
317
|
message.push(item);
|
|
310
318
|
}
|
|
311
319
|
}
|
|
312
|
-
this.chatService.addCompleteRequest(widget.viewModel.
|
|
320
|
+
this.chatService.addCompleteRequest(widget.viewModel.sessionResource, request.message, request.variableData, request.attempt, {
|
|
313
321
|
message,
|
|
314
322
|
result: request.response.result,
|
|
315
323
|
followups: request.response.followups
|
|
@@ -341,9 +349,10 @@ QuickChat = QuickChat_1 = ( __decorate([
|
|
|
341
349
|
( __param(0, IInstantiationService)),
|
|
342
350
|
( __param(1, IContextKeyService)),
|
|
343
351
|
( __param(2, IChatService)),
|
|
344
|
-
( __param(3,
|
|
352
|
+
( __param(3, IWorkbenchLayoutService)),
|
|
345
353
|
( __param(4, IViewsService)),
|
|
346
|
-
( __param(5, IChatEntitlementService))
|
|
354
|
+
( __param(5, IChatEntitlementService)),
|
|
355
|
+
( __param(6, IMarkdownRendererService))
|
|
347
356
|
], QuickChat));
|
|
348
357
|
|
|
349
358
|
export { QuickChatService };
|
|
@@ -3,7 +3,7 @@ import { AccessibleViewProviderId, AccessibleViewType, IAccessibleViewContentPro
|
|
|
3
3
|
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
4
4
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
5
|
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
6
|
-
import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-
|
|
6
|
+
import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
7
|
export declare class ChatResponseAccessibleView implements IAccessibleViewImplementation {
|
|
8
8
|
readonly priority = 100;
|
|
9
9
|
readonly name = "panelChat";
|
|
@@ -3,11 +3,14 @@ import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/b
|
|
|
3
3
|
import { isMarkdownString, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
4
4
|
import { stripIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iconLabels';
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
7
|
import { AccessibleViewType, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
7
8
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
8
|
-
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-
|
|
9
|
+
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chat';
|
|
9
10
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
10
|
-
import {
|
|
11
|
+
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
12
|
+
import { isResponseVM } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
13
|
+
import { toolContentToA11yString } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
11
14
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
12
15
|
|
|
13
16
|
class ChatResponseAccessibleView {
|
|
@@ -72,7 +75,8 @@ class ChatResponseAccessibleProvider extends Disposable {
|
|
|
72
75
|
});
|
|
73
76
|
const toolInvocations = item.response.value.filter(item => item.kind === 'toolInvocation');
|
|
74
77
|
for (const toolInvocation of toolInvocations) {
|
|
75
|
-
|
|
78
|
+
const state = toolInvocation.state.get();
|
|
79
|
+
if (toolInvocation.confirmationMessages?.title && state.type === IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
76
80
|
const title = typeof toolInvocation.confirmationMessages.title === 'string' ? toolInvocation.confirmationMessages.title : toolInvocation.confirmationMessages.title.value;
|
|
77
81
|
const message = typeof toolInvocation.confirmationMessages.message === 'string' ? toolInvocation.confirmationMessages.message : stripIcons(renderAsPlaintext(toolInvocation.confirmationMessages.message));
|
|
78
82
|
let input = '';
|
|
@@ -97,9 +101,15 @@ class ChatResponseAccessibleProvider extends Disposable {
|
|
|
97
101
|
}
|
|
98
102
|
responseContent += `\n${message}\n`;
|
|
99
103
|
}
|
|
100
|
-
else if (
|
|
101
|
-
responseContent +=
|
|
102
|
-
|
|
104
|
+
else if (state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
105
|
+
responseContent += ( localize(5365, "Approve results of {0}? Result: ", toolInvocation.toolId)) + toolContentToA11yString(state.contentForModel) + '\n';
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const resultDetails = IChatToolInvocation.resultDetails(toolInvocation);
|
|
109
|
+
if (resultDetails && 'input' in resultDetails) {
|
|
110
|
+
responseContent += '\n' + (resultDetails.isError ? 'Errored ' : 'Completed ');
|
|
111
|
+
responseContent += `${`${typeof toolInvocation.invocationMessage === 'string' ? toolInvocation.invocationMessage : stripIcons(renderAsPlaintext(toolInvocation.invocationMessage))} with input: ${resultDetails.input}`}\n`;
|
|
112
|
+
}
|
|
103
113
|
}
|
|
104
114
|
}
|
|
105
115
|
const pastConfirmations = item.response.value.filter(item => item.kind === 'toolInvocationSerialized');
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { GroupModelChangeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
3
3
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
4
|
-
import { ChatEditorInput } from "@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput";
|
|
5
|
-
import { IChatSessionItem, IChatSessionItemProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
6
4
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
5
|
+
import { IChatSessionItem, IChatSessionItemProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
6
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
7
|
+
import { ChatEditorInput } from "@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput";
|
|
7
8
|
export declare class ChatSessionTracker extends Disposable {
|
|
8
9
|
private readonly editorGroupsService;
|
|
9
10
|
private readonly chatService;
|
|
11
|
+
private readonly chatSessionsService;
|
|
10
12
|
private readonly _onDidChangeEditors;
|
|
13
|
+
private readonly groupDisposables;
|
|
11
14
|
readonly onDidChangeEditors: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<{
|
|
12
15
|
sessionType: string;
|
|
13
16
|
kind: GroupModelChangeKind;
|
|
14
17
|
}>;
|
|
15
|
-
constructor(editorGroupsService: IEditorGroupsService, chatService: IChatService);
|
|
18
|
+
constructor(editorGroupsService: IEditorGroupsService, chatService: IChatService, chatSessionsService: IChatSessionsService);
|
|
16
19
|
private setupEditorTracking;
|
|
17
20
|
private registerGroupListeners;
|
|
18
21
|
getLocalEditorsForSessionType(sessionType: string): ChatEditorInput[];
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
6
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
7
|
-
import { isChatSession, getChatSessionType } from './common.js';
|
|
8
|
-
import { ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
9
6
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { localChatSessionType, ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
8
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
9
|
+
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
10
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
11
|
+
import { isChatSession } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/common';
|
|
12
12
|
|
|
13
13
|
let ChatSessionTracker = class ChatSessionTracker extends Disposable {
|
|
14
|
-
constructor(editorGroupsService, chatService) {
|
|
14
|
+
constructor(editorGroupsService, chatService, chatSessionsService) {
|
|
15
15
|
super();
|
|
16
16
|
this.editorGroupsService = editorGroupsService;
|
|
17
17
|
this.chatService = chatService;
|
|
18
|
+
this.chatSessionsService = chatSessionsService;
|
|
18
19
|
this._onDidChangeEditors = this._register(( new Emitter()));
|
|
20
|
+
this.groupDisposables = this._register(( new DisposableMap()));
|
|
19
21
|
this.onDidChangeEditors = this._onDidChangeEditors.event;
|
|
20
22
|
this.setupEditorTracking();
|
|
21
23
|
}
|
|
@@ -26,14 +28,18 @@ let ChatSessionTracker = class ChatSessionTracker extends Disposable {
|
|
|
26
28
|
this._register(this.editorGroupsService.onDidAddGroup(group => {
|
|
27
29
|
this.registerGroupListeners(group);
|
|
28
30
|
}));
|
|
31
|
+
this._register(this.editorGroupsService.onDidRemoveGroup(group => {
|
|
32
|
+
this.groupDisposables.deleteAndDispose(group.id);
|
|
33
|
+
}));
|
|
29
34
|
}
|
|
30
35
|
registerGroupListeners(group) {
|
|
31
|
-
this.
|
|
32
|
-
if (!isChatSession(e.editor)) {
|
|
36
|
+
this.groupDisposables.set(group.id, group.onDidModelChange(e => {
|
|
37
|
+
if (!isChatSession(this.chatSessionsService.getContentProviderSchemes(), e.editor)) {
|
|
33
38
|
return;
|
|
34
39
|
}
|
|
35
40
|
const editor = e.editor;
|
|
36
|
-
const sessionType =
|
|
41
|
+
const sessionType = editor.getSessionType();
|
|
42
|
+
this.chatSessionsService.notifySessionItemsChanged(sessionType);
|
|
37
43
|
this._onDidChangeEditors.fire({ sessionType, kind: e.kind });
|
|
38
44
|
}));
|
|
39
45
|
}
|
|
@@ -41,7 +47,7 @@ let ChatSessionTracker = class ChatSessionTracker extends Disposable {
|
|
|
41
47
|
const localEditors = [];
|
|
42
48
|
this.editorGroupsService.groups.forEach(group => {
|
|
43
49
|
group.editors.forEach(editor => {
|
|
44
|
-
if (editor instanceof ChatEditorInput &&
|
|
50
|
+
if (editor instanceof ChatEditorInput && editor.getSessionType() === sessionType) {
|
|
45
51
|
localEditors.push(editor);
|
|
46
52
|
}
|
|
47
53
|
});
|
|
@@ -49,7 +55,7 @@ let ChatSessionTracker = class ChatSessionTracker extends Disposable {
|
|
|
49
55
|
return localEditors;
|
|
50
56
|
}
|
|
51
57
|
async getHybridSessionsForProvider(provider) {
|
|
52
|
-
if (provider.chatSessionType ===
|
|
58
|
+
if (provider.chatSessionType === localChatSessionType) {
|
|
53
59
|
return [];
|
|
54
60
|
}
|
|
55
61
|
const localEditors = this.getLocalEditorsForSessionType(provider.chatSessionType);
|
|
@@ -62,24 +68,25 @@ let ChatSessionTracker = class ChatSessionTracker extends Disposable {
|
|
|
62
68
|
if (editor.options.ignoreInView) {
|
|
63
69
|
return;
|
|
64
70
|
}
|
|
65
|
-
let status;
|
|
71
|
+
let status = ChatSessionStatus.Completed;
|
|
66
72
|
let timestamp;
|
|
67
|
-
if (editor.
|
|
68
|
-
const model = this.chatService.getSession(editor.
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
if (editor.sessionResource) {
|
|
74
|
+
const model = this.chatService.getSession(editor.sessionResource);
|
|
75
|
+
const modelStatus = model ? this.modelToStatus(model) : undefined;
|
|
76
|
+
if (model && modelStatus) {
|
|
77
|
+
status = modelStatus;
|
|
71
78
|
const requests = model.getRequests();
|
|
72
79
|
if (requests.length > 0) {
|
|
73
80
|
timestamp = requests[requests.length - 1].timestamp;
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
83
|
}
|
|
77
|
-
const parsed =
|
|
84
|
+
const parsed = LocalChatSessionUri.parse(editor.resource);
|
|
78
85
|
const hybridSession = {
|
|
79
86
|
id: parsed?.sessionId || editor.sessionId || `${provider.chatSessionType}-local-${index}`,
|
|
87
|
+
resource: editor.resource,
|
|
80
88
|
label: editor.getName(),
|
|
81
|
-
|
|
82
|
-
status,
|
|
89
|
+
status: status,
|
|
83
90
|
provider,
|
|
84
91
|
timing: {
|
|
85
92
|
startTime: timestamp ?? Date.now()
|
|
@@ -121,7 +128,8 @@ let ChatSessionTracker = class ChatSessionTracker extends Disposable {
|
|
|
121
128
|
};
|
|
122
129
|
ChatSessionTracker = ( __decorate([
|
|
123
130
|
( __param(0, IEditorGroupsService)),
|
|
124
|
-
( __param(1, IChatService))
|
|
131
|
+
( __param(1, IChatService)),
|
|
132
|
+
( __param(2, IChatSessionsService))
|
|
125
133
|
], ChatSessionTracker));
|
|
126
134
|
|
|
127
135
|
export { ChatSessionTracker };
|