Directory

← Back

Chat Assistant Add-on

Chat assistant floating window using wc-chatbot.

Author

Rating

Popularity

100+

Add-on that displays a chat assistant floating window using wc-chatbot.

Features

  • Messages can be sent by the user or programmatically.
  • Listen for new messages written by the user.
  • Toggle the chat window on/off.

Sample code

ChatAssistant chatAssistant = new ChatAssistant();
TextArea message = new TextArea();
message.setLabel("Enter a message from the assistant");
message.setSizeFull();

Button chat = new Button("Chat");
chat.addClickListener(ev->{
  Message m = new Message(message.getValue(),false,false,0,false,new Sender("Assistant","1","https://ui-avatars.com/api/?name=Bot"));
  chatAssistant.sendMessage(m);
  message.clear();
});
chatAssistant.sendMessage(new Message("Hello, I am here to assist you",false,false,0,false,new Sender("Assistant","1","https://ui-avatars.com/api/?name=Bot")));
chatAssistant.toggle();
chatAssistant.addChatSentListener(ev->{
	Notification.show(ev.getMessage());
});

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release

Released
2023-08-30
Maturity
TESTED
License
Apache License 2.0

Compatibility

Framework
Vaadin 24
Browser
Browser Independent

Chat Assistant Add-on - Vaadin Add-on Directory

Chat assistant floating window using wc-chatbot. Chat Assistant Add-on - Vaadin Add-on Directory
Add-on that displays a chat assistant floating window using [wc-chatbot](https://github.com/yishiashia/wc-chatbot). #### Features * Messages can be sent by the user or programmatically. * Listen for new messages written by the user. * Toggle the chat window on/off.
Online