/** * Startup/reload resource listing: path and source-label formatting, scope * grouping, diagnostics rendering, and the [Resources]/[Skills]/… sections * shown in the chat. Extracted from interactive-mode.ts; everything here is * either pure formatting or rendering into a container passed via deps. */ import { type Container, Text } from "@kolisachint/hoocode-tui"; import type { AgentDefinition } from "../../core/agent-frontmatter.js"; import type { ExtensionRunner } from "../../core/extensions/index.js"; import type { PromptTemplate } from "../../core/prompt-templates.js"; import type { ResourceDiagnostic, ResourceLoader } from "../../core/resource-loader.js"; import type { SourceInfo } from "../../core/source-info.js"; export interface Expandable { setExpanded(expanded: boolean): void; } export declare function isExpandable(obj: unknown): obj is Expandable; export declare class ExpandableText extends Text implements Expandable { private collapsed; private expanded; private isExpanded; constructor(collapsed: () => string, expanded: () => string, initiallyExpanded: boolean, paddingX: number, paddingY: number); setExpanded(expanded: boolean): void; /** * Re-evaluate the current state's text without changing which state it is in. * * The two closures are captured once, so anything they read that can change * later — the startup banner reads the working directory — goes stale until * something asks for it again. `/cd` is that something. */ refresh(): void; } export declare function formatDisplayPath(p: string): string; /** The slice of the interactive mode the resource listing renders into. */ export interface ResourceDisplayDeps { chatContainer: Container; getCwd(): string; getResourceLoader(): ResourceLoader; getPromptTemplates(): ReadonlyArray; getExtensionRunner(): ExtensionRunner; getActiveMode(): string; getSubagentEnabled(): boolean; /** Dispatchable subagents in this cwd (0 when the Task tool is off). */ getAgentCount(): number; /** Dispatchable agents for this cwd (empty when Task tool is off). */ getAgents(): AgentDefinition[]; /** * Canvases that could be opened here (`/canvas`). Listing one is free — it * reads directory entries and never forks — which is why they can appear in a * startup summary at all, and why a withheld one is reported rather than * hidden: the point of the trust gate is that a person can see the offer. */ getCanvases(): Array<{ id: string; scope: string; withheld: boolean; }>; /** Terminal width, used to keep one-line-per-item sections to one line. */ getColumns?(): number | undefined; quietStartup(): boolean; verbose: boolean; /** Startup expansion state for the collapsible sections. */ isExpanded(): boolean; getBuiltInCommandConflictDiagnostics(extensionRunner: ExtensionRunner): ResourceDiagnostic[]; } /** * Whether a `showLoadedResources` call renders the full summary rather than * diagnostics only. Exported so callers can skip preparing summary-only data * (and claiming once-per-session notices) on a quiet startup. */ export declare function willShowResourceListing(deps: Pick, options?: { force?: boolean; }): boolean; export declare function showLoadedResources(deps: ResourceDisplayDeps, options?: { extensions?: Array<{ path: string; sourceInfo?: SourceInfo; }>; force?: boolean; showDiagnosticsWhenQuiet?: boolean; }): void; //# sourceMappingURL=resource-display.d.ts.map