import * as DOM from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom"; import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation"; 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 { IEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor"; import { EditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane"; import { IEditorOpenContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor"; import { IEditorGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service"; import { AICustomizationManagementEditorInput } from "./aiCustomizationManagementEditorInput.js"; import { IAICustomizationItemsModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.service"; import { AICustomizationManagementSection } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement"; import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service"; import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service"; import { IAICustomizationWorkspaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service"; import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service"; import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IWorkingCopyService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service"; import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service"; import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service"; import { IAgentPluginItem } from "../agentPluginEditor/agentPluginItems.js"; import { ICustomizationHarnessService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service"; import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service"; export declare const aiCustomizationManagementSashBorder: string; /** * Editor pane for the AI Customizations Management Editor. * Provides a global view of all AI customizations with a sidebar for navigation * and a content area showing a searchable list of items. */ export declare class AICustomizationManagementEditor extends EditorPane { private readonly storageService; private readonly instantiationService; private readonly openerService; private readonly commandService; private readonly workspaceService; private readonly promptsService; private readonly textModelService; private readonly configurationService; private readonly workingCopyService; private readonly hoverService; private readonly markdownRendererService; private readonly modelService; private readonly quickInputService; private readonly contextMenuService; private readonly fileService; private readonly notificationService; private readonly harnessService; private readonly viewsService; private readonly itemsModel; static readonly ID = "workbench.editor.aiCustomizationManagement"; private container; private splitViewContainer; private splitView; private sidebarContainer; private sectionsList; private contentContainer; private listWidget; private mcpListWidget; private pluginListWidget; private modelsWidget; private promptsContentContainer; private mcpContentContainer; private pluginContentContainer; private modelsContentContainer; private modelsFooterElement; private editorContentContainer; private editorPreviewContainer; private editorPreviewScrollContainer; private editorPreviewIssuesContainer; private editorPreviewFrontMatterContainer; private editorPreviewBodyContainer; private embeddedEditorContainer; private embeddedEditor; private editorActionButton; private editorActionButtonIcon; private editorModeButton; private editorActionButtonInProgress; private editorDisplayMode; private editorItemNameElement; private editorItemPathElement; private editorSaveIndicator; private readonly editorModelChangeDisposables; private readonly editorPreviewDisposables; private readonly editorPreviewRenderScheduler; private readonly builtinEditingSessions; private currentEditingUri; private currentEditingProjectRoot; private currentEditingStorage; private currentEditingPromptType; private currentEditingReadOnly; private currentModelRef; private viewMode; private mcpDetailContainer; private embeddedMcpDetail; private readonly mcpDetailDisposables; private pluginDetailContainer; private embeddedPluginDetail; private readonly pluginDetailDisposables; /** Section to restore when navigating back from plugin detail (when opened from a non-plugin section). */ private pluginDetailReturnSection; private dimension; private readonly sections; private readonly allSections; private selectedSection; private welcomePage; private readonly editorDisposables; private _editorContentChanged; private _previousActiveHarnessId; private harnessDropdownContainer; private harnessDropdownButton; private harnessDropdownIcon; private harnessDropdownLabel; private sidebarHeaderContainer; private homeButton; private homeButtonLabel; private readonly inEditorContextKey; private readonly sectionContextKey; private readonly harnessContextKey; constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, openerService: IOpenerService, commandService: ICommandService, workspaceService: IAICustomizationWorkspaceService, promptsService: IPromptsService, textModelService: ITextModelService, configurationService: IConfigurationService, workingCopyService: IWorkingCopyService, hoverService: IHoverService, markdownRendererService: IMarkdownRendererService, modelService: IModelService, quickInputService: IQuickInputService, contextMenuService: IContextMenuService, fileService: IFileService, notificationService: INotificationService, harnessService: ICustomizationHarnessService, viewsService: IViewsService, itemsModel: IAICustomizationItemsModel); protected createEditor(parent: HTMLElement): void; private createSplitView; /** * Whether the harness selector UI is enabled. * When disabled, the editor behaves as if "Local" is always selected. */ private get isHarnessSelectorEnabled(); /** * Rebuilds the visible sections list based on the active harness's * `hiddenSections`. If the current selection falls into a hidden * section, the first visible section is selected instead. */ private rebuildVisibleSections; private createSidebar; private createSidebarHeader; private createHarnessDropdown; /** * Lazily creates the harness dropdown if it doesn't exist but * multiple harnesses are now available, or hides it if only one * harness remains (e.g. after an extension-contributed harness is * unregistered). */ private ensureHarnessDropdown; private updateHomeButtonStyle; private updateHarnessDropdown; private showHarnessMenu; private createWelcomePage; private createBackArrowButton; private createContent; private isPromptsSection; /** * Updates the count for a specific section and re-renders the sidebar. */ private updateSectionCount; /** * Navigates to the welcome page (no section selected). */ showWelcomePage(): void; private selectSection; private ensureSectionsListReflectsActiveSection; private updateContentVisibility; /** * Creates a new customization using the AI-guided flow. */ private createNewItemWithAI; /** * Creates a new prompt file and opens it in the embedded editor. */ private createNewItemManual; /** * Resolves the target directory for creating a new customization file. * If multiple source folders exist for the given storage type, shows a * picker to let the user choose. Otherwise, returns the single match. * * @returns the resolved URI, `undefined` when no folder is available, * or `null` when the user cancelled the picker. */ private resolveTargetDirectoryWithPicker; updateStyles(): void; setInput(input: AICustomizationManagementEditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise; clearInput(): void; layout(dimension: DOM.Dimension): void; focus(): void; /** * Selects a specific section programmatically. */ selectSectionById(sectionId: AICustomizationManagementSection, options?: { showMarketplace?: boolean; }): void; /** * Refreshes the list widget. */ refreshList(): void; /** * Scrolls the active list widget so the last item is visible. */ revealLastItem(): void; /** * Generates a debug report for the current section. */ generateDebugReport(): Promise; private createEmbeddedEditor; private showEmbeddedEditor; private goBackToList; private getOrCreateBuiltinEditingSession; private createBuiltinPromptSaveRequest; private createExistingCustomizationSaveRequest; private saveBuiltinPromptCopy; private saveExistingCustomization; private pickBuiltinPromptSaveTarget; private handleEditorActionButton; private updateEditorActionButton; private shouldShowBuiltinSaveAction; private updateInputDirtyState; private handleBuiltinSave; private resetEditorSaveIndicator; private isStructuredPreviewSupported; private onStructuredPreviewSettingChanged; private getCurrentEditingModel; private toggleEditorDisplayMode; private updateEditorDisplayMode; private getEditorModeButtonLabel; private getEditorModeButtonTooltip; private canEditCurrentRaw; private scheduleCurrentEditorPreviewRender; private renderCurrentEditorPreview; private renderEditorPreview; private renderPreviewIssues; private renderPreviewFrontMatter; private renderPreviewAttribute; private renderPreviewBody; private stringifyPreviewValue; private toPreviewObject; private clearEditorPreview; private disposeBuiltinEditingSessions; private disposeBuiltinEditingSession; private createEmbeddedMcpDetail; private showEmbeddedMcpDetail; private goBackFromMcpDetail; private createEmbeddedPluginDetail; private showEmbeddedPluginDetail; /** * Public method to show a plugin detail from any section (e.g. from "Show Plugin" context menu). * Saves the current section so the back button returns the user to it. */ showPluginDetail(item: IAgentPluginItem): Promise; private goBackFromPluginDetail; }