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

If user input too long, the conversation can not display all the input #8815

Open
5 tasks done
sideef5ect opened this issue Sep 26, 2024 · 4 comments
Open
5 tasks done
Assignees
Labels
🐞 bug Something isn't working stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@sideef5ect
Copy link

sideef5ect commented Sep 26, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

send a long text with code, the user message can not be displayed correctly, the response from AI is good.
image
image

✔️ Expected Behavior

The user message should also be well formatted.
image

BTW, is it possible to also have the copy button for user messages? the user message should be treated as the same of the ai messages? Why there is no copy button and the play button for user messages?

❌ Actual Behavior

can not review the user messages because of bad formatting.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Sep 26, 2024
Copy link

dosubot bot commented Sep 26, 2024

I found a similar issue that might be relevant to your problem: Nested code blocks or other markdown blocks in the chat window need a copy button for easy code copying. This issue is closed and was last updated on April 07, 2024. The suggested solution was to duplicate the issue to another one [1].

Regarding your specific issue with long user messages not being displayed properly, the current implementation does not explicitly truncate or handle long user messages. They are displayed in their entirety within the chat interface, which might cause formatting issues if the message is too long [2].

To address this, you might consider implementing CSS styles to handle text overflow, such as .truncate, .overflow-ellipsis, or .overflow-clip, which can ensure that overflowing text is either clipped or shown with an ellipsis [[3]](https://github.com/langgenius/dify/blob/main/third-party/chrome plug-in/tailwind.css).

Additionally, there is no existing functionality for adding copy or play buttons to user messages. This feature is currently only available for AI messages. You might need to extend the existing components to include these buttons for user messages as well.

If you need further assistance with implementing these changes, feel free to ask!

To continue talking to Dosu, mention @dosu.

@crazywoola
Copy link
Member

Can you provide some example texts?

@sideef5ect
Copy link
Author

sideef5ect commented Sep 27, 2024

fields = "31,55,58,70,71,73,74,75,76,77,78,79,80,82,83,84,85,86,87,88,6004,6008,6070,6072,6073,6119,6457,6508,6509,7051,7057,7058,7059,7068,7084,7085,7086,7087,7088,7089,7094,7184,7219,7220,7221,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,7308,7309,7310,7311,7607,7633,7635,7636,7637,7638,7639,7644,7655,7671,7672,7674,7675,7676,7677,7678,7679,7724,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7694,7695,7696,7697,7698,7699,7700,7702,7703,7704,7705,7706,7707,7708,7714,7715,7718,7720,7741,7762,7768,7920,7921"

example

image

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 28, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 12, 2024
@YIXIAO0 YIXIAO0 reopened this Nov 14, 2024
Copy link

dosubot bot commented Dec 15, 2024

Hi, @sideef5ect. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug in Dify version 0.8.1 regarding incorrect display of long user inputs in self-hosted Docker environments.
  • AI responses are formatted correctly, but user inputs are not.
  • I suggested using CSS styles to manage text overflow and noted the absence of copy or play buttons for user messages.
  • You provided a sample input and screenshot to illustrate the issue.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the Dify repository. If so, you can keep the discussion open by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

3 participants