@threadplane/chatInterfacev0.3.4

ChatLifecycle

Reactive readiness and user submission counters for a chat component instance.

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

Declaration

export interface ChatLifecycle  {
  readonly componentReady: Signal<boolean>;
  readonly firstMessageSent: Signal<boolean>;
  readonly inputSubmittedAt: Signal<number | null>;
  readonly messageCount: Signal<number>;
}

Members

componentReady

True after <chat> initializes with a non-null agent binding.

readonly componentReady: Signal<boolean>;

firstMessageSent

True after the first user submit. Sticky for the life of the chat instance — does NOT reset on clearThread.

readonly firstMessageSent: Signal<boolean>;

inputSubmittedAt

Epoch ms of the most recent user submit. Resets on clearThread.

readonly inputSubmittedAt: Signal<number | null>;

messageCount

Count of user submits. Resets on clearThread.

readonly messageCount: Signal<number>;