OvidijusParsiunas / deep-chat

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

Allow adding custom buttons in the input area #150

Open buzhou9 opened 3 months ago

buzhou9 commented 3 months ago

Hi there

We hope to add some custom buttons in the input area, just like submitting and uploading microphone buttons.

Custom buttons can control their UI by passing in "svg" and "style" like other existing buttons, and also allow us to pass in a function in response to click events.

If you think this feature is beneficial, hope you can add it to this project.

I am also reading the source code of your project. If you need it, I can also participate in completing some work, which would be my honor.

Thankyou!

OvidijusParsiunas commented 3 months ago

Hi @buzhou9.

What kind of custom buttons would you like to add and what would be the purpose of the event listeners. We try to keep the API as clean as possible and provide options only if absolutely necessary, hence I can't promise that we will implement this.

Let me know more bout your use-case so I can understand it better.

Thanks!

buzhou9 commented 3 months ago

你好@buzhou9。

您想要添加什么类型的自定义按钮以及事件侦听器的用途是什么。我们尽力保持 API 尽可能干净,并且仅在绝对必要时才提供选项,因此我不能保证我们会实现这一点。

让我更多地了解您的用例,以便我更好地理解它。

谢谢!

Our current requirement is to add a button that users can click to restart a new conversation when they feel that the AI is unable to answer the question correctly. This is common because the AI agent we are using is not very intelligent. Because we embed the page into the native APP application for use, if the user exits the page and then re-enters, it will disrupt the user experience, and the top navigation bar is fixed and cannot add new buttons. Therefore, we hope to try adding a button to open new conversations at the bottom.

buzhou9 commented 3 months ago

你好@buzhou9。 您想要添加什么类型的自定义按钮以及事件侦听器的用途是什么。我们尽力保持 API 尽可能干净,并且仅在绝对必要时才提供选项,因此我不能保证我们会实现这一点。 让我更多地了解您的用例,以便我更好地理解它。 谢谢!

Our current requirement is to add a button that users can click to restart a new conversation when they feel that the AI is unable to answer the question correctly. This is common because the AI agent we are using is not very intelligent. Because we embed the page into the native APP application for use, if the user exits the page and then re-enters, it will disrupt the user experience, and the top navigation bar is fixed and cannot add new buttons. Therefore, we hope to try adding a button to open new conversations at the bottom.

The dropdown page interaction method will be designed by the product to switch to the previous chat. Cannot be used to refresh the page and create a new chat.

OvidijusParsiunas commented 3 months ago

Hi @buzhou9. Thankyou for sharing your information about your use-case. I have thought about this a little further and concluded that providing custom buttons is a big feature that I unfortuntely cannot currently undertake as we are preparing for a big release.

I know that you have mentioned that you can help out, but we are trying to minimize the amount of new code due to the upcoming release, hence you can help us out in the future. I have also added this feature to a list of future features as I do think that it is valuable, so I will be looking at as soon as I get the chance.

For now, you will unfortunately have to build your own component for your particular use-case. My apologies. I will update this issue once the work begins on this feature.

Thankyou.

buzhou9 commented 3 months ago

Hi @buzhou9. Thankyou for sharing your information about your use-case. I have thought about this a little further and concluded that providing custom buttons is a big feature that I unfortuntely cannot currently undertake as we are preparing for a big release.

I know that you have mentioned that you can help out, but we are trying to minimize the amount of new code due to the upcoming release, hence you can help us out in the future. I have also added this feature to a list of future features as I do think that it is valuable, so I will be looking at as soon as I get the chance.

For now, you will unfortunately have to build your own component for your particular use-case. My apologies. I will update this issue once the work begins on this feature.

Thankyou.

Thank you for your reply. I will try to build local components and look forward to your new version.