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.
import type { ContentBlock } from '@threadplane/angular/chat';Declaration
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;
};