export interface SessionTreeEntry { id: string; parentId?: string | null; timestamp: string; } export interface SessionTreeNode { entry: TEntry; children: Array>; label?: string; } export interface TreeGutter { position: number; show: boolean; } export interface FlatSessionTreeNode { node: TNode; indent: number; showConnector: boolean; isLast: boolean; gutters: TreeGutter[]; isVirtualRootChild: boolean; multipleRoots: boolean; } export interface VisibleTreeLayout { multipleRoots: boolean; visibleParent: Map; visibleChildren: Map; } export function buildSessionTree( entries: TEntry[], getLabel: (entry: TEntry) => string | undefined, ): Array>; export function buildActivePathIds( entryById: Map, targetId: string, ): Set; export function getEntryPath( entryById: Map, targetId: string, ): TEntry[]; export function indexSessionTree( roots: TNode[], ): Map; export function flattenSessionTree( roots: TNode[], activeEntryIds: ReadonlySet, ): Array>; export function recalculateVisibleTreeLayout( visibleNodes: Array>, allNodes: Array>, ): VisibleTreeLayout; export function buildTreePrefix( flatNode: FlatSessionTreeNode, branchMiddle?: string, ): string; export function extractTextContent(content: unknown, maxLength?: number): string; export function hasTextContent(content: unknown): boolean; export function formatTreeToolCall( name: string, args: Record, shortenPath: (path: string) => string, ): string;