opencode/packages/ui/src/components/message-part-text.ts
2026-05-20 20:15:52 -04:00

3 lines
175 B
TypeScript

export function readPartText(accum: Record<string, string> | undefined, part: { id: string; text?: string }): string {
return (accum?.[part.id] ?? part.text ?? "").trim()
}