/** * Extract fenced code blocks from a markdown string. * * Only parses triple-backtick (```) fences — that's what the agent uses. * Optional language on the open fence is captured so a future UI can * show it ("copy bash block", "copy typescript block", …). * * Heuristic for "no fences at all, but the message is clearly code": * if the whole message (trimmed) has no backticks and starts with a * shell prompt-ish first line (e.g. `$ npm …`, `npm i …`, `git …`), we * treat the whole message as one implicit block. Kept intentionally * conservative to avoid copying narrative prose when the user asked for * an explanation. */ export interface CodeBlock { lang: string | null; code: string; } export declare function extractCodeBlocks(md: string): CodeBlock[]; //# sourceMappingURL=code-blocks.d.ts.map