@codingame/monaco-vscode-chat-service-override 24.3.0 → 25.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 +35 -35
- package/package.json +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityService.d.ts → accessibility/chatAccessibilityService.d.ts} +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityService.js → accessibility/chatAccessibilityService.js} +23 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatResponseAccessibleView.d.ts → accessibility/chatResponseAccessibleView.d.ts} +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatResponseAccessibleView.js → accessibility/chatResponseAccessibleView.js} +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatTerminalOutputAccessibleView.js → accessibility/chatTerminalOutputAccessibleView.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +69 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +24 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +48 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +16 -19
- 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/chatToolActions.js +35 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +22 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +31 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +61 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +482 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +84 -93
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +137 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +92 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +81 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +335 -102
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +47 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +80 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentResolveService.d.ts → attachments/chatAttachmentResolveService.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentResolveService.js → attachments/chatAttachmentResolveService.js} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatVariables.d.ts → attachments/chatVariables.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatVariables.js → attachments/chatVariables.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditing → attachments}/simpleBrowserEditorOverlay.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -206
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +20 -20
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +41 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +35 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSessions.contribution.d.ts → chatSessions/chatSessions.contribution.d.ts} +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSessions.contribution.js → chatSessions/chatSessions.contribution.js} +53 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +18 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +64 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +90 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContextService.d.ts → contextContrib/chatContextService.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContextService.js → contextContrib/chatContextService.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsConfirmationService.d.ts → tools/languageModelToolsConfirmationService.d.ts} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsConfirmationService.js → tools/languageModelToolsConfirmationService.js} +47 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsService.d.ts → tools/languageModelToolsService.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsService.js → tools/languageModelToolsService.js} +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownAnchorService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatLayoutService.d.ts → widget/chatLayoutService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidgetService.d.ts → widget/chatWidgetService.d.ts} +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidgetService.js → widget/chatWidgetService.js} +27 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusWidget.d.ts → widget/input/chatStatusWidget.d.ts} +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusWidget.js → widget/input/chatStatusWidget.js} +17 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorContrib.js +12 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatQuick.d.ts → widgetHosts/chatQuick.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatQuick.js → widgetHosts/chatQuick.js} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditor.d.ts → widgetHosts/editor/chatEditor.d.ts} +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditor.js → widgetHosts/editor/chatEditor.js} +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewPane.d.ts → widgetHosts/viewPane/chatViewPane.d.ts} +46 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewPane.js → widgetHosts/viewPane/chatViewPane.js} +258 -154
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewTitleControl.d.ts → widgetHosts/viewPane/chatViewTitleControl.d.ts} +5 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewTitleControl.js → widgetHosts/viewPane/chatViewTitleControl.js} +97 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +176 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +89 -0
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceImpl.d.ts → chatService/chatServiceImpl.d.ts} +16 -20
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceImpl.js → chatService/chatServiceImpl.js} +97 -151
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceTelemetry.d.ts → chatService/chatServiceTelemetry.d.ts} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceTelemetry.js → chatService/chatServiceTelemetry.js} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatCodeMapperService.d.ts → editing/chatCodeMapperService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatModelStore.d.ts → model/chatModelStore.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatProgressTypes → model/chatProgressTypes}/chatToolInvocation.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatProgressTypes → model/chatProgressTypes}/chatToolInvocation.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/{chatSessionStore.d.ts → model/chatSessionStore.d.ts} +14 -7
- package/vscode/src/vs/workbench/contrib/chat/common/{chatSessionStore.js → model/chatSessionStore.js} +164 -39
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTransferService.d.ts → model/chatTransferService.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTransferService.js → model/chatTransferService.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatSlashCommands.d.ts → participants/chatSlashCommands.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +25 -49
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +54 -54
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +83 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +11 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -10
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTodoListService.d.ts → tools/chatTodoListService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTodoListService.js → tools/chatTodoListService.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/{chatResponseResourceFileSystemProvider.d.ts → widget/chatResponseResourceFileSystemProvider.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatResponseResourceFileSystemProvider.js → widget/chatResponseResourceFileSystemProvider.js} +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +23 -23
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +1 -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 +47 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +33 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +6 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +17 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +22 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +100 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +19 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{commandLineAutoApprover.d.ts → tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts} +11 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{commandLineAutoApprover.js → tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js} +83 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +156 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +64 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +16 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.d.ts +1 -1
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +55 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +85 -46
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +9 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +0 -248
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +0 -184
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +0 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +0 -229
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +0 -495
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +0 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +0 -386
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +0 -299
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +0 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +0 -39
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatTerminalOutputAccessibleView.d.ts → accessibility/chatTerminalOutputAccessibleView.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → attachments/media}/simpleBrowserOverlay.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditing → attachments}/simpleBrowserEditorOverlay.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatEditing/media}/chatEditingEditorOverlay.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatEditing/media}/chatEditorController.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownAnchorService.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatLayoutService.js → widget/chatLayoutService.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEdinputInputContentProvider.d.ts → widget/input/editor/chatEditorInputContentProvider.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEdinputInputContentProvider.js → widget/input/editor/chatEditorInputContentProvider.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorContrib.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/editorHoverWrapper.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/editorHoverWrapper.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/media/editorHoverWrapper.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/input/media}/chatStatusWidget.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatCodeMapperService.js → editing/chatCodeMapperService.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatModelStore.js → model/chatModelStore.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatSlashCommands.js → participants/chatSlashCommands.js} +0 -0
|
@@ -10,14 +10,14 @@ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
10
10
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
11
11
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
12
12
|
import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
|
|
13
|
-
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
14
|
-
import { IChatModel, IChatRequestModel, IChatRequestVariableData, IExportableChatData, ISerializableChatData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
15
|
-
import { IParsedChatRequest } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes";
|
|
16
|
-
import { IChatCompleteResponse, IChatDetail, IChatModelReference, IChatProgress, IChatSendRequestData, IChatSendRequestOptions, IChatSessionContext, IChatSessionStartOptions,
|
|
17
|
-
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
13
|
+
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service";
|
|
14
|
+
import { IChatModel, IChatRequestModel, IChatRequestVariableData, IExportableChatData, ISerializableChatData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
15
|
+
import { IParsedChatRequest } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes";
|
|
16
|
+
import { IChatCompleteResponse, IChatDetail, IChatModelReference, IChatProgress, IChatSendRequestData, IChatSendRequestOptions, IChatSessionContext, IChatSessionStartOptions, IChatUserActionEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
17
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
18
18
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
19
|
-
import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSlashCommands.service";
|
|
20
|
-
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service";
|
|
19
|
+
import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service";
|
|
20
|
+
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service";
|
|
21
21
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
22
22
|
export declare class ChatService extends Disposable implements IChatService {
|
|
23
23
|
private readonly storageService;
|
|
@@ -34,10 +34,9 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
34
34
|
_serviceBrand: undefined;
|
|
35
35
|
private readonly _sessionModels;
|
|
36
36
|
private readonly _pendingRequests;
|
|
37
|
-
private _persistedSessions;
|
|
38
37
|
private _saveModelsEnabled;
|
|
39
|
-
private
|
|
40
|
-
get
|
|
38
|
+
private _transferredSessionResource;
|
|
39
|
+
get transferredSessionResource(): URI | undefined;
|
|
41
40
|
private readonly _onDidSubmitRequest;
|
|
42
41
|
readonly onDidSubmitRequest: Event<{
|
|
43
42
|
readonly chatSessionResource: URI;
|
|
@@ -46,7 +45,7 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
46
45
|
readonly onDidPerformUserAction: Event<IChatUserActionEvent>;
|
|
47
46
|
private readonly _onDidDisposeSession;
|
|
48
47
|
readonly onDidDisposeSession: Event<{
|
|
49
|
-
readonly sessionResource: URI;
|
|
48
|
+
readonly sessionResource: URI[];
|
|
50
49
|
reason: "cleared";
|
|
51
50
|
}>;
|
|
52
51
|
private readonly _sessionFollowupCancelTokens;
|
|
@@ -65,8 +64,9 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
65
64
|
get edits2Enabled(): boolean;
|
|
66
65
|
private get isEmptyWindow();
|
|
67
66
|
constructor(storageService: IStorageService, logService: ILogService, extensionService: IExtensionService, instantiationService: IInstantiationService, workspaceContextService: IWorkspaceContextService, chatSlashCommandService: IChatSlashCommandService, chatAgentService: IChatAgentService, configurationService: IConfigurationService, chatTransferService: IChatTransferService, chatSessionService: IChatSessionsService, mcpService: IMcpService);
|
|
68
|
-
get editingSessions(): import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService").IChatEditingSession[];
|
|
67
|
+
get editingSessions(): import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService").IChatEditingSession[];
|
|
69
68
|
isEnabled(location: ChatAgentLocation): boolean;
|
|
69
|
+
private migrateData;
|
|
70
70
|
private saveState;
|
|
71
71
|
/**
|
|
72
72
|
* Only persist local sessions from chat that are not imported.
|
|
@@ -75,14 +75,13 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
75
75
|
notifyUserAction(action: IChatUserActionEvent): void;
|
|
76
76
|
setChatSessionTitle(sessionResource: URI, title: string): Promise<void>;
|
|
77
77
|
private trace;
|
|
78
|
+
private info;
|
|
78
79
|
private error;
|
|
79
80
|
private deserializeChats;
|
|
80
|
-
private getTransferredSessionData;
|
|
81
81
|
/**
|
|
82
82
|
* todo@connor4312 This will be cleaned up with the globalization of edits.
|
|
83
83
|
*/
|
|
84
84
|
private reviveSessionsWithEdits;
|
|
85
|
-
private initializePersistedSessionsFromFileStorage;
|
|
86
85
|
/**
|
|
87
86
|
* Returns an array of chat details for all persisted chat sessions that have at least one request.
|
|
88
87
|
* Chat sessions that have already been loaded into the chat view are excluded from the result.
|
|
@@ -110,11 +109,7 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
110
109
|
getSession(sessionResource: URI): IChatModel | undefined;
|
|
111
110
|
getActiveSessionReference(sessionResource: URI): IChatModelReference | undefined;
|
|
112
111
|
getOrRestoreSession(sessionResource: URI): Promise<IChatModelReference | undefined>;
|
|
113
|
-
|
|
114
|
-
* This is really just for migrating data from the edit session location to the panel.
|
|
115
|
-
*/
|
|
116
|
-
isPersistedSessionEmpty(sessionResource: URI): boolean;
|
|
117
|
-
getPersistedSessionTitle(sessionResource: URI): string | undefined;
|
|
112
|
+
getSessionTitle(sessionResource: URI): string | undefined;
|
|
118
113
|
loadSessionFromContent(data: IExportableChatData | ISerializableChatData): IChatModelReference | undefined;
|
|
119
114
|
loadSessionForResource(chatSessionResource: URI, location: ChatAgentLocation, token: CancellationToken): Promise<IChatModelReference | undefined>;
|
|
120
115
|
getChatSessionFromInternalUri(sessionResource: URI): IChatSessionContext | undefined;
|
|
@@ -123,6 +118,7 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
123
118
|
private parseChatRequest;
|
|
124
119
|
private refreshFollowupsCancellationToken;
|
|
125
120
|
private _sendRequestAsync;
|
|
121
|
+
private generateInitialChatTitleIfNeeded;
|
|
126
122
|
private prepareContext;
|
|
127
123
|
private getHistoryEntriesFromModel;
|
|
128
124
|
removeRequest(sessionResource: URI, requestId: string): Promise<void>;
|
|
@@ -130,7 +126,7 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
130
126
|
addCompleteRequest(sessionResource: URI, message: IParsedChatRequest | string, variableData: IChatRequestVariableData | undefined, attempt: number | undefined, response: IChatCompleteResponse): Promise<void>;
|
|
131
127
|
cancelCurrentRequestForSession(sessionResource: URI): void;
|
|
132
128
|
hasSessions(): boolean;
|
|
133
|
-
transferChatSession(
|
|
129
|
+
transferChatSession(transferredSessionResource: URI, toWorkspace: URI): Promise<void>;
|
|
134
130
|
getChatStorageFolder(): URI;
|
|
135
131
|
logChatIndex(): void;
|
|
136
132
|
setTitle(sessionResource: URI, title: string): void;
|
|
@@ -11,9 +11,9 @@ import { Disposable, DisposableResourceMap, DisposableStore, MutableDisposable }
|
|
|
11
11
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
12
12
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
13
13
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
14
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
14
15
|
import { StopWatch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/stopwatch';
|
|
15
16
|
import { isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
16
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
17
17
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
18
18
|
import { OffsetRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/offsetRange';
|
|
19
19
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -21,35 +21,33 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
21
21
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
22
22
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
23
23
|
import { Progress } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
24
|
-
import { StorageScope
|
|
24
|
+
import { StorageScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
25
25
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
26
26
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
27
27
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
28
28
|
import { InlineChatConfigKeys } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
29
29
|
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
30
30
|
import { awaitStatsForSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
31
|
-
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
32
|
-
import { chatEditingSessionIsReady } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
33
|
-
import { normalizeSerializableChatData, ChatModel, ChatRequestRemovalReason, updateRanges, toChatHistoryContent, ChatRequestModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
34
|
-
import { ChatModelStore } from '
|
|
35
|
-
import { ChatRequestTextPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, chatSubcommandLeader, chatAgentLeader, ChatRequestSlashCommandPart, getPromptText } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
36
|
-
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
37
|
-
import { ResponseModelState, ChatMcpServersStarting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
31
|
+
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
|
|
32
|
+
import { chatEditingSessionIsReady } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
33
|
+
import { normalizeSerializableChatData, ChatModel, ChatRequestRemovalReason, updateRanges, toChatHistoryContent, ChatRequestModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
34
|
+
import { ChatModelStore } from '../model/chatModelStore.js';
|
|
35
|
+
import { ChatRequestTextPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, chatSubcommandLeader, chatAgentLeader, ChatRequestSlashCommandPart, getPromptText } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
36
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
|
|
37
|
+
import { ResponseModelState, ChatMcpServersStarting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
38
38
|
import { ChatServiceTelemetry, ChatRequestTelemetry } from './chatServiceTelemetry.js';
|
|
39
39
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
40
|
-
import { ChatSessionStore } from '
|
|
41
|
-
import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSlashCommands.service';
|
|
42
|
-
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service';
|
|
43
|
-
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
40
|
+
import { ChatSessionStore } from '../model/chatSessionStore.js';
|
|
41
|
+
import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service';
|
|
42
|
+
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service';
|
|
43
|
+
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
44
44
|
import { ChatConfiguration, ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
45
45
|
import { ChatMessageRole } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
46
|
-
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
46
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
47
47
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
48
48
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
49
49
|
|
|
50
50
|
const serializedChatKey = 'interactive.sessions';
|
|
51
|
-
const TransferredGlobalChatKey = 'chat.workspaceTransfer';
|
|
52
|
-
const SESSION_TRANSFER_EXPIRATION_IN_MILLISECONDS = 1000 * 60;
|
|
53
51
|
let CancellableRequest = class CancellableRequest {
|
|
54
52
|
constructor(cancellationTokenSource, requestId, toolsService) {
|
|
55
53
|
this.cancellationTokenSource = cancellationTokenSource;
|
|
@@ -70,8 +68,8 @@ CancellableRequest = ( __decorate([
|
|
|
70
68
|
( __param(2, ILanguageModelToolsService))
|
|
71
69
|
], CancellableRequest));
|
|
72
70
|
let ChatService = class ChatService extends Disposable {
|
|
73
|
-
get
|
|
74
|
-
return this.
|
|
71
|
+
get transferredSessionResource() {
|
|
72
|
+
return this._transferredSessionResource;
|
|
75
73
|
}
|
|
76
74
|
setSaveModelsEnabled(enabled) {
|
|
77
75
|
this._saveModelsEnabled = enabled;
|
|
@@ -126,36 +124,17 @@ let ChatService = class ChatService extends Disposable {
|
|
|
126
124
|
}
|
|
127
125
|
}));
|
|
128
126
|
this._register(this._sessionModels.onDidDisposeModel(model => {
|
|
129
|
-
this._onDidDisposeSession.fire({ sessionResource: model.sessionResource, reason: 'cleared' });
|
|
127
|
+
this._onDidDisposeSession.fire({ sessionResource: [model.sessionResource], reason: 'cleared' });
|
|
130
128
|
}));
|
|
131
129
|
this._chatServiceTelemetry = this.instantiationService.createInstance(ChatServiceTelemetry);
|
|
132
|
-
const sessionData = storageService.get(serializedChatKey, this.isEmptyWindow ? StorageScope.APPLICATION : StorageScope.WORKSPACE, '');
|
|
133
|
-
if (sessionData) {
|
|
134
|
-
this._persistedSessions = this.deserializeChats(sessionData);
|
|
135
|
-
const countsForLog = ( Object.keys(this._persistedSessions)).length;
|
|
136
|
-
if (countsForLog > 0) {
|
|
137
|
-
this.trace('constructor', `Restored ${countsForLog} persisted sessions`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
this._persistedSessions = {};
|
|
142
|
-
}
|
|
143
|
-
const transferredData = this.getTransferredSessionData();
|
|
144
|
-
const transferredChat = transferredData?.chat;
|
|
145
|
-
if (transferredChat) {
|
|
146
|
-
this.trace('constructor', `Transferred session ${transferredChat.sessionId}`);
|
|
147
|
-
this._persistedSessions[transferredChat.sessionId] = transferredChat;
|
|
148
|
-
this._transferredSessionData = {
|
|
149
|
-
sessionId: transferredChat.sessionId,
|
|
150
|
-
location: transferredData.location,
|
|
151
|
-
inputState: transferredData.inputState
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
130
|
this._chatSessionStore = this._register(this.instantiationService.createInstance(ChatSessionStore));
|
|
155
|
-
this._chatSessionStore.migrateDataIfNeeded(() => this.
|
|
156
|
-
this.
|
|
157
|
-
|
|
158
|
-
|
|
131
|
+
this._chatSessionStore.migrateDataIfNeeded(() => this.migrateData());
|
|
132
|
+
const transferredData = this._chatSessionStore.getTransferredSessionData();
|
|
133
|
+
if (transferredData) {
|
|
134
|
+
this.trace('constructor', `Transferred session ${transferredData}`);
|
|
135
|
+
this._transferredSessionResource = transferredData;
|
|
136
|
+
}
|
|
137
|
+
this.reviveSessionsWithEdits();
|
|
159
138
|
this._register(storageService.onWillSaveState(() => this.saveState()));
|
|
160
139
|
this.chatModels = derived(this, reader => [...( this._sessionModels.observable.read(reader).values())]);
|
|
161
140
|
this.requestInProgressObs = derived(reader => {
|
|
@@ -169,6 +148,18 @@ let ChatService = class ChatService extends Disposable {
|
|
|
169
148
|
isEnabled(location) {
|
|
170
149
|
return this.chatAgentService.getContributedDefaultAgent(location) !== undefined;
|
|
171
150
|
}
|
|
151
|
+
migrateData() {
|
|
152
|
+
const sessionData = this.storageService.get(serializedChatKey, this.isEmptyWindow ? StorageScope.APPLICATION : StorageScope.WORKSPACE, '');
|
|
153
|
+
if (sessionData) {
|
|
154
|
+
const persistedSessions = this.deserializeChats(sessionData);
|
|
155
|
+
const countsForLog = ( Object.keys(persistedSessions)).length;
|
|
156
|
+
if (countsForLog > 0) {
|
|
157
|
+
this.info('migrateData', `Restored ${countsForLog} persisted sessions`);
|
|
158
|
+
}
|
|
159
|
+
return persistedSessions;
|
|
160
|
+
}
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
172
163
|
saveState() {
|
|
173
164
|
if (!this._saveModelsEnabled) {
|
|
174
165
|
return;
|
|
@@ -215,6 +206,14 @@ let ChatService = class ChatService extends Disposable {
|
|
|
215
206
|
this.logService.trace(`ChatService#${method}`);
|
|
216
207
|
}
|
|
217
208
|
}
|
|
209
|
+
info(method, message) {
|
|
210
|
+
if (message) {
|
|
211
|
+
this.logService.info(`ChatService#${method}: ${message}`);
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.logService.info(`ChatService#${method}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
218
217
|
error(method, message) {
|
|
219
218
|
this.logService.error(`ChatService#${method} ${message}`);
|
|
220
219
|
}
|
|
@@ -248,21 +247,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
248
247
|
return {};
|
|
249
248
|
}
|
|
250
249
|
}
|
|
251
|
-
getTransferredSessionData() {
|
|
252
|
-
const data = this.storageService.getObject(TransferredGlobalChatKey, StorageScope.PROFILE, []);
|
|
253
|
-
const workspaceUri = this.workspaceContextService.getWorkspace().folders[0]?.uri;
|
|
254
|
-
if (!workspaceUri) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
const thisWorkspace = ( workspaceUri.toString());
|
|
258
|
-
const currentTime = Date.now();
|
|
259
|
-
const transferred = data.find(item => ( URI.revive(item.toWorkspace).toString()) === thisWorkspace && (currentTime - item.timestampInMilliseconds < SESSION_TRANSFER_EXPIRATION_IN_MILLISECONDS));
|
|
260
|
-
const filtered = data.filter(item => ( URI.revive(item.toWorkspace).toString()) !== thisWorkspace && (currentTime - item.timestampInMilliseconds < SESSION_TRANSFER_EXPIRATION_IN_MILLISECONDS));
|
|
261
|
-
this.storageService.store(TransferredGlobalChatKey, JSON.stringify(filtered), StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
262
|
-
return transferred;
|
|
263
|
-
}
|
|
264
250
|
async reviveSessionsWithEdits() {
|
|
265
|
-
|
|
251
|
+
const idx = await this._chatSessionStore.getIndex();
|
|
252
|
+
await Promise.all(( ( Object.values(idx)).map(async (session) => {
|
|
266
253
|
if (!session.hasPendingEdits) {
|
|
267
254
|
return;
|
|
268
255
|
}
|
|
@@ -274,28 +261,6 @@ let ChatService = class ChatService extends Disposable {
|
|
|
274
261
|
}
|
|
275
262
|
})));
|
|
276
263
|
}
|
|
277
|
-
async initializePersistedSessionsFromFileStorage() {
|
|
278
|
-
const index = await this._chatSessionStore.getIndex();
|
|
279
|
-
const sessionIds = ( Object.keys(index));
|
|
280
|
-
for (const sessionId of sessionIds) {
|
|
281
|
-
const metadata = index[sessionId];
|
|
282
|
-
if (metadata && !this._persistedSessions[sessionId]) {
|
|
283
|
-
const minimalSession = {
|
|
284
|
-
version: 3,
|
|
285
|
-
sessionId: sessionId,
|
|
286
|
-
customTitle: metadata.title,
|
|
287
|
-
creationDate: Date.now(),
|
|
288
|
-
lastMessageDate: metadata.lastMessageDate,
|
|
289
|
-
initialLocation: metadata.initialLocation,
|
|
290
|
-
requests: [],
|
|
291
|
-
responderUsername: '',
|
|
292
|
-
responderAvatarIconUri: undefined,
|
|
293
|
-
hasPendingEdits: metadata.hasPendingEdits,
|
|
294
|
-
};
|
|
295
|
-
this._persistedSessions[sessionId] = minimalSession;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
264
|
async getLocalSessionHistory() {
|
|
300
265
|
const liveSessionItems = await this.getLiveSessionItems();
|
|
301
266
|
const historySessionItems = await this.getHistorySessionItems();
|
|
@@ -305,7 +270,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
305
270
|
return await Promise.all(( Array.from(( this._sessionModels.values()))
|
|
306
271
|
.filter(session => this.shouldBeInHistory(session))
|
|
307
272
|
.map(async (session) => {
|
|
308
|
-
const title = session.title || ( localize(
|
|
273
|
+
const title = session.title || ( localize(5944, "New Chat"));
|
|
309
274
|
return {
|
|
310
275
|
sessionResource: session.sessionResource,
|
|
311
276
|
title,
|
|
@@ -352,6 +317,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
352
317
|
}
|
|
353
318
|
async removeHistoryEntry(sessionResource) {
|
|
354
319
|
await this._chatSessionStore.deleteSession(this.toLocalSessionId(sessionResource));
|
|
320
|
+
this._onDidDisposeSession.fire({ sessionResource: [sessionResource], reason: 'cleared' });
|
|
355
321
|
}
|
|
356
322
|
async clearAllHistoryEntries() {
|
|
357
323
|
await this._chatSessionStore.clearAllSessions();
|
|
@@ -417,8 +383,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
417
383
|
throw ( new Error(`Cannot restore non-local session ${sessionResource}`));
|
|
418
384
|
}
|
|
419
385
|
let sessionData;
|
|
420
|
-
if (this.
|
|
421
|
-
|
|
386
|
+
if (isEqual(this.transferredSessionResource, sessionResource)) {
|
|
387
|
+
this._transferredSessionResource = undefined;
|
|
388
|
+
sessionData = revive(await this._chatSessionStore.readTransferredSession(sessionResource));
|
|
422
389
|
}
|
|
423
390
|
else {
|
|
424
391
|
sessionData = revive(await this._chatSessionStore.readSession(sessionId));
|
|
@@ -433,45 +400,18 @@ let ChatService = class ChatService extends Disposable {
|
|
|
433
400
|
sessionId,
|
|
434
401
|
canUseTools: true,
|
|
435
402
|
});
|
|
436
|
-
const isTransferred = this.transferredSessionData?.sessionId === sessionId;
|
|
437
|
-
if (isTransferred) {
|
|
438
|
-
this._transferredSessionData = undefined;
|
|
439
|
-
}
|
|
440
403
|
return sessionRef;
|
|
441
404
|
}
|
|
442
|
-
|
|
443
|
-
const sessionId = LocalChatSessionUri.parseLocalSessionId(sessionResource);
|
|
444
|
-
if (!sessionId) {
|
|
445
|
-
throw ( new Error(`Cannot restore non-local session ${sessionResource}`));
|
|
446
|
-
}
|
|
447
|
-
const session = this._persistedSessions[sessionId];
|
|
448
|
-
if (session) {
|
|
449
|
-
return session.requests.length === 0;
|
|
450
|
-
}
|
|
451
|
-
return this._chatSessionStore.isSessionEmpty(sessionId);
|
|
452
|
-
}
|
|
453
|
-
getPersistedSessionTitle(sessionResource) {
|
|
405
|
+
getSessionTitle(sessionResource) {
|
|
454
406
|
const sessionId = LocalChatSessionUri.parseLocalSessionId(sessionResource);
|
|
455
407
|
if (!sessionId) {
|
|
456
408
|
return undefined;
|
|
457
409
|
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
const title = session.customTitle || ChatModel.getDefaultTitle(session.requests);
|
|
461
|
-
return title;
|
|
462
|
-
}
|
|
463
|
-
const internalGetIndex = this._chatSessionStore.internalGetIndex;
|
|
464
|
-
if (typeof internalGetIndex === 'function') {
|
|
465
|
-
const indexData = internalGetIndex.call(this._chatSessionStore);
|
|
466
|
-
const metadata = indexData.entries[sessionId];
|
|
467
|
-
if (metadata && metadata.title) {
|
|
468
|
-
return metadata.title;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
return undefined;
|
|
410
|
+
return this._sessionModels.get(sessionResource)?.title ??
|
|
411
|
+
this._chatSessionStore.getMetadataForSessionSync(sessionResource)?.title;
|
|
472
412
|
}
|
|
473
413
|
loadSessionFromContent(data) {
|
|
474
|
-
const sessionId =
|
|
414
|
+
const sessionId = data.sessionId ?? generateUuid();
|
|
475
415
|
const sessionResource = LocalChatSessionUri.forSession(sessionId);
|
|
476
416
|
return this._sessionModels.acquireOrCreate({
|
|
477
417
|
initialData: data,
|
|
@@ -514,7 +454,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
514
454
|
for (const message of providedSession.history) {
|
|
515
455
|
if (message.type === 'request') {
|
|
516
456
|
if (lastRequest) {
|
|
517
|
-
lastRequest.response?.
|
|
457
|
+
lastRequest.response?.complete();
|
|
518
458
|
}
|
|
519
459
|
const requestText = message.prompt;
|
|
520
460
|
const parsedRequest = {
|
|
@@ -541,7 +481,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
541
481
|
}
|
|
542
482
|
}
|
|
543
483
|
if (providedSession.isCompleteObs?.get()) {
|
|
544
|
-
lastRequest?.response?.
|
|
484
|
+
lastRequest?.response?.complete();
|
|
545
485
|
}
|
|
546
486
|
if (providedSession.progressObs && lastRequest && providedSession.interruptActiveResponseCallback) {
|
|
547
487
|
const initialCancellationRequest = this.instantiationService.createInstance(CancellableRequest, ( new CancellationTokenSource()), undefined);
|
|
@@ -571,7 +511,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
571
511
|
lastProgressLength = progressArray.length;
|
|
572
512
|
}
|
|
573
513
|
if (isComplete) {
|
|
574
|
-
lastRequest.response?.
|
|
514
|
+
lastRequest.response?.complete();
|
|
575
515
|
cancellationListener.clear();
|
|
576
516
|
}
|
|
577
517
|
}));
|
|
@@ -579,7 +519,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
579
519
|
else {
|
|
580
520
|
if (lastRequest && model.editingSession) {
|
|
581
521
|
await chatEditingSessionIsReady(model.editingSession);
|
|
582
|
-
lastRequest.response?.
|
|
522
|
+
lastRequest.response?.complete();
|
|
583
523
|
}
|
|
584
524
|
}
|
|
585
525
|
return modelRef;
|
|
@@ -676,9 +616,9 @@ let ChatService = class ChatService extends Disposable {
|
|
|
676
616
|
_sendRequestAsync(model, sessionResource, parsedRequest, attempt, enableCommandDetection, defaultAgent, location, options) {
|
|
677
617
|
const followupsCancelToken = this.refreshFollowupsCancellationToken(sessionResource);
|
|
678
618
|
let request;
|
|
679
|
-
const agentPart =
|
|
680
|
-
const agentSlashCommandPart =
|
|
681
|
-
const commandPart =
|
|
619
|
+
const agentPart = parsedRequest.parts.find((r) => r instanceof ChatRequestAgentPart);
|
|
620
|
+
const agentSlashCommandPart = parsedRequest.parts.find((r) => r instanceof ChatRequestAgentSubcommandPart);
|
|
621
|
+
const commandPart = parsedRequest.parts.find((r) => r instanceof ChatRequestSlashCommandPart);
|
|
682
622
|
const requests = [...model.getRequests()];
|
|
683
623
|
const requestTelemetry = this.instantiationService.createInstance(ChatRequestTelemetry, {
|
|
684
624
|
agent: agentPart?.agent ?? defaultAgent,
|
|
@@ -742,7 +682,6 @@ let ChatService = class ChatService extends Disposable {
|
|
|
742
682
|
try {
|
|
743
683
|
let rawResult;
|
|
744
684
|
let agentOrCommandFollowups = undefined;
|
|
745
|
-
let chatTitlePromise;
|
|
746
685
|
if (agentPart || (defaultAgent && !commandPart)) {
|
|
747
686
|
const prepareChatAgentRequest = (agent, command, enableCommandDetection, chatRequest, isParticipantDetected) => {
|
|
748
687
|
const initVariableData = { variables: [] };
|
|
@@ -817,6 +756,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
817
756
|
await this.extensionService.activateByEvent(`onChatParticipant:${agent.id}`);
|
|
818
757
|
const history = this.getHistoryEntriesFromModel(requests, location, agent.id);
|
|
819
758
|
const requestProps = prepareChatAgentRequest(agent, command, enableCommandDetection, request , !!detectedAgent);
|
|
759
|
+
this.generateInitialChatTitleIfNeeded(model, requestProps, defaultAgent, token);
|
|
820
760
|
const pendingRequest = this._pendingRequests.get(sessionResource);
|
|
821
761
|
if (pendingRequest && !pendingRequest.requestId) {
|
|
822
762
|
pendingRequest.requestId = requestProps.requestId;
|
|
@@ -832,18 +772,6 @@ let ChatService = class ChatService extends Disposable {
|
|
|
832
772
|
const agentResult = await this.chatAgentService.invokeAgent(agent.id, requestProps, progressCallback, history, token);
|
|
833
773
|
rawResult = agentResult;
|
|
834
774
|
agentOrCommandFollowups = this.chatAgentService.getFollowups(agent.id, requestProps, agentResult, history, followupsCancelToken);
|
|
835
|
-
if (model.getRequests().length === 1 && !model.customTitle) {
|
|
836
|
-
const chatHistory = this.getHistoryEntriesFromModel(model.getRequests(), location, agent.id);
|
|
837
|
-
chatTitlePromise = this.chatAgentService.getChatTitle(agent.id, chatHistory, CancellationToken.None).then((title) => {
|
|
838
|
-
if (title === undefined) {
|
|
839
|
-
const defaultAgentForTitle = this.chatAgentService.getDefaultAgent(location);
|
|
840
|
-
if (defaultAgentForTitle) {
|
|
841
|
-
return this.chatAgentService.getChatTitle(defaultAgentForTitle.id, chatHistory, CancellationToken.None);
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
return title;
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
775
|
}
|
|
848
776
|
else if (commandPart && this.chatSlashCommandService.hasCommand(commandPart.slashCommand.command)) {
|
|
849
777
|
if (commandPart.slashCommand.silent !== true) {
|
|
@@ -874,7 +802,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
874
802
|
else {
|
|
875
803
|
if (!rawResult) {
|
|
876
804
|
this.trace('sendRequest', `Provider returned no response for session ${model.sessionResource}`);
|
|
877
|
-
rawResult = { errorDetails: { message: ( localize(
|
|
805
|
+
rawResult = { errorDetails: { message: ( localize(5945, "Provider returned null response")) } };
|
|
878
806
|
}
|
|
879
807
|
const result = rawResult.errorDetails?.responseIsFiltered ? 'filtered' :
|
|
880
808
|
rawResult.errorDetails && gotProgress ? 'errorWithOutput' :
|
|
@@ -899,11 +827,6 @@ let ChatService = class ChatService extends Disposable {
|
|
|
899
827
|
this._chatServiceTelemetry.retrievedFollowups(agentPart?.agent.id ?? '', commandForTelemetry, followups?.length ?? 0);
|
|
900
828
|
});
|
|
901
829
|
}
|
|
902
|
-
chatTitlePromise?.then(title => {
|
|
903
|
-
if (title) {
|
|
904
|
-
model.setCustomTitle(title);
|
|
905
|
-
}
|
|
906
|
-
});
|
|
907
830
|
}
|
|
908
831
|
}
|
|
909
832
|
catch (err) {
|
|
@@ -938,6 +861,23 @@ let ChatService = class ChatService extends Disposable {
|
|
|
938
861
|
responseCompletePromise: rawResponsePromise,
|
|
939
862
|
};
|
|
940
863
|
}
|
|
864
|
+
generateInitialChatTitleIfNeeded(model, request, defaultAgent, token) {
|
|
865
|
+
if (model.getRequests().length !== 1 || model.customTitle) {
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
const singleEntryHistory = [{
|
|
869
|
+
request,
|
|
870
|
+
response: [],
|
|
871
|
+
result: {}
|
|
872
|
+
}];
|
|
873
|
+
const generate = async () => {
|
|
874
|
+
const title = await this.chatAgentService.getChatTitle(defaultAgent.id, singleEntryHistory, token);
|
|
875
|
+
if (title && !model.customTitle) {
|
|
876
|
+
model.setCustomTitle(title);
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
void generate();
|
|
880
|
+
}
|
|
941
881
|
prepareContext(attachedContextVariables) {
|
|
942
882
|
attachedContextVariables ??= [];
|
|
943
883
|
attachedContextVariables.sort((a, b) => {
|
|
@@ -1044,22 +984,28 @@ let ChatService = class ChatService extends Disposable {
|
|
|
1044
984
|
hasSessions() {
|
|
1045
985
|
return this._chatSessionStore.hasSessions();
|
|
1046
986
|
}
|
|
1047
|
-
transferChatSession(
|
|
1048
|
-
|
|
987
|
+
async transferChatSession(transferredSessionResource, toWorkspace) {
|
|
988
|
+
if (!LocalChatSessionUri.isLocalSession(transferredSessionResource)) {
|
|
989
|
+
throw ( new Error(
|
|
990
|
+
`Can only transfer local chat sessions. Invalid session: ${transferredSessionResource}`
|
|
991
|
+
));
|
|
992
|
+
}
|
|
993
|
+
const model = this._sessionModels.get(transferredSessionResource);
|
|
1049
994
|
if (!model) {
|
|
1050
995
|
throw ( new Error(
|
|
1051
|
-
`Failed to transfer session. Unknown session
|
|
996
|
+
`Failed to transfer session. Unknown session: ${transferredSessionResource}`
|
|
1052
997
|
));
|
|
1053
998
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
999
|
+
if (model.initialLocation !== ChatAgentLocation.Chat) {
|
|
1000
|
+
throw ( new Error(
|
|
1001
|
+
`Can only transfer chat sessions located in the Chat view. Session ${transferredSessionResource} has location=${model.initialLocation}`
|
|
1002
|
+
));
|
|
1003
|
+
}
|
|
1004
|
+
await this._chatSessionStore.storeTransferSession({
|
|
1005
|
+
sessionResource: model.sessionResource,
|
|
1057
1006
|
timestampInMilliseconds: Date.now(),
|
|
1058
1007
|
toWorkspace: toWorkspace,
|
|
1059
|
-
|
|
1060
|
-
location: transferredSessionData.location,
|
|
1061
|
-
});
|
|
1062
|
-
this.storageService.store(TransferredGlobalChatKey, JSON.stringify(existingRaw), StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
1008
|
+
}, model);
|
|
1063
1009
|
this.chatTransferService.addWorkspaceToTransferred(toWorkspace);
|
|
1064
1010
|
this.trace('transferChatSession', `Transferred session ${model.sessionResource} to workspace ${( toWorkspace.toString())}`);
|
|
1065
1011
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
2
|
-
import { IChatAgentData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
3
|
-
import { ChatRequestModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
4
|
-
import { ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes";
|
|
5
|
-
import { IChatSendRequestOptions, IChatUserActionEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
2
|
+
import { IChatAgentData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents";
|
|
3
|
+
import { ChatRequestModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
4
|
+
import { ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes";
|
|
5
|
+
import { IChatSendRequestOptions, IChatUserActionEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
6
6
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
7
7
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
8
8
|
export type ChatProviderInvokedEvent = {
|
|
@@ -3,8 +3,8 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
4
|
import { isLocation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
|
|
5
5
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
6
|
-
import { ChatAgentVoteDirection, ChatCopyKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
7
|
-
import { isImageVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries';
|
|
6
|
+
import { ChatAgentVoteDirection, ChatCopyKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
7
|
+
import { isImageVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
8
8
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
9
9
|
|
|
10
10
|
let ChatServiceTelemetry = class ChatServiceTelemetry {
|
|
@@ -3,7 +3,7 @@ import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
5
5
|
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
6
|
-
import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service";
|
|
6
|
+
import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatCodeMapperService.service";
|
|
7
7
|
export interface ICodeMapperResponse {
|
|
8
8
|
textEdit: (resource: URI, textEdit: TextEdit[]) => void;
|
|
9
9
|
notebookEdit: (resource: URI, edit: ICellEditOperation[]) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IDisposable, IReference, ReferenceCollection } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
-
import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
5
|
-
import { ChatModel, IExportableChatData, ISerializableChatData, ISerializableChatModelInputState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
4
|
+
import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
5
|
+
import { ChatModel, IExportableChatData, ISerializableChatData, ISerializableChatModelInputState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
6
6
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
7
7
|
export interface IStartSessionProps {
|
|
8
8
|
readonly initialData?: IExportableChatData | ISerializableChatData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
2
2
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
|
-
import { IChatExtensionsContent, IChatTodoListContent, IChatToolInputInvocationData, IChatToolInvocation, IChatToolInvocationSerialized, type IChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
4
|
-
import { IPreparedToolInvocation, IToolConfirmationMessages, IToolData, IToolProgressStep, IToolResult, ToolDataSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService";
|
|
3
|
+
import { IChatExtensionsContent, IChatTodoListContent, IChatToolInputInvocationData, IChatToolInvocation, IChatToolInvocationSerialized, type IChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
4
|
+
import { IPreparedToolInvocation, IToolConfirmationMessages, IToolData, IToolProgressStep, IToolResult, ToolDataSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
5
5
|
export declare class ChatToolInvocation implements IChatToolInvocation {
|
|
6
6
|
readonly toolCallId: string;
|
|
7
7
|
readonly kind: "toolInvocation";
|