# `Minga.RenderModel.UI.AgentChat.MarkdownBlock`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/render_model/ui/agent_chat/markdown_block.ex#L1)

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.

# `kind`

```elixir
@type kind() ::
  :paragraph
  | :heading
  | :list_item
  | :blockquote
  | :rule
  | :spacer
  | :code_block
```

Markdown block kind encoded on the gui_agent_chat wire.

# `styled_line`

```elixir
@type styled_line() :: [styled_run()]
```

A line of styled runs.

# `styled_run`

```elixir
@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.

# `t`

```elixir
@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()
}
```

# `blockquote`

```elixir
@spec blockquote(non_neg_integer(), [styled_line()]) :: t()
```

# `code_block`

```elixir
@spec code_block(
  non_neg_integer(),
  String.t(),
  String.t(),
  String.t() | nil,
  boolean(),
  [styled_line()]
) ::
  t()
```

# `complete?`

```elixir
@spec complete?(t()) :: boolean()
```

# `heading`

```elixir
@spec heading(non_neg_integer(), non_neg_integer(), [styled_line()]) :: t()
```

# `list_item`

```elixir
@spec list_item(non_neg_integer(), non_neg_integer(), boolean(), non_neg_integer(), [
  styled_line()
]) ::
  t()
```

# `map_lines`

```elixir
@spec map_lines(t(), (styled_line() -&gt; styled_line())) :: t()
```

# `map_lines`

```elixir
@spec map_lines(t(), (styled_line() -&gt; styled_line()), pos_integer()) :: t()
```

# `paragraph`

```elixir
@spec paragraph(non_neg_integer(), [styled_line()]) :: t()
```

# `rule`

```elixir
@spec rule(non_neg_integer()) :: t()
```

# `spacer`

```elixir
@spec spacer(non_neg_integer(), non_neg_integer()) :: t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
