# ChatLifecycle

Package: `@threadplane/react/chat` · 0.0.0

**Unpublished development API.**

Reference: /docs/api/react/chat/ChatLifecycle

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

## ChatLifecycle

Readiness and composer submissions of one `Chat`.

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

### componentReady

True once the `Chat` has mounted.

```typescript
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.

```typescript
readonly firstMessageSent: boolean;
```

### inputSubmittedAt

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

```typescript
readonly inputSubmittedAt: number | null;
```

### messageCount

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

```typescript
readonly messageCount: number;
```