import { isMessageItem, isFunctionCallItem, isWebSearchCallItem, AnyResponseItem, } from "../utils/item-types"; import { MessageItemComponent } from "./message-item"; import { FunctionCallItemComponent } from "./function-call-item"; import { WebSearchItemComponent } from "./web-search-item"; import { GenericItemComponent } from "./generic-item"; interface ItemRendererProps { item: AnyResponseItem; index: number; keyPrefix: string; defaultRole?: string; } export function ItemRenderer({ item, index, keyPrefix, defaultRole = "unknown", }: ItemRendererProps) { if (isMessageItem(item)) { return ( ); } if (isFunctionCallItem(item)) { return ( ); } if (isWebSearchCallItem(item)) { return ( ); } // Fallback to generic item for unknown types return ( ); }