import { CompositeTreeNode, TreeNode } from '@theia/core/lib/browser/tree/tree'; import { SelectableTreeNode } from '@theia/core/lib/browser/tree/tree-selection'; import { AiConfigurationCategory, AiConfigurationItemStatus } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category'; /** * Top-level node representing a single {@link AiConfigurationCategory}. * Carries the `expanded` property (making it an `ExpandableTreeNode`) only when * the category is a non-empty collection. */ export interface AiConfigurationCategoryNode extends SelectableTreeNode, CompositeTreeNode { readonly type: 'category'; readonly categoryId: string; readonly iconClass: string; readonly contributed: boolean; children: AiConfigurationItemNode[]; expanded?: boolean; selected: boolean; } export declare namespace AiConfigurationCategoryNode { function is(node: TreeNode | undefined): node is AiConfigurationCategoryNode; } /** Child node representing one item of a collection category. */ export interface AiConfigurationItemNode extends SelectableTreeNode { readonly type: 'item'; readonly categoryId: string; readonly itemId: string; readonly iconClass: string; /** The item's state, as the tree shows it: a dot next to the label (e.g. an MCP server that is running). */ readonly status?: AiConfigurationItemStatus; selected: boolean; } export declare namespace AiConfigurationItemNode { function is(node: TreeNode | undefined): node is AiConfigurationItemNode; } /** Non-selectable separator introducing the "Contributed by extensions" group. */ export interface AiConfigurationSeparatorNode extends TreeNode { readonly type: 'separator'; } export declare namespace AiConfigurationSeparatorNode { function is(node: TreeNode | undefined): node is AiConfigurationSeparatorNode; } export interface AiConfigurationTreeBuildOptions { /** Returns the previous expansion state of a category, to preserve it across rebuilds. */ isExpanded?(categoryId: string): boolean | undefined; } /** * Builds the (invisible) root of the AI Configuration category tree from the * ordered list of categories. Extracted as a pure function so the tree shape * (children, separator, expansion) can be tested without a DOM. */ export declare namespace AiConfigurationTree { const ROOT_ID = "ai-configuration-tree-root"; const CONTRIBUTED_SEPARATOR_ID = "ai-configuration-contributed-separator"; function categoryNodeId(categoryId: string): string; function itemNodeId(categoryId: string, itemId: string): string; function buildRoot(categories: AiConfigurationCategory[], options?: AiConfigurationTreeBuildOptions): CompositeTreeNode; } //# sourceMappingURL=ai-configuration-tree-nodes.d.ts.map