Spaces:
Running
Running
Agent Guide for components/
Context
Page-level UI panels rendered by ChatInterface. Each component manages a major area of the interface (conversation, dashboard, settings, reports, observability, camera).
Structure & Navigation
| Component | Purpose | Data Source (Hook) | Backend Dependencies |
|---|---|---|---|
ChatInterface.tsx |
Main layout + conversation panel | useConversation, useSession, useListening |
WebSocket (/api/stream/ws), /api/session/inject-text |
DashboardGrid.tsx |
Health dashboard cards | useDashboardData |
/api/stream/dashboard-stats |
SettingsPanel.tsx |
Profile, medical, meds, dev settings | useSettings, useConsent |
/api/profile, /api/medications, /api/wakeword, /api/consent, /api/stream/reset-db, /api/conversation-log |
ReportsPanel.tsx |
View/export health reports | (inline fetch) | /api/appointment-export |
ObservabilityPanel.tsx |
Real-time monitoring metrics | useObservability |
/api/stream/observability, /api/stream/cost-summary, cost.update WS events |
CameraView.tsx |
Robot camera feed + head control | (via useConversation) |
camera.frame WS events, /api/move-head |
ComponentOverlay.tsx |
Floating GenUI component display | useConversation |
ui.component / ui.dismiss WS events |
ConsentModal.tsx |
GDPR-style consent dialog | useConsent |
/api/consent |
Dependencies & Connections
- Hooks: Every component gets its data from hooks in
../hooks/. Seehooks/AGENT.md. - Registry:
ComponentOverlayrenders GenUI components from../registry/. Seeregistry/AGENT.md. - WebSocket events that trigger component state changes:
ui.navigate→ChatInterfaceopens/closes panelsui.settings_updated→SettingsPanelre-fetches profile/medssession.*→ChatInterfaceupdates session indicator
When Adding a New Panel
- Create
NewPanel.tsxin this directory - Create or extend a hook in
../hooks/for data fetching - Add navigation entry in
ChatInterface.tsxbottom bar - If voice-navigable: add target to
ui_control.pybackend tool +emit_ui_navigate() - Update this
AGENT.md