import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box } from 'ink';
import ChatQueue from '../../components/chat-queue.js';
/**
 * Chat history component that displays frozen and dynamic chat content.
 *
 * IMPORTANT: This component should NEVER be conditionally unmounted.
 * It contains ink's Static component which holds frozen terminal output.
 * Unmounting causes the Static content to be destroyed and recreated,
 * leading to memory issues and visual glitches.
 *
 * Use ChatInput separately for the input area, which can mount/unmount freely.
 */
export function ChatHistory({ startChat, staticComponents, queuedComponents, liveComponent, }) {
    return (_jsxs(Box, { flexGrow: 1, flexDirection: "column", minHeight: 0, children: [startChat && (_jsx(ChatQueue, { staticComponents: staticComponents, queuedComponents: queuedComponents })), liveComponent && _jsx(Box, { marginLeft: -1, children: liveComponent })] }));
}
//# sourceMappingURL=chat-history.js.map