Add basic markdown support for assist chat messages#3689
Conversation
Sources/Shared/Assets/Colors.xcassets/haPrimaryDark.colorset/Contents.json
Outdated
Show resolved
Hide resolved
bgoncal
left a comment
There was a problem hiding this comment.
Looking great! Thanks for helping out with that.
One last request, can you also add a screenshot of how it looks in Apple Watch now? It worth testing if links are going to open in the in-app browser.
| .background(backgroundForChatItemType(item.itemType)) | ||
| .roundedCorner(6, corners: roundedCornersForChatItemType(item.itemType)) | ||
| .foregroundColor(.white) | ||
| .tint(Color.haPrimaryDark) |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
For the linter issue you can use |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3689 +/- ##
==========================================
+ Coverage 44.72% 45.59% +0.87%
==========================================
Files 232 232
Lines 13911 14071 +160
==========================================
+ Hits 6221 6416 +195
+ Misses 7690 7655 -35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bgoncal
left a comment
There was a problem hiding this comment.
Out of curiosity, do you use Assist only by text? Markdown is not handled well by TTS (but that's not related to this PR goal of course)
@bgoncal Both. Depends on the situation and use case. Elevenlabs actually handles most cases just fine and uses simple markdown features for pronunciation. On voice only devices I have another assistant that has a special system prompt. I would like to use text input more on mobile but theres also this issue: home-assistant/core#147975 |
Summary
This adds basic markdown formatting for messages in assist because LLMs often respond with markdown.
It does not support common markdown features like headlines, images and tables because they are currently not natively supported in SwiftUI
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes