ChatLifecycle

Unpublished development API. This package is under development and is not available as a published release.

Readiness and composer submissions of one Chat.

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

Declaration

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

Members

componentReady

True once the Chat has mounted.

readonly componentReady: boolean;

firstMessageSent

True after the first message sent from the composer, or once a run is seen running, which covers a message the app sent itself, such as a welcome suggestion. It stays true for the life of the Chat, across sessions.

readonly firstMessageSent: boolean;

inputSubmittedAt

Epoch milliseconds of the latest composer submit. Null again when session changes.

readonly inputSubmittedAt: number | null;

messageCount

Messages sent from the composer. Starts again at 0 when session changes.

readonly messageCount: number;