Skip to content

Function: ui()

ts
function ui(...content: ReplyContent[]): ChatUi;

Defined in: packages/sdk/src/renderer/templates/chat-tools.ts:200

Render UI for this turn with no message text — renderer blocks and/or content fragments. Use it when the tool's whole answer is the UI (a card, a table). The model already chose the tool; ui() shows the result.

Parameters

ParameterType
...contentReplyContent[]

Returns

ChatUi

Example

ts
return ui(Card({children: [Text({content: `${city} — ${tempC}°`})]}));

Matterway Assistant SDK Documentation