import React from 'react'; import { Box, Text } from 'ink'; import { LogEntry } from './types.js'; interface DaemonFeedProps { logs: LogEntry[]; secureMode: boolean; } const LEVEL_COLOR: Record = { info: 'gray', warn: 'yellow', error: 'red', command: 'cyan', frank: 'magenta', guardian: 'blue', hive: 'cyan', }; const LEVEL_PREFIX: Record = { info: ' ', warn: '⚠ ', error: '✖ ', command: '» ', frank: 'F ', guardian: 'G ', hive: 'H ', }; export function DaemonFeed({ logs, secureMode }: DaemonFeedProps) { return ( ◈ DAEMON FEED {secureMode && ⚠ SECURE OVERLAY ACTIVE} {logs.slice(-14).map(log => ( {log.timestamp} {LEVEL_PREFIX[log.level]}{log.message} ))} ); }