import * as React from '@theia/core/shared/react'; import { HoverService } from '@theia/core/lib/browser'; import { GenericCapabilitySelections, ServerToolDescriptor } from '@theia/ai-core'; import { AvailableGenericCapabilities } from './generic-capabilities-service.js'; /** * Optional "Server Tools" section for the current model's provider. When present, the tree shows a * dedicated root category (named after the provider) with a "Server Tools" sub-group. Selections here * are stored separately from {@link GenericCapabilitySelections} and routed through {@link onChange}. */ export interface ServerToolsSection { /** Display label for the root category (the current model's provider). */ providerName: string; /** The current model's vendor; used to key the selections. */ vendor: string; /** Server tools offered by the current model. */ tools: ServerToolDescriptor[]; /** Currently enabled server tool ids. */ selectedIds: string[]; /** Called when the enabled server tool ids change. */ onChange: (ids: string[]) => void; } export interface GenericCapabilitiesTreeProps { /** Current generic capability selections */ genericCapabilities: GenericCapabilitySelections; /** Called when a capability type's selection changes */ onGenericCapabilityChange: (type: keyof GenericCapabilitySelections, ids: string[]) => void; /** Called to reset all generic capabilities to stored defaults */ onResetGenericCapabilities: () => void; /** Available capabilities to select from */ availableCapabilities: AvailableGenericCapabilities; /** Items already in the agent prompt that should be disabled/greyed */ disabledCapabilities: GenericCapabilitySelections; /** Optional server tools section for the current model's provider */ serverTools?: ServerToolsSection; /** Whether the section is disabled */ disabled?: boolean; /** Hover service for tooltips */ hoverService: HoverService; } /** * A unified tree component for selecting generic capabilities. * Shows all capability types as root nodes, with groups and items as children. * Includes search functionality and keyboard navigation. */ export declare const GenericCapabilitiesTree: React.FunctionComponent; //# sourceMappingURL=generic-capabilities-tree.d.ts.map