import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from 'ink';
/** streaming text 显示尾部行数上限（超出截尾，老内容滚出窗口） */
const STREAMING_TAIL_LINES = 20;
export function StreamingBlock({ progressStage, streamingText, }) {
    if (progressStage !== 'streaming' || streamingText.length === 0) {
        return null;
    }
    const lines = streamingText.split('\n').slice(-STREAMING_TAIL_LINES);
    return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [lines.map((line, i) => (_jsx(Text, { children: line }, i))), _jsx(Text, { color: "gray", dimColor: true, children: "\u258D" })] }));
}
