juzser / vue-bot-ui

For the one who is finding a customizable chatbot UI.
MIT License
155 stars 32 forks source link

New Feature request #63

Open ahmeddevelops opened 4 days ago

ahmeddevelops commented 4 days ago

Can we add a feature such that when the user clicks on a button from the list of options, it should emit an event notifying us that the user indeed selected an option and not typed a text. This can help determine the flow to choose in the backend.

Example

  1. The user types a text - We determine it was a plain text, a general query
  2. The user chooses a pre-defined option - We determine that it wasn't a plain text, render sub-options or perform additional operations.
juzser commented 4 days ago

That's a good idea. But I doubt it will change the whole structure of data message. So the value will no longer be string, it should be an object with type. Or at least, the Send event not only emit the value params, but also the type of input.

I'm not sure I can maintain the vue2 version anymore, so if someone can help, that's great.