Skip to content

Add CoT reasoning streaming support #6294

@linear

Description

@linear
Add `onReasoningChunk` callback support at the core level to enable real-time chain-of-thought streaming. Benefits both `packages/server` and `eliza-cloud-v2`.

### Core
- Add `ReasoningChunkPayload` type with phases: `planning` | `actions` | `response`
- Extend `StreamingContext` with `onReasoningChunk` callback
- Create `ReasoningStreamExtractor` to extract `<thought>` (by default) content
- Wire through message service pipeline

### Server
- Emit `messageReasoningChunk` via Socket.IO

### Client
- Add `ThinkingIndicator` component (aligned with cloud-v2)
- Handle reasoning chunks in `use-socket-chat.ts`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions