@threadplane/chatFunctionv0.3.4

isTyping

Whether the agent should show a "typing" indicator — it is loading and has not yet started streaming the assistant's reply.

import { isTyping } from '@threadplane/chat';

Declaration · overload 1

export declare function isTyping(agent: Agent): boolean;

Parameters

agent · required
Agent

The agent to inspect.

Returns

boolean

true while the agent is awaiting a response but no assistant text has streamed yet; false once tokens arrive or the agent is idle.

Examples

\@if (isTyping(agent)) { <chat-typing-indicator [agent]="agent" /> }