diff --git a/packages/client-android/App.tsx b/packages/client-android/App.tsx index e0849f6..6065f75 100644 --- a/packages/client-android/App.tsx +++ b/packages/client-android/App.tsx @@ -11,7 +11,7 @@ import { DEFAULT_GATEWAY_CONFIG } from '@yuzu-gca/shared'; type Msg = { role: 'user' | 'assistant'; text: string; ts: number }; export default function App() { - const [tab, setTab] = useState<'chat' | 'settings' | 'device' | 'connection'>('chat'); + const [tab, setTab] = useState<'chat' | 'terminal' | 'settings' | 'device' | 'connection'>('chat'); // Chat state const [messages, setMessages] = useState([]); @@ -85,10 +85,10 @@ export default function App() { {/* Tabs */} - {(['chat', 'settings', 'device', 'connection'] as const).map(t => ( + {(['chat', 'terminal', 'settings', 'device', 'connection'] as const).map(t => ( setTab(t)} style={[styles.tab, tab === t && styles.tabActive]}> - {t === 'chat' ? 'Chat' : t === 'settings' ? 'Gateway' : t === 'device' ? 'Device' : (connStatus === 'connected' ? '🟢' : '⚫')} + {t === 'chat' ? 'Chat' : t === 'terminal' ? 'Term' : t === 'settings' ? 'Gateway' : t === 'device' ? 'Device' : (connStatus === 'connected' ? '🟢' : '⚫')} ))} @@ -128,6 +128,29 @@ export default function App() { )} + {/* ── Terminal Tab ── */} + {tab === 'terminal' && ( + + + + Execute remote commands via Gateway MCP.{'\n'}Type a shell command and press Execute.{'\n'} + + + + + + Run + + + + )} + {/* ── Settings Tab ── */} {tab === 'settings' && ( @@ -245,6 +268,8 @@ const styles = StyleSheet.create({ conn_error: { backgroundColor: '#7f1d1d' }, conn_disconnected: { backgroundColor: '#1e293b' }, connText: { fontSize: 16, color: '#e2e8f0' }, + termOutput: { flex: 1, backgroundColor: '#0a0f1a', margin: 8, borderRadius: 8, padding: 12 }, + termText: { fontFamily: 'monospace', fontSize: 12, color: '#22c55e', lineHeight: 18 }, btn: { borderRadius: 8, padding: 14, marginTop: 16, alignItems: 'center' }, btnPrimary: { backgroundColor: '#1e40af' }, btnDanger: { backgroundColor: '#991b1b' },