Minga.Frontend.Adapter.GUI.AgentChatEncoder (Minga v0.1.0)

Copy Markdown View Source

Pure GUI adapter encoder for the agent chat surface (gui_agent_chat, 0x78).

Encodes a Minga.RenderModel.UI.AgentChat semantic model into the sectioned wire format and gates on a :erlang.phash2/1 fingerprint stored in Minga.Frontend.Adapter.GUI.Caches. Depends only on the model, the protocol opcodes, and the caches struct; it touches no processes and references no product module. The editor builder pre-resolves every agent struct into the core views (AgentChat.ToolCallView, AgentChat.ApprovalView, AgentChat.Usage) before they reach this encoder.

Summary

Types

A chat message that may carry pre-computed styled runs.

Types

gui_chat_message()

@type gui_chat_message() :: Minga.RenderModel.UI.AgentChat.message_body()

A chat message that may carry pre-computed styled runs.

Functions

encode(model, caches)

@spec encode(
  Minga.RenderModel.UI.AgentChat.t(),
  Minga.Frontend.Adapter.GUI.Caches.t()
) ::
  {binary() | nil, Minga.Frontend.Adapter.GUI.Caches.t()}