'use client' import { RiLoader4Line } from '@remixicon/react' import type { LiveOutputState, Translate } from './types' type LiveOutputCardProps = { liveOutput: LiveOutputState t: Translate } export default function LiveOutputCard({ liveOutput, t }: LiveOutputCardProps) { const { streamingThinking, streamingText, hasStreamingResult } = liveOutput const hasContent = hasStreamingResult || Boolean(streamingThinking) || Boolean(streamingText) if (!hasContent) return null return (
{t('challenges.player.liveOutput')} {hasStreamingResult && ( )}
{streamingThinking && (
{t('challenges.player.modelThinking', 'Thinking')}
{streamingThinking}
)} {streamingText && (
{streamingText}
)} {!streamingThinking && !streamingText && (
{t('challenges.player.awaitingResponse')}
)}
) }