/** * Static tree rendering — box-drawing hierarchy with depth, fold, and icons. * * @remarks * Part of the Human Render Contract (Epic T10114, ADR-077). Consumes a * {@link TreeResponse} (flat, pre-order list of {@link FlatTreeNode}s) and * emits a box-drawing tree that mirrors the canonical Saga → Epic → Task → * Subtask layout. * * Connector glyphs: * - `├─` non-last child * - `└─` last child * - `│ ` vertical continuation across a non-last ancestor * - ` ` last-sibling ancestor (no vertical bar) * * Each rendered row carries the matching {@link KindIcon} prefix and a * trailing {@link StatusIcon}. When the {@link AnimateContext} indicates * `noColor` mode (or `opts.asciiBoxDrawing === true`) glyphs collapse to * ASCII fallbacks (`+-`, `| `, ` `) and icons resolve via {@link ascii}. * * @epic T10114 * @task T10128 * @subtask T10142 */ import type { TreeResponse } from '@cleocode/contracts/render/tree.js'; import type { AnimateContext } from '../animate-context.js'; /** Options for {@link renderTree}. */ export interface RenderTreeViewOptions { /** Render gate — primitive returns `''` when `enabled === false`. */ readonly ctx: AnimateContext; /** * When a node has more direct children than this threshold, only the first * `foldAt - 1` are rendered and a `…` summary line replaces the rest. * * @defaultValue `50` */ readonly foldAt?: number; /** * When `true`, force ASCII box-drawing glyphs regardless of the context's * `noColor` signal. When `false`, force Unicode. When omitted, defer to * `ctx.inputs.noColor`. */ readonly asciiBoxDrawing?: boolean; } /** * Render a {@link TreeResponse} as a multi-line box-drawing tree. * * @param resp - The flattened tree response to render. * @param opts - Render gate + fold + ASCII overrides. * @returns The formatted tree. Empty when `opts.ctx.enabled` is `false`. * * @example * ```ts * renderTree(saga, { ctx }); * // 🌲 SG-WORKTRUNK-OWN ✅ * // ├─ 📋 T9977 Worktree native ownership ✅ * // │ ├─ • T9983 Reader cache 🚧 * // │ └─ • T9984 NAPI shim ✅ * // └─ 📋 T9981 Doctor budget ⏳ * ``` */ export declare function renderTree(resp: TreeResponse, opts: RenderTreeViewOptions): string; //# sourceMappingURL=tree.d.ts.map