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):
|
|
@tejasprasad2008-afk can we have a beautiful demo for this pr, you know its weird if we dont have video demo for the ui;s relates task. |
202604211155.mp4Please let me know if any changes are required! |
|
@tejasprasad2008-afk are you sure that video is from omi app? |
|
Hey @tejasprasad2008-afk 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |