@threadplane/chatInterfacev0.3.4

ChatRunActivityTemplateContext

Template context for the run-activity template projected into <chat>. One context is built while a run is active and has no assistant message.

import type { ChatRunActivityTemplateContext } from '@threadplane/chat';

Declaration

export interface ChatRunActivityTemplateContext  {
  $implicit: Agent;
  hasAssistantMessage: boolean;
  messages: Message[];
  running: boolean;
}

Members

$implicit

The agent bound to <chat> (let-agent).

$implicit: Agent;

hasAssistantMessage

Whether the current run has an assistant message yet. Always false while the template renders: the first assistant message hands the run over to the per-message activity slot (let-hasAssistantMessage="hasAssistantMessage").

hasAssistantMessage: boolean;

messages

The current run's messages: every message after the last user message, or every message when there is none (let-messages="messages").

messages: Message[];

running

Whether a run is in flight (agent.isLoading()). Always true while the template renders (let-running="running").

running: boolean;