// This is where the chat UI will be // [!code highlight]
{messages.map((message) => (
{message.role === "user" ? "User: " : "AI: "}
{message.parts.map((part, i) => {
switch (part.type) {
case "text":
return
{part.text}
;
default:
return (
{JSON.stringify(part)}
);
}
})}
))}
// This is where the dev server will be previewed // [!code highlight]
;