{/* Header Bar */}
{/* Left: Filename & Lightswind Badge */}
{filename}
{showLanguageBadge && (
{language}
)}
{/* Right: Lightswind AI Status Badge & Control Buttons */}
{showAiStatus && (
{aiIcon}
{!isDone ? "Writing code..." : aiAgentName}
)}
{showReplayButton && (
)}
{showCopyButton && (
)}
{/* Code Body Container using OneDark Utility Tokens */}
{displayedLines.map((lineTokens, i) => {
const lineNumber = i + 1;
const isHighlighted = highlightLines.includes(lineNumber);
const isCurrentLine = i === displayedLines.length - 1 && !isDone;
const motionConfig = getMotionProps(typingAnimation);
return (
{/* Line Number */}
{showLineNumbers && (
{lineNumber}
)}
{/* Code Tokens styled with OneDark utility */}
{lineTokens.map((tok, j) => (
{tok.text}
))}
{/* Animated Typing Cursor */}
{isCurrentLine && renderCursor(typingAnimation)}
);
})}
);
};
export default AiCodeBlock;
```