import * as DOM from "../../../../../base/browser/dom.js"; import { Disposable } from "../../../../../base/common/lifecycle.js"; import { IAccessibilitySignalService } from "../../../../../platform/accessibilitySignal/browser/accessibilitySignalService.service.js"; import { ICommandService } from "../../../../../platform/commands/common/commands.service.js"; import { ICustomizationMarketplaceService } from "../../../../../platform/customizationMarketplace/common/customizationMarketplaceService.service.js"; import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js"; import { IContextMenuService } from "../../../../../platform/contextview/browser/contextView.service.js"; import { IHoverService } from "../../../../../platform/hover/browser/hover.service.js"; import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js"; import { IKeybindingService } from "../../../../../platform/keybinding/common/keybinding.service.js"; import { INotificationService } from "../../../../../platform/notification/common/notification.service.js"; import { IOpenerService } from "../../../../../platform/opener/common/opener.service.js"; import { ITelemetryService } from "../../../../../platform/telemetry/common/telemetry.service.js"; import { IThemeService } from "../../../../../platform/theme/common/themeService.service.js"; import { IChatEntitlementService } from "../../../../services/chat/common/chatEntitlementService.service.js"; import { IMcpWorkbenchService } from "../../../mcp/common/mcpTypes.service.js"; import { ICustomizationMarketplaceInstallService } from "../../common/customizationMarketplaceInstallService.service.js"; import { AICustomizationManagementSection, IWelcomePageFeatures } from "../../common/aiCustomizationWorkspaceService.js"; import { IAgentPluginService } from "../../common/plugins/agentPluginService.service.js"; import { IAICustomizationItemsModel } from "./aiCustomizationItemsModel.service.js"; import { IAICustomizationWelcomePageImplementation, ICustomizationMarketplaceOrigin, IWelcomePageCallbacks } from "./aiCustomizationWelcomePage.js"; export declare class AICustomizationDiscoveryPage extends Disposable implements IAICustomizationWelcomePageImplementation { private readonly callbacks; private readonly instantiationService; private readonly contextMenuService; private readonly hoverService; private readonly openerService; private readonly notificationService; private readonly configurationService; private readonly commandService; private readonly keybindingService; private readonly entitlementService; private readonly marketplaceService; private readonly installService; private readonly itemsModel; private readonly pluginService; private readonly mcpWorkbenchService; private readonly accessibilitySignalService; private readonly themeService; private readonly telemetryService; readonly container: HTMLElement; private readonly header; private readonly progressBar; private progressBarActive; private readonly titleDescription; private readonly searchWidget; private readonly searchActionsContainer; private readonly searchToolbar; private readonly sourceWarnings; private readonly sourceButton; private readonly browseScrollable; private readonly browseContent; private readonly browseSections; private readonly browseStatus; private readonly resultListContainer; private readonly resultList; private readonly resultStatus; private readonly browseDisposables; private readonly browsePrimaryActions; private readonly browseAlternativeActions; private readonly browseInstallStates; private readonly resultAlternativeActions; private readonly resultStatusDisposables; private readonly descriptionDisposables; private readonly searchActionDisposables; private readonly sourceHover; private readonly request; private readonly searchScheduler; private readonly continuationScheduler; private catalogPage; private enabledSourceIds; private readonly browseCatalogCache; private readonly installErrors; private readonly pendingInstalls; private readonly pendingUninstalls; private readonly pendingDirectUninstalls; private readonly requiredPluginUris; private readonly expandedAlternatives; private forceMarketplaceRefresh; private clearMarketplaceResults; /** Sources named by pending forced refreshes; `undefined` when any source may have changed. */ private changedMarketplaceSourceIds; /** Number of catalog results to restore when an in-place background refresh reloads the current query. */ private refreshDepth; private readonly marketplaceRefreshScheduler; private query; private installedItems; private providerPlugins; private catalogItems; private curatedSections; private curatedSourceId; private sourceSections; private curatedSourceError; private marketplaceSources; private selectedSourceId; private visibleSectionIds; private visible; private pendingRecoveryReload; private filteredBackfillLimitReached; private loaded; private loading; private loadingMore; private errorMessage; private requestSequence; private providerPluginSequence; private lastDimension; private lastAnnouncement; private lastBrowseTelemetryView; private catalogLoadProgress; private curatedLoadProgress; private browseLoadStartedAt; private browseFirstContentAt; constructor(parent: HTMLElement, _welcomePageFeatures: IWelcomePageFeatures | undefined, callbacks: IWelcomePageCallbacks, _harnessLabel: string, instantiationService: IInstantiationService, contextMenuService: IContextMenuService, hoverService: IHoverService, openerService: IOpenerService, notificationService: INotificationService, configurationService: IConfigurationService, commandService: ICommandService, keybindingService: IKeybindingService, entitlementService: IChatEntitlementService, marketplaceService: ICustomizationMarketplaceService, installService: ICustomizationMarketplaceInstallService, itemsModel: IAICustomizationItemsModel, pluginService: IAgentPluginService, mcpWorkbenchService: IMcpWorkbenchService, accessibilitySignalService: IAccessibilitySignalService, themeService: IThemeService, telemetryService: ITelemetryService); private scheduleMarketplaceRefresh; private isCurrentViewAffectedBySources; /** Drops cached Browse results that include the changed sources so they reload when shown again. */ private invalidateBrowseCatalogCache; private updateSources; private updateSourceButton; private showSourceMenu; private selectSource; private createAddButton; private updateDescription; private onQueryChanged; private setQuery; private resetCatalogState; private updateSearchActions; private handleAvailabilityChanged; private refreshInstalledItems; /** * Installed items only feed search results; browse cards are derived from the * catalog and installation state. Avoid rebuilding the browse cards when only * installed items change, since that churns frequently (e.g. MCP server status). */ private renderInstalledItemsChange; private refreshProviderPlugins; private getFilteredInstalledItems; private matchesDiscoveryType; private matchesInstalledItem; private matchesMarketplaceResource; private isCanvasOnlyQuery; private hasBlankCanvasFilter; private isBlankCanvasBrowse; private shouldQueryCatalog; private isCatalogEnabled; private isCurrentQueryAffectedBySourceConfiguration; private getCurrentQuerySources; private getEnabledCatalogSourceIds; private hasNextCatalogPage; private shouldQueryCanvasFallback; private queryCanvasFallback; private getMarketplaceSourceLabel; private getMarketplaceResourceLabel; private cancelCatalogRequest; private updateCatalogPage; private noteBrowseFirstContent; private getBrowsePresentation; private loadSourceSections; private cacheBrowseCatalog; private loadCatalog; /** * Queries the first catalog page and requests continuation pages until at least `depth` results are * loaded, so an in-place refresh restores the results the user had already scrolled to in one update. */ private queryCatalogToDepth; private logBrowseRendered; private logBrowseLoaded; private loadBrowseSections; private isLoadingMore; private hasMatchingCatalogItems; private isCatalogPending; private render; private scheduleContinuationIfNeeded; private getSearchMarketplaceResources; private deduplicateMarketplaceResources; private renderSearchResults; private renderBrowse; private renderBrowseSection; private renderBrowseCardGroup; private renderBrowseCard; private install; private repair; /** * Explains why a plugin the organization requires cannot be uninstalled, or `undefined` when it can. * With `includeContents`, `uri` may also be a file inside the plugin. */ private getRequiredPluginMessage; private getUninstallBlockedMessage; private uninstall; private uninstallMarketplaceResource; private getInstallState; private openMarketplaceItem; private openCatalogItem; private openInstalledItem; private openExternal; private updateSearchAriaLabel; private announce; private getEntryAriaLabel; private isAlternativeExpanded; private toggleAlternative; rebuildCards(visibleSectionIds: ReadonlySet): void; setHarnessLabel(_label: string): void; setVisible(visible: boolean): void; focus(): void; reset(preserveFocus?: boolean): void; resetFilters(): void; setSearchQuery(value: string, preserveFocus?: boolean): void; showMarketplace(query: string, sourceId: string | undefined, preserveFocus?: boolean): void; layout(dimension: DOM.Dimension | undefined): void; getAccessibilityContent(): string; restoreMarketplaceItemFocus(origin: ICustomizationMarketplaceOrigin): void; dispose(): void; }