Semantic markdown block for agent chat messages.
The BEAM owns markdown structure. Frontends render these blocks directly and must not infer code cards from styled-run flags or decorative text.
Summary
Types
Markdown block kind encoded on the gui_agent_chat wire.
A line of styled runs.
A styled text run: {text, fg_rgb, bg_rgb, flags} or with a trailing url.
Types
@type kind() ::
:paragraph
| :heading
| :list_item
| :blockquote
| :rule
| :spacer
| :code_block
Markdown block kind encoded on the gui_agent_chat wire.
@type styled_line() :: [styled_run()]
A line of styled runs.
@type styled_run() :: {String.t(), non_neg_integer(), non_neg_integer(), non_neg_integer()} | {String.t(), non_neg_integer(), non_neg_integer(), non_neg_integer(), String.t()}
A styled text run: {text, fg_rgb, bg_rgb, flags} or with a trailing url.
@type t() :: %Minga.RenderModel.UI.AgentChat.MarkdownBlock{ capability_flags: non_neg_integer(), flags: non_neg_integer(), height: non_neg_integer(), id: non_neg_integer(), indent: non_neg_integer(), kind: kind(), label: String.t(), language: String.t(), level: non_neg_integer(), lines: [styled_line()], ordered: boolean(), ordinal: non_neg_integer(), target_path: String.t() }
Functions
@spec blockquote(non_neg_integer(), [styled_line()]) :: t()
@spec code_block( non_neg_integer(), String.t(), String.t(), String.t() | nil, boolean(), [styled_line()] ) :: t()
@spec heading(non_neg_integer(), non_neg_integer(), [styled_line()]) :: t()
@spec list_item(non_neg_integer(), non_neg_integer(), boolean(), non_neg_integer(), [ styled_line() ]) :: t()
@spec map_lines(t(), (styled_line() -> styled_line())) :: t()
@spec map_lines(t(), (styled_line() -> styled_line()), pos_integer()) :: t()
@spec paragraph(non_neg_integer(), [styled_line()]) :: t()
@spec rule(non_neg_integer()) :: t()
@spec spacer(non_neg_integer(), non_neg_integer()) :: t()