-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added exportFormat parameter to LLMChatView #48
Added exportFormat parameter to LLMChatView #48
Conversation
Instead of passing .pdf to the ChatView, LLMChatView now has an optional parameter exportFormat that is passed to the ChatView. By default, it is .pdf (so the .init signature need not change), but can now take any ot .pdf, .json, .text, or .none. If exportFormat is .none, no export button will appear in the toolbar.
Thank you for the PR @nriedman; amazing! Feel free to request a review from @philippzagar once you are happy with the result of the PR and would like to get a review. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
+ Coverage 30.17% 30.19% +0.03%
==========================================
Files 66 66
Lines 2891 2892 +1
==========================================
+ Hits 872 873 +1
Misses 2019 2019
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the PR @nriedman, greatly appreciated! 🚀
I had some minor change requests that I persisted as in-line comments. Feel free to actually build the documentation within Xcode and check out the result via Product > Build Documentation
, that helps to resolve lots of issues I mentioned in the in-line comments 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nriedman, just minor fixes left
@nriedman How are we doing with this PR? It would be great to get it merged so we can tag a release and use this in the main application 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nriedman Only one small adjustment necessary, then you should be good to go! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @PSchmiedmayer for the final changes!
LLMChatView exportFormat parameter
♻️ Current situation & Problem
Currently, the LLMChatView creates an instance of the ChatView by passing .pdf as the exportFormat. The result is that there is no way to change the export format or disable exporting entirely.
⚙️ Release Notes
Instead of passing .pdf to the ChatView, LLMChatView now has an optional parameter exportFormat that is passed to the ChatView. By default, it is .pdf (so the .init signature need not change), but can now take any of .pdf, .json, .text, or .none. If exportFormat is .none, no export button will appear in the toolbar.
📚 Documentation
The LLMChatView/init now has an optional new signature where the user passes in a value for exportFormat.
Alternatively, the exportFormat parameter may be omitted, in which case the LLMChatView will default to .pdf.
✅ Testing
Export functionality is rigorously tested as part of the UI testing for the Spezi ChatView.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: