tjtanjin / react-chatbotify

A modern React library for creating a flexible and extensible chatbot.
https://react-chatbotify.com
MIT License
135 stars 65 forks source link

Need to Control Initial start Message Delay in React Chatbotify #18

Closed devAmaresh closed 5 months ago

devAmaresh commented 5 months ago

Hello,

I am using React Chatbotify for a project and I've encountered an issue. There seems to be a delay before the start message is shown when the chatbot is initialized. I would like to control this delay, ideally setting it to zero so that the start message appears immediately.

I've looked through the documentation and the source code, but I couldn't find a specific setting or property that controls this delay. It's possible that I've missed it, or that this feature is not directly configurable.

Could you please provide some guidance on how to control the delay of the start message in React Chatbotify? If this feature is not currently available, could it be considered for a future update?

tjtanjin commented 5 months ago

Hi @devAmaresh, I'm unsure of the delay that you are experiencing. If you hop over to the documentation website, the chatbot sends its messages immediately. Are you perhaps able to send a video or elaborate on the issue?

devAmaresh commented 5 months ago

you can refer to this video ..When the initial start message is shown there is a transition effect (delay) i want a control over it ....

tjtanjin commented 5 months ago

bandicam.2024-03-26.14-54-10-824.mp4 you can refer to this video ..When the initial start message is shown there is a transition effect (delay) i want a control over it ....

Are you referring to the animation played for the chat bubbles?

devAmaresh commented 5 months ago

bandicam.2024-03-26.14-54-10-824.mp4 you can refer to this video ..When the initial start message is shown there is a transition effect (delay) i want a control over it ....

Are you referring to the animation played for the chat bubbles?

yes..

tjtanjin commented 5 months ago

bandicam.2024-03-26.14-54-10-824.mp4

you can refer to this video ..When the initial start message is shown there is a transition effect (delay) i want a control over it ....

Are you referring to the animation played for the chat bubbles?

yes..

I see you have a rather interesting use case where you're building a wrapper around the chatbot. I can understand why you won't want the first message to animate since it is visually disruptive on every edit.

That said, I have never catered this option since for typical uses of a chatbot, the messages should be animated the same way regardless of whether it's the first or last message. I am also not very inclined to add a special option just for the first message because it is very niche.

Not to worry though, I am not leaving you in the lurch. Moving forward, this is how I picture we can resolve this:

The above solution is general enough to be possibly useful for other use cases and at the same time, provides a solution to your issue. I understand this is more troublesome than a straightforward solution of adding an option to the initial message but it is a good balance between having too niche a feature and addressing your needs.

Let me know your thoughts!

devAmaresh commented 5 months ago

I am satisfied with your solution . Looking forward to seeing this enhancement implemented!. Thank you for your efforts ..

tjtanjin commented 5 months ago

I am satisfied with your solution . Looking forward to seeing this enhancement implemented!.

Thank you for your efforts ..

No problem! I actually feel the animate field would be nice to have. Separately, would you be comfortable reaching out on discord? I am a little curious about your use case and can also benefit from having you test the build as well 😝

devAmaresh commented 5 months ago

I am satisfied with your solution . Looking forward to seeing this enhancement implemented!. Thank you for your efforts ..

No problem! I actually feel the animate field would be nice to have. Separately, would you be comfortable reaching out on discord? I am a little curious about your use case and can also benefit from having you test the build as well 😝

sure

tjtanjin commented 5 months ago

Closing this issue for the following reasons: