feat(chat): port chat widget components from Dart to React

This commit is contained in:
2026-06-09 20:19:52 +08:00
parent 199a14650e
commit 109a3e3855
48 changed files with 2463 additions and 382 deletions
+26
View File
@@ -0,0 +1,26 @@
"use client";
/**
* TextBubble 文字气泡
*
* 原始 Dart: lib/ui/chat/widgets/text_bubble.dart41 行)
*
* 视觉差异:
* - AI 消息:白底黑字 + 左上角尖角
* - 用户消息:渐变(primaryGradient+ 白字 + 右上角尖角
*/
import styles from "./text-bubble.module.css";
export interface TextBubbleProps {
content: string;
isFromAI: boolean;
}
export function TextBubble({ content, isFromAI }: TextBubbleProps) {
return (
<div
className={`${styles.bubble} ${isFromAI ? styles.bubbleAi : styles.bubbleUser}`}
>
{content}
</div>
);
}