# ChatLifecycle

Package: `@threadplane/chat` · 0.3.4

Reference: /docs/api/chat/ChatLifecycle

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

## ChatLifecycle

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

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

### componentReady

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

```typescript
readonly componentReady: Signal<boolean>;
```

### firstMessageSent

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

```typescript
readonly firstMessageSent: Signal<boolean>;
```

### inputSubmittedAt

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

```typescript
readonly inputSubmittedAt: Signal<number | null>;
```

### messageCount

Count of user submits. Resets on clearThread.

```typescript
readonly messageCount: Signal<number>;
```