import * as DOM from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom"; import { ITreeElement } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree"; import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation"; import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service"; import { ITextResourceConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service"; import { IExperimentalSettingsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/experimentalSettings.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IExtensionManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service"; import { IExtensionGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IManagedSettingsPresentationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/managedSettingsPresentation.service"; import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service"; import { IEditorProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service"; import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service"; import { IUserDataSyncEnablementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSync.service"; import { IWorkspaceTrustManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service"; import { EditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane"; import { IEditorOpenContext, IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor"; import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service"; import { IWorkbenchConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration.service"; import { IEditorGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService"; import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service"; import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service"; import { ISettingsEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences"; import { IPreferencesService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences.service"; import { SettingsEditor2Input } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferencesEditorInput"; import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service"; import { IUserDataSyncWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataSync/common/userDataSync.service"; import { IPreferencesSearchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/preferences/common/preferences.service"; import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service"; import { SettingsTreeGroupChild, SettingsTreeGroupElement } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels"; export declare enum SettingsFocusContext { Search = 0, TableOfContents = 1, SettingTree = 2, SettingControl = 3 } export declare function createGroupIterator(group: SettingsTreeGroupElement): Iterable>; /** * Whether Settings search results are safe to focus from the search input. * `searchPending` must be the boolean from {@link Delayer.isTriggered} (call the method — * a bare method reference is always truthy and would incorrectly block focus forever). */ export declare function isSettingsSearchUpToDate(searchPending: boolean, renderedSearchQuery: string | undefined, currentSearchValue: string): boolean; export declare class SettingsEditor2 extends EditorPane { private readonly configurationService; private readonly preferencesService; private readonly instantiationService; private readonly preferencesSearchService; private readonly logService; private readonly storageService; protected editorGroupService: IEditorGroupsService; private readonly userDataSyncWorkbenchService; private readonly userDataSyncEnablementService; private readonly workspaceTrustManagementService; private readonly extensionService; private readonly languageService; private readonly extensionManagementService; private readonly productService; private readonly extensionGalleryService; private readonly editorProgressService; private readonly keybindingService; private readonly chatEntitlementService; private readonly environmentService; static readonly ID: string; private static NUM_INSTANCES; private static SEARCH_DEBOUNCE; private static SETTING_UPDATE_FAST_DEBOUNCE; private static SETTING_UPDATE_SLOW_DEBOUNCE; private static CONFIG_SCHEMA_UPDATE_DELAYER; private static TOC_MIN_WIDTH; private static TOC_RESET_WIDTH; private static EDITOR_MIN_WIDTH; private static NARROW_TOTAL_WIDTH; private static SUGGESTIONS; private static shouldSettingUpdateFast; private defaultSettingsEditorModel; private readonly modelDisposables; private rootElement; private headerContainer; private searchContainer; private bodyContainer; private searchWidget; private countElement; private controlsElement; private settingsTargetsWidget; private splitView; private settingsTreeContainer; private settingsTree; private settingRenderers; private tocTreeModel; private readonly settingsTreeModel; private noResultsMessage; private clearFilterLinkContainer; private tocTreeContainer; private tocTree; private searchDelayer; private searchInProgress; private aiSearchPromise; /** * The trimmed query value that the currently rendered results reflect. Used to determine * whether the displayed results are up to date with the current search input value before * moving focus into the results. */ private renderedSearchQuery; private showAiResultsAction; private searchInputDelayer; private updatedConfigSchemaDelayer; private settingFastUpdateDelayer; private settingSlowUpdateDelayer; private pendingSettingUpdate; private readonly viewState; private readonly _searchResultModel; private searchResultLabel; private lastSyncedLabel; private settingsOrderByTocIndex; private tocRowFocused; private settingRowFocused; private settingFirstRowFocused; private inSettingsEditorContextKey; private searchFocusContextKey; private aiResultsAvailable; private scheduledRefreshes; private pendingAssignmentRefresh; private _currentFocusContext; /** Don't spam warnings */ private hasWarnedMissingSettings; private tocTreeDisposed; /** Persist the search query upon reloads */ private editorMemento; private tocFocusedElement; private treeFocusedElement; private settingsTreeScrollTop; private dimension; private installedExtensionIds; private dismissedExtensionSettings; private readonly DISMISSED_EXTENSION_SETTINGS_STORAGE_KEY; private readonly DISMISSED_EXTENSION_SETTINGS_DELIMITER; private readonly SEARCH_HISTORY_STORAGE_KEY; private readonly inputChangeListener; private searchInputActionBar; constructor(group: IEditorGroup, telemetryService: ITelemetryService, configurationService: IWorkbenchConfigurationService, textResourceConfigurationService: ITextResourceConfigurationService, themeService: IThemeService, preferencesService: IPreferencesService, instantiationService: IInstantiationService, preferencesSearchService: IPreferencesSearchService, logService: ILogService, contextKeyService: IContextKeyService, storageService: IStorageService, editorGroupService: IEditorGroupsService, userDataSyncWorkbenchService: IUserDataSyncWorkbenchService, userDataSyncEnablementService: IUserDataSyncEnablementService, workspaceTrustManagementService: IWorkspaceTrustManagementService, extensionService: IExtensionService, languageService: ILanguageService, extensionManagementService: IExtensionManagementService, productService: IProductService, extensionGalleryService: IExtensionGalleryService, editorProgressService: IEditorProgressService, userDataProfileService: IUserDataProfileService, keybindingService: IKeybindingService, chatEntitlementService: IChatEntitlementService, environmentService: IWorkbenchEnvironmentService, experimentalSettingsService: IExperimentalSettingsService, managedSettingsPresentationService: IManagedSettingsPresentationService); private whenCurrentProfileChanged; private canShowAdvancedSettings; /** Allows explicitly targeted settings to bypass the default advanced-settings filter. */ private shouldShowSetting; private disableAiSearchToggle; private updateAiSearchToggleVisibility; get minimumWidth(): number; get maximumWidth(): number; get minimumHeight(): number; set minimumWidth(value: number); set maximumWidth(value: number); private get currentSettingsModel(); private get searchResultModel(); private set searchResultModel(value); private get focusedSettingDOMElement(); get currentFocusContext(): SettingsFocusContext; protected createEditor(parent: HTMLElement): void; setInput(input: SettingsEditor2Input, options: ISettingsEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise; private refreshInstalledExtensionsList; private restoreCachedState; getViewState(): object | undefined; setOptions(options: ISettingsEditorOptions | undefined): void; private _setOptions; clearInput(): void; layout(dimension: DOM.Dimension): void; focus(): void; protected setEditorVisible(visible: boolean): void; focusSettings(focusSettingInput?: boolean): void; focusTOC(): void; /** * Invoked when the user presses the down arrow while the search input is focused. * Navigates forward through the search history first; only once there are no more * recent history entries does focus move down into the settings results. */ navigateSearchHistoryNextOrFocusSettings(): void; /** * Invoked when the user presses the up arrow while the search input is focused. * Navigates backward through the search history. */ navigateSearchHistoryPrevious(): void; /** * Whether the currently rendered results reflect the current search input value. * Returns false while a search is still pending (debounced) or in progress, so that * focus is not moved into stale results. */ private isSearchUpToDate; /** * Moves focus from the search input into the first settings result, but only when the * displayed results are up to date with the current search input. If the results are * stale (a search is still pending or in progress), this does nothing so that focus does * not land on results from a previous query. */ focusFirstSettingFromSearch(): void; private updateSettingFirstRowFocusedContext; showContextMenu(): void; focusSearch(filter?: string, selectAll?: boolean): void; clearSearchResults(): void; clearSearchFilters(): void; /** * Updates the search input placeholder so that it hints at history navigation * (up/down arrows) once the user has search history, similar to the keyboard * shortcuts editor. */ private updateSearchPlaceholder; private updateInputAriaLabel; /** * Render the header of the Settings editor, which includes the content above the splitview. */ private createHeader; toggleAiSearch(): void; private onDidToggleAiSearch; private onDidSettingsTargetChange; private onDidDismissExtensionSetting; private onDidClickSetting; switchToSettingsFile(): Promise; private openSettingsFile; private createBody; private addCtrlAInterceptor; private createTOC; private applyFilter; private removeLanguageFilters; private createSettingsTree; private onDidChangeSetting; private updateTreeScrollSync; private updateChangedSetting; private reportModifiedSetting; private scheduleRefresh; private createSettingsOrderByTocIndex; private refreshModels; private onConfigUpdate; private updateElementsByKey; private getActiveControlInSettingsTree; private renderTree; private refreshSingleElement; private refreshTree; private refreshTOCTree; private updateModifiedLabelForKey; private onSearchInputChanged; private loadSearchHistory; private saveSearchHistory; private parseSettingFromJSON; /** * Toggles the visibility of the Settings editor table of contents during a search * depending on the behavior. */ private toggleTocBySearchBehaviorType; private triggerSearch; /** * Return a fake SearchResultModel which can hold a flat list of all settings, to be filtered (@modified etc) */ private createFilterModel; private triggerFilterPreferences; private onDidFinishSearch; private doLocalSearch; private doRemoteSearch; private doAiSearch; private getLLMRankedResults; private searchWithProvider; private logSearchPerformance; private renderResultCountMessages; private _searchPreferencesModel; private layoutSplitView; protected saveState(): void; }