@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
|
@@ -5,51 +5,42 @@ import * as agentsessionsviewer from './media/agentsessionsviewer.css';
|
|
|
5
5
|
import { h } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
7
|
import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
-
import { hasValidDiff, getAgentChangesSummary, isAgentSessionsModel, isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
8
|
+
import { hasValidDiff, getAgentChangesSummary, isAgentSessionSection, isAgentSessionsModel, AgentSessionSection, isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
9
9
|
import { IconLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabel';
|
|
10
10
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
11
11
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
12
12
|
import { getDurationString, fromNow } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
|
|
13
13
|
import { createMatches } from '@codingame/monaco-vscode-api/vscode/vs/base/common/filters';
|
|
14
14
|
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
15
|
-
import { allowedChatMarkdownHtmlTags } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer';
|
|
15
|
+
import { allowedChatMarkdownHtmlTags } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer';
|
|
16
16
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
17
17
|
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
18
18
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
19
19
|
import { fillEditorsDragData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/dnd';
|
|
20
|
-
import { ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
21
|
-
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
22
20
|
import { HoverStyle } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover';
|
|
23
|
-
import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
24
|
-
import { Position } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
25
|
-
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
26
|
-
import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
27
|
-
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
28
21
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
29
|
-
import { AGENT_SESSIONS_VIEW_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
30
22
|
import { IntervalTimer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
31
23
|
import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
32
24
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
33
25
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
34
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
26
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
35
27
|
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
36
28
|
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
37
29
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
30
|
+
import { isSessionInProgressStatus, ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
38
31
|
|
|
39
|
-
var AgentSessionRenderer_1;
|
|
32
|
+
var AgentSessionRenderer_1, AgentSessionSectionRenderer_1;
|
|
40
33
|
registerCss(agentsessionsviewer);
|
|
41
34
|
let AgentSessionRenderer = class AgentSessionRenderer {
|
|
42
35
|
static { AgentSessionRenderer_1 = this; }
|
|
43
36
|
static { this.TEMPLATE_ID = 'agent-session'; }
|
|
44
|
-
constructor(markdownRendererService, productService,
|
|
37
|
+
constructor(options, markdownRendererService, productService, hoverService, instantiationService, contextKeyService) {
|
|
38
|
+
this.options = options;
|
|
45
39
|
this.markdownRendererService = markdownRendererService;
|
|
46
40
|
this.productService = productService;
|
|
47
|
-
this.layoutService = layoutService;
|
|
48
|
-
this.viewDescriptorService = viewDescriptorService;
|
|
49
41
|
this.hoverService = hoverService;
|
|
50
42
|
this.instantiationService = instantiationService;
|
|
51
43
|
this.contextKeyService = contextKeyService;
|
|
52
|
-
this.chatSessionsService = chatSessionsService;
|
|
53
44
|
this.templateId = AgentSessionRenderer_1.TEMPLATE_ID;
|
|
54
45
|
}
|
|
55
46
|
renderTemplate(container) {
|
|
@@ -70,6 +61,7 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
70
61
|
h('span.agent-session-diff-added@addedSpan'),
|
|
71
62
|
h('span.agent-session-diff-removed@removedSpan')
|
|
72
63
|
]),
|
|
64
|
+
h('div.agent-session-badge@badge'),
|
|
73
65
|
h('div.agent-session-description@description'),
|
|
74
66
|
h('div.agent-session-status@status')
|
|
75
67
|
])
|
|
@@ -90,6 +82,7 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
90
82
|
diffFilesSpan: elements.filesSpan,
|
|
91
83
|
diffAddedSpan: elements.addedSpan,
|
|
92
84
|
diffRemovedSpan: elements.removedSpan,
|
|
85
|
+
badge: elements.badge,
|
|
93
86
|
description: elements.description,
|
|
94
87
|
status: elements.status,
|
|
95
88
|
contextKeyService,
|
|
@@ -102,6 +95,7 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
102
95
|
template.diffFilesSpan.textContent = '';
|
|
103
96
|
template.diffAddedSpan.textContent = '';
|
|
104
97
|
template.diffRemovedSpan.textContent = '';
|
|
98
|
+
template.badge.textContent = '';
|
|
105
99
|
template.description.textContent = '';
|
|
106
100
|
template.element.classList.toggle('archived', session.element.isArchived());
|
|
107
101
|
template.icon.className = `agent-session-icon ${ThemeIcon.asClassName(this.getIcon(session.element))}`;
|
|
@@ -109,27 +103,57 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
109
103
|
template.title.setLabel(renderAsPlaintext(markdownTitle), undefined, { matches: createMatches(session.filterData) });
|
|
110
104
|
ChatContextKeys.isArchivedAgentSession.bindTo(template.contextKeyService).set(session.element.isArchived());
|
|
111
105
|
ChatContextKeys.isReadAgentSession.bindTo(template.contextKeyService).set(session.element.isRead());
|
|
106
|
+
ChatContextKeys.agentSessionType.bindTo(template.contextKeyService).set(session.element.providerType);
|
|
112
107
|
template.titleToolbar.context = session.element;
|
|
108
|
+
let hasDiff = false;
|
|
113
109
|
const { changes: diff } = session.element;
|
|
114
|
-
if (!
|
|
110
|
+
if (!isSessionInProgressStatus(session.element.status) && diff && hasValidDiff(diff)) {
|
|
115
111
|
if (this.renderDiff(session, template)) {
|
|
116
|
-
|
|
112
|
+
hasDiff = true;
|
|
117
113
|
}
|
|
118
114
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
template.diffContainer.classList.toggle('has-diff', hasDiff);
|
|
116
|
+
let hasBadge = false;
|
|
117
|
+
if (!isSessionInProgressStatus(session.element.status)) {
|
|
118
|
+
hasBadge = this.renderBadge(session, template);
|
|
119
|
+
}
|
|
120
|
+
template.badge.classList.toggle('has-badge', hasBadge);
|
|
121
|
+
if (!hasDiff) {
|
|
122
|
+
this.renderDescription(session, template, hasBadge);
|
|
122
123
|
}
|
|
123
124
|
this.renderStatus(session, template);
|
|
124
125
|
this.renderHover(session, template);
|
|
125
126
|
}
|
|
127
|
+
renderBadge(session, template) {
|
|
128
|
+
const badge = session.element.badge;
|
|
129
|
+
if (badge) {
|
|
130
|
+
this.renderMarkdownOrText(badge, template.badge, template.elementDisposable);
|
|
131
|
+
}
|
|
132
|
+
return !!badge;
|
|
133
|
+
}
|
|
134
|
+
renderMarkdownOrText(content, container, disposables) {
|
|
135
|
+
if (typeof content === 'string') {
|
|
136
|
+
container.textContent = content;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
disposables.add(this.markdownRendererService.render(content, {
|
|
140
|
+
sanitizerConfig: {
|
|
141
|
+
replaceWithPlaintext: true,
|
|
142
|
+
allowedTags: {
|
|
143
|
+
override: allowedChatMarkdownHtmlTags,
|
|
144
|
+
},
|
|
145
|
+
allowedLinkSchemes: { augment: [this.productService.urlProtocol] }
|
|
146
|
+
},
|
|
147
|
+
}, container));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
126
150
|
renderDiff(session, template) {
|
|
127
151
|
const diff = getAgentChangesSummary(session.element.changes);
|
|
128
152
|
if (!diff) {
|
|
129
153
|
return false;
|
|
130
154
|
}
|
|
131
155
|
if (diff.files > 0) {
|
|
132
|
-
template.diffFilesSpan.textContent = diff.files === 1 ? ( localize(
|
|
156
|
+
template.diffFilesSpan.textContent = diff.files === 1 ? ( localize(4909, "1 file")) : ( localize(4910, "{0} files", diff.files));
|
|
133
157
|
}
|
|
134
158
|
if (diff.insertions >= 0 ) {
|
|
135
159
|
template.diffAddedSpan.textContent = `+${diff.insertions}`;
|
|
@@ -154,55 +178,48 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
154
178
|
}
|
|
155
179
|
return Codicon.circleSmallFilled;
|
|
156
180
|
}
|
|
157
|
-
renderDescription(session, template) {
|
|
181
|
+
renderDescription(session, template, hasBadge) {
|
|
158
182
|
const description = session.element.description;
|
|
159
183
|
if (description) {
|
|
160
|
-
|
|
161
|
-
template.description.textContent = description;
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
template.elementDisposable.add(this.markdownRendererService.render(description, {
|
|
165
|
-
sanitizerConfig: {
|
|
166
|
-
replaceWithPlaintext: true,
|
|
167
|
-
allowedTags: {
|
|
168
|
-
override: allowedChatMarkdownHtmlTags,
|
|
169
|
-
},
|
|
170
|
-
allowedLinkSchemes: { augment: [this.productService.urlProtocol] }
|
|
171
|
-
},
|
|
172
|
-
}, template.description));
|
|
173
|
-
}
|
|
184
|
+
this.renderMarkdownOrText(description, template.description, template.elementDisposable);
|
|
174
185
|
}
|
|
175
186
|
else {
|
|
176
|
-
if (
|
|
177
|
-
template.description.textContent = ( localize(
|
|
187
|
+
if (session.element.status === ChatSessionStatus.InProgress) {
|
|
188
|
+
template.description.textContent = ( localize(4911, "Working..."));
|
|
189
|
+
}
|
|
190
|
+
else if (session.element.status === ChatSessionStatus.NeedsInput) {
|
|
191
|
+
template.description.textContent = ( localize(4912, "Input needed."));
|
|
192
|
+
}
|
|
193
|
+
else if (hasBadge && session.element.status === ChatSessionStatus.Completed) {
|
|
194
|
+
template.description.textContent = '';
|
|
178
195
|
}
|
|
179
196
|
else if (session.element.timing.finishedOrFailedTime &&
|
|
180
197
|
session.element.timing.inProgressTime &&
|
|
181
198
|
session.element.timing.finishedOrFailedTime > session.element.timing.inProgressTime) {
|
|
182
|
-
const duration = this.toDuration(session.element.timing.inProgressTime, session.element.timing.finishedOrFailedTime);
|
|
199
|
+
const duration = this.toDuration(session.element.timing.inProgressTime, session.element.timing.finishedOrFailedTime, false);
|
|
183
200
|
template.description.textContent = session.element.status === ChatSessionStatus.Failed ?
|
|
184
|
-
( localize(
|
|
185
|
-
( localize(
|
|
201
|
+
( localize(4913, "Failed after {0}.", duration ?? '1s')) :
|
|
202
|
+
( localize(4914, "Completed in {0}.", duration ?? '1s'));
|
|
186
203
|
}
|
|
187
204
|
else {
|
|
188
205
|
template.description.textContent = session.element.status === ChatSessionStatus.Failed ?
|
|
189
|
-
( localize(
|
|
190
|
-
( localize(
|
|
206
|
+
( localize(4915, "Failed")) :
|
|
207
|
+
( localize(4916, "Completed"));
|
|
191
208
|
}
|
|
192
209
|
}
|
|
193
210
|
}
|
|
194
|
-
toDuration(startTime, endTime) {
|
|
211
|
+
toDuration(startTime, endTime, useFullTimeWords) {
|
|
195
212
|
const elapsed = Math.round((endTime - startTime) / 1000) * 1000;
|
|
196
213
|
if (elapsed < 1000) {
|
|
197
214
|
return undefined;
|
|
198
215
|
}
|
|
199
|
-
return getDurationString(elapsed);
|
|
216
|
+
return getDurationString(elapsed, useFullTimeWords);
|
|
200
217
|
}
|
|
201
218
|
renderStatus(session, template) {
|
|
202
219
|
const getStatus = (session) => {
|
|
203
220
|
let timeLabel;
|
|
204
|
-
if (
|
|
205
|
-
timeLabel = this.toDuration(session.timing.inProgressTime, Date.now());
|
|
221
|
+
if (session.status === ChatSessionStatus.InProgress && session.timing.inProgressTime) {
|
|
222
|
+
timeLabel = this.toDuration(session.timing.inProgressTime, Date.now(), false);
|
|
206
223
|
}
|
|
207
224
|
if (!timeLabel) {
|
|
208
225
|
timeLabel = fromNow(session.timing.endTime || session.timing.startTime);
|
|
@@ -211,30 +228,67 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
211
228
|
};
|
|
212
229
|
template.status.textContent = getStatus(session.element);
|
|
213
230
|
const timer = template.elementDisposable.add(( new IntervalTimer()));
|
|
214
|
-
timer.cancelAndSet(() => template.status.textContent = getStatus(session.element),
|
|
231
|
+
timer.cancelAndSet(() => template.status.textContent = getStatus(session.element), session.element.status === ChatSessionStatus.InProgress ? 1000 : 60 * 1000 );
|
|
215
232
|
}
|
|
216
233
|
renderHover(session, template) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
234
|
+
template.elementDisposable.add(this.hoverService.setupDelayedHover(template.element, () => ({
|
|
235
|
+
content: this.buildTooltip(session.element),
|
|
236
|
+
style: HoverStyle.Pointer,
|
|
237
|
+
position: {
|
|
238
|
+
hoverPosition: this.options.getHoverPosition()
|
|
239
|
+
}
|
|
240
|
+
}), { groupId: 'agent.sessions' }));
|
|
241
|
+
}
|
|
242
|
+
buildTooltip(session) {
|
|
243
|
+
const lines = [];
|
|
244
|
+
lines.push(`**${session.label}**`);
|
|
245
|
+
if (session.tooltip) {
|
|
246
|
+
const tooltip = typeof session.tooltip === 'string' ? session.tooltip : session.tooltip.value;
|
|
247
|
+
lines.push(tooltip);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
if (session.description) {
|
|
251
|
+
const description = typeof session.description === 'string' ? session.description : session.description.value;
|
|
252
|
+
lines.push(description);
|
|
253
|
+
}
|
|
254
|
+
if (session.badge) {
|
|
255
|
+
const badge = typeof session.badge === 'string' ? session.badge : session.badge.value;
|
|
256
|
+
lines.push(badge);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const details = [];
|
|
260
|
+
details.push(toStatusLabel(session.status));
|
|
261
|
+
details.push(session.providerLabel);
|
|
262
|
+
if (session.timing.finishedOrFailedTime && session.timing.inProgressTime) {
|
|
263
|
+
const duration = this.toDuration(session.timing.inProgressTime, session.timing.finishedOrFailedTime, true);
|
|
264
|
+
if (duration) {
|
|
265
|
+
details.push(duration);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
details.push(fromNow(session.timing.startTime, true, true));
|
|
270
|
+
}
|
|
271
|
+
lines.push(details.join(' • '));
|
|
272
|
+
const diff = getAgentChangesSummary(session.changes);
|
|
273
|
+
if (diff && hasValidDiff(session.changes)) {
|
|
274
|
+
const diffParts = [];
|
|
275
|
+
if (diff.files > 0) {
|
|
276
|
+
diffParts.push(diff.files === 1 ? ( localize(4917, "1 file")) : ( localize(4918, "{0} files", diff.files)));
|
|
277
|
+
}
|
|
278
|
+
if (diff.insertions > 0) {
|
|
279
|
+
diffParts.push(`+${diff.insertions}`);
|
|
280
|
+
}
|
|
281
|
+
if (diff.deletions > 0) {
|
|
282
|
+
diffParts.push(`-${diff.deletions}`);
|
|
283
|
+
}
|
|
284
|
+
if (diffParts.length > 0) {
|
|
285
|
+
lines.push(`$(diff) ${diffParts.join(', ')}`);
|
|
286
|
+
}
|
|
237
287
|
}
|
|
288
|
+
if (session.isArchived()) {
|
|
289
|
+
lines.push(`$(archive) ${( localize(4919, "Archived"))}`);
|
|
290
|
+
}
|
|
291
|
+
return ( new MarkdownString(lines.join('\n\n'), { supportThemeIcons: true }));
|
|
238
292
|
}
|
|
239
293
|
renderCompressedElements(node, index, templateData, details) {
|
|
240
294
|
throw ( new Error('Should never happen since session is incompressible'));
|
|
@@ -247,30 +301,107 @@ let AgentSessionRenderer = class AgentSessionRenderer {
|
|
|
247
301
|
}
|
|
248
302
|
};
|
|
249
303
|
AgentSessionRenderer = AgentSessionRenderer_1 = ( __decorate([
|
|
250
|
-
( __param(
|
|
251
|
-
( __param(
|
|
252
|
-
( __param(
|
|
253
|
-
( __param(
|
|
254
|
-
( __param(
|
|
255
|
-
( __param(5, IInstantiationService)),
|
|
256
|
-
( __param(6, IContextKeyService)),
|
|
257
|
-
( __param(7, IChatSessionsService))
|
|
304
|
+
( __param(1, IMarkdownRendererService)),
|
|
305
|
+
( __param(2, IProductService)),
|
|
306
|
+
( __param(3, IHoverService)),
|
|
307
|
+
( __param(4, IInstantiationService)),
|
|
308
|
+
( __param(5, IContextKeyService))
|
|
258
309
|
], AgentSessionRenderer));
|
|
310
|
+
function toStatusLabel(status) {
|
|
311
|
+
let statusLabel;
|
|
312
|
+
switch (status) {
|
|
313
|
+
case ChatSessionStatus.NeedsInput:
|
|
314
|
+
statusLabel = ( localize(4920, "Needs Input"));
|
|
315
|
+
break;
|
|
316
|
+
case ChatSessionStatus.InProgress:
|
|
317
|
+
statusLabel = ( localize(4921, "In Progress"));
|
|
318
|
+
break;
|
|
319
|
+
case ChatSessionStatus.Failed:
|
|
320
|
+
statusLabel = ( localize(4922, "Failed"));
|
|
321
|
+
break;
|
|
322
|
+
default:
|
|
323
|
+
statusLabel = ( localize(4923, "Completed"));
|
|
324
|
+
}
|
|
325
|
+
return statusLabel;
|
|
326
|
+
}
|
|
327
|
+
let AgentSessionSectionRenderer = class AgentSessionSectionRenderer {
|
|
328
|
+
static { AgentSessionSectionRenderer_1 = this; }
|
|
329
|
+
static { this.TEMPLATE_ID = 'agent-session-section'; }
|
|
330
|
+
constructor(instantiationService, contextKeyService) {
|
|
331
|
+
this.instantiationService = instantiationService;
|
|
332
|
+
this.contextKeyService = contextKeyService;
|
|
333
|
+
this.templateId = AgentSessionSectionRenderer_1.TEMPLATE_ID;
|
|
334
|
+
}
|
|
335
|
+
renderTemplate(container) {
|
|
336
|
+
const disposables = ( new DisposableStore());
|
|
337
|
+
const elements = h('div.agent-session-section@container', [
|
|
338
|
+
h('span.agent-session-section-label@label'),
|
|
339
|
+
h('div.agent-session-section-toolbar@toolbar')
|
|
340
|
+
]);
|
|
341
|
+
const contextKeyService = disposables.add(this.contextKeyService.createScoped(elements.container));
|
|
342
|
+
const scopedInstantiationService = disposables.add(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyService]))));
|
|
343
|
+
const toolbar = disposables.add(scopedInstantiationService.createInstance(MenuWorkbenchToolBar, elements.toolbar, MenuId.AgentSessionSectionToolbar, {
|
|
344
|
+
menuOptions: { shouldForwardArgs: true },
|
|
345
|
+
}));
|
|
346
|
+
container.appendChild(elements.container);
|
|
347
|
+
return {
|
|
348
|
+
container: elements.container,
|
|
349
|
+
label: elements.label,
|
|
350
|
+
toolbar,
|
|
351
|
+
contextKeyService,
|
|
352
|
+
disposables
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
renderElement(element, index, template, details) {
|
|
356
|
+
template.label.textContent = element.element.label;
|
|
357
|
+
ChatContextKeys.agentSessionSection.bindTo(template.contextKeyService).set(element.element.section);
|
|
358
|
+
template.toolbar.context = element.element;
|
|
359
|
+
}
|
|
360
|
+
renderCompressedElements(node, index, templateData, details) {
|
|
361
|
+
throw ( new Error('Should never happen since section header is incompressible'));
|
|
362
|
+
}
|
|
363
|
+
disposeElement(element, index, template, details) {
|
|
364
|
+
}
|
|
365
|
+
disposeTemplate(templateData) {
|
|
366
|
+
templateData.disposables.dispose();
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
AgentSessionSectionRenderer = AgentSessionSectionRenderer_1 = ( __decorate([
|
|
370
|
+
( __param(0, IInstantiationService)),
|
|
371
|
+
( __param(1, IContextKeyService))
|
|
372
|
+
], AgentSessionSectionRenderer));
|
|
259
373
|
class AgentSessionsListDelegate {
|
|
260
374
|
static { this.ITEM_HEIGHT = 52; }
|
|
375
|
+
static { this.SECTION_HEIGHT = 26; }
|
|
261
376
|
getHeight(element) {
|
|
377
|
+
if (isAgentSessionSection(element)) {
|
|
378
|
+
return AgentSessionsListDelegate.SECTION_HEIGHT;
|
|
379
|
+
}
|
|
262
380
|
return AgentSessionsListDelegate.ITEM_HEIGHT;
|
|
263
381
|
}
|
|
264
382
|
getTemplateId(element) {
|
|
383
|
+
if (isAgentSessionSection(element)) {
|
|
384
|
+
return AgentSessionSectionRenderer.TEMPLATE_ID;
|
|
385
|
+
}
|
|
265
386
|
return AgentSessionRenderer.TEMPLATE_ID;
|
|
266
387
|
}
|
|
267
388
|
}
|
|
268
389
|
class AgentSessionsAccessibilityProvider {
|
|
269
390
|
getWidgetAriaLabel() {
|
|
270
|
-
return localize(
|
|
391
|
+
return localize(4924, "Agent Sessions");
|
|
271
392
|
}
|
|
272
393
|
getAriaLabel(element) {
|
|
273
|
-
|
|
394
|
+
if (isAgentSessionSection(element)) {
|
|
395
|
+
return localize(4925, "{0} sessions section", element.label);
|
|
396
|
+
}
|
|
397
|
+
return localize(
|
|
398
|
+
4926,
|
|
399
|
+
"{0} session {1} ({2}), created {3}",
|
|
400
|
+
element.providerLabel,
|
|
401
|
+
element.label,
|
|
402
|
+
toStatusLabel(element.status),
|
|
403
|
+
( new Date(element.timing.startTime)).toLocaleString()
|
|
404
|
+
);
|
|
274
405
|
}
|
|
275
406
|
}
|
|
276
407
|
class AgentSessionsDataSource {
|
|
@@ -279,24 +410,110 @@ class AgentSessionsDataSource {
|
|
|
279
410
|
this.sorter = sorter;
|
|
280
411
|
}
|
|
281
412
|
hasChildren(element) {
|
|
282
|
-
|
|
413
|
+
if (isAgentSessionsModel(element)) {
|
|
414
|
+
return true;
|
|
415
|
+
}
|
|
416
|
+
else if (isAgentSessionSection(element)) {
|
|
417
|
+
return element.sessions.length > 0;
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
283
422
|
}
|
|
284
423
|
getChildren(element) {
|
|
285
|
-
if (
|
|
424
|
+
if (isAgentSessionsModel(element)) {
|
|
425
|
+
let filteredSessions = element.sessions.filter(session => !this.filter?.exclude(session));
|
|
426
|
+
const limitResultsCount = this.filter?.limitResults?.();
|
|
427
|
+
if (!this.filter?.groupResults?.() || typeof limitResultsCount === 'number') {
|
|
428
|
+
filteredSessions.sort(this.sorter.compare.bind(this.sorter));
|
|
429
|
+
}
|
|
430
|
+
if (typeof limitResultsCount === 'number') {
|
|
431
|
+
filteredSessions = filteredSessions.slice(0, limitResultsCount);
|
|
432
|
+
}
|
|
433
|
+
this.filter?.notifyResults?.(filteredSessions.length);
|
|
434
|
+
if (this.filter?.groupResults?.()) {
|
|
435
|
+
return this.groupSessionsIntoSections(filteredSessions);
|
|
436
|
+
}
|
|
437
|
+
return filteredSessions;
|
|
438
|
+
}
|
|
439
|
+
else if (isAgentSessionSection(element)) {
|
|
440
|
+
return element.sessions;
|
|
441
|
+
}
|
|
442
|
+
else {
|
|
286
443
|
return [];
|
|
287
444
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
445
|
+
}
|
|
446
|
+
groupSessionsIntoSections(sessions) {
|
|
447
|
+
const result = [];
|
|
448
|
+
const sortedSessions = sessions.sort(this.sorter.compare.bind(this.sorter));
|
|
449
|
+
const groupedSessions = groupAgentSessions(sortedSessions);
|
|
450
|
+
for (const { sessions, section, label } of ( groupedSessions.values())) {
|
|
451
|
+
if (sessions.length === 0) {
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
result.push({ section, label, sessions });
|
|
293
455
|
}
|
|
294
|
-
|
|
295
|
-
return filteredSessions;
|
|
456
|
+
return result;
|
|
296
457
|
}
|
|
297
458
|
}
|
|
459
|
+
const DAY_THRESHOLD = 24 * 60 * 60 * 1000;
|
|
460
|
+
const WEEK_THRESHOLD = 7 * DAY_THRESHOLD;
|
|
461
|
+
const AgentSessionSectionLabels = {
|
|
462
|
+
[AgentSessionSection.InProgress]: ( localize(4927, "In Progress")),
|
|
463
|
+
[AgentSessionSection.Today]: ( localize(4928, "Today")),
|
|
464
|
+
[AgentSessionSection.Yesterday]: ( localize(4929, "Yesterday")),
|
|
465
|
+
[AgentSessionSection.Week]: ( localize(4930, "Last Week")),
|
|
466
|
+
[AgentSessionSection.Older]: ( localize(4931, "Older")),
|
|
467
|
+
[AgentSessionSection.Archived]: ( localize(4932, "Archived")),
|
|
468
|
+
};
|
|
469
|
+
function groupAgentSessions(sessions) {
|
|
470
|
+
const now = Date.now();
|
|
471
|
+
const startOfToday = ( new Date(now)).setHours(0, 0, 0, 0);
|
|
472
|
+
const startOfYesterday = startOfToday - DAY_THRESHOLD;
|
|
473
|
+
const weekThreshold = now - WEEK_THRESHOLD;
|
|
474
|
+
const inProgressSessions = [];
|
|
475
|
+
const todaySessions = [];
|
|
476
|
+
const yesterdaySessions = [];
|
|
477
|
+
const weekSessions = [];
|
|
478
|
+
const olderSessions = [];
|
|
479
|
+
const archivedSessions = [];
|
|
480
|
+
for (const session of sessions) {
|
|
481
|
+
if (isSessionInProgressStatus(session.status)) {
|
|
482
|
+
inProgressSessions.push(session);
|
|
483
|
+
}
|
|
484
|
+
else if (session.isArchived()) {
|
|
485
|
+
archivedSessions.push(session);
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
const sessionTime = session.timing.endTime || session.timing.startTime;
|
|
489
|
+
if (sessionTime >= startOfToday) {
|
|
490
|
+
todaySessions.push(session);
|
|
491
|
+
}
|
|
492
|
+
else if (sessionTime >= startOfYesterday) {
|
|
493
|
+
yesterdaySessions.push(session);
|
|
494
|
+
}
|
|
495
|
+
else if (sessionTime >= weekThreshold) {
|
|
496
|
+
weekSessions.push(session);
|
|
497
|
+
}
|
|
498
|
+
else {
|
|
499
|
+
olderSessions.push(session);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
return ( new Map([
|
|
504
|
+
[AgentSessionSection.InProgress, { section: AgentSessionSection.InProgress, label: AgentSessionSectionLabels[AgentSessionSection.InProgress], sessions: inProgressSessions }],
|
|
505
|
+
[AgentSessionSection.Today, { section: AgentSessionSection.Today, label: AgentSessionSectionLabels[AgentSessionSection.Today], sessions: todaySessions }],
|
|
506
|
+
[AgentSessionSection.Yesterday, { section: AgentSessionSection.Yesterday, label: AgentSessionSectionLabels[AgentSessionSection.Yesterday], sessions: yesterdaySessions }],
|
|
507
|
+
[AgentSessionSection.Week, { section: AgentSessionSection.Week, label: AgentSessionSectionLabels[AgentSessionSection.Week], sessions: weekSessions }],
|
|
508
|
+
[AgentSessionSection.Older, { section: AgentSessionSection.Older, label: AgentSessionSectionLabels[AgentSessionSection.Older], sessions: olderSessions }],
|
|
509
|
+
[AgentSessionSection.Archived, { section: AgentSessionSection.Archived, label: AgentSessionSectionLabels[AgentSessionSection.Archived], sessions: archivedSessions }],
|
|
510
|
+
]));
|
|
511
|
+
}
|
|
298
512
|
class AgentSessionsIdentityProvider {
|
|
299
513
|
getId(element) {
|
|
514
|
+
if (isAgentSessionSection(element)) {
|
|
515
|
+
return `section-${element.section}`;
|
|
516
|
+
}
|
|
300
517
|
if (isAgentSession(element)) {
|
|
301
518
|
return ( element.resource.toString());
|
|
302
519
|
}
|
|
@@ -308,13 +525,21 @@ class AgentSessionsCompressionDelegate {
|
|
|
308
525
|
return true;
|
|
309
526
|
}
|
|
310
527
|
}
|
|
311
|
-
|
|
312
|
-
constructor(
|
|
313
|
-
this.
|
|
528
|
+
class AgentSessionsSorter {
|
|
529
|
+
constructor(options) {
|
|
530
|
+
this.options = options;
|
|
314
531
|
}
|
|
315
532
|
compare(sessionA, sessionB) {
|
|
316
|
-
const
|
|
317
|
-
const
|
|
533
|
+
const aNeedsInput = sessionA.status === ChatSessionStatus.NeedsInput;
|
|
534
|
+
const bNeedsInput = sessionB.status === ChatSessionStatus.NeedsInput;
|
|
535
|
+
if (aNeedsInput && !bNeedsInput) {
|
|
536
|
+
return -1;
|
|
537
|
+
}
|
|
538
|
+
if (!aNeedsInput && bNeedsInput) {
|
|
539
|
+
return 1;
|
|
540
|
+
}
|
|
541
|
+
const aInProgress = sessionA.status === ChatSessionStatus.InProgress;
|
|
542
|
+
const bInProgress = sessionB.status === ChatSessionStatus.InProgress;
|
|
318
543
|
if (aInProgress && !bInProgress) {
|
|
319
544
|
return -1;
|
|
320
545
|
}
|
|
@@ -329,14 +554,18 @@ let AgentSessionsSorter = class AgentSessionsSorter {
|
|
|
329
554
|
if (aArchived && !bArchived) {
|
|
330
555
|
return 1;
|
|
331
556
|
}
|
|
557
|
+
const override = this.options?.overrideCompare?.(sessionA, sessionB);
|
|
558
|
+
if (typeof override === 'number') {
|
|
559
|
+
return override;
|
|
560
|
+
}
|
|
332
561
|
return (sessionB.timing.endTime || sessionB.timing.startTime) - (sessionA.timing.endTime || sessionA.timing.startTime);
|
|
333
562
|
}
|
|
334
|
-
}
|
|
335
|
-
AgentSessionsSorter = ( __decorate([
|
|
336
|
-
( __param(0, IChatSessionsService))
|
|
337
|
-
], AgentSessionsSorter));
|
|
563
|
+
}
|
|
338
564
|
class AgentSessionsKeyboardNavigationLabelProvider {
|
|
339
565
|
getKeyboardNavigationLabel(element) {
|
|
566
|
+
if (isAgentSessionSection(element)) {
|
|
567
|
+
return element.label;
|
|
568
|
+
}
|
|
340
569
|
return element.label;
|
|
341
570
|
}
|
|
342
571
|
getCompressedNodeKeyboardNavigationLabel(elements) {
|
|
@@ -349,18 +578,22 @@ let AgentSessionsDragAndDrop = class AgentSessionsDragAndDrop extends Disposable
|
|
|
349
578
|
this.instantiationService = instantiationService;
|
|
350
579
|
}
|
|
351
580
|
onDragStart(data, originalEvent) {
|
|
352
|
-
const elements = data.getData();
|
|
581
|
+
const elements = data.getData().filter(e => isAgentSession(e));
|
|
353
582
|
const uris = coalesce(( elements.map(e => e.resource)));
|
|
354
583
|
this.instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, uris, originalEvent));
|
|
355
584
|
}
|
|
356
585
|
getDragURI(element) {
|
|
586
|
+
if (isAgentSessionSection(element)) {
|
|
587
|
+
return null;
|
|
588
|
+
}
|
|
357
589
|
return ( element.resource.toString());
|
|
358
590
|
}
|
|
359
591
|
getDragLabel(elements, originalEvent) {
|
|
360
|
-
|
|
361
|
-
|
|
592
|
+
const sessions = elements.filter(e => isAgentSession(e));
|
|
593
|
+
if (sessions.length === 1) {
|
|
594
|
+
return sessions[0].label;
|
|
362
595
|
}
|
|
363
|
-
return localize(
|
|
596
|
+
return localize(4933, "{0} agent sessions", sessions.length);
|
|
364
597
|
}
|
|
365
598
|
onDragOver(data, targetElement, targetIndex, targetSector, originalEvent) {
|
|
366
599
|
return false;
|
|
@@ -371,4 +604,4 @@ AgentSessionsDragAndDrop = ( __decorate([
|
|
|
371
604
|
( __param(0, IInstantiationService))
|
|
372
605
|
], AgentSessionsDragAndDrop));
|
|
373
606
|
|
|
374
|
-
export { AgentSessionRenderer, AgentSessionsAccessibilityProvider, AgentSessionsCompressionDelegate, AgentSessionsDataSource, AgentSessionsDragAndDrop, AgentSessionsIdentityProvider, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsListDelegate, AgentSessionsSorter };
|
|
607
|
+
export { AgentSessionRenderer, AgentSessionSectionLabels, AgentSessionSectionRenderer, AgentSessionsAccessibilityProvider, AgentSessionsCompressionDelegate, AgentSessionsDataSource, AgentSessionsDragAndDrop, AgentSessionsIdentityProvider, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsListDelegate, AgentSessionsSorter, groupAgentSessions };
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
2
2
|
import { Emitter } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
3
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
4
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
|
-
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
5
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
6
6
|
import { IChatSessionItem, IChatSessionItemProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
7
7
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
8
8
|
export declare class LocalAgentsSessionsProvider extends Disposable implements IChatSessionItemProvider, IWorkbenchContribution {
|
|
@@ -16,8 +16,9 @@ export declare class LocalAgentsSessionsProvider extends Disposable implements I
|
|
|
16
16
|
readonly onDidChangeChatSessionItems: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
17
17
|
constructor(chatService: IChatService, chatSessionsService: IChatSessionsService);
|
|
18
18
|
private registerListeners;
|
|
19
|
-
private modelToStatus;
|
|
20
19
|
provideChatSessionItems(token: CancellationToken): Promise<IChatSessionItem[]>;
|
|
21
20
|
private getHistoryItems;
|
|
22
21
|
private toChatSessionItem;
|
|
22
|
+
private modelToStatus;
|
|
23
|
+
private chatResponseStateToStatus;
|
|
23
24
|
}
|