Перейти к основному содержимому

AgentStreamChunk

@mineflow/client-core


@mineflow/client-core / AgentStreamChunk

Type Alias: AgentStreamChunk

type AgentStreamChunk =
| {
text: string;
type: "text";
}
| {
name: string;
type: "tool_use";
}
| {
name: string;
ok: boolean;
type: "tool_result";
}
| {
spec: CopilotChartSpec;
type: "chart";
}
| {
stopReason: string;
type: "done";
}
| {
message: string;
type: "error";
};

Defined in: packages/client-core/src/copilot.ts:71

Фрагмент потока ответа Copilot. Дискриминируется по type. ЗЕРКАЛИТ AgentStreamChunk из apps/agent-host — это сетевой контракт между ними.