The pieces of the chat panel (PhoenixKitAgent.Web.Dock): one message of
the feed, a confirmation card and a file waiting for a message.
A message comes as PhoenixKitAgent.Conversations hands it to a client: a
tool call has only its summary (tool_summary: the tool's name, the
outcome, how many it found, whether it was cut), never what the tool
returned, and the panel shows no more than that. A model answer is
markdown, shown by PhoenixKitAgent.Web.Markdown (no outside pictures, no
raw HTML, links with their domain).
A confirmation card (a tool message with its card,
PhoenixKitAgent.Confirmations.cards/4) shows core's preview through
core's operation_preview component and the arguments the model sent as
plain text: every value is escaped by HEEx, nothing of it is markdown or a
link.
Summary
Functions
A file of the chat that waits for a message.
When a chat was last written to, for the list of chats: how long ago in the user's language, and the moment itself (site time zone) as the tooltip.
A write that waits for the user's confirmation, or what became of it: the preview core holds for it and the arguments the model sent while it waits, with "Run" and "Cancel the change"; "Ask again" once it ran out.
One message of the feed.
Functions
A file of the chat that waits for a message.
Attributes
attachment(PhoenixKitAgent.Schemas.Attachment) (required)
When a chat was last written to, for the list of chats: how long ago in the user's language, and the moment itself (site time zone) as the tooltip.
Rendered by the server only. Core's time_ago would do the same job, but
its TimeAgo hook rewrites the text in English in the browser, and its
tooltip is an English date.
Attributes
id(:string) (required)datetime(DateTime) - Defaults tonil.
A write that waits for the user's confirmation, or what became of it: the preview core holds for it and the arguments the model sent while it waits, with "Run" and "Cancel the change"; "Ask again" once it ran out.
Attributes
id(:string) (required)message(PhoenixKitAgent.Schemas.Message) (required)card(:map) (required)
One message of the feed.
Attributes
id(:string) (required)message(PhoenixKitAgent.Schemas.Message) (required)