-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Use Markdown in AI chat messages #12234
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
Comments
@ar-rana please open a pull-request an link it to to this issue. This will ease the review process substantially. Thank you :-) |
Figure 1 Figure 2 I have a proposal to implement the markdown with text flow (which can be constructed with a Markdown parser and a tree walker to yield a Textflow node), which can be made selectable and copyable through the POC shown below. |
@Yubo-Cao That looks great! Go ahead! |
/assign-me |
👋 Hey @Yubo-Cao, thank you for your interest in this issue! 🎉 We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly. In case you encounter failing tests during development, please check our developer FAQs! Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. Happy coding! 🚀 |
Uh oh!
There was an error while loading. Please reload this page.
Is your suggestion for improvement related to a problem? Please describe.
Currently, chat messages are formatted in a
TextArea
. This allows text to be selected, but the formatting is ugly. Markdown is a de-facto standard for chat LLMs.Describe the solution you'd like
Use Markdown in AI chat messages with the ability to select and copy text.
Additional context
There is a long-standing problem with JavaFX: you cannot select
Text
orLabel
. Only text inTextField
orTextArea
can be selected. However, text inWebView
can be selected, and it is already used in JabRef in entry preview!Thus, you have 2 options:
Text
orLabel
s and add a buttonCopy
in the sidebar of a chat message (place where "Delete" button).WebView
.Option 1 is, I think, easier to implement.
But Option 2 is tricky: at first glance it would solve the problem, but the question is -- performance overhead?
WebView
is like a tiny browser. Thus, a better option is to format the whole chat UI (only messages, not prompt) in aWebView
.Though the best way is to find a way to make
Text
orLabel
be selectable and copyable.The text was updated successfully, but these errors were encountered: