# `MingaEditor.RenderPipeline.Content`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/render_pipeline/content.ex#L1)

Stage 4: Content.

Builds the semantic `RenderModel.Window` models for each editor window
(buffer windows and agent chat windows) and resolves each active window's
buffer cursor. Produces `WindowContent` carriers that the Compose stage
flattens into the frame's window list.

# `state`

```elixir
@type state() :: MingaEditor.RenderPipeline.Input.t()
```

Render pipeline input.

# `build_agent_chat_content`

```elixir
@spec build_agent_chat_content(state(), MingaEditor.Layout.t()) ::
  {[MingaEditor.RenderPipeline.WindowContent.t()],
   Minga.RenderModel.Cursor.t() | nil, state()}
```

Builds the semantic window models for agent chat windows.

Finds windows with `{:agent_chat, _}` content in the layout, renders
the agent chat content into their rects, and returns `WindowContent`
carriers. Buffer windows are skipped (handled by `build_content/2`).

Returns an empty list if no agent chat windows exist.

# `build_agent_chat_content`

```elixir
@spec build_agent_chat_content(state(), MingaEditor.Layout.t(), %{
  required(MingaEditor.Window.id()) =&gt;
    MingaEditor.RenderPipeline.AgentChatPrefetch.t()
}) ::
  {[MingaEditor.RenderPipeline.WindowContent.t()],
   Minga.RenderModel.Cursor.t() | nil, state()}
```

# `build_content`

```elixir
@spec build_content(state(), %{
  required(MingaEditor.Window.id()) =&gt;
    MingaEditor.RenderPipeline.Scroll.WindowScroll.t()
}) ::
  {[MingaEditor.RenderPipeline.WindowContent.t()],
   Minga.RenderModel.Cursor.t() | nil, state()}
```

Builds the semantic window models for each buffer window.

Produces `WindowContent` carriers (the window's `RenderModel.Window`
models) and the absolute cursor position for the active window.

# `reset_rows_rasterized`

```elixir
@spec reset_rows_rasterized(state()) :: state()
```

Resets the per-frame rasterized-row counter at the start of the Content stage (#2287).

# `rows_rasterized`

```elixir
@spec rows_rasterized(state()) :: non_neg_integer()
```

Returns the number of buffer rows rasterized so far this frame (#2287).

---

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