import React from 'react' import type { Observation } from '../types' import { panelStyle, titleStyle } from '../App' interface Props { obs: Observation | null } const fileIcon = (f: string) => f.endsWith('.js') ? '🟨' : f.endsWith('.ts') ? '🔷' : f.endsWith('.json') ? '📋' : f.endsWith('.yml') || f.endsWith('.yaml') ? '⚙️' : '📄' export function WorkspacePanel({ obs }: Props) { if (!obs || obs.available_files.length === 0) return null return (
📁 Workspace Files
{obs.available_files.map(f => (
(e.currentTarget.style.background = '#1e2d4a')} onMouseLeave={e => (e.currentTarget.style.background = 'transparent')}> {fileIcon(f)} {f}
))}
) }