@codingame/monaco-vscode-chat-service-override 26.2.1 → 27.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 +31 -1
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +39 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +274 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +71 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +284 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +79 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +378 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
- 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 +53 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +204 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +541 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -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.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +181 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +943 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +248 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +118 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +727 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +623 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +858 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +19 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +529 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +305 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +111 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +429 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +781 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +5 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +15 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +351 -0
- 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 +118 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +182 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +892 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +55 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +16 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +69 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +2 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +43 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +67 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +64 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +4 -2
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +42 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +58 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +18 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +192 -85
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +111 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +622 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +478 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +1 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +2 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +23 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +44 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +345 -113
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +34 -24
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +11 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +248 -24
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
- 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 +6 -6
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +5 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
- 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/commandLineAutoApproveAnalyzer.js +12 -12
- 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/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 +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +280 -65
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +47 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- 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 +6 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +38 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
6
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
8
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
9
|
+
import { ISessionOpenOptions } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener";
|
|
10
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
11
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
12
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
13
|
+
import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
|
|
14
|
+
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
15
|
+
import { AgentSessionProviders } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions";
|
|
16
|
+
import { INewSession } from "../../chat/browser/newSession.js";
|
|
17
|
+
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
18
|
+
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
19
|
+
import { ISessionsManagementService } from "@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/sessions/browser/sessionsManagementService.service";
|
|
20
|
+
export declare const IsNewChatSessionContext: RawContextKey<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* An active session item extends IChatSessionItem with repository information.
|
|
23
|
+
* - For agent session items: repository is the workingDirectory from metadata
|
|
24
|
+
* - For new sessions: repository comes from the session option with id 'repository'
|
|
25
|
+
*/
|
|
26
|
+
export interface IActiveSessionItem {
|
|
27
|
+
readonly resource: URI;
|
|
28
|
+
readonly isUntitled: boolean;
|
|
29
|
+
readonly label: string | undefined;
|
|
30
|
+
readonly repository: URI | undefined;
|
|
31
|
+
readonly worktree: URI | undefined;
|
|
32
|
+
readonly providerType: string;
|
|
33
|
+
}
|
|
34
|
+
export declare class SessionsManagementService extends Disposable implements ISessionsManagementService {
|
|
35
|
+
private readonly storageService;
|
|
36
|
+
private readonly uriIdentityService;
|
|
37
|
+
private readonly agentSessionsService;
|
|
38
|
+
private readonly chatSessionsService;
|
|
39
|
+
private readonly chatWidgetService;
|
|
40
|
+
private readonly chatService;
|
|
41
|
+
private readonly instantiationService;
|
|
42
|
+
private readonly logService;
|
|
43
|
+
private readonly commandService;
|
|
44
|
+
private readonly languageModelsService;
|
|
45
|
+
readonly _serviceBrand: undefined;
|
|
46
|
+
private readonly _activeSession;
|
|
47
|
+
readonly activeSession: IObservable<IActiveSessionItem | undefined>;
|
|
48
|
+
private readonly _newActiveSessionDisposables;
|
|
49
|
+
private readonly _newSession;
|
|
50
|
+
private lastSelectedSession;
|
|
51
|
+
private readonly isNewChatSessionContext;
|
|
52
|
+
constructor(storageService: IStorageService, uriIdentityService: IUriIdentityService, agentSessionsService: IAgentSessionsService, chatSessionsService: IChatSessionsService, chatWidgetService: IChatWidgetService, chatService: IChatService, instantiationService: IInstantiationService, logService: ILogService, contextKeyService: IContextKeyService, commandService: ICommandService, languageModelsService: ILanguageModelsService);
|
|
53
|
+
private refreshActiveSessionFromModel;
|
|
54
|
+
private showNextSession;
|
|
55
|
+
private getRepositoryFromMetadata;
|
|
56
|
+
private getRepositoryFromSessionOption;
|
|
57
|
+
getActiveSession(): IActiveSessionItem | undefined;
|
|
58
|
+
openSession(sessionResource: URI, openOptions?: ISessionOpenOptions): Promise<void>;
|
|
59
|
+
createNewSessionForTarget(target: AgentSessionProviders, sessionResource: URI, defaultRepoUri?: URI): Promise<INewSession>;
|
|
60
|
+
/**
|
|
61
|
+
* Open an existing agent session - set it as active and reveal it.
|
|
62
|
+
*/
|
|
63
|
+
private openExistingSession;
|
|
64
|
+
/**
|
|
65
|
+
* Open a new remote session - load the model first, then show it in the ChatViewPane.
|
|
66
|
+
*/
|
|
67
|
+
private openNewSession;
|
|
68
|
+
sendRequestForNewSession(sessionResource: URI, options?: {
|
|
69
|
+
openNewSessionView?: boolean;
|
|
70
|
+
}): Promise<void>;
|
|
71
|
+
private doSendRequestForNewSession;
|
|
72
|
+
openNewSessionView(): void;
|
|
73
|
+
private setActiveSession;
|
|
74
|
+
private doSetActiveSession;
|
|
75
|
+
private equalsSessionItem;
|
|
76
|
+
commitWorktreeFiles(session: IActiveSessionItem, fileUris: URI[]): Promise<void>;
|
|
77
|
+
private loadLastSelectedSession;
|
|
78
|
+
private saveLastSelectedSession;
|
|
79
|
+
}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
+
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
10
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
12
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
13
|
+
import { openSession } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener';
|
|
14
|
+
import { ChatViewPaneTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
15
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
16
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
17
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
18
|
+
import { ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
19
|
+
import { isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
20
|
+
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
21
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
22
|
+
import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
23
|
+
import { LocalNewSession, RemoteNewSession } from '../../chat/browser/newSession.js';
|
|
24
|
+
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
25
|
+
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
26
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
27
|
+
|
|
28
|
+
const IsNewChatSessionContext = ( new RawContextKey("isNewChatSession", true));
|
|
29
|
+
const LAST_SELECTED_SESSION_KEY = "agentSessions.lastSelectedSession";
|
|
30
|
+
const repositoryOptionId = "repository";
|
|
31
|
+
let SessionsManagementService = class SessionsManagementService extends Disposable {
|
|
32
|
+
constructor(
|
|
33
|
+
storageService,
|
|
34
|
+
uriIdentityService,
|
|
35
|
+
agentSessionsService,
|
|
36
|
+
chatSessionsService,
|
|
37
|
+
chatWidgetService,
|
|
38
|
+
chatService,
|
|
39
|
+
instantiationService,
|
|
40
|
+
logService,
|
|
41
|
+
contextKeyService,
|
|
42
|
+
commandService,
|
|
43
|
+
languageModelsService
|
|
44
|
+
) {
|
|
45
|
+
super();
|
|
46
|
+
this.storageService = storageService;
|
|
47
|
+
this.uriIdentityService = uriIdentityService;
|
|
48
|
+
this.agentSessionsService = agentSessionsService;
|
|
49
|
+
this.chatSessionsService = chatSessionsService;
|
|
50
|
+
this.chatWidgetService = chatWidgetService;
|
|
51
|
+
this.chatService = chatService;
|
|
52
|
+
this.instantiationService = instantiationService;
|
|
53
|
+
this.logService = logService;
|
|
54
|
+
this.commandService = commandService;
|
|
55
|
+
this.languageModelsService = languageModelsService;
|
|
56
|
+
this._activeSession = observableValue(this, undefined);
|
|
57
|
+
this.activeSession = this._activeSession;
|
|
58
|
+
this._newActiveSessionDisposables = this._register(( new DisposableStore()));
|
|
59
|
+
this._newSession = this._register(( new MutableDisposable()));
|
|
60
|
+
this.isNewChatSessionContext = IsNewChatSessionContext.bindTo(contextKeyService);
|
|
61
|
+
this.lastSelectedSession = this.loadLastSelectedSession();
|
|
62
|
+
this._register(this.storageService.onWillSaveState(() => this.saveLastSelectedSession()));
|
|
63
|
+
this._register(
|
|
64
|
+
this.agentSessionsService.model.onDidChangeSessions(() => this.refreshActiveSessionFromModel())
|
|
65
|
+
);
|
|
66
|
+
this._register(this.agentSessionsService.model.onDidChangeSessionArchivedState(e => {
|
|
67
|
+
if (e.isArchived()) {
|
|
68
|
+
const currentActive = this._activeSession.get();
|
|
69
|
+
if (currentActive && ( currentActive.resource.toString()) === ( e.resource.toString())) {
|
|
70
|
+
this.openNewSessionView();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
refreshActiveSessionFromModel() {
|
|
76
|
+
const currentActive = this._activeSession.get();
|
|
77
|
+
if (!currentActive) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const agentSession = this.agentSessionsService.model.getSession(currentActive.resource);
|
|
81
|
+
if (!agentSession) {
|
|
82
|
+
if (currentActive.isUntitled) {
|
|
83
|
+
const chatViewWidgets = this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat);
|
|
84
|
+
const committedResource = chatViewWidgets[0]?.viewModel?.sessionResource;
|
|
85
|
+
const committedSession = committedResource ? this.agentSessionsService.model.getSession(committedResource) : undefined;
|
|
86
|
+
if (committedSession) {
|
|
87
|
+
this.setActiveSession(committedSession);
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
this.showNextSession();
|
|
91
|
+
}
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this.setActiveSession(agentSession);
|
|
95
|
+
}
|
|
96
|
+
showNextSession() {
|
|
97
|
+
const sessions = this.agentSessionsService.model.sessions.filter(s => !s.isArchived()).sort(
|
|
98
|
+
(a, b) => (b.timing.lastRequestEnded ?? b.timing.created) - (a.timing.lastRequestEnded ?? a.timing.created)
|
|
99
|
+
);
|
|
100
|
+
if (sessions.length > 0) {
|
|
101
|
+
this.setActiveSession(sessions[0]);
|
|
102
|
+
this.instantiationService.invokeFunction(openSession, sessions[0]);
|
|
103
|
+
} else {
|
|
104
|
+
this.openNewSessionView();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
getRepositoryFromMetadata(metadata) {
|
|
108
|
+
if (!metadata) {
|
|
109
|
+
return [undefined, undefined];
|
|
110
|
+
}
|
|
111
|
+
const repositoryPath = metadata?.repositoryPath;
|
|
112
|
+
const repositoryPathUri = typeof repositoryPath === "string" ? URI.file(repositoryPath) : undefined;
|
|
113
|
+
const worktreePath = metadata?.worktreePath;
|
|
114
|
+
const worktreePathUri = typeof worktreePath === "string" ? URI.file(worktreePath) : undefined;
|
|
115
|
+
return [
|
|
116
|
+
URI.isUri(repositoryPathUri) ? repositoryPathUri : undefined,
|
|
117
|
+
URI.isUri(worktreePathUri) ? worktreePathUri : undefined
|
|
118
|
+
];
|
|
119
|
+
}
|
|
120
|
+
getRepositoryFromSessionOption(sessionResource) {
|
|
121
|
+
const optionValue = this.chatSessionsService.getSessionOption(sessionResource, repositoryOptionId);
|
|
122
|
+
if (!optionValue) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const optionId = typeof optionValue === "string" ? optionValue : optionValue.id;
|
|
126
|
+
if (!optionId) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
return ( URI.parse(optionId));
|
|
131
|
+
} catch {
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
getActiveSession() {
|
|
136
|
+
return this._activeSession.get();
|
|
137
|
+
}
|
|
138
|
+
async openSession(sessionResource, openOptions) {
|
|
139
|
+
this.isNewChatSessionContext.set(false);
|
|
140
|
+
const existingSession = this.agentSessionsService.model.getSession(sessionResource);
|
|
141
|
+
if (existingSession) {
|
|
142
|
+
await this.openExistingSession(existingSession, openOptions);
|
|
143
|
+
} else if (this._newSession.value && this.uriIdentityService.extUri.isEqual(sessionResource, this._newSession.value.resource)) {
|
|
144
|
+
await this.openNewSession(this._newSession.value);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async createNewSessionForTarget(target, sessionResource, defaultRepoUri) {
|
|
148
|
+
if (!this.isNewChatSessionContext.get()) {
|
|
149
|
+
this.isNewChatSessionContext.set(true);
|
|
150
|
+
}
|
|
151
|
+
let newSession;
|
|
152
|
+
if (target === AgentSessionProviders.Background || target === AgentSessionProviders.Local) {
|
|
153
|
+
newSession = this.instantiationService.createInstance(LocalNewSession, sessionResource, defaultRepoUri);
|
|
154
|
+
} else {
|
|
155
|
+
newSession = this.instantiationService.createInstance(RemoteNewSession, sessionResource, target);
|
|
156
|
+
}
|
|
157
|
+
this._newSession.value = newSession;
|
|
158
|
+
this.setActiveSession(newSession);
|
|
159
|
+
return newSession;
|
|
160
|
+
}
|
|
161
|
+
async openExistingSession(session, openOptions) {
|
|
162
|
+
this.setActiveSession(session);
|
|
163
|
+
await this.instantiationService.invokeFunction(openSession, session, openOptions);
|
|
164
|
+
}
|
|
165
|
+
async openNewSession(newSession) {
|
|
166
|
+
this.setActiveSession(newSession);
|
|
167
|
+
const sessionResource = newSession.resource;
|
|
168
|
+
const chatWidget = await this.chatWidgetService.openSession(sessionResource, ChatViewPaneTarget);
|
|
169
|
+
if (!chatWidget?.viewModel) {
|
|
170
|
+
this.logService.warn(`[ActiveSessionService] Failed to open session: ${( sessionResource.toString())}`);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const repository = this.getRepositoryFromSessionOption(sessionResource);
|
|
174
|
+
this.logService.info(`[ActiveSessionService] Active session changed (new): ${( sessionResource.toString())}, repository: ${repository?.toString() ?? "none"}`);
|
|
175
|
+
}
|
|
176
|
+
async sendRequestForNewSession(sessionResource, options) {
|
|
177
|
+
const session = this._newSession.value;
|
|
178
|
+
if (!session) {
|
|
179
|
+
this.logService.error(
|
|
180
|
+
`[SessionsManagementService] No new session found for resource: ${( sessionResource.toString())}`
|
|
181
|
+
);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (!this.uriIdentityService.extUri.isEqual(sessionResource, session.resource)) {
|
|
185
|
+
this.logService.error(
|
|
186
|
+
`[SessionsManagementService] Session resource mismatch. Expected: ${( session.resource.toString())}, received: ${( sessionResource.toString())}`
|
|
187
|
+
);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const query = session.query;
|
|
191
|
+
if (!query) {
|
|
192
|
+
this.logService.error("[SessionsManagementService] No query set on session");
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const contribution = this.chatSessionsService.getChatSessionContribution(session.target);
|
|
196
|
+
const sendOptions = {
|
|
197
|
+
location: ChatAgentLocation.Chat,
|
|
198
|
+
userSelectedModelId: session.modelId,
|
|
199
|
+
modeInfo: {
|
|
200
|
+
kind: ChatModeKind.Agent,
|
|
201
|
+
isBuiltin: true,
|
|
202
|
+
modeInstructions: undefined,
|
|
203
|
+
modeId: "agent",
|
|
204
|
+
applyCodeBlockSuggestionId: undefined
|
|
205
|
+
},
|
|
206
|
+
agentIdSilent: contribution?.type,
|
|
207
|
+
attachedContext: session.attachedContext
|
|
208
|
+
};
|
|
209
|
+
await this.chatSessionsService.getOrCreateChatSession(session.resource, CancellationToken.None);
|
|
210
|
+
await this.doSendRequestForNewSession(
|
|
211
|
+
session,
|
|
212
|
+
query,
|
|
213
|
+
sendOptions,
|
|
214
|
+
session.selectedOptions,
|
|
215
|
+
options?.openNewSessionView
|
|
216
|
+
);
|
|
217
|
+
this._newSession.value = undefined;
|
|
218
|
+
}
|
|
219
|
+
async doSendRequestForNewSession(session, query, sendOptions, selectedOptions, openNewSessionView) {
|
|
220
|
+
await this.openSession(session.resource);
|
|
221
|
+
if (openNewSessionView) {
|
|
222
|
+
this.openNewSessionView();
|
|
223
|
+
}
|
|
224
|
+
const modelRef = this.chatService.acquireExistingSession(session.resource);
|
|
225
|
+
if (modelRef) {
|
|
226
|
+
const model = modelRef.object;
|
|
227
|
+
if (session.modelId) {
|
|
228
|
+
const languageModel = this.languageModelsService.lookupLanguageModel(session.modelId);
|
|
229
|
+
if (languageModel) {
|
|
230
|
+
model.inputModel.setState({
|
|
231
|
+
selectedModel: {
|
|
232
|
+
identifier: session.modelId,
|
|
233
|
+
metadata: languageModel
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (selectedOptions && selectedOptions.size > 0) {
|
|
239
|
+
const contributedSession = model.contributedChatSession;
|
|
240
|
+
if (contributedSession) {
|
|
241
|
+
const initialSessionOptions = ( [...selectedOptions.entries()].map(([optionId, value]) => ({
|
|
242
|
+
optionId,
|
|
243
|
+
value
|
|
244
|
+
})));
|
|
245
|
+
model.setContributedChatSession({
|
|
246
|
+
...contributedSession,
|
|
247
|
+
initialSessionOptions
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
modelRef.dispose();
|
|
252
|
+
}
|
|
253
|
+
const existingResources = ( new Set(( this.agentSessionsService.model.sessions.map(s => ( s.resource.toString())))));
|
|
254
|
+
const result = await this.chatService.sendRequest(session.resource, query, sendOptions);
|
|
255
|
+
if (result.kind === "rejected") {
|
|
256
|
+
this.logService.error(`[ActiveSessionService] sendRequest rejected: ${result.reason}`);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
let newSession = this.agentSessionsService.model.sessions.find(s => !( existingResources.has(( s.resource.toString()))));
|
|
260
|
+
if (!newSession) {
|
|
261
|
+
let listener;
|
|
262
|
+
newSession = await Promise.race([( new Promise(resolve => {
|
|
263
|
+
listener = this.agentSessionsService.model.onDidChangeSessions(() => {
|
|
264
|
+
const session = this.agentSessionsService.model.sessions.find(s => !( existingResources.has(( s.resource.toString()))));
|
|
265
|
+
if (session) {
|
|
266
|
+
resolve(session);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
})), ( new Promise(resolve => setTimeout(() => resolve(undefined), 30_000)))]);
|
|
270
|
+
listener?.dispose();
|
|
271
|
+
}
|
|
272
|
+
if (newSession && !openNewSessionView) {
|
|
273
|
+
this.setActiveSession(newSession);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
openNewSessionView() {
|
|
277
|
+
if (this.isNewChatSessionContext.get()) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
this.isNewChatSessionContext.set(true);
|
|
281
|
+
this.setActiveSession(undefined);
|
|
282
|
+
}
|
|
283
|
+
setActiveSession(session) {
|
|
284
|
+
let activeSessionItem;
|
|
285
|
+
if (session) {
|
|
286
|
+
if (isAgentSession(session)) {
|
|
287
|
+
this.lastSelectedSession = session.resource;
|
|
288
|
+
const [repository, worktree] = this.getRepositoryFromMetadata(session.metadata);
|
|
289
|
+
activeSessionItem = {
|
|
290
|
+
isUntitled: this.chatService.getSession(session.resource)?.contributedChatSession?.isUntitled ?? true,
|
|
291
|
+
label: session.label,
|
|
292
|
+
resource: session.resource,
|
|
293
|
+
repository,
|
|
294
|
+
worktree,
|
|
295
|
+
providerType: session.providerType
|
|
296
|
+
};
|
|
297
|
+
} else {
|
|
298
|
+
activeSessionItem = {
|
|
299
|
+
isUntitled: true,
|
|
300
|
+
label: undefined,
|
|
301
|
+
resource: session.resource,
|
|
302
|
+
repository: session.repoUri,
|
|
303
|
+
worktree: undefined,
|
|
304
|
+
providerType: session.target
|
|
305
|
+
};
|
|
306
|
+
this._newActiveSessionDisposables.clear();
|
|
307
|
+
this._newActiveSessionDisposables.add(session.onDidChange(e => {
|
|
308
|
+
if (e === "repoUri") {
|
|
309
|
+
this.doSetActiveSession({
|
|
310
|
+
isUntitled: true,
|
|
311
|
+
label: undefined,
|
|
312
|
+
resource: session.resource,
|
|
313
|
+
repository: session.repoUri,
|
|
314
|
+
worktree: undefined,
|
|
315
|
+
providerType: session.target
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}));
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
this.doSetActiveSession(activeSessionItem);
|
|
322
|
+
}
|
|
323
|
+
doSetActiveSession(activeSessionItem) {
|
|
324
|
+
if (this.equalsSessionItem(this._activeSession.get(), activeSessionItem)) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (activeSessionItem) {
|
|
328
|
+
this.logService.info(`[ActiveSessionService] Active session changed: ${( activeSessionItem.resource.toString())}`);
|
|
329
|
+
this.logService.trace(
|
|
330
|
+
`[ActiveSessionService] Active session details: ${JSON.stringify(activeSessionItem)}`
|
|
331
|
+
);
|
|
332
|
+
} else {
|
|
333
|
+
this.logService.trace("[ActiveSessionService] Active session cleared");
|
|
334
|
+
}
|
|
335
|
+
this._activeSession.set(activeSessionItem, undefined);
|
|
336
|
+
}
|
|
337
|
+
equalsSessionItem(a, b) {
|
|
338
|
+
if (a === b) {
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
if (!a || !b) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
return (a.label === b.label && ( a.resource.toString()) === ( b.resource.toString()) && a.repository?.toString() === b.repository?.toString() && a.worktree?.toString() === b.worktree?.toString());
|
|
345
|
+
}
|
|
346
|
+
async commitWorktreeFiles(session, fileUris) {
|
|
347
|
+
const worktreeUri = session.worktree;
|
|
348
|
+
if (!worktreeUri) {
|
|
349
|
+
throw ( new Error("Cannot commit worktree files: active session has no associated worktree"));
|
|
350
|
+
}
|
|
351
|
+
for (const fileUri of fileUris) {
|
|
352
|
+
await this.commandService.executeCommand("github.copilot.cli.sessions.commitToWorktree", {
|
|
353
|
+
worktreeUri,
|
|
354
|
+
fileUri
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
await this.agentSessionsService.model.resolve(AgentSessionProviders.Background);
|
|
358
|
+
}
|
|
359
|
+
loadLastSelectedSession() {
|
|
360
|
+
const cached = this.storageService.get(LAST_SELECTED_SESSION_KEY, StorageScope.WORKSPACE);
|
|
361
|
+
if (!cached) {
|
|
362
|
+
return undefined;
|
|
363
|
+
}
|
|
364
|
+
try {
|
|
365
|
+
return ( URI.parse(cached));
|
|
366
|
+
} catch {
|
|
367
|
+
return undefined;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
saveLastSelectedSession() {
|
|
371
|
+
if (this.lastSelectedSession) {
|
|
372
|
+
this.storageService.store(LAST_SELECTED_SESSION_KEY, ( this.lastSelectedSession.toString()), StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
SessionsManagementService = ( __decorate([( __param(0, IStorageService)), ( __param(1, IUriIdentityService)), ( __param(2, IAgentSessionsService)), ( __param(3, IChatSessionsService)), ( __param(4, IChatWidgetService)), ( __param(5, IChatService)), ( __param(6, IInstantiationService)), ( __param(7, ILogService)), ( __param(8, IContextKeyService)), ( __param(9, ICommandService)), ( __param(10, ILanguageModelsService))], SessionsManagementService));
|
|
377
|
+
|
|
378
|
+
export { IsNewChatSessionContext, SessionsManagementService };
|
package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts
CHANGED
|
@@ -19,9 +19,8 @@ export declare class ChatAccessibilityService extends Disposable implements ICha
|
|
|
19
19
|
private readonly _chatService;
|
|
20
20
|
readonly _serviceBrand: undefined;
|
|
21
21
|
private _pendingSignalMap;
|
|
22
|
-
private readonly
|
|
22
|
+
private readonly toasts;
|
|
23
23
|
constructor(_accessibilitySignalService: IAccessibilitySignalService, _instantiationService: IInstantiationService, _configurationService: IConfigurationService, _hostService: IHostService, _widgetService: IChatWidgetService, _chatService: IChatService);
|
|
24
|
-
dispose(): void;
|
|
25
24
|
acceptRequest(uri: URI, skipRequestSignal?: boolean): void;
|
|
26
25
|
disposeRequest(requestId: URI): void;
|
|
27
26
|
acceptResponse(widget: ChatWidget, container: HTMLElement, response: IChatResponseViewModel | string | undefined, requestId: URI, isVoiceInput?: boolean): void;
|
package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { getWindow
|
|
3
|
+
import { getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
5
5
|
import { status, alert } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
6
|
-
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
6
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
8
|
-
import { Disposable, DisposableMap,
|
|
7
|
+
import { Disposable, DisposableMap, DisposableSet, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
9
|
import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
11
10
|
import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
@@ -17,8 +16,9 @@ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/s
|
|
|
17
16
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
18
17
|
import { ElicitationState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
19
18
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
20
|
-
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
19
|
+
import { ChatConfiguration, ChatNotificationMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
21
20
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
21
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
22
22
|
import { AccessibilityVoiceSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/speech/common/speechService';
|
|
23
23
|
|
|
24
24
|
const CHAT_RESPONSE_PENDING_ALLOWANCE_MS = 4000;
|
|
@@ -39,7 +39,7 @@ let ChatAccessibilityService = class ChatAccessibilityService extends Disposable
|
|
|
39
39
|
this._widgetService = _widgetService;
|
|
40
40
|
this._chatService = _chatService;
|
|
41
41
|
this._pendingSignalMap = this._register(( new DisposableMap()));
|
|
42
|
-
this.
|
|
42
|
+
this.toasts = this._register(( new DisposableSet()));
|
|
43
43
|
this._register(this._widgetService.onDidBackgroundSession(e => {
|
|
44
44
|
const session = this._chatService.getSession(e);
|
|
45
45
|
if (!session) {
|
|
@@ -52,13 +52,6 @@ let ChatAccessibilityService = class ChatAccessibilityService extends Disposable
|
|
|
52
52
|
this.disposeRequest(e);
|
|
53
53
|
}));
|
|
54
54
|
}
|
|
55
|
-
dispose() {
|
|
56
|
-
for (const ds of Array.from(this.notifications)) {
|
|
57
|
-
ds.dispose();
|
|
58
|
-
}
|
|
59
|
-
this.notifications.clear();
|
|
60
|
-
super.dispose();
|
|
61
|
-
}
|
|
62
55
|
acceptRequest(uri, skipRequestSignal) {
|
|
63
56
|
if (!skipRequestSignal) {
|
|
64
57
|
this._accessibilitySignalService.playSignal(AccessibilitySignal.chatRequestSent, {
|
|
@@ -103,51 +96,45 @@ let ChatAccessibilityService = class ChatAccessibilityService extends Disposable
|
|
|
103
96
|
});
|
|
104
97
|
}
|
|
105
98
|
async _showOSNotification(widget, container, responseContent) {
|
|
106
|
-
|
|
99
|
+
const mode = this._configurationService.getValue(ChatConfiguration.NotifyWindowOnResponseReceived);
|
|
100
|
+
if (mode === ChatNotificationMode.Off) {
|
|
107
101
|
return;
|
|
108
102
|
}
|
|
109
103
|
const targetWindow = getWindow(container);
|
|
110
104
|
if (!targetWindow) {
|
|
111
105
|
return;
|
|
112
106
|
}
|
|
113
|
-
|
|
107
|
+
const isFocused = targetWindow.document.hasFocus();
|
|
108
|
+
if (mode !== ChatNotificationMode.Always && isFocused) {
|
|
114
109
|
return;
|
|
115
110
|
}
|
|
116
111
|
if (!responseContent || !responseContent.trim()) {
|
|
117
112
|
return;
|
|
118
113
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
ds.dispose();
|
|
124
|
-
this.notifications.delete(ds);
|
|
125
|
-
}
|
|
126
|
-
const title = widget?.viewModel?.model.title ? ( localize(4598, "Chat: {0}", widget.viewModel.model.title)) : ( localize(4599, "Untitled Chat"));
|
|
127
|
-
const notification = await triggerNotification(title, {
|
|
128
|
-
detail: ( localize(4600, "New chat response."))
|
|
129
|
-
});
|
|
130
|
-
if (!notification) {
|
|
131
|
-
return;
|
|
114
|
+
if (!isFocused) {
|
|
115
|
+
await this._hostService.focus(targetWindow, {
|
|
116
|
+
mode: FocusMode.Notify
|
|
117
|
+
});
|
|
132
118
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
this.toasts.clearAndDisposeAll();
|
|
120
|
+
const title = widget?.viewModel?.model.title ? ( localize(4685, "Chat: {0}", widget.viewModel.model.title)) : ( localize(4686, "Untitled Chat"));
|
|
121
|
+
const cts = ( new CancellationTokenSource());
|
|
122
|
+
const disposable = toDisposable(() => cts.dispose(true));
|
|
123
|
+
this.toasts.add(disposable);
|
|
124
|
+
const {
|
|
125
|
+
clicked
|
|
126
|
+
} = await this._hostService.showToast({
|
|
127
|
+
title,
|
|
128
|
+
body: ( localize(4687, "New chat response."))
|
|
129
|
+
}, cts.token);
|
|
130
|
+
this.toasts.deleteAndDispose(disposable);
|
|
131
|
+
if (clicked) {
|
|
137
132
|
await this._hostService.focus(targetWindow, {
|
|
138
133
|
mode: FocusMode.Force
|
|
139
134
|
});
|
|
140
135
|
await this._widgetService.reveal(widget);
|
|
141
136
|
widget.focusInput();
|
|
142
|
-
|
|
143
|
-
this.notifications.delete(disposables);
|
|
144
|
-
}));
|
|
145
|
-
disposables.add(this._hostService.onDidChangeFocus(focus => {
|
|
146
|
-
if (focus) {
|
|
147
|
-
disposables.dispose();
|
|
148
|
-
this.notifications.delete(disposables);
|
|
149
|
-
}
|
|
150
|
-
}));
|
|
137
|
+
}
|
|
151
138
|
}
|
|
152
139
|
};
|
|
153
140
|
ChatAccessibilityService = ( __decorate([( __param(0, IAccessibilitySignalService)), ( __param(1, IInstantiationService)), ( __param(2, IConfigurationService)), ( __param(3, IHostService)), ( __param(4, IChatWidgetService)), ( __param(5, IChatService))], ChatAccessibilityService));
|
package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
|
4
4
|
import { AccessibleViewProviderId, AccessibleViewType, IAccessibleViewContentProvider } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
5
5
|
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
6
6
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
7
8
|
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
8
|
-
import { IChatExtensionsContent, IChatPullRequestContent, IChatSubagentToolInvocationData, IChatTerminalToolInvocationData, IChatTodoListContent, IChatToolInputInvocationData, ILegacyChatTerminalToolInvocationData, IToolResultOutputDetailsSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
9
|
+
import { IChatExtensionsContent, IChatPullRequestContent, IChatSimpleToolInvocationData, IChatSubagentToolInvocationData, IChatTerminalToolInvocationData, IChatTodoListContent, IChatToolInputInvocationData, IChatToolResourcesInvocationData, ILegacyChatTerminalToolInvocationData, IToolResultOutputDetailsSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
9
10
|
import { IToolResultInputOutputDetails, IToolResultOutputDetails } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
10
11
|
import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
11
12
|
import { Location } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
@@ -16,8 +17,10 @@ export declare class ChatResponseAccessibleView implements IAccessibleViewImplem
|
|
|
16
17
|
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").RawContextKey<boolean>;
|
|
17
18
|
getProvider(accessor: ServicesAccessor): ChatResponseAccessibleProvider | undefined;
|
|
18
19
|
}
|
|
19
|
-
type ToolSpecificData = IChatTerminalToolInvocationData | ILegacyChatTerminalToolInvocationData | IChatToolInputInvocationData | IChatExtensionsContent | IChatPullRequestContent | IChatTodoListContent | IChatSubagentToolInvocationData;
|
|
20
|
+
type ToolSpecificData = IChatTerminalToolInvocationData | ILegacyChatTerminalToolInvocationData | IChatToolInputInvocationData | IChatExtensionsContent | IChatPullRequestContent | IChatTodoListContent | IChatSubagentToolInvocationData | IChatSimpleToolInvocationData | IChatToolResourcesInvocationData;
|
|
20
21
|
type ResultDetails = Array<URI | Location> | IToolResultInputOutputDetails | IToolResultOutputDetails | IToolResultOutputDetailsSerialized;
|
|
22
|
+
export declare const CHAT_ACCESSIBLE_VIEW_INCLUDE_THINKING_STORAGE_KEY = "chat.accessibleView.includeThinking";
|
|
23
|
+
export declare function isThinkingContentIncludedInAccessibleView(storageService: IStorageService): boolean;
|
|
21
24
|
export declare function getToolSpecificDataDescription(toolSpecificData: ToolSpecificData | undefined): string;
|
|
22
25
|
export declare function getResultDetailsDescription(resultDetails: ResultDetails | undefined): {
|
|
23
26
|
input?: string;
|
|
@@ -28,11 +31,13 @@ export declare function getToolInvocationA11yDescription(invocationMessage: stri
|
|
|
28
31
|
declare class ChatResponseAccessibleProvider extends Disposable implements IAccessibleViewContentProvider {
|
|
29
32
|
private readonly _widget;
|
|
30
33
|
private readonly _wasOpenedFromInput;
|
|
34
|
+
private readonly _storageService;
|
|
31
35
|
private _focusedItem;
|
|
32
36
|
private readonly _focusedItemDisposables;
|
|
37
|
+
private readonly _storageDisposables;
|
|
33
38
|
private readonly _onDidChangeContent;
|
|
34
39
|
readonly onDidChangeContent: Event<void>;
|
|
35
|
-
constructor(_widget: IChatWidget, item: ChatTreeItem, _wasOpenedFromInput: boolean);
|
|
40
|
+
constructor(_widget: IChatWidget, item: ChatTreeItem, _wasOpenedFromInput: boolean, _storageService: IStorageService);
|
|
36
41
|
readonly id = AccessibleViewProviderId.PanelChat;
|
|
37
42
|
readonly verbositySettingKey = AccessibilityVerbositySettingId.Chat;
|
|
38
43
|
readonly options: {
|
|
@@ -43,6 +48,7 @@ declare class ChatResponseAccessibleProvider extends Disposable implements IAcce
|
|
|
43
48
|
private _renderMessageAsPlaintext;
|
|
44
49
|
private _getContent;
|
|
45
50
|
private _normalizeWhitespace;
|
|
51
|
+
private _shouldIncludeThinkingContent;
|
|
46
52
|
onClose(): void;
|
|
47
53
|
provideNextContent(): string | undefined;
|
|
48
54
|
providePreviousContent(): string | undefined;
|