-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use Markdown in AI Summary tab #12233
Comments
Implementation hint: Look at the |
@koppor, Hello! |
Welcome to the vibrant world of open-source development with JabRef! Newcomers, 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. ⚠ Note that this issue will become unassigned if it isn't closed within 30 days. 🔧 A maintainer can also add the Happy coding! 🚀 |
/assign @mulla028 |
I don't think we should force Markdown. It should be toggleable. Sometimes I want to copy the unformated markdown somewhere else. Sometimes I want to copy the Markdown. But yes, Markdown should be the default. |
I think, you are requesting a context menu with two copy options as available in the context menu of an entry Note: this is not avaialble in the context menu of the preview (yet) |
No, I am explicitly talking about a toggle. Can be a tab or dropdown too. If push comes to shove also via right-click menu. Reason: Eventually, html or other formatting could be added as well to the list. Not only do I argue that being able to copy the raw text is important, also in the mid / long term, we want to be be able to edit responses directly in the JabRef UI, which will enable having and fixing longer conversations, even when the model at first responded inadequately (obviously something out of scope for this issue here). Finally, being able to look at the source, just like in biblatex source tab is important, otherwise we will have users that raise issues like these: nomic-ai/gpt4all#864, which are basically formatting issues. Without the raw source, it is hard to debug them. |
When you start JabRef and open the entry editor (by clicking on an entry), you can go to the AI summary / AI chat tab. Copying is already possible and it should still be possible, even with the markdown feature. IMHO, if my proposal to use a toggle, tab, dropdown, right-click menu to switch between normal and markdown view gets implemented, then copying should work for both views (also via selecting all text via ctrl + a and then copy via ctrl + c). Related documentation: |
@ThiloteE |
Hi, @mula! Is there anything specific you want to ask about my issue? I might've formulated it wrong. By "use Markdown" I meant, that LLM models typically generate output not just in plain text, but in markdown (rich text), and we need a way to display a Markdown not in its source, but to apply it and stylize the text. By "1. Use Text or Labels for Markdown" I meant to render Markdown as several Text elements with different CSS styles. For that you need a Markdown parser. By "2. Use WebView" I mean using a web view component in summary tab. In this option you need to convert Markdown to HTML (I think JabRef already has something like that). Thilo has proposed a new feature: toggling. It will allow you to switch between styles: one using TextArea (this is what we already have) and Markdown rendering (two options I told above). This will be a great plus if you implement option 1. If you implement option 2, then there would be no need to show Markdown source in TextArea, as users are able to copy from WebView |
@koppor @Siedlerchr |
@mulla028 Use WebView. See org.jabref.logic.layout.format.MarkdownFormatter#format of how to transform Markdown to HTML. WebView component is OK, because it is only one. Similar to the EntryPreview, where we also use one. Reason: The user experience with WebView is better than having multiple copy buttons. Nearly no other app has that... This is ADR-0036? Can you link "only one package" in the ADR (you will find the text in the ADR itself) Your option 2 here is option "Use a Markdown parser to convert content into HTML and use a WebView for one message" in that ADR? Wasn't that considered bad? What has changed now? |
|
Sounds good 👍 |
@InAnYan Can you craft a new (short) ADR for chat summarization and reference that ADR? Moreover, fix that ADR by adding the link to the markdown framework? |
Is your suggestion for improvement related to a problem? Please describe.
Currently, summary is 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 summary window.
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
somewhere at the end.WebView
.Option 1 is, I think, easier to implement, however option 2 is preferred
The text was updated successfully, but these errors were encountered: