feat: add GenUI support for Omi chat (#3810)#6816
feat: add GenUI support for Omi chat (#3810)#6816tejasprasad2008-afk wants to merge 3 commits intoBasedHardware:mainfrom
Conversation
tejasprasad2008-afk
commented
Apr 18, 2026
- Add GenUIMessageWidget for location_prompt and map_result components
- Update markdown_message_widget to detect and render GenUI JSON
- Pass sendMessage callback through NormalMessageWidget and MemoriesMessageWidget
- Add GenUI instructions to backend system prompt in chat.py
- Backward compatible: plain text messages unaffected
- Add GenUIMessageWidget for location_prompt and map_result components - Update markdown_message_widget to detect and render GenUI JSON - Pass sendMessage callback through NormalMessageWidget and MemoriesMessageWidget - Add GenUI instructions to backend system prompt in chat.py - Backward compatible: plain text messages unaffected
|
Closes #3810 What this doesReplaces markdown rendering with interactive GenUI components in Omi chat. Changes
Flow
Backward compatibleAll non-genui messages continue rendering as markdown exactly as before. |
Greptile SummaryThis PR adds GenUI support to the Omi chat, enabling the LLM to return structured JSON that renders interactive Flutter widgets (location prompts, map cards, result cards) instead of plain markdown. The backend injects GenUI instructions into the RAG prompt, and the Flutter side detects and dispatches the JSON to the appropriate widget.
Confidence Score: 3/5Not safe to merge — the app will not compile due to a missing file import and undefined class reference A P0 compile error (missing
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Flutter as Flutter Chat UI
participant Backend as Backend (chat.py)
participant LLM
User->>Flutter: sends message
Flutter->>Backend: POST /chat message
Backend->>LLM: prompt with genui_instructions (RAG path only)
LLM-->>Backend: JSON genui location_prompt
Backend-->>Flutter: message text (raw JSON string)
Flutter->>Flutter: getMarkdownWidget()
Flutter->>Flutter: GenUIMessage.tryParse()
alt component == location_prompt
Flutter->>Flutter: render LocationSharePrompt widget
User->>Flutter: taps Yes
Flutter->>Backend: sendMessage with coordinates
Backend->>LLM: follow-up with lat/lng
LLM-->>Backend: JSON map_result
Backend-->>Flutter: map_result JSON
Flutter->>Flutter: render MapCard widget
else other component
Flutter->>Flutter: render appropriate GenUI widget
end
|
…fix indentation, fix user-agent
|
All Greptile review issues have been addressed in the latest commit (15ca7a1):
|