/** * Decide whether the pager / chat preview should open in formatted markdown * (force) or raw (plain) by default. User can still toggle with f / r. * * Formatted by default: * - compacted context, help / shortcuts / system docs * - markdown **reads** (fs.read of .md) * * Raw by default (green/red editor view): * - all file mutations (create / append / edit / write / writeMany) — * including pure-green .md appends/creates so the user sees the real * hunks, not a formatted doc preview * - mixed red+green file edits * - shell / http / web / net / scans / other tools */ import type { FileChange } from "../../tools/file-diff.js"; /** True for paths we treat as markdown sources. */ export declare function isMarkdownPath(path: string | undefined | null): boolean; /** * Pure create / green-only write: no deleted lines (stats.removed === 0). * Mixed edits (red + green) stay raw so the user sees the real diff. */ export declare function isPureAddFileChange(change: FileChange): boolean; export type PagerDefaultKind = "compacted" | "help" | "system" | "tool" | "file-change" | "generic"; export interface PagerDefaultViewInput { readonly kind?: PagerDefaultKind | undefined; readonly toolName?: string | undefined; readonly path?: string | undefined; readonly body?: string | undefined; readonly fileChange?: FileChange | undefined; } /** * Whether the pager should start in formatted (`force`) vs raw (`plain`). */ export declare function shouldDefaultFormattedView(input: PagerDefaultViewInput): boolean; /** Map decision → openPager markdown arg. */ export declare function defaultPagerMarkdownMode(input: PagerDefaultViewInput): "force" | "plain";