Skip to content
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 chat messages #12234

Open
InAnYan opened this issue Nov 25, 2024 · 0 comments
Open

Use Markdown in AI chat messages #12234

InAnYan opened this issue Nov 25, 2024 · 0 comments
Labels
AI Related to AI Chat/Summarization ui

Comments

@InAnYan
Copy link
Collaborator

InAnYan commented Nov 25, 2024

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 or Label. Only text in TextField or TextArea can be selected. However, text in WebView can be selected, and it is already used in JabRef in entry preview!

Thus, you have 2 options:

  1. Implement Markdown using Text or Labels and add a button Copy in the sidebar of a chat message (place where "Delete" button).
  2. Implement Markdown using 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 a WebView.

Though the best way is to find a way to make Text or Label be selectable and copyable.

@InAnYan InAnYan added AI Related to AI Chat/Summarization ui labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Related to AI Chat/Summarization ui
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant