capsule-ai-cli
Version:
The AI Model Orchestrator - Intelligent multi-model workflows with device-locked licensing
10 lines • 716 B
JavaScript
import React from 'react';
import { Box } from 'ink';
import { ChatMessage } from './ChatMessage.js';
export const ConversationView = ({ messages, height, scrollOffset = 0 }) => {
const endIndex = messages.length - scrollOffset;
const startIndex = Math.max(0, endIndex - Math.floor(height / 2));
const visibleMessages = messages.slice(startIndex, endIndex);
return (React.createElement(Box, { flexDirection: "column", height: height, overflow: "hidden" }, visibleMessages.map((message) => (React.createElement(ChatMessage, { key: message.id, type: message.type, content: message.content, timestamp: message.timestamp, metadata: message.metadata })))));
};
//# sourceMappingURL=ConversationView.js.map