/
githubmirror
/
ui
Обзор
Документация
Войти
/
githubmirror
/
ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/v4/lib/ai.ts
13 строк
438 B
shadcn
feat: @shadcn/helpers (#11168)
14 июл 2026, 19:08
Не верифицирован
14 июл 2026, 19:08
0ec4a7f
Код
Авторство
О чём код?
// Compatibility bridge for v4 examples that still import from `@/lib/ai`. // The public chat API lives in `@shadcn/helpers/ai-sdk`; `getMessageText` // remains local to the app. import type { UIMessage } from "ai" export * from "@shadcn/helpers/ai-sdk" export function getMessageText(message: Pick<UIMessage, "parts">) { return message.parts.reduce( (text, part) => (part.type === "text" ? text + part.text : text), "" ) }