Function: MastraChat()
MastraChat<
TValues>(__namedParameters):Element
Self-contained chat component. Mount it anywhere under the Mastra
plugin and it wires itself from the plugin’s published client config
(mount paths + default agent) via useMastraChat, then renders
the conversation through ChatView. The GenieChat-equivalent
drop-in: full streaming, tool-session pills, approvals, stop control,
history pagination, and built-in conversation management (a sidebar
of the resource’s threads with select / new / delete, persisted
across reloads) - all with no host wiring. The model picker is opt-in
via showModelPicker; thread management is on by default, laid out per
threadPlacement (auto docks it right and falls back to a tab strip on a
narrow chat) and turned off with threadPlacement: "disabled".
Type Parameters
Section titled “Type Parameters”TValues
Section titled “TValues”TValues extends Record<string, unknown> = Record<string, unknown>
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”MastraChatProps<TValues>
Returns
Section titled “Returns”Element