Agentic UI/MessageBubble

MessageBubble

채팅 메시지를 표시하는 버블 컴포넌트입니다. user, assistant, system 세 가지 역할을 지원합니다.

Installation

bash
npx axis-cli add message-bubble --agentic

Interactive Demo

👤
안녕하세요! 오늘 날씨가 어때요?
오후 02:02
🤖
안녕하세요! 오늘 서울은 맑고 기온은 15°C 정도입니다. 야외 활동하기 좋은 날씨네요.
GPT-4o오후 02:03

Roles

User

👤
사용자 메시지입니다.

Assistant

🤖
AI 어시스턴트의 응답입니다.
GPT-4

System

시스템 알림: 새로운 세션이 시작되었습니다.

Usage

tsx
import { MessageBubble } from '@axis-ds/agentic-ui'

export function Example() {
  return (
    <div className="space-y-4">
      <MessageBubble
        role="user"
        content="React 컴포넌트 설계 패턴에 대해 알려주세요."
        timestamp={new Date()}
        status="sent"
      />
      <MessageBubble
        role="assistant"
        content="React 컴포넌트 설계에는 여러 패턴이 있습니다..."
        timestamp={new Date()}
        metadata="GPT-4"
      />
    </div>
  )
}

Props

roleRequired
Type:"user" | "assistant" | "system"

메시지 발신자 역할

contentRequired
Type:React.ReactNode

메시지 내용

timestamp
Type:Date
Default:-

메시지 타임스탬프

avatar
Type:React.ReactNode | string
Default:-

아바타 (ReactNode 또는 이미지 URL)

status
Type:"sending" | "sent" | "error"
Default:-

메시지 전송 상태

actions
Type:React.ReactNode
Default:-

메시지 액션 버튼

metadata
Type:string
Default:-

메타데이터 (모델명 등)

className
Type:string
Default:-

추가 CSS 클래스