import type { ReactNode } from 'react'; import { type NormalizedHunkStat } from './patchNormalize'; /** * Bounded viewport for a tool card's diff body. * * Base height matches the `max-h-80` used by `ToolContentBox` so narrow panes * and mobile stay compact; from `sm` up it grows to `max-h-[32rem]`, which is * already used elsewhere for roomier desktop content. Vertical overflow scrolls; * horizontal overflow is still handled by Pierre's `overflow: 'wrap'`. * * `overscroll-behavior` is intentionally left at its default so reaching either * end of the diff chains back to the chat thread, keeping the outer list usable. */ export declare const INLINE_DIFF_VIEWPORT_CLASS = "bg-card/60 border border-border rounded-lg max-w-full min-w-0 overflow-y-auto overflow-x-hidden max-h-80 sm:max-h-[32rem]"; /** Matches the existing apply-patch hunk chip label format. */ export declare function formatHunkLabel(hunk: NormalizedHunkStat): string; export interface InlinePatchDiffProps { /** Raw patch payload from a tool artifact or tool arguments. */ patch: string; /** Used when the payload carries hunks but no filename. */ fallbackPath?: string; /** * Set when the surrounding renderer already displays the filename, so the * per-file path row is suppressed for single-file payloads. Multi-file * payloads always show their own path rows. */ hidePathHeader?: boolean; } /** * Renders every file operation in one tool patch payload, in source order. * A single `apply_patch` call may touch many files with many hunks each and * mix add/update/delete; all of them render, each with its own diff surface. */ export declare function InlinePatchDiff({ patch, fallbackPath, hidePathHeader, }: InlinePatchDiffProps): import("react/jsx-runtime").JSX.Element; export interface InlineFileWriteDiffProps { path: string; /** Full content written by the tool. */ content: string; /** * Previous content. Pass `null` when the file did not exist, and `''` for an * existing but empty file — the two render differently. */ previousContent?: string | null; /** Rendered when the diff surface cannot be used. */ fallback?: ReactNode; hidePathHeader?: boolean; } /** * Renders a whole-file write as a direct file comparison. A created file has no * old side, so every line renders as an addition with the language inferred * from the filename. */ export declare function InlineFileWriteDiff({ path, content, previousContent, fallback, hidePathHeader, }: InlineFileWriteDiffProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=InlineDiff.d.ts.map