@codingame/monaco-vscode-chat-service-override 28.4.1 → 29.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 +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +22 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- 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 +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
|
@@ -6,11 +6,12 @@ import { $, append, addDisposableListener, EventType, setVisibility, getWindow,
|
|
|
6
6
|
import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
|
|
7
7
|
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
8
8
|
import { Sash, Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
|
|
9
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
9
|
+
import { CancellationToken, CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
10
10
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
11
11
|
import { MutableDisposable, toDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
12
12
|
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
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 { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
15
16
|
import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
16
17
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
@@ -140,6 +141,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
140
141
|
this.workbenchEnvironmentService = workbenchEnvironmentService;
|
|
141
142
|
this.hostService = hostService;
|
|
142
143
|
this.lastDimensionsPerOrientation = ( new Map());
|
|
144
|
+
this.loadSessionCts = this._register(( new MutableDisposable()));
|
|
143
145
|
this.modelRef = this._register(( new MutableDisposable()));
|
|
144
146
|
this.activityBadge = this._register(( new MutableDisposable()));
|
|
145
147
|
this.sessionsViewerOrientation = AgentSessionsViewerOrientation.Stacked;
|
|
@@ -256,7 +258,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
256
258
|
const wasVisible = this._widget.visible;
|
|
257
259
|
try {
|
|
258
260
|
this._widget.setVisible(false);
|
|
259
|
-
await this.showModel(modelRef);
|
|
261
|
+
await this.showModel(CancellationToken.None, modelRef);
|
|
260
262
|
} finally {
|
|
261
263
|
this._widget.setVisible(wasVisible);
|
|
262
264
|
}
|
|
@@ -313,7 +315,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
313
315
|
const sessionsContainer = this.sessionsContainer = parent.appendChild($(".agent-sessions-container"));
|
|
314
316
|
const sessionsTitleContainer = this.sessionsTitleContainer = append(sessionsContainer, $(".agent-sessions-title-container"));
|
|
315
317
|
const sessionsTitle = this.sessionsTitle = append(sessionsTitleContainer, $("span.agent-sessions-title"));
|
|
316
|
-
sessionsTitle.textContent = ( localize(
|
|
318
|
+
sessionsTitle.textContent = ( localize(7101, "Sessions"));
|
|
317
319
|
this._register(addDisposableListener(sessionsTitle, EventType.CLICK, () => {
|
|
318
320
|
this.sessionsControl?.scrollToTop();
|
|
319
321
|
this.sessionsControl?.focus();
|
|
@@ -341,7 +343,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
341
343
|
...defaultButtonStyles,
|
|
342
344
|
secondary: true
|
|
343
345
|
})));
|
|
344
|
-
newSessionButton.label = ( localize(
|
|
346
|
+
newSessionButton.label = ( localize(7102, "New Session"));
|
|
345
347
|
this._register(
|
|
346
348
|
newSessionButton.onDidClick(() => this.commandService.executeCommand(ACTION_ID_NEW_CHAT))
|
|
347
349
|
);
|
|
@@ -555,6 +557,14 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
555
557
|
sessionsControl.reveal(sessionResource);
|
|
556
558
|
}
|
|
557
559
|
}));
|
|
560
|
+
this._register(this.agentSessionsService.model.onDidChangeSessionArchivedState(e => {
|
|
561
|
+
if (e.isArchived()) {
|
|
562
|
+
const currentSessionResource = chatWidget.viewModel?.sessionResource;
|
|
563
|
+
if (currentSessionResource && isEqual(currentSessionResource, e.resource)) {
|
|
564
|
+
this.clear();
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}));
|
|
558
568
|
this._register(autorun(reader => {
|
|
559
569
|
chatWidget.inputPart.height.read(reader);
|
|
560
570
|
if (this.sessionsViewerVisible && this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
@@ -573,7 +583,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
573
583
|
progressBadgeDisposables.value.add(autorun(reader => {
|
|
574
584
|
if (model.requestInProgress.read(reader)) {
|
|
575
585
|
this.activityBadge.value = this.activityService.showViewActivity(this.id, {
|
|
576
|
-
badge: ( new ProgressBadge(() => ( localize(
|
|
586
|
+
badge: ( new ProgressBadge(() => ( localize(7103, "Agent Session in Progress"))))
|
|
577
587
|
});
|
|
578
588
|
} else {
|
|
579
589
|
this.activityBadge.clear();
|
|
@@ -607,33 +617,40 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
607
617
|
async _applyModel() {
|
|
608
618
|
const sessionResource = this.getTransferredOrPersistedSessionInfo();
|
|
609
619
|
const modelRef = sessionResource ? await this.chatService.acquireOrLoadSession(sessionResource, ChatAgentLocation.Chat, CancellationToken.None) : undefined;
|
|
610
|
-
await this.showModel(modelRef);
|
|
620
|
+
await this.showModel(CancellationToken.None, modelRef);
|
|
611
621
|
}
|
|
612
|
-
async showModel(modelRef, startNewSession = true) {
|
|
622
|
+
async showModel(token, modelRef, startNewSession = true) {
|
|
613
623
|
const oldModelResource = this.modelRef.value?.object.sessionResource;
|
|
614
624
|
this.modelRef.value = undefined;
|
|
615
625
|
let ref;
|
|
616
626
|
if (startNewSession) {
|
|
617
|
-
ref = modelRef ?? (this.chatService.transferredSessionResource ? await this.chatService.acquireOrLoadSession(
|
|
618
|
-
this.chatService.transferredSessionResource,
|
|
619
|
-
ChatAgentLocation.Chat,
|
|
620
|
-
CancellationToken.None
|
|
621
|
-
) : this.chatService.startNewLocalSession(ChatAgentLocation.Chat));
|
|
627
|
+
ref = modelRef ?? (this.chatService.transferredSessionResource ? await this.chatService.acquireOrLoadSession(this.chatService.transferredSessionResource, ChatAgentLocation.Chat, token) : this.chatService.startNewLocalSession(ChatAgentLocation.Chat));
|
|
622
628
|
if (!ref) {
|
|
623
629
|
throw ( new Error("Could not start chat session"));
|
|
624
630
|
}
|
|
625
631
|
}
|
|
632
|
+
if (token.isCancellationRequested) {
|
|
633
|
+
ref?.dispose();
|
|
634
|
+
return undefined;
|
|
635
|
+
}
|
|
626
636
|
this.modelRef.value = ref;
|
|
627
637
|
const model = ref?.object;
|
|
628
638
|
if (model) {
|
|
629
639
|
await this.updateWidgetLockState(getChatSessionType(model.sessionResource));
|
|
640
|
+
if (token.isCancellationRequested) {
|
|
641
|
+
this.modelRef.value = undefined;
|
|
642
|
+
return undefined;
|
|
643
|
+
}
|
|
630
644
|
this.viewState.sessionResource = model.sessionResource;
|
|
631
645
|
}
|
|
632
646
|
this._widget.setModel(model);
|
|
633
647
|
this.titleControl?.update(model);
|
|
634
648
|
this.updateActions();
|
|
635
649
|
if (oldModelResource) {
|
|
636
|
-
this.agentSessionsService.model.getSession(oldModelResource)
|
|
650
|
+
const oldSession = this.agentSessionsService.model.getSession(oldModelResource);
|
|
651
|
+
if (oldSession && !oldSession.isMarkedUnread()) {
|
|
652
|
+
oldSession.setRead(true);
|
|
653
|
+
}
|
|
637
654
|
}
|
|
638
655
|
return model;
|
|
639
656
|
}
|
|
@@ -654,39 +671,59 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
654
671
|
}
|
|
655
672
|
const contribution = this.chatSessionsService.getChatSessionContribution(sessionType);
|
|
656
673
|
if (contribution) {
|
|
657
|
-
this._widget.lockToCodingAgent(contribution.name, contribution.displayName,
|
|
674
|
+
this._widget.lockToCodingAgent(contribution.name, contribution.displayName, sessionType);
|
|
658
675
|
} else {
|
|
659
676
|
this._widget.unlockFromCodingAgent();
|
|
660
677
|
}
|
|
661
678
|
}
|
|
662
679
|
async clear() {
|
|
680
|
+
this.loadSessionCts.value?.cancel();
|
|
663
681
|
this.updateViewState();
|
|
664
|
-
await this.showModel(
|
|
682
|
+
await this.showModel(CancellationToken.None);
|
|
665
683
|
this.updateActions();
|
|
666
684
|
}
|
|
667
685
|
async loadSession(sessionResource) {
|
|
686
|
+
this.loadSessionCts.value?.cancel();
|
|
687
|
+
const cts = this.loadSessionCts.value = ( new CancellationTokenSource());
|
|
688
|
+
const token = cts.token;
|
|
668
689
|
if (this.restoringSession) {
|
|
669
690
|
await this.restoringSession;
|
|
670
691
|
}
|
|
692
|
+
if (token.isCancellationRequested) {
|
|
693
|
+
return undefined;
|
|
694
|
+
}
|
|
671
695
|
return this.progressService.withProgress({
|
|
672
696
|
location: ChatViewId,
|
|
673
697
|
delay: 200
|
|
674
698
|
}, async () => {
|
|
675
699
|
let queue = Promise.resolve();
|
|
676
700
|
const clearWidget = disposableTimeout(() => {
|
|
677
|
-
|
|
701
|
+
if (token.isCancellationRequested || this.loadSessionCts.value !== cts) {
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
queue = this.showModel(token, undefined, false).then(() => {});
|
|
678
705
|
}, 100);
|
|
706
|
+
const clearWidgetCancellationListener = token.onCancellationRequested(() => clearWidget.dispose());
|
|
679
707
|
try {
|
|
680
|
-
const newModelRef = await this.chatService.acquireOrLoadSession(sessionResource, ChatAgentLocation.Chat,
|
|
708
|
+
const newModelRef = await this.chatService.acquireOrLoadSession(sessionResource, ChatAgentLocation.Chat, token);
|
|
681
709
|
clearWidget.dispose();
|
|
682
710
|
await queue;
|
|
683
|
-
|
|
711
|
+
if (token.isCancellationRequested) {
|
|
712
|
+
newModelRef?.dispose();
|
|
713
|
+
return undefined;
|
|
714
|
+
}
|
|
715
|
+
return this.showModel(token, newModelRef);
|
|
684
716
|
} catch (err) {
|
|
685
717
|
clearWidget.dispose();
|
|
686
718
|
await queue;
|
|
719
|
+
if (token.isCancellationRequested) {
|
|
720
|
+
return undefined;
|
|
721
|
+
}
|
|
687
722
|
this.logService.error(`Failed to load chat session '${( sessionResource.toString())}'`, err);
|
|
688
|
-
this.notificationService.error(( localize(
|
|
689
|
-
return this.showModel(undefined);
|
|
723
|
+
this.notificationService.error(( localize(7104, "Failed to open chat session: {0}", toErrorMessage(err))));
|
|
724
|
+
return this.showModel(token, undefined);
|
|
725
|
+
} finally {
|
|
726
|
+
clearWidgetCancellationListener.dispose();
|
|
690
727
|
}
|
|
691
728
|
});
|
|
692
729
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js
CHANGED
|
@@ -23,7 +23,7 @@ let ChatViewTitleControl = class ChatViewTitleControl extends Disposable {
|
|
|
23
23
|
ChatViewTitleControl_1 = this;
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
26
|
-
this.DEFAULT_TITLE = ( localize(
|
|
26
|
+
this.DEFAULT_TITLE = ( localize(7105, "Chat"));
|
|
27
27
|
}
|
|
28
28
|
static {
|
|
29
29
|
this.PICK_AGENT_SESSION_ACTION_ID = "workbench.action.chat.pickAgentSession";
|
|
@@ -48,7 +48,7 @@ let ChatViewTitleControl = class ChatViewTitleControl extends Disposable {
|
|
|
48
48
|
constructor() {
|
|
49
49
|
super({
|
|
50
50
|
id: ChatViewTitleControl_1.PICK_AGENT_SESSION_ACTION_ID,
|
|
51
|
-
title: ( localize(
|
|
51
|
+
title: ( localize(7106, "Pick Agent Session")),
|
|
52
52
|
f1: false,
|
|
53
53
|
menu: [{
|
|
54
54
|
id: MenuId.ChatViewSessionTitleNavigationToolbar,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
2
|
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import { ChatDebugLogLevel, IChatDebugEvent, IChatDebugLogProvider, IChatDebugResolvedEventContent } from "
|
|
4
|
+
import { ChatDebugLogLevel, IChatDebugEvent, IChatDebugLogProvider, IChatDebugResolvedEventContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService";
|
|
5
5
|
import { IChatDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service";
|
|
6
6
|
export declare class ChatDebugServiceImpl extends Disposable implements IChatDebugService {
|
|
7
7
|
readonly _serviceBrand: undefined;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
private
|
|
8
|
+
static readonly MAX_EVENTS_PER_SESSION = 10000;
|
|
9
|
+
static readonly MAX_SESSIONS = 5;
|
|
10
|
+
/** Per-session event buffers. Ordered from oldest to newest session (LRU). */
|
|
11
|
+
private readonly _sessionBuffers;
|
|
12
|
+
/** Ordered list of session URIs for LRU eviction. */
|
|
13
|
+
private readonly _sessionOrder;
|
|
12
14
|
private readonly _onDidAddEvent;
|
|
13
15
|
readonly onDidAddEvent: Event<IChatDebugEvent>;
|
|
14
16
|
private readonly _onDidClearProviderEvents;
|
|
@@ -20,7 +22,14 @@ export declare class ChatDebugServiceImpl extends Disposable implements IChatDeb
|
|
|
20
22
|
private readonly _invocationCts;
|
|
21
23
|
/** Events that were returned by providers (not internally logged). */
|
|
22
24
|
private readonly _providerEvents;
|
|
25
|
+
/** Session URIs created via import. */
|
|
26
|
+
private readonly _importedSessions;
|
|
27
|
+
/** Human-readable titles for imported sessions. */
|
|
28
|
+
private readonly _importedSessionTitles;
|
|
23
29
|
activeSessionResource: URI | undefined;
|
|
30
|
+
/** Schemes eligible for debug logging and provider invocation. */
|
|
31
|
+
private static readonly _debugEligibleSchemes;
|
|
32
|
+
private _isDebugEligibleSession;
|
|
24
33
|
log(sessionResource: URI, name: string, details?: string, level?: ChatDebugLogLevel, options?: {
|
|
25
34
|
id?: string;
|
|
26
35
|
category?: string;
|
|
@@ -31,6 +40,8 @@ export declare class ChatDebugServiceImpl extends Disposable implements IChatDeb
|
|
|
31
40
|
getEvents(sessionResource?: URI): readonly IChatDebugEvent[];
|
|
32
41
|
getSessionResources(): readonly URI[];
|
|
33
42
|
clear(): void;
|
|
43
|
+
/** Remove all ancillary state for an evicted session. */
|
|
44
|
+
private _evictSession;
|
|
34
45
|
registerProvider(provider: IChatDebugLogProvider): IDisposable;
|
|
35
46
|
hasInvokedProviders(sessionResource: URI): boolean;
|
|
36
47
|
invokeProviders(sessionResource: URI): Promise<void>;
|
|
@@ -40,5 +51,10 @@ export declare class ChatDebugServiceImpl extends Disposable implements IChatDeb
|
|
|
40
51
|
markDebugDataAttached(sessionResource: URI): void;
|
|
41
52
|
hasAttachedDebugData(sessionResource: URI): boolean;
|
|
42
53
|
resolveEvent(eventId: string): Promise<IChatDebugResolvedEventContent | undefined>;
|
|
54
|
+
isCoreEvent(event: IChatDebugEvent): boolean;
|
|
55
|
+
setImportedSessionTitle(sessionResource: URI, title: string): void;
|
|
56
|
+
getImportedSessionTitle(sessionResource: URI): string | undefined;
|
|
57
|
+
exportLog(sessionResource: URI): Promise<Uint8Array | undefined>;
|
|
58
|
+
importLog(data: Uint8Array): Promise<URI | undefined>;
|
|
43
59
|
dispose(): void;
|
|
44
60
|
}
|
|
@@ -1,18 +1,73 @@
|
|
|
1
1
|
|
|
2
|
+
import { timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
2
3
|
import { CancellationTokenSource, CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
3
4
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
5
|
import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
6
|
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
7
|
-
import {
|
|
8
|
+
import { extUri } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
+
import { ChatDebugLogLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService';
|
|
8
10
|
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
9
11
|
|
|
12
|
+
class SessionEventBuffer {
|
|
13
|
+
constructor(capacity) {
|
|
14
|
+
this.capacity = capacity;
|
|
15
|
+
this._head = 0;
|
|
16
|
+
this._size = 0;
|
|
17
|
+
this._buffer = ( new Array(capacity));
|
|
18
|
+
}
|
|
19
|
+
get size() {
|
|
20
|
+
return this._size;
|
|
21
|
+
}
|
|
22
|
+
push(event) {
|
|
23
|
+
const idx = (this._head + this._size) % this.capacity;
|
|
24
|
+
this._buffer[idx] = event;
|
|
25
|
+
if (this._size < this.capacity) {
|
|
26
|
+
this._size++;
|
|
27
|
+
} else {
|
|
28
|
+
this._head = (this._head + 1) % this.capacity;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
toArray() {
|
|
32
|
+
const result = [];
|
|
33
|
+
for (let i = 0; i < this._size; i++) {
|
|
34
|
+
const event = this._buffer[(this._head + i) % this.capacity];
|
|
35
|
+
if (event) {
|
|
36
|
+
result.push(event);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
removeWhere(predicate) {
|
|
42
|
+
let write = 0;
|
|
43
|
+
for (let i = 0; i < this._size; i++) {
|
|
44
|
+
const idx = (this._head + i) % this.capacity;
|
|
45
|
+
const event = this._buffer[idx];
|
|
46
|
+
if (event && predicate(event)) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (write !== i) {
|
|
50
|
+
const writeIdx = (this._head + write) % this.capacity;
|
|
51
|
+
this._buffer[writeIdx] = event;
|
|
52
|
+
}
|
|
53
|
+
write++;
|
|
54
|
+
}
|
|
55
|
+
for (let i = write; i < this._size; i++) {
|
|
56
|
+
this._buffer[(this._head + i) % this.capacity] = undefined;
|
|
57
|
+
}
|
|
58
|
+
this._size = write;
|
|
59
|
+
}
|
|
60
|
+
clear() {
|
|
61
|
+
this._buffer.fill(undefined);
|
|
62
|
+
this._head = 0;
|
|
63
|
+
this._size = 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
10
66
|
class ChatDebugServiceImpl extends Disposable {
|
|
11
67
|
constructor() {
|
|
12
68
|
super(...arguments);
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this._size = 0;
|
|
69
|
+
this._sessionBuffers = ( new ResourceMap());
|
|
70
|
+
this._sessionOrder = [];
|
|
16
71
|
this._onDidAddEvent = this._register(( new Emitter()));
|
|
17
72
|
this.onDidAddEvent = this._onDidAddEvent.event;
|
|
18
73
|
this._onDidClearProviderEvents = this._register(( new Emitter()));
|
|
@@ -23,12 +78,26 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
23
78
|
this._providers = ( new Set());
|
|
24
79
|
this._invocationCts = ( new ResourceMap());
|
|
25
80
|
this._providerEvents = ( new WeakSet());
|
|
81
|
+
this._importedSessions = ( new ResourceMap());
|
|
82
|
+
this._importedSessionTitles = ( new ResourceMap());
|
|
26
83
|
}
|
|
27
84
|
static {
|
|
28
|
-
this.
|
|
85
|
+
this.MAX_EVENTS_PER_SESSION = 10_000;
|
|
86
|
+
}
|
|
87
|
+
static {
|
|
88
|
+
this.MAX_SESSIONS = 5;
|
|
89
|
+
}
|
|
90
|
+
static {
|
|
91
|
+
this._debugEligibleSchemes = ( new Set([
|
|
92
|
+
LocalChatSessionUri.scheme,
|
|
93
|
+
"copilotcli",
|
|
94
|
+
"claude-code"]));
|
|
95
|
+
}
|
|
96
|
+
_isDebugEligibleSession(sessionResource) {
|
|
97
|
+
return ( ChatDebugServiceImpl._debugEligibleSchemes.has(sessionResource.scheme)) || ( this._importedSessions.has(sessionResource));
|
|
29
98
|
}
|
|
30
99
|
log(sessionResource, name, details, level = ChatDebugLogLevel.Info, options) {
|
|
31
|
-
if (!
|
|
100
|
+
if (!this._isDebugEligibleSession(sessionResource)) {
|
|
32
101
|
return;
|
|
33
102
|
}
|
|
34
103
|
this.addEvent({
|
|
@@ -44,13 +113,23 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
44
113
|
});
|
|
45
114
|
}
|
|
46
115
|
addEvent(event) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
116
|
+
let buffer = this._sessionBuffers.get(event.sessionResource);
|
|
117
|
+
if (!buffer) {
|
|
118
|
+
if (this._sessionOrder.length >= ChatDebugServiceImpl.MAX_SESSIONS) {
|
|
119
|
+
const evicted = this._sessionOrder.shift();
|
|
120
|
+
this._evictSession(evicted);
|
|
121
|
+
}
|
|
122
|
+
buffer = ( new SessionEventBuffer(ChatDebugServiceImpl.MAX_EVENTS_PER_SESSION));
|
|
123
|
+
this._sessionBuffers.set(event.sessionResource, buffer);
|
|
124
|
+
this._sessionOrder.push(event.sessionResource);
|
|
51
125
|
} else {
|
|
52
|
-
|
|
126
|
+
const idx = this._sessionOrder.findIndex(u => extUri.isEqual(u, event.sessionResource));
|
|
127
|
+
if (idx !== -1 && idx !== this._sessionOrder.length - 1) {
|
|
128
|
+
this._sessionOrder.splice(idx, 1);
|
|
129
|
+
this._sessionOrder.push(event.sessionResource);
|
|
130
|
+
}
|
|
53
131
|
}
|
|
132
|
+
buffer.push(event);
|
|
54
133
|
this._onDidAddEvent.fire(event);
|
|
55
134
|
}
|
|
56
135
|
addProviderEvent(event) {
|
|
@@ -58,40 +137,40 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
58
137
|
this.addEvent(event);
|
|
59
138
|
}
|
|
60
139
|
getEvents(sessionResource) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
result.push(event);
|
|
140
|
+
let result;
|
|
141
|
+
if (sessionResource) {
|
|
142
|
+
const buffer = this._sessionBuffers.get(sessionResource);
|
|
143
|
+
result = buffer ? buffer.toArray() : [];
|
|
144
|
+
} else {
|
|
145
|
+
result = [];
|
|
146
|
+
for (const buffer of ( this._sessionBuffers.values())) {
|
|
147
|
+
result.push(...buffer.toArray());
|
|
70
148
|
}
|
|
71
149
|
}
|
|
72
150
|
result.sort((a, b) => a.created.getTime() - b.created.getTime());
|
|
73
151
|
return result;
|
|
74
152
|
}
|
|
75
153
|
getSessionResources() {
|
|
76
|
-
|
|
77
|
-
const result = [];
|
|
78
|
-
for (let i = 0; i < this._size; i++) {
|
|
79
|
-
const event = this._buffer[(this._head + i) % ChatDebugServiceImpl.MAX_EVENTS];
|
|
80
|
-
if (!event) {
|
|
81
|
-
continue;
|
|
82
|
-
}
|
|
83
|
-
if (!( seen.has(event.sessionResource))) {
|
|
84
|
-
seen.set(event.sessionResource, true);
|
|
85
|
-
result.push(event.sessionResource);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return result;
|
|
154
|
+
return [...this._sessionOrder];
|
|
89
155
|
}
|
|
90
156
|
clear() {
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this._size = 0;
|
|
157
|
+
this._sessionBuffers.clear();
|
|
158
|
+
this._sessionOrder.length = 0;
|
|
94
159
|
this._debugDataAttachedSessions.clear();
|
|
160
|
+
this._importedSessions.clear();
|
|
161
|
+
this._importedSessionTitles.clear();
|
|
162
|
+
}
|
|
163
|
+
_evictSession(sessionResource) {
|
|
164
|
+
this._sessionBuffers.delete(sessionResource);
|
|
165
|
+
this._importedSessions.delete(sessionResource);
|
|
166
|
+
this._importedSessionTitles.delete(sessionResource);
|
|
167
|
+
this._debugDataAttachedSessions.delete(sessionResource);
|
|
168
|
+
const cts = this._invocationCts.get(sessionResource);
|
|
169
|
+
if (cts) {
|
|
170
|
+
cts.cancel();
|
|
171
|
+
cts.dispose();
|
|
172
|
+
this._invocationCts.delete(sessionResource);
|
|
173
|
+
}
|
|
95
174
|
}
|
|
96
175
|
registerProvider(provider) {
|
|
97
176
|
this._providers.add(provider);
|
|
@@ -108,7 +187,7 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
108
187
|
return ( this._invocationCts.has(sessionResource));
|
|
109
188
|
}
|
|
110
189
|
async invokeProviders(sessionResource) {
|
|
111
|
-
if (!
|
|
190
|
+
if (!this._isDebugEligibleSession(sessionResource)) {
|
|
112
191
|
return;
|
|
113
192
|
}
|
|
114
193
|
const existingCts = this._invocationCts.get(sessionResource);
|
|
@@ -130,11 +209,18 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
130
209
|
try {
|
|
131
210
|
const events = await provider.provideChatDebugLog(sessionResource, token);
|
|
132
211
|
if (events) {
|
|
133
|
-
|
|
212
|
+
const BATCH_SIZE = 500;
|
|
213
|
+
for (let i = 0; i < events.length; i++) {
|
|
214
|
+
if (token.isCancellationRequested) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
134
217
|
this.addProviderEvent({
|
|
135
|
-
...
|
|
136
|
-
sessionResource:
|
|
218
|
+
...events[i],
|
|
219
|
+
sessionResource: events[i].sessionResource ?? sessionResource
|
|
137
220
|
});
|
|
221
|
+
if (i > 0 && i % BATCH_SIZE === 0) {
|
|
222
|
+
await timeout(0);
|
|
223
|
+
}
|
|
138
224
|
}
|
|
139
225
|
}
|
|
140
226
|
} catch (err) {
|
|
@@ -151,24 +237,10 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
151
237
|
this._debugDataAttachedSessions.delete(sessionResource);
|
|
152
238
|
}
|
|
153
239
|
_clearProviderEvents(sessionResource) {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const idx = (this._head + i) % ChatDebugServiceImpl.MAX_EVENTS;
|
|
158
|
-
const event = this._buffer[idx];
|
|
159
|
-
if (event && ( this._providerEvents.has(event)) && ( event.sessionResource.toString()) === key) {
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
if (write !== i) {
|
|
163
|
-
const writeIdx = (this._head + write) % ChatDebugServiceImpl.MAX_EVENTS;
|
|
164
|
-
this._buffer[writeIdx] = event;
|
|
165
|
-
}
|
|
166
|
-
write++;
|
|
167
|
-
}
|
|
168
|
-
for (let i = write; i < this._size; i++) {
|
|
169
|
-
this._buffer[(this._head + i) % ChatDebugServiceImpl.MAX_EVENTS] = undefined;
|
|
240
|
+
const buffer = this._sessionBuffers.get(sessionResource);
|
|
241
|
+
if (buffer) {
|
|
242
|
+
buffer.removeWhere(event => ( this._providerEvents.has(event)));
|
|
170
243
|
}
|
|
171
|
-
this._size = write;
|
|
172
244
|
this._onDidClearProviderEvents.fire(sessionResource);
|
|
173
245
|
}
|
|
174
246
|
markDebugDataAttached(sessionResource) {
|
|
@@ -195,12 +267,54 @@ class ChatDebugServiceImpl extends Disposable {
|
|
|
195
267
|
}
|
|
196
268
|
return undefined;
|
|
197
269
|
}
|
|
270
|
+
isCoreEvent(event) {
|
|
271
|
+
return !( this._providerEvents.has(event));
|
|
272
|
+
}
|
|
273
|
+
setImportedSessionTitle(sessionResource, title) {
|
|
274
|
+
this._importedSessionTitles.set(sessionResource, title);
|
|
275
|
+
}
|
|
276
|
+
getImportedSessionTitle(sessionResource) {
|
|
277
|
+
return this._importedSessionTitles.get(sessionResource);
|
|
278
|
+
}
|
|
279
|
+
async exportLog(sessionResource) {
|
|
280
|
+
for (const provider of this._providers) {
|
|
281
|
+
if (provider.provideChatDebugLogExport) {
|
|
282
|
+
try {
|
|
283
|
+
const data = await provider.provideChatDebugLogExport(sessionResource, CancellationToken.None);
|
|
284
|
+
if (data !== undefined) {
|
|
285
|
+
return data;
|
|
286
|
+
}
|
|
287
|
+
} catch (err) {
|
|
288
|
+
onUnexpectedError(err);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return undefined;
|
|
293
|
+
}
|
|
294
|
+
async importLog(data) {
|
|
295
|
+
for (const provider of this._providers) {
|
|
296
|
+
if (provider.resolveChatDebugLogImport) {
|
|
297
|
+
try {
|
|
298
|
+
const sessionUri = await provider.resolveChatDebugLogImport(data, CancellationToken.None);
|
|
299
|
+
if (sessionUri !== undefined) {
|
|
300
|
+
this._importedSessions.set(sessionUri, true);
|
|
301
|
+
return sessionUri;
|
|
302
|
+
}
|
|
303
|
+
} catch (err) {
|
|
304
|
+
onUnexpectedError(err);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return undefined;
|
|
309
|
+
}
|
|
198
310
|
dispose() {
|
|
199
311
|
for (const cts of ( this._invocationCts.values())) {
|
|
200
312
|
cts.cancel();
|
|
201
313
|
cts.dispose();
|
|
202
314
|
}
|
|
203
315
|
this._invocationCts.clear();
|
|
316
|
+
this.clear();
|
|
317
|
+
this._providers.clear();
|
|
204
318
|
super.dispose();
|
|
205
319
|
}
|
|
206
320
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
4
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
5
5
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
6
6
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
@@ -16,7 +16,7 @@ import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/co
|
|
|
16
16
|
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service";
|
|
17
17
|
import { ChatModel, IChatModel, IChatRequestModel, IChatRequestVariableData, IExportableChatData, ISerializableChatData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
18
18
|
import { IParsedChatRequest } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes";
|
|
19
|
-
import { ChatRequestQueueKind, ChatSendResult, IChatCompleteResponse, IChatDetail, IChatModelReference, IChatProgress, IChatSendRequestOptions, IChatSessionContext, IChatSessionStartOptions, IChatUserActionEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
19
|
+
import { ChatRequestQueueKind, ChatSendResult, IChatCompleteResponse, IChatDetail, IChatModelReference, IChatProgress, IChatQuestionAnswers, IChatSendRequestOptions, IChatSessionContext, IChatSessionStartOptions, IChatUserActionEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
20
20
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
21
21
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
22
22
|
import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service";
|
|
@@ -60,7 +60,7 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
60
60
|
readonly onDidReceiveQuestionCarouselAnswer: Event<{
|
|
61
61
|
requestId: string;
|
|
62
62
|
resolveId: string;
|
|
63
|
-
answers:
|
|
63
|
+
answers: IChatQuestionAnswers | undefined;
|
|
64
64
|
}>;
|
|
65
65
|
private readonly _onDidDisposeSession;
|
|
66
66
|
readonly onDidDisposeSession: Event<{
|
|
@@ -91,7 +91,7 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
91
91
|
*/
|
|
92
92
|
private shouldStoreSession;
|
|
93
93
|
notifyUserAction(action: IChatUserActionEvent): void;
|
|
94
|
-
notifyQuestionCarouselAnswer(requestId: string, resolveId: string, answers:
|
|
94
|
+
notifyQuestionCarouselAnswer(requestId: string, resolveId: string, answers: IChatQuestionAnswers | undefined): void;
|
|
95
95
|
setChatSessionTitle(sessionResource: URI, title: string): Promise<void>;
|
|
96
96
|
private trace;
|
|
97
97
|
private info;
|
|
@@ -152,8 +152,9 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
152
152
|
removeRequest(sessionResource: URI, requestId: string): Promise<void>;
|
|
153
153
|
adoptRequest(sessionResource: URI, request: IChatRequestModel): Promise<void>;
|
|
154
154
|
addCompleteRequest(sessionResource: URI, message: IParsedChatRequest | string, variableData: IChatRequestVariableData | undefined, attempt: number | undefined, response: IChatCompleteResponse): Promise<void>;
|
|
155
|
-
cancelCurrentRequestForSession(sessionResource: URI, source?: string): void
|
|
155
|
+
cancelCurrentRequestForSession(sessionResource: URI, source?: string): Promise<void>;
|
|
156
156
|
setYieldRequested(sessionResource: URI): void;
|
|
157
|
+
migrateRequests(originalResource: URI, targetResource: URI): void;
|
|
157
158
|
removePendingRequest(sessionResource: URI, requestId: string): void;
|
|
158
159
|
setPendingRequests(sessionResource: URI, requests: readonly {
|
|
159
160
|
requestId: string;
|
|
@@ -166,4 +167,5 @@ export declare class ChatService extends Disposable implements IChatService {
|
|
|
166
167
|
setSessionTitle(sessionResource: URI, title: string): void;
|
|
167
168
|
appendProgress(request: IChatRequestModel, progress: IChatProgress): void;
|
|
168
169
|
private toLocalSessionId;
|
|
170
|
+
registerChatModelChangeListeners(chatSessionType: string, onChange: (chatSessionResource: URI) => void): IDisposable;
|
|
169
171
|
}
|