/** * Open full tool output in the pager modal (scroll + search + Esc/q). * Prefers the on-disk artifact, then the unbounded spool. Never re-truncates. * * Bodies that are pure JSON get pretty-printed so web.search dumps aren't * one messy minified blob. */ import type { AppServices } from "../bootstrap/composition-root.js"; import type { ToolItem } from "../state/transcript-types.js"; import type { FileChange } from "../../tools/file-diff.js"; /** * Prefer a human-readable hit list for web.search-style payloads. * Falls back to pretty JSON, then the raw text. */ export declare function formatToolPagerBody(raw: string): string; /** * Human path/command label for pager titles and headers. * Never dump raw tool-arg JSON (history rows often store that). * * @param maxLen Cap for short titles only. Omit for full body headers so the * pager shows the complete command (card already has it untruncated). */ export declare function cleanArgsLabel(name: string, argsDisplay: string | undefined, options?: { maxLen?: number; }): string; /** Absolute path for on-disk open (fs.read / similar) when recoverable. */ export declare function pathFromArgsDisplay(argsDisplay: string | undefined): string | undefined; /** Short, stable title: `web.search ยท output` (args live in the body header). */ export declare function toolPagerTitle(name: string, argsDisplay: string | undefined): string; export interface OpenToolOutputOptions { /** * When set, use this body instead of spool/artifact (e.g. one tool.batch * sub-section). Title still comes from `item`. */ readonly bodyOverride?: string; /** Override the pager title (defaults to toolPagerTitle). */ readonly titleOverride?: string; /** Skip artifact lookup even if item.artifactPath is set. */ readonly skipArtifact?: boolean; /** * Open a single file-change snapshot (full file + green/red markers). * Prefer this over the raw tool receipt when the tool card has fileChanges. */ readonly fileChange?: FileChange; } export declare function openToolOutputPager(services: AppServices, item: Pick & { readonly fileChanges?: ToolItem["fileChanges"]; }, options?: OpenToolOutputOptions): Promise;