import type { State } from '../app-state.js'; import type { ProjectPickerItem } from '../ui-contracts.js'; type PanelResetState = Pick; export declare function closePanels(state: State): PanelResetState; export declare function clampContextLoad(load: number): number; /** Upper bound on the live tool-stream text retained in state. */ export declare const MAX_TOOL_STREAM_RETAINED_CHARS = 100000; /** Upper bound on the assistant/thinking live tail retained in React state. */ export declare const MAX_ASSISTANT_STREAM_RETAINED_CHARS = 16384; /** * Bound a growing display-only string while preserving the newest text. * Reducer stream state is only the live rendering tail, not the canonical * provider response; completed output remains available from the committed * history entry and session log. */ export declare function retainStreamTail(current: string, delta: string, maxChars: number): string; /** Caps applied to tool `input` payloads before retention in history entries. */ export declare const MAX_RETAINED_INPUT_CHARS = 2048; export declare const MAX_RETAINED_INPUT_DEPTH = 4; export declare const MAX_RETAINED_INPUT_ITEMS = 64; /** * Deep-truncate a tool input for long-term retention in history entries. * Strings are capped per-string, arrays/objects are capped in breadth and * depth. Returns the value unchanged when nothing exceeds a cap. * * @public — exported for unit tests */ export declare function pruneToolInput(value: unknown, depth?: number): unknown; /** * Find the first non-divider index in the list. Returns 0 when the list is * empty or contains only dividers. * * @public — exported for unit tests */ export declare function firstSelectable(items: ProjectPickerItem[]): number; /** * Skip divider items at the given index, moving forward (+1) or backward (-1). * Clamps to [0, items.length - 1]. If every item is a divider the index stays * put — the caller should already know the list has at least one selectable. * * @public — exported for unit tests */ export declare function skipDivider(items: ProjectPickerItem[], idx: number, dir: 1 | -1): number; export {}; //# sourceMappingURL=helpers.d.ts.map