/** * Plain-text extraction for /copy. Kept off tui.ts so tests do not load SshTui. */ import type { CollapsibleBlock, Row } from './transcript-types.js'; export declare function copyTextFromRow(row: Row | CollapsibleBlock | undefined): string; /** What a copy is aimed at: the highlighted card, or the model's last reply. */ export type CopyTarget = 'highlight' | 'reply'; /** The newest model reply with text, or `''` when the session has not produced one. */ export declare function latestReplyText(rows: readonly Row[]): string; /** * The text one copy target holds. * * The two targets are deliberately exclusive. They used to be one rule — * "the highlighted card, else the newest reply" — and the fallback made the * reply unreachable: any card left highlighted (one click on a tool card is * enough) silently redirected `/copy`, with nothing on screen saying the reply * had been passed over. `/copy` now names its target and defaults to the reply; * `highlight` is the old rule with its own, honest, empty case. * @param rows - the rows the reader can see (a `/clear` cutoff is not searched). * @param focused - the highlighted row, if any. * @param target - what the reader asked for; `reply` is the command's default. */ export declare function copyTextFromTranscript(rows: readonly Row[], focused: Row | CollapsibleBlock | null, target?: CopyTarget): { text: string; source: 'focused' | 'assistant' | 'empty'; };