ChatActivityTemplateContext
Template context for a per-message activity template projected into
<chat>. One context is built for every assistant message.
import type { ChatActivityTemplateContext } from '@threadplane/chat';Declaration
export interface ChatActivityTemplateContext {
$implicit: Message;
agent: Agent;
index: number;
subagents: Subagent[];
toolCalls: ToolCall[];
}Members
$implicit
The assistant message the activity belongs to (let-message).
$implicit: Message;agent
The agent bound to <chat> (let-agent="agent").
agent: Agent;index
Index of the message in agent.messages() (let-i="index").
index: number;subagents
Subagents spawned by this message's tool calls, anchored by
Subagent.toolCallId and ordered like the spawning calls
(let-subagents="subagents").
subagents: Subagent[];toolCalls
The tool calls this message emitted, in emission order, excluding the
generative-UI dispatcher and view-backed tool names that <chat> never
renders as cards (let-toolCalls="toolCalls").
toolCalls: ToolCall[];