interface ChatBubbleProps { role: "user" | "character"; text: string; } // H-3 動作描寫標記渲染:把 *…* 標記以暮空紫小字呈現,與台詞區分。 function renderContent(text: string) { const parts = text.split(/(*[^*]+*)/g).filter(Boolean); return parts.map((part, index) => { const match = part.match(/^*([^*]+)*$/); if (match) { return ( {match[1]} ); } return {part}; }); } export function ChatBubble({ role, text }: ChatBubbleProps) { const isUser = role === "user"; return (