import { StreamingTokenResponse } from "../components/streaming-token-response"; import { AnswerUiView, type AnswerUiMapTarget } from "./answer-ui-view"; import type { AnswerUiPart } from "./contract"; export function AnswerPartsView({ parts, messageId, disabled, streaming, streamDone, onLocate, onSubmit }: { parts: AnswerUiPart[]; messageId: string; disabled: boolean; streaming: boolean; streamDone: boolean; onLocate?: (target: AnswerUiMapTarget) => Promise | void; onSubmit?: (text: string) => Promise | void; }) { return (
{parts.map((part, index) => part.type === "answer-ui" ? ( ) : ( ) )}
); }