OvidijusParsiunas / deep-chat

Fully customizable AI chatbot component for your website
https://deepchat.dev
MIT License
1.43k stars 221 forks source link

Improvement Suggestions for the Message Display Interface #31

Closed guinanlin closed 11 months ago

guinanlin commented 11 months ago

First of all, thank you very much for your in-depth research and development of DeepChat. The product is really great. I'm also willing to conduct thorough testing and provide suggestions for the product.

Below, I'd like to offer some of my suggestions regarding the 'message' feature. The screenshot below is from another open-source project at https://github.com/Chanzhaoyu/chatgpt-web. I hope that DeepChat can also provide similar functionality. The specific functionality points are as follows:

  1. Copy code: Sometimes, after AI processing, the content may contain markdown. I hope that this markdown can be copied. The main purpose is to copy it to other places (e.g., EditPlus, VSCode, Notepad) for editing.

  2. Code send to: Ideally, it would be great to be able to send this code to other places through an API. In my application, based on the chat conversation, useful content needs to be collected and distributed to other components or systems.

  3. Regenerate, run again: Sometimes, the message from AI is not good, and I hope AI can provide me with the results again.

  4. Display original: The purpose of displaying the original text is that sometimes I want to see unformatted content or to copy it.

  5. Copy to clipboard: This feature is also very effective for quickly copying to the clipboard.

  6. Delete the message: It should be possible to delete the message.

  7. Send to: I hope this feature, along with point 2, can be combined. That is, I hope this message can be quickly collected into other systems. So, you can format the message, for example, in a format similar to the following JSON:

    { original: xxx,
     format: [ normal-text: markdown-text: ... ] 
    }
  8. Display the time: It should display the time of sending and receiving. image

OvidijusParsiunas commented 11 months ago

Hi @guinanlin, thankyou for the great suggestions. At the current moment I have 4 features that I will need to work on, so new ones will unfortunately have to wait until they are finished which will likely take multiple weeks to do. Nevertheless I will give feedback on what is possible and what I will be able to do:

  1. Copying code is difficult to do because the code blocks are parsed and rendered by an external library called Remarkable, hence I have little control the result and don't think I will be able to achieve it for now.
  2. Same problem as above.
  3. That sounds like an interesting feature, I will look into adding this one.
  4. Same problem as first.
  5. That is a good feature, will see if I can add it.
  6. I am not sure what the benefit is for deleting a message, that feature would have low priority.
  7. If you want to send the newest message to somebody, you can track the messages using getMessages and onNewMessage properties. However if you want to let the user to send a message, that would be very context dependent, so I can only recommend building that out using your custom html.
  8. That is a very nice feature, I will be adding this one.

I appreciate all the analysis and the features are well thought out. As I mentioned before I am currently working on 4 new features, so I can't start anything new. However, if you don't want to wait - everything that you have mentioned here you can build out yourself by creating your own web component using this guide or Lit framework and referencing it in html responses.

I am ofcourse determined to fix any bugs/issues immediately and am happy to hear about any other improvements that I can make to the component.

I will be closing this issue now and will update it when I add any of the features in the list above. Thankyou!