import { View, ScrollView } from "react-native"; import { StyleSheet } from "react-native-unistyles"; import { forwardRef } from "react"; import { UserMessage, AssistantMessage, ActivityLog, ToolCall, } from "@/components/message"; import type { MessageEntry } from "@/contexts/session-context"; interface OrchestratorMessagesViewProps { messages: MessageEntry[]; currentAssistantMessage: string; onArtifactClick: (artifactId: string) => void; } export const OrchestratorMessagesView = forwardRef( function OrchestratorMessagesView({ messages, currentAssistantMessage, onArtifactClick }, ref) { return ( <> {messages.map((msg) => { if (msg.type === "user") { return ( ); } if (msg.type === "assistant") { return ( ); } if (msg.type === "activity") { return ( ); } if (msg.type === "artifact") { return ( ); } if (msg.type === "tool_call") { return ( ); } return null; })} {/* Streaming assistant message */} {currentAssistantMessage && ( )} ); } ); const styles = StyleSheet.create((theme) => ({ scrollView: { flex: 1, }, scrollContent: { paddingHorizontal: theme.spacing[4], paddingTop: theme.spacing[4], paddingBottom: theme.spacing[6], }, }));