/**
 * Formats code with markdown code fences for display in tool messages.
 *
 * @param body - The code/text content to format
 * @param language - Optional language identifier for syntax highlighting
 * @returns Markdown-formatted code block
 */
export function codeBlock(body, language) {
    if (!body || body.trim() === "") {
        return "";
    }
    return `\`\`\`${language ?? ""}\n\n${body}\n\n\`\`\``;
}
//# sourceMappingURL=utils.js.map