@codingame/monaco-vscode-chat-service-override 32.0.2 → 33.0.4
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.d.ts +1 -1
- package/index.js +15 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +170 -24
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +372 -66
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +18 -1
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +160 -31
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +19 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +134 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +257 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +84 -3
- package/vscode/src/vs/platform/agentHost/common/agentService.js +9 -1
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +61 -1
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +61 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +4 -4
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +1 -1
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +2 -7
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +8 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +10 -6
- 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 +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +180 -174
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +330 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +267 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +53 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- 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 +4 -4
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -28
- 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.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +150 -119
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +45 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +58 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +88 -70
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +82 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +89 -71
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -2843
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +2934 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +53 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +131 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +23 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +91 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +203 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +31 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +88 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +21 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +55 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +106 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- 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/promptFileContributions.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- 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.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +106 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.d.ts → chatOutputPartStateCache.d.ts} +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.js → chatOutputPartStateCache.js} +19 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +58 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- 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.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +19 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -2
- 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 +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +14 -15
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +155 -156
- package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.d.ts +88 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +237 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +600 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +47 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.js +7 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css +298 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- 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 +7 -7
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- 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.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +78 -7
- 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/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +15 -11
- 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 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.js +286 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +285 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +19 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +415 -47
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +2 -7
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +1 -1
- package/vscode/src/vs/base/common/defaultAccount.d.ts +0 -69
- package/vscode/src/vs/base/common/defaultAccount.js +0 -12
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +0 -85
|
@@ -18,7 +18,6 @@ import { language } from '@codingame/monaco-vscode-api/vscode/vs/base/common/pla
|
|
|
18
18
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
19
19
|
import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
20
20
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
21
|
-
import { stripIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iconLabels';
|
|
22
21
|
import { IInlineCompletionsService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/inlineCompletionsService.service';
|
|
23
22
|
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
24
23
|
import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
|
|
@@ -43,6 +42,8 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
43
42
|
import { IContextViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
44
43
|
import { isNewUser } from './chatStatus.js';
|
|
45
44
|
import { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.service';
|
|
45
|
+
import { GitHubPaths } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount';
|
|
46
|
+
import { IDefaultAccountService } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service';
|
|
46
47
|
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
47
48
|
import { isCompletionsEnabled } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/completionsEnablement';
|
|
48
49
|
|
|
@@ -55,9 +56,6 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
55
56
|
static {
|
|
56
57
|
this.QUICK_SETTINGS_COLLAPSED_KEY = "chatStatusDashboard.quickSettingsCollapsed";
|
|
57
58
|
}
|
|
58
|
-
static {
|
|
59
|
-
this.CONTRIBUTED_COLLAPSED_KEY_PREFIX = "chatStatusDashboard.contributedCollapsed.";
|
|
60
|
-
}
|
|
61
59
|
constructor(
|
|
62
60
|
options,
|
|
63
61
|
chatEntitlementService,
|
|
@@ -74,7 +72,8 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
74
72
|
markdownRendererService,
|
|
75
73
|
languageFeaturesService,
|
|
76
74
|
contextViewService,
|
|
77
|
-
storageService
|
|
75
|
+
storageService,
|
|
76
|
+
defaultAccountService
|
|
78
77
|
) {
|
|
79
78
|
super();
|
|
80
79
|
this.options = options;
|
|
@@ -93,6 +92,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
93
92
|
this.languageFeaturesService = languageFeaturesService;
|
|
94
93
|
this.contextViewService = contextViewService;
|
|
95
94
|
this.storageService = storageService;
|
|
95
|
+
this.defaultAccountService = defaultAccountService;
|
|
96
96
|
this.element = $("div.chat-status-bar-entry-tooltip");
|
|
97
97
|
this.dateFormatter = safeIntl.DateTimeFormat(language, {
|
|
98
98
|
month: "short",
|
|
@@ -121,26 +121,25 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
121
121
|
} = this.chatEntitlementService.quotas;
|
|
122
122
|
const hasQuotas = !!(chat || premiumChat);
|
|
123
123
|
const isAnonymousWithSentiment = this.chatEntitlementService.anonymous && this.chatEntitlementService.sentiment.completed;
|
|
124
|
+
const isPooledQuotaDepleted = premiumChat?.unlimited && premiumChat.hasQuota === false && !(this.chatEntitlementService.quotas.additionalUsageEnabled ?? false);
|
|
124
125
|
const hasUsageSection = hasQuotas || isAnonymousWithSentiment;
|
|
125
|
-
const hasVisibleUsageContent = chat?.unlimited === false || premiumChat?.unlimited === false || completions?.unlimited === false || isAnonymousWithSentiment;
|
|
126
|
+
const hasVisibleUsageContent = chat?.unlimited === false || premiumChat?.unlimited === false || (!this.options?.compactQuotaLayout && completions?.unlimited === false) || isAnonymousWithSentiment || isPooledQuotaDepleted;
|
|
126
127
|
const contributedEntries = [...this.chatStatusItemService.getEntries()];
|
|
127
128
|
const hasQuickSettingsContent = !this.options?.disableInlineSuggestionsSettings || !this.options?.disableModelSelection || !this.options?.disableProviderOptions || !this.options?.disableCompletionsSnooze;
|
|
128
129
|
let headerAdditionalSpendButton;
|
|
129
|
-
if (hasUsageSection) {
|
|
130
|
+
if (hasUsageSection && !this.options?.compactQuotaLayout) {
|
|
130
131
|
const planName = getChatPlanName(this.chatEntitlementService.entitlement);
|
|
131
132
|
const headerHost = this.options?.titleHeaderContainer ?? this.element;
|
|
132
133
|
const header = this.renderHeader(headerHost, this._store, planName, toAction({
|
|
133
134
|
id: "workbench.action.manageCopilot",
|
|
134
|
-
label: ( localize(
|
|
135
|
-
tooltip: ( localize(
|
|
135
|
+
label: ( localize(6688, "Manage Copilot Settings")),
|
|
136
|
+
tooltip: ( localize(6689, "Manage Copilot Settings")),
|
|
136
137
|
class: ThemeIcon.asClassName(Codicon.settings),
|
|
137
|
-
run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(
|
|
138
|
+
run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(this.defaultAccountService.resolveGitHubUrl(GitHubPaths.copilotSettings)))))
|
|
138
139
|
}));
|
|
139
140
|
const canConfigureAdditionalSpend = this.chatEntitlementService.entitlement === ChatEntitlement.EDU || this.chatEntitlementService.entitlement === ChatEntitlement.Pro || this.chatEntitlementService.entitlement === ChatEntitlement.ProPlus || this.chatEntitlementService.entitlement === ChatEntitlement.Max;
|
|
140
|
-
const showUpgrade = this.chatEntitlementService.
|
|
141
|
+
const showUpgrade = this.chatEntitlementService.quotas.canUpgradePlan ?? false;
|
|
141
142
|
const actionBarElement = header.lastElementChild;
|
|
142
|
-
const initialAdditionalUsageEnabled = this.chatEntitlementService.quotas.additionalUsageEnabled ?? false;
|
|
143
|
-
const initialIsUsageBasedBilling = this.chatEntitlementService.quotas.usageBasedBilling === true;
|
|
144
143
|
if (canConfigureAdditionalSpend) {
|
|
145
144
|
headerAdditionalSpendButton = this._store.add(( new Button(header, {
|
|
146
145
|
...defaultButtonStyles,
|
|
@@ -148,29 +147,25 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
148
147
|
secondary: true
|
|
149
148
|
})));
|
|
150
149
|
headerAdditionalSpendButton.element.classList.add("header-cta-button");
|
|
151
|
-
|
|
152
|
-
headerAdditionalSpendButton.label = initialAdditionalUsageEnabled ? ( localize(6627, "Manage Additional Spend")) : ( localize(6628, "Configure Additional Spend"));
|
|
153
|
-
} else {
|
|
154
|
-
headerAdditionalSpendButton.label = initialAdditionalUsageEnabled ? ( localize(6629, "Manage Budget")) : ( localize(6630, "Configure Budget"));
|
|
155
|
-
}
|
|
150
|
+
headerAdditionalSpendButton.label = ( localize(6690, "Manage Budget"));
|
|
156
151
|
this._store.add(headerAdditionalSpendButton.onDidClick(() => {
|
|
157
152
|
this.telemetryService.publicLog2("workbenchActionExecuted", {
|
|
158
153
|
id: "workbench.action.chat.manageAdditionalSpend",
|
|
159
154
|
from: "chat-status"
|
|
160
155
|
});
|
|
161
|
-
this.runCommandAndClose(() => this.openerService.open(( URI.parse(
|
|
156
|
+
this.runCommandAndClose(() => this.openerService.open(( URI.parse(this.defaultAccountService.resolveGitHubUrl(GitHubPaths.billingBudgets)))));
|
|
162
157
|
}));
|
|
163
158
|
if (actionBarElement) {
|
|
164
159
|
header.insertBefore(headerAdditionalSpendButton.element, actionBarElement);
|
|
165
160
|
}
|
|
166
161
|
}
|
|
167
|
-
if (showUpgrade) {
|
|
162
|
+
if (showUpgrade && !canConfigureAdditionalSpend) {
|
|
168
163
|
const upgradeButton = this._store.add(( new Button(header, {
|
|
169
164
|
...defaultButtonStyles,
|
|
170
165
|
hoverDelegate: nativeHoverDelegate
|
|
171
166
|
})));
|
|
172
167
|
upgradeButton.element.classList.add("header-cta-button");
|
|
173
|
-
upgradeButton.label = ( localize(
|
|
168
|
+
upgradeButton.label = ( localize(6691, "Upgrade"));
|
|
174
169
|
this._store.add(
|
|
175
170
|
upgradeButton.onDidClick(() => this.runCommandAndClose("workbench.action.chat.upgradePlan"))
|
|
176
171
|
);
|
|
@@ -179,16 +174,56 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
179
174
|
}
|
|
180
175
|
}
|
|
181
176
|
}
|
|
177
|
+
if (hasUsageSection && this.options?.compactQuotaLayout && this.options.ctaButtonsContainer) {
|
|
178
|
+
const ctaContainer = this.options.ctaButtonsContainer;
|
|
179
|
+
const canConfigureAdditionalSpend = this.chatEntitlementService.entitlement === ChatEntitlement.EDU || this.chatEntitlementService.entitlement === ChatEntitlement.Pro || this.chatEntitlementService.entitlement === ChatEntitlement.ProPlus || this.chatEntitlementService.entitlement === ChatEntitlement.Max;
|
|
180
|
+
const showUpgrade = this.chatEntitlementService.quotas.canUpgradePlan ?? false;
|
|
181
|
+
if (canConfigureAdditionalSpend) {
|
|
182
|
+
headerAdditionalSpendButton = this._store.add(( new Button(ctaContainer, {
|
|
183
|
+
...defaultButtonStyles,
|
|
184
|
+
hoverDelegate: nativeHoverDelegate,
|
|
185
|
+
secondary: true
|
|
186
|
+
})));
|
|
187
|
+
headerAdditionalSpendButton.label = ( localize(6690, "Manage Budget"));
|
|
188
|
+
this._store.add(headerAdditionalSpendButton.onDidClick(() => {
|
|
189
|
+
this.telemetryService.publicLog2("workbenchActionExecuted", {
|
|
190
|
+
id: "workbench.action.chat.manageAdditionalSpend",
|
|
191
|
+
from: "chat-status"
|
|
192
|
+
});
|
|
193
|
+
this.runCommandAndClose(() => this.openerService.open(( URI.parse(this.defaultAccountService.resolveGitHubUrl(GitHubPaths.billingBudgets)))));
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
if (showUpgrade && !canConfigureAdditionalSpend) {
|
|
197
|
+
const upgradeButton = this._store.add(( new Button(ctaContainer, {
|
|
198
|
+
...defaultButtonStyles,
|
|
199
|
+
hoverDelegate: nativeHoverDelegate
|
|
200
|
+
})));
|
|
201
|
+
upgradeButton.label = ( localize(6691, "Upgrade"));
|
|
202
|
+
this._store.add(
|
|
203
|
+
upgradeButton.onDidClick(() => this.runCommandAndClose("workbench.action.chat.upgradePlan"))
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (this.options?.compactQuotaLayout) {
|
|
208
|
+
this.element.classList.add("compact");
|
|
209
|
+
}
|
|
182
210
|
const updatePromise = this.chatEntitlementService.update(token);
|
|
183
211
|
if (hasVisibleUsageContent) {
|
|
184
212
|
this.renderUsageContent(this.element, token, headerAdditionalSpendButton, updatePromise);
|
|
185
213
|
}
|
|
186
214
|
const hasPremiumUnlimited = !!premiumChat?.unlimited;
|
|
187
215
|
if (hasPremiumUnlimited) {
|
|
188
|
-
const includedTitle = this.chatEntitlementService.quotas.usageBasedBilling ? ( localize(
|
|
216
|
+
const includedTitle = this.chatEntitlementService.quotas.usageBasedBilling ? ( localize(6692, "Credits")) : ( localize(6693, "Premium Requests"));
|
|
189
217
|
const includedContainer = this.element.appendChild($("div.quota-indicator.included"));
|
|
190
|
-
|
|
191
|
-
|
|
218
|
+
if (this.options?.compactQuotaLayout) {
|
|
219
|
+
const planName = getChatPlanName(this.chatEntitlementService.entitlement);
|
|
220
|
+
includedContainer.classList.add("compact");
|
|
221
|
+
includedContainer.appendChild($("div.quota-title", undefined, planName));
|
|
222
|
+
includedContainer.appendChild($("div.description", undefined, isPooledQuotaDepleted ? ( localize(6694, "{0} limit reached.", includedTitle)) : ( localize(6695, "{0} included with your organization's plan.", includedTitle))));
|
|
223
|
+
} else {
|
|
224
|
+
includedContainer.appendChild($("div.quota-title", undefined, includedTitle));
|
|
225
|
+
includedContainer.appendChild($("div.description", undefined, isPooledQuotaDepleted ? ( localize(6696, "Organization limit reached.")) : ( localize(6697, "Included with your organization's plan."))));
|
|
226
|
+
}
|
|
192
227
|
}
|
|
193
228
|
if (hasQuickSettingsContent) {
|
|
194
229
|
const hasContentAbove = hasUsageSection || hasVisibleUsageContent || hasPremiumUnlimited;
|
|
@@ -207,14 +242,16 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
207
242
|
resetDate,
|
|
208
243
|
resetDateHasTime
|
|
209
244
|
} = this.chatEntitlementService.quotas;
|
|
245
|
+
const compact = !!this.options?.compactQuotaLayout;
|
|
246
|
+
const planName = compact ? getChatPlanName(this.chatEntitlementService.entitlement) : undefined;
|
|
210
247
|
if (chatQuota || premiumChatQuota || completionsQuota) {
|
|
211
248
|
const resetLabel = resetDate ? (resetDateHasTime ? ( localize(
|
|
212
|
-
|
|
249
|
+
6698,
|
|
213
250
|
"Resets {0} at {1}",
|
|
214
251
|
this.dateFormatter.value.format(( new Date(resetDate))),
|
|
215
252
|
this.timeFormatter.value.format(( new Date(resetDate)))
|
|
216
253
|
)) : ( localize(
|
|
217
|
-
|
|
254
|
+
6699,
|
|
218
255
|
"Resets {0}",
|
|
219
256
|
this.dateFormatter.value.format(( new Date(resetDate)))
|
|
220
257
|
))) : undefined;
|
|
@@ -227,26 +264,34 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
227
264
|
}
|
|
228
265
|
let chatQuotaIndicator;
|
|
229
266
|
if (chatQuota && !chatQuota.unlimited && (!this.chatEntitlementService.quotas.usageBasedBilling || this.chatEntitlementService.entitlement === ChatEntitlement.Free)) {
|
|
230
|
-
const chatLabel = this.chatEntitlementService.quotas.usageBasedBilling && this.chatEntitlementService.entitlement === ChatEntitlement.Free ? ( localize(
|
|
231
|
-
chatQuotaIndicator = this.createQuotaIndicator(
|
|
267
|
+
const chatLabel = this.chatEntitlementService.quotas.usageBasedBilling && this.chatEntitlementService.entitlement === ChatEntitlement.Free ? ( localize(6700, "Credits")) : ( localize(6701, "Chat messages"));
|
|
268
|
+
chatQuotaIndicator = this.createQuotaIndicator(
|
|
269
|
+
container,
|
|
270
|
+
chatQuota,
|
|
271
|
+
chatLabel,
|
|
272
|
+
resetLabel,
|
|
273
|
+
compact ? planName : undefined
|
|
274
|
+
);
|
|
232
275
|
}
|
|
233
276
|
let premiumChatQuotaIndicator;
|
|
234
277
|
if (premiumChatQuota && !premiumChatQuota.unlimited && premiumChatQuota.percentRemaining >= 0) {
|
|
235
278
|
const isUBB = this.chatEntitlementService.quotas.usageBasedBilling;
|
|
236
|
-
const premiumChatLabel = isUBB ? ( localize(
|
|
279
|
+
const premiumChatLabel = isUBB ? ( localize(6700, "Credits")) : this.chatEntitlementService.quotas.additionalUsageEnabled ? ( localize(6702, "Included premium requests")) : ( localize(6703, "Premium requests"));
|
|
237
280
|
const premiumChatResetLabel = isUBB ? this.formatResetAtLabel(premiumChatQuota.resetAt) ?? resetLabel : resetLabel;
|
|
238
|
-
premiumChatQuotaIndicator = this.createQuotaIndicator(
|
|
281
|
+
premiumChatQuotaIndicator = this.createQuotaIndicator(
|
|
282
|
+
container,
|
|
283
|
+
premiumChatQuota,
|
|
284
|
+
premiumChatLabel,
|
|
285
|
+
premiumChatResetLabel,
|
|
286
|
+
compact ? planName : undefined
|
|
287
|
+
);
|
|
239
288
|
}
|
|
240
289
|
let completionsQuotaIndicator;
|
|
241
|
-
const showCompletions = completionsQuota && !completionsQuota.unlimited && completionsQuota.percentRemaining >= 0 && (!this.chatEntitlementService.quotas.usageBasedBilling || this.chatEntitlementService.entitlement === ChatEntitlement.Free);
|
|
290
|
+
const showCompletions = !compact && completionsQuota && !completionsQuota.unlimited && completionsQuota.percentRemaining >= 0 && (!this.chatEntitlementService.quotas.usageBasedBilling || this.chatEntitlementService.entitlement === ChatEntitlement.Free);
|
|
242
291
|
if (showCompletions) {
|
|
243
|
-
completionsQuotaIndicator = this.createQuotaIndicator(container, completionsQuota, ( localize(
|
|
292
|
+
completionsQuotaIndicator = this.createQuotaIndicator(container, completionsQuota, ( localize(6704, "Inline Suggestions")), resetLabel, compact ? planName : undefined);
|
|
244
293
|
}
|
|
245
|
-
|
|
246
|
-
await updatePromise;
|
|
247
|
-
if (token.isCancellationRequested) {
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
294
|
+
const updateIndicators = () => {
|
|
250
295
|
const {
|
|
251
296
|
chat: chatQuota,
|
|
252
297
|
premiumChat: premiumChatQuota,
|
|
@@ -262,22 +307,29 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
262
307
|
completionsQuotaIndicator?.(completionsQuota);
|
|
263
308
|
}
|
|
264
309
|
const {
|
|
265
|
-
calloutVisible
|
|
266
|
-
additionalUsageEnabled: isAdditionalUsageEnabled
|
|
310
|
+
calloutVisible
|
|
267
311
|
} = globalCalloutUpdater();
|
|
268
312
|
if (headerAdditionalSpendButton) {
|
|
269
313
|
headerAdditionalSpendButton.element.style.display = calloutVisible ? "" : "none";
|
|
270
|
-
|
|
271
|
-
if (isUBB) {
|
|
272
|
-
headerAdditionalSpendButton.label = isAdditionalUsageEnabled ? ( localize(6627, "Manage Additional Spend")) : ( localize(6628, "Configure Additional Spend"));
|
|
273
|
-
} else {
|
|
274
|
-
headerAdditionalSpendButton.label = isAdditionalUsageEnabled ? ( localize(6629, "Manage Budget")) : ( localize(6630, "Configure Budget"));
|
|
275
|
-
}
|
|
314
|
+
headerAdditionalSpendButton.label = ( localize(6690, "Manage Budget"));
|
|
276
315
|
}
|
|
316
|
+
};
|
|
317
|
+
(async () => {
|
|
318
|
+
await updatePromise;
|
|
319
|
+
if (token.isCancellationRequested) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
updateIndicators();
|
|
277
323
|
})();
|
|
324
|
+
this._store.add(
|
|
325
|
+
this.chatEntitlementService.onDidChangeQuotaRemaining(() => updateIndicators())
|
|
326
|
+
);
|
|
327
|
+
this._store.add(
|
|
328
|
+
this.chatEntitlementService.onDidChangeQuotaExceeded(() => updateIndicators())
|
|
329
|
+
);
|
|
278
330
|
}
|
|
279
331
|
else if (this.chatEntitlementService.anonymous && this.chatEntitlementService.sentiment.completed) {
|
|
280
|
-
this.createQuotaIndicator(container, ( localize(
|
|
332
|
+
this.createQuotaIndicator(container, ( localize(6705, "Limited")), ( localize(6701, "Chat messages")));
|
|
281
333
|
}
|
|
282
334
|
}
|
|
283
335
|
renderInlineSuggestionsSection(hasContentAbove) {
|
|
@@ -290,10 +342,10 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
290
342
|
const activeLanguageId = this.editorService.activeTextEditorLanguageId;
|
|
291
343
|
const getStatusText = () => {
|
|
292
344
|
if (!this.canUseChat()) {
|
|
293
|
-
return localize(
|
|
345
|
+
return localize(6706, "Disabled");
|
|
294
346
|
}
|
|
295
347
|
const enabled = activeLanguageId ? isCompletionsEnabled(this.configurationService, activeLanguageId) : isCompletionsEnabled(this.configurationService);
|
|
296
|
-
return enabled ? ( localize(
|
|
348
|
+
return enabled ? ( localize(6707, "Enabled")) : ( localize(6706, "Disabled"));
|
|
297
349
|
};
|
|
298
350
|
let disclosureHeader;
|
|
299
351
|
let chevron;
|
|
@@ -304,7 +356,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
304
356
|
disclosureHeader.classList.add("no-border");
|
|
305
357
|
}
|
|
306
358
|
disclosureHeader.setAttribute("aria-expanded", String(!collapsed));
|
|
307
|
-
disclosureHeader.appendChild($("span.collapsible-label", undefined, ( localize(
|
|
359
|
+
disclosureHeader.appendChild($("span.collapsible-label", undefined, ( localize(6708, "Inline Suggestions"))));
|
|
308
360
|
chevron = disclosureHeader.appendChild($("span.collapsible-chevron"));
|
|
309
361
|
chevron.classList.add(
|
|
310
362
|
...ThemeIcon.asClassNameArray(collapsed ? Codicon.chevronRight : Codicon.chevronDown)
|
|
@@ -345,66 +397,61 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
345
397
|
this.renderInlineSuggestionsContent(collapsibleInner);
|
|
346
398
|
}
|
|
347
399
|
renderContributedSections(contributedEntries) {
|
|
348
|
-
const nonCollapsible = !!this.options?.disableContributedSectionsCollapsible;
|
|
349
400
|
for (const item of contributedEntries) {
|
|
350
|
-
const storageKey = ChatStatusDashboard_1.CONTRIBUTED_COLLAPSED_KEY_PREFIX + item.id;
|
|
351
|
-
const collapsed = !nonCollapsible && this.storageService.getBoolean(storageKey, StorageScope.PROFILE, true);
|
|
352
401
|
const headerLabel = typeof item.label === "string" ? item.label : item.label.label;
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
);
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
402
|
+
let headerLink = typeof item.label === "string" ? undefined : item.label.link;
|
|
403
|
+
let linkDescription = typeof item.label === "string" ? undefined : item.label.helpText;
|
|
404
|
+
const section = this.element.appendChild($("div.contributed-section"));
|
|
405
|
+
const header = section.appendChild($("div.collapsible-header.non-collapsible"));
|
|
406
|
+
header.appendChild($("span.collapsible-label", undefined, headerLabel));
|
|
407
|
+
if (linkDescription || headerLink) {
|
|
408
|
+
const infoIcon = header.appendChild($("span.contributed-info-icon"));
|
|
409
|
+
infoIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.info));
|
|
410
|
+
this._store.add(this.hoverService.setupDelayedHover(infoIcon, () => {
|
|
411
|
+
const hoverContent = ( new MarkdownString("", {
|
|
412
|
+
isTrusted: true
|
|
413
|
+
}));
|
|
414
|
+
if (linkDescription) {
|
|
415
|
+
hoverContent.appendText(linkDescription);
|
|
416
|
+
}
|
|
417
|
+
if (headerLink) {
|
|
418
|
+
if (linkDescription) {
|
|
419
|
+
hoverContent.appendText(" ");
|
|
420
|
+
}
|
|
421
|
+
hoverContent.appendMarkdown(`[${( localize(6709, "Learn More"))}](${headerLink})`);
|
|
422
|
+
}
|
|
423
|
+
return {
|
|
424
|
+
content: hoverContent
|
|
425
|
+
};
|
|
426
|
+
}, {
|
|
427
|
+
reducedDelay: true
|
|
428
|
+
}));
|
|
366
429
|
}
|
|
367
|
-
const statusEl =
|
|
430
|
+
const statusEl = header.appendChild($("span.collapsible-status"));
|
|
368
431
|
statusEl.append(...renderLabelWithIcons(item.description));
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
if (!nonCollapsible) {
|
|
377
|
-
const toggle = () => {
|
|
378
|
-
const isCollapsed = collapsibleContent.classList.toggle("collapsed");
|
|
379
|
-
collapsibleInner.inert = isCollapsed;
|
|
380
|
-
disclosureHeader.setAttribute("aria-expanded", String(!isCollapsed));
|
|
381
|
-
chevron.className = "collapsible-chevron";
|
|
382
|
-
chevron.classList.add(
|
|
383
|
-
...ThemeIcon.asClassNameArray(isCollapsed ? Codicon.chevronRight : Codicon.chevronDown)
|
|
384
|
-
);
|
|
385
|
-
this.storageService.store(storageKey, isCollapsed, StorageScope.PROFILE, StorageTarget.USER);
|
|
386
|
-
};
|
|
387
|
-
this._store.add(addDisposableListener(disclosureHeader, EventType.CLICK, () => toggle()));
|
|
432
|
+
let currentTooltip = item.tooltip;
|
|
433
|
+
if (currentTooltip) {
|
|
434
|
+
this._store.add(this.hoverService.setupDelayedHover(statusEl, () => ({
|
|
435
|
+
content: currentTooltip ?? ""
|
|
436
|
+
}), {
|
|
437
|
+
reducedDelay: true
|
|
438
|
+
}));
|
|
388
439
|
}
|
|
389
440
|
const sectionDisposables = this._store.add(( new MutableDisposable()));
|
|
390
441
|
const sectionStore = ( new DisposableStore());
|
|
391
442
|
sectionDisposables.value = sectionStore;
|
|
392
|
-
let descriptionEl;
|
|
393
|
-
if (headerLink) {
|
|
394
|
-
descriptionEl = collapsibleInner.appendChild($("div.section-description"));
|
|
395
|
-
const descText = linkDescription ? `${linkDescription} [${( localize(6646, "Learn More"))}](${headerLink})` : `[${( localize(6646, "Learn More"))}](${headerLink})`;
|
|
396
|
-
this.renderTextPlus(descriptionEl, descText, sectionStore);
|
|
397
|
-
}
|
|
398
443
|
let detailEl;
|
|
399
444
|
if (item.detail) {
|
|
400
|
-
detailEl =
|
|
445
|
+
detailEl = section.appendChild($("div.contributed-detail"));
|
|
401
446
|
this.renderTextPlus(detailEl, item.detail, sectionStore);
|
|
402
447
|
}
|
|
403
448
|
this._store.add(this.chatStatusItemService.onDidChange(e => {
|
|
404
449
|
if (e.entry.id === item.id) {
|
|
405
450
|
statusEl.textContent = "";
|
|
406
451
|
statusEl.append(...renderLabelWithIcons(e.entry.description));
|
|
407
|
-
|
|
452
|
+
currentTooltip = e.entry.tooltip;
|
|
453
|
+
headerLink = typeof e.entry.label === "string" ? undefined : e.entry.label.link;
|
|
454
|
+
linkDescription = typeof e.entry.label === "string" ? undefined : e.entry.label.helpText;
|
|
408
455
|
const newStore = ( new DisposableStore());
|
|
409
456
|
sectionDisposables.value = newStore;
|
|
410
457
|
if (detailEl) {
|
|
@@ -416,34 +463,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
416
463
|
detailEl = undefined;
|
|
417
464
|
}
|
|
418
465
|
} else if (e.entry.detail) {
|
|
419
|
-
detailEl =
|
|
466
|
+
detailEl = section.appendChild($("div.contributed-detail"));
|
|
420
467
|
this.renderTextPlus(detailEl, e.entry.detail, newStore);
|
|
421
468
|
}
|
|
422
|
-
const updatedLink = typeof e.entry.label === "string" ? undefined : e.entry.label.link;
|
|
423
|
-
const updatedLinkDesc = typeof e.entry.label === "string" ? undefined : e.entry.label.helpText;
|
|
424
|
-
if (descriptionEl) {
|
|
425
|
-
if (updatedLink) {
|
|
426
|
-
descriptionEl.textContent = "";
|
|
427
|
-
const descText = updatedLinkDesc ? `${updatedLinkDesc} [${( localize(6646, "Learn More"))}](${updatedLink})` : `[${( localize(6646, "Learn More"))}](${updatedLink})`;
|
|
428
|
-
this.renderTextPlus(descriptionEl, descText, newStore);
|
|
429
|
-
} else {
|
|
430
|
-
descriptionEl.remove();
|
|
431
|
-
descriptionEl = undefined;
|
|
432
|
-
}
|
|
433
|
-
} else if (updatedLink) {
|
|
434
|
-
descriptionEl = collapsibleInner.insertBefore($("div.section-description"), detailEl ?? null);
|
|
435
|
-
const descText = updatedLinkDesc ? `${updatedLinkDesc} [${( localize(6646, "Learn More"))}](${updatedLink})` : `[${( localize(6646, "Learn More"))}](${updatedLink})`;
|
|
436
|
-
this.renderTextPlus(descriptionEl, descText, newStore);
|
|
437
|
-
}
|
|
438
469
|
}
|
|
439
470
|
}));
|
|
440
471
|
}
|
|
441
472
|
}
|
|
442
473
|
renderSetupSection() {
|
|
443
|
-
const
|
|
474
|
+
const hasByokModels = this.chatEntitlementService.hasByokModels;
|
|
475
|
+
const newUser = isNewUser(this.chatEntitlementService) && !hasByokModels;
|
|
444
476
|
const anonymousUser = this.chatEntitlementService.anonymous;
|
|
445
477
|
const disabled = this.chatEntitlementService.sentiment.disabled || this.chatEntitlementService.sentiment.untrusted;
|
|
446
|
-
const signedOut = this.chatEntitlementService.entitlement === ChatEntitlement.Unknown;
|
|
478
|
+
const signedOut = this.chatEntitlementService.entitlement === ChatEntitlement.Unknown && !hasByokModels;
|
|
447
479
|
if (!(newUser || signedOut || disabled)) {
|
|
448
480
|
return;
|
|
449
481
|
}
|
|
@@ -452,7 +484,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
452
484
|
let descriptionClass = ".description";
|
|
453
485
|
if (newUser && anonymousUser) {
|
|
454
486
|
descriptionText = ( new MarkdownString(( localize(
|
|
455
|
-
|
|
487
|
+
6710,
|
|
456
488
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
|
|
457
489
|
defaultChat.provider.default.name,
|
|
458
490
|
defaultChat.provider.default.name,
|
|
@@ -463,23 +495,23 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
463
495
|
}));
|
|
464
496
|
descriptionClass = `${descriptionClass}.terms`;
|
|
465
497
|
} else if (newUser) {
|
|
466
|
-
descriptionText = ( localize(
|
|
498
|
+
descriptionText = ( localize(6711, "Set up Copilot to use AI features."));
|
|
467
499
|
} else if (anonymousUser) {
|
|
468
|
-
descriptionText = ( localize(
|
|
500
|
+
descriptionText = ( localize(6712, "Sign in to enable more Copilot AI features."));
|
|
469
501
|
} else if (disabled) {
|
|
470
|
-
descriptionText = ( localize(
|
|
502
|
+
descriptionText = ( localize(6713, "Enable Copilot to use AI features."));
|
|
471
503
|
} else {
|
|
472
|
-
descriptionText = ( localize(
|
|
504
|
+
descriptionText = ( localize(6714, "Sign in to use Copilot AI features."));
|
|
473
505
|
}
|
|
474
506
|
let buttonLabel;
|
|
475
507
|
if (newUser) {
|
|
476
|
-
buttonLabel = ( localize(
|
|
508
|
+
buttonLabel = ( localize(6715, "Use AI Features"));
|
|
477
509
|
} else if (anonymousUser) {
|
|
478
|
-
buttonLabel = ( localize(
|
|
510
|
+
buttonLabel = ( localize(6716, "Enable more AI Features"));
|
|
479
511
|
} else if (disabled) {
|
|
480
|
-
buttonLabel = ( localize(
|
|
512
|
+
buttonLabel = ( localize(6717, "Enable AI Features"));
|
|
481
513
|
} else {
|
|
482
|
-
buttonLabel = ( localize(
|
|
514
|
+
buttonLabel = ( localize(6718, "Sign in to use AI Features"));
|
|
483
515
|
}
|
|
484
516
|
let commandId;
|
|
485
517
|
if (newUser && anonymousUser) {
|
|
@@ -515,7 +547,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
515
547
|
const currentModel = modelInfo.models.find(m => m.id === modelInfo.currentModelId);
|
|
516
548
|
if (currentModel) {
|
|
517
549
|
const modelContainer = container.appendChild($("div.model-selection"));
|
|
518
|
-
modelContainer.appendChild($("span.model-text", undefined, ( localize(
|
|
550
|
+
modelContainer.appendChild($("span.model-text", undefined, ( localize(6719, "Model"))));
|
|
519
551
|
const selectOptions = ( modelInfo.models.map(m => ({
|
|
520
552
|
text: m.name
|
|
521
553
|
})));
|
|
@@ -526,7 +558,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
526
558
|
this.contextViewService,
|
|
527
559
|
defaultSelectBoxStyles,
|
|
528
560
|
{
|
|
529
|
-
ariaLabel: ( localize(
|
|
561
|
+
ariaLabel: ( localize(6720, "Select Model")),
|
|
530
562
|
optionsAsChildren: true
|
|
531
563
|
}
|
|
532
564
|
)));
|
|
@@ -559,7 +591,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
559
591
|
this.contextViewService,
|
|
560
592
|
defaultSelectBoxStyles,
|
|
561
593
|
{
|
|
562
|
-
ariaLabel: ( localize(
|
|
594
|
+
ariaLabel: ( localize(6721, "Select {0}", option.label)),
|
|
563
595
|
optionsAsChildren: true
|
|
564
596
|
}
|
|
565
597
|
)));
|
|
@@ -578,7 +610,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
578
610
|
}
|
|
579
611
|
if (!this.options?.disableCompletionsSnooze && this.canUseChat()) {
|
|
580
612
|
const snooze = append(container, $("div.snooze-completions"));
|
|
581
|
-
this.createCompletionsSnooze(snooze, ( localize(
|
|
613
|
+
this.createCompletionsSnooze(snooze, ( localize(6722, "Snooze")));
|
|
582
614
|
}
|
|
583
615
|
}
|
|
584
616
|
canUseChat() {
|
|
@@ -635,14 +667,16 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
635
667
|
}
|
|
636
668
|
const resetDate = ( new Date(resetAt * 1000));
|
|
637
669
|
return localize(
|
|
638
|
-
|
|
670
|
+
6698,
|
|
639
671
|
"Resets {0} at {1}",
|
|
640
672
|
this.dateFormatter.value.format(resetDate),
|
|
641
673
|
this.timeFormatter.value.format(resetDate)
|
|
642
674
|
);
|
|
643
675
|
}
|
|
644
|
-
createQuotaIndicator(container, quota, label, resetLabel) {
|
|
676
|
+
createQuotaIndicator(container, quota, label, resetLabel, compactTitle) {
|
|
677
|
+
const isCompact = !!compactTitle;
|
|
645
678
|
const quotaValue = $("span.quota-value");
|
|
679
|
+
const quotaValueText = isCompact ? quotaValue.appendChild($("span.quota-value-text")) : quotaValue;
|
|
646
680
|
const quotaValueSuffix = $("span.quota-value-suffix");
|
|
647
681
|
const quotaBit = $("div.quota-bit");
|
|
648
682
|
const resetValue = $("span.quota-reset");
|
|
@@ -650,28 +684,32 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
650
684
|
resetValue.textContent = resetLabel;
|
|
651
685
|
}
|
|
652
686
|
const quotaPercentage = $("div.quota-percentage", undefined, quotaValue, quotaValueSuffix);
|
|
653
|
-
quotaPercentage.tabIndex = 0;
|
|
654
|
-
|
|
687
|
+
quotaPercentage.tabIndex = isCompact ? -1 : 0;
|
|
688
|
+
const indicatorElement = $(
|
|
655
689
|
"div.quota-indicator",
|
|
656
690
|
undefined,
|
|
657
|
-
$("div.quota-title", undefined, label),
|
|
691
|
+
$("div.quota-title", undefined, isCompact ? compactTitle : label),
|
|
658
692
|
$("div.quota-details", undefined, quotaPercentage, resetValue),
|
|
659
|
-
$("div.quota-bar", undefined, quotaBit)
|
|
660
|
-
)
|
|
693
|
+
...(isCompact ? [] : [$("div.quota-bar", undefined, quotaBit)])
|
|
694
|
+
);
|
|
695
|
+
if (isCompact) {
|
|
696
|
+
indicatorElement.classList.add("compact");
|
|
697
|
+
}
|
|
698
|
+
container.appendChild(indicatorElement);
|
|
661
699
|
let currentQuota = quota;
|
|
662
700
|
let isHovered = false;
|
|
663
701
|
const showPercentage = () => {
|
|
664
702
|
if (typeof currentQuota === "string") {
|
|
665
|
-
|
|
703
|
+
quotaValueText.textContent = currentQuota;
|
|
666
704
|
quotaValueSuffix.textContent = "";
|
|
667
705
|
} else {
|
|
668
706
|
const usedPercentage = Math.max(0, 100 - currentQuota.percentRemaining);
|
|
669
|
-
|
|
670
|
-
|
|
707
|
+
quotaValueText.textContent = ( localize(
|
|
708
|
+
6723,
|
|
671
709
|
"{0}%",
|
|
672
710
|
this.quotaPercentageFormatter.value.format(Math.floor(usedPercentage))
|
|
673
711
|
));
|
|
674
|
-
quotaValueSuffix.textContent = ` ${( localize(
|
|
712
|
+
quotaValueSuffix.textContent = isCompact ? ( localize(6724, "{0} used", label)) : ` ${( localize(6725, "used"))}`;
|
|
675
713
|
}
|
|
676
714
|
};
|
|
677
715
|
const showCredits = () => {
|
|
@@ -680,23 +718,24 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
680
718
|
const used = total * (100 - currentQuota.percentRemaining) / 100;
|
|
681
719
|
const usedFormatted = this.quotaCreditsFormatter.value.format(used);
|
|
682
720
|
const totalFormatted = this.quotaCreditsFormatter.value.format(total);
|
|
683
|
-
|
|
684
|
-
quotaValueSuffix.textContent = ` ${( localize(
|
|
721
|
+
quotaValueText.textContent = ( localize(6726, "{0} / {1}", usedFormatted, totalFormatted));
|
|
722
|
+
quotaValueSuffix.textContent = isCompact ? ( localize(6724, "{0} used", label)) : ` ${( localize(6725, "used"))}`;
|
|
685
723
|
}
|
|
686
724
|
};
|
|
687
|
-
|
|
725
|
+
const hoverTarget = isCompact ? quotaValueText : quotaPercentage;
|
|
726
|
+
this._store.add(addDisposableListener(hoverTarget, EventType.MOUSE_ENTER, () => {
|
|
688
727
|
isHovered = true;
|
|
689
728
|
showCredits();
|
|
690
729
|
}));
|
|
691
|
-
this._store.add(addDisposableListener(
|
|
730
|
+
this._store.add(addDisposableListener(hoverTarget, EventType.MOUSE_LEAVE, () => {
|
|
692
731
|
isHovered = false;
|
|
693
732
|
showPercentage();
|
|
694
733
|
}));
|
|
695
|
-
this._store.add(addDisposableListener(
|
|
734
|
+
this._store.add(addDisposableListener(hoverTarget, EventType.FOCUS, () => {
|
|
696
735
|
isHovered = true;
|
|
697
736
|
showCredits();
|
|
698
737
|
}));
|
|
699
|
-
this._store.add(addDisposableListener(
|
|
738
|
+
this._store.add(addDisposableListener(hoverTarget, EventType.BLUR, () => {
|
|
700
739
|
isHovered = false;
|
|
701
740
|
showPercentage();
|
|
702
741
|
}));
|
|
@@ -739,38 +778,39 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
739
778
|
allQuotas.push(quotas.completions);
|
|
740
779
|
}
|
|
741
780
|
const maxUsedPercentage = allQuotas.length > 0 ? Math.max(...( allQuotas.map(q => Math.max(0, 100 - q.percentRemaining)))) : 0;
|
|
781
|
+
const isPooledQuotaExhausted = quotas.premiumChat?.unlimited && quotas.premiumChat.hasQuota === false;
|
|
742
782
|
if (maxUsedPercentage >= 100 && additionalUsageEnabled) {
|
|
743
783
|
quotaCallout.style.display = "";
|
|
744
784
|
quotaCallout.className = "quota-callout info";
|
|
745
785
|
calloutIcon.className = `callout-icon ${ThemeIcon.asClassName(Codicon.info)}`;
|
|
746
786
|
calloutText.textContent = isUsageBasedBilling ? ( localize(
|
|
747
|
-
|
|
748
|
-
"Additional
|
|
787
|
+
6727,
|
|
788
|
+
"Additional budget is configured. Usage will continue until limits reset."
|
|
749
789
|
)) : ( localize(
|
|
750
|
-
|
|
790
|
+
6728,
|
|
751
791
|
"Premium request budget is configured. Usage will continue until limits reset."
|
|
752
792
|
));
|
|
753
793
|
} else if (maxUsedPercentage >= 75 && maxUsedPercentage < 100 && additionalUsageEnabled) {
|
|
754
794
|
quotaCallout.style.display = "";
|
|
755
795
|
quotaCallout.className = "quota-callout info";
|
|
756
796
|
calloutIcon.className = `callout-icon ${ThemeIcon.asClassName(Codicon.info)}`;
|
|
757
|
-
calloutText.textContent = isUsageBasedBilling ? ( localize(
|
|
758
|
-
} else if (maxUsedPercentage >= 100 && !additionalUsageEnabled) {
|
|
797
|
+
calloutText.textContent = isUsageBasedBilling ? ( localize(6729, "Once the limit is reached, additional budget will be used.")) : ( localize(6730, "Once the limit is reached, premium request budget will be used."));
|
|
798
|
+
} else if ((maxUsedPercentage >= 100 || isPooledQuotaExhausted) && !additionalUsageEnabled) {
|
|
759
799
|
quotaCallout.style.display = "";
|
|
760
800
|
quotaCallout.className = "quota-callout info";
|
|
761
801
|
calloutIcon.className = `callout-icon ${ThemeIcon.asClassName(Codicon.info)}`;
|
|
762
802
|
calloutText.textContent = isEnterpriseUser ? ( localize(
|
|
763
|
-
|
|
803
|
+
6731,
|
|
764
804
|
"Copilot is paused until the limit resets. Contact your administrator for more information."
|
|
765
|
-
)) : ( localize(
|
|
805
|
+
)) : ( localize(6732, "Copilot is paused until the limit resets."));
|
|
766
806
|
} else if (maxUsedPercentage >= 75 && !additionalUsageEnabled) {
|
|
767
807
|
quotaCallout.style.display = "";
|
|
768
808
|
quotaCallout.className = "quota-callout info";
|
|
769
809
|
calloutIcon.className = `callout-icon ${ThemeIcon.asClassName(Codicon.info)}`;
|
|
770
810
|
calloutText.textContent = isEnterpriseUser ? ( localize(
|
|
771
|
-
|
|
811
|
+
6733,
|
|
772
812
|
"Copilot will pause when the limit is reached. Contact your administrator for more information."
|
|
773
|
-
)) : ( localize(
|
|
813
|
+
)) : ( localize(6734, "Copilot will pause when the limit is reached."));
|
|
774
814
|
} else {
|
|
775
815
|
quotaCallout.style.display = "none";
|
|
776
816
|
}
|
|
@@ -787,23 +827,23 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
787
827
|
const settings = container.appendChild($("div.settings"));
|
|
788
828
|
{
|
|
789
829
|
const globalSetting = append(settings, $("div.setting"));
|
|
790
|
-
this.createInlineSuggestionsSetting(globalSetting, ( localize(
|
|
830
|
+
this.createInlineSuggestionsSetting(globalSetting, ( localize(6735, "Ghost text suggestions")), "*");
|
|
791
831
|
const overriddenHint = globalSetting.appendChild($("span.setting-overridden"));
|
|
792
832
|
const updateOverriddenHint = () => {
|
|
793
833
|
const obj = this.configurationService.getValue(defaultChat.completionsEnablementSetting);
|
|
794
834
|
const hasOverride = modeId && isObject(obj) && typeof obj[modeId] !== "undefined" && Boolean(obj[modeId]) !== Boolean(obj["*"]);
|
|
795
|
-
overriddenHint.textContent = hasOverride ? ( localize(
|
|
835
|
+
overriddenHint.textContent = hasOverride ? ( localize(6736, "(overridden)")) : "";
|
|
796
836
|
};
|
|
797
837
|
updateOverriddenHint();
|
|
798
838
|
if (modeId) {
|
|
799
839
|
const languageSetting = append(settings, $("div.setting"));
|
|
800
840
|
const languageName = this.languageService.getLanguageName(modeId) ?? modeId;
|
|
801
|
-
this.createTriStateLanguageSetting(languageSetting, ( localize(
|
|
841
|
+
this.createTriStateLanguageSetting(languageSetting, ( localize(6737, "Ghost text suggestions for {0}", languageName)), modeId, updateOverriddenHint);
|
|
802
842
|
}
|
|
803
843
|
}
|
|
804
844
|
{
|
|
805
845
|
const setting = append(settings, $("div.setting"));
|
|
806
|
-
this.createNextEditSuggestionsSetting(setting, ( localize(
|
|
846
|
+
this.createNextEditSuggestionsSetting(setting, ( localize(6738, "Next edit suggestions")), this.getCompletionsSettingAccessor(modeId));
|
|
807
847
|
}
|
|
808
848
|
}
|
|
809
849
|
createSetting(container, settingIdsToReEvaluate, label, accessor) {
|
|
@@ -1005,7 +1045,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
1005
1045
|
})));
|
|
1006
1046
|
const cancelAction = toAction({
|
|
1007
1047
|
id: "workbench.action.cancelSnoozeStatusBarLink",
|
|
1008
|
-
label: ( localize(
|
|
1048
|
+
label: ( localize(6739, "Cancel Snooze")),
|
|
1009
1049
|
run: () => this.inlineCompletionsService.cancelSnooze(),
|
|
1010
1050
|
class: ThemeIcon.asClassName(Codicon.stopCircle)
|
|
1011
1051
|
});
|
|
@@ -1014,19 +1054,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
1014
1054
|
toolbar.clear();
|
|
1015
1055
|
const timeLeftMs = this.inlineCompletionsService.snoozeTimeLeft;
|
|
1016
1056
|
if (!isEnabled || timeLeftMs <= 0) {
|
|
1017
|
-
timerDisplay.textContent = ( localize(
|
|
1057
|
+
timerDisplay.textContent = ( localize(6740, "Hide suggestions for 5 min"));
|
|
1018
1058
|
timerDisplay.title = "";
|
|
1019
1059
|
button.label = label;
|
|
1020
|
-
button.setTitle(( localize(
|
|
1060
|
+
button.setTitle(( localize(6741, "Hide inline suggestions for 5 min")));
|
|
1021
1061
|
return true;
|
|
1022
1062
|
}
|
|
1023
1063
|
const timeLeftSeconds = Math.ceil(timeLeftMs / 1000);
|
|
1024
1064
|
const minutes = Math.floor(timeLeftSeconds / 60);
|
|
1025
1065
|
const seconds = timeLeftSeconds % 60;
|
|
1026
|
-
timerDisplay.textContent = `${minutes}:${seconds < 10 ? "0" : ""}${seconds} ${( localize(
|
|
1027
|
-
timerDisplay.title = ( localize(
|
|
1028
|
-
button.label = ( localize(
|
|
1029
|
-
button.setTitle(( localize(
|
|
1066
|
+
timerDisplay.textContent = `${minutes}:${seconds < 10 ? "0" : ""}${seconds} ${( localize(6742, "remaining"))}`;
|
|
1067
|
+
timerDisplay.title = ( localize(6743, "Inline suggestions are hidden for the remaining duration"));
|
|
1068
|
+
button.label = ( localize(6744, "+5 min"));
|
|
1069
|
+
button.setTitle(( localize(6745, "Snooze additional 5 min")));
|
|
1030
1070
|
toolbar.push([cancelAction], {
|
|
1031
1071
|
icon: true,
|
|
1032
1072
|
label: false
|
|
@@ -1060,6 +1100,6 @@ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
|
|
|
1060
1100
|
}));
|
|
1061
1101
|
}
|
|
1062
1102
|
};
|
|
1063
|
-
ChatStatusDashboard = ChatStatusDashboard_1 = ( __decorate([( __param(1, IChatEntitlementService)), ( __param(2, IChatStatusItemService)), ( __param(3, ICommandService)), ( __param(4, IConfigurationService)), ( __param(5, IEditorService)), ( __param(6, IHoverService)), ( __param(7, ILanguageService)), ( __param(8, IOpenerService)), ( __param(9, ITelemetryService)), ( __param(10, ITextResourceConfigurationService)), ( __param(11, IInlineCompletionsService)), ( __param(12, IMarkdownRendererService)), ( __param(13, ILanguageFeaturesService)), ( __param(14, IContextViewService)), ( __param(15, IStorageService))], ChatStatusDashboard));
|
|
1103
|
+
ChatStatusDashboard = ChatStatusDashboard_1 = ( __decorate([( __param(1, IChatEntitlementService)), ( __param(2, IChatStatusItemService)), ( __param(3, ICommandService)), ( __param(4, IConfigurationService)), ( __param(5, IEditorService)), ( __param(6, IHoverService)), ( __param(7, ILanguageService)), ( __param(8, IOpenerService)), ( __param(9, ITelemetryService)), ( __param(10, ITextResourceConfigurationService)), ( __param(11, IInlineCompletionsService)), ( __param(12, IMarkdownRendererService)), ( __param(13, ILanguageFeaturesService)), ( __param(14, IContextViewService)), ( __param(15, IStorageService)), ( __param(16, IDefaultAccountService))], ChatStatusDashboard));
|
|
1064
1104
|
|
|
1065
1105
|
export { ChatStatusDashboard };
|