-
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
Export chats to markdown or HTML #230
base: main
Are you sure you want to change the base?
Conversation
Don't merge yet! |
* @param tabId Corresponding tab ID. | ||
* @param fileType Whether to serialize to markdown or HTML format | ||
*/ | ||
public serializeChat = (tabId: string, fileType: 'markdown' | 'html'): string => { |
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.
nit: just type
or contentType
would be better, since we're sending content instead of an actual file.
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.
Totally right, thanks, will fix
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.
Brilliant!
Maybe also removing the code block actions and then releasing it would be a better idea. |
Problem
Users would like to export their chats so that they can revisit them later.
Solution
---
The example app includes an example of calling this serialization and using it to download a file.
Tests (NA)
- [ ] I have tested this change on VSCode- [ ] I have tested this change on JetBrainsLicense
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.