# ContentBlock

Package: `@threadplane/angular/chat` · 0.3.7

Reference: /docs/api/angular/chat/ContentBlock

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

## ContentBlock

One structured segment of a message: text, an image, a tool invocation the
model wrote inline, or a tool result. Plain data, like everything a snapshot
holds.

```typescript
export type ContentBlock = {
    readonly type: 'text';
    readonly text: string;
} | {
    readonly type: 'image';
    readonly url: string;
    readonly alt?: string;
} | {
    readonly type: 'tool_use';
    readonly id: string;
    readonly name: string;
    readonly args: PlainValue;
} | {
    readonly type: 'tool_result';
    readonly toolCallId: string;
    readonly result: PlainValue;
    readonly isError?: boolean;
};
```