Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ChatBubble #7548

Open
ahuang11 opened this issue Dec 11, 2024 · 2 comments
Open

Adding ChatBubble #7548

ahuang11 opened this issue Dec 11, 2024 · 2 comments

Comments

@ahuang11
Copy link
Contributor

A lot of times I want to incorporate the same look and feel of ChatMessage markdown, but forget the CSS class (is it message or chat-message).

To make it more explicit, I'd like to introduce ChatBubble which is simply Markdown(css_classes=["message"]).

Use case for me is:

message_col = pn.Column(widget1, widget2)
chat_interface = ChatInterface()
chat_interface.send(message_col)

# some callback happens:
message_col.objects = [Markdown("Done!", css_classes=["message"])]

Would be nice to just do:

message_col = pn.Column(widget1, widget2)
chat_interface = ChatInterface()
chat_interface.send(message_col)

# some callback happens:
message_col.objects = [ChatBubble("Done!")]
@ahuang11
Copy link
Contributor Author

Not sure if it should contain header/footer objects too.

@philippjfr
Copy link
Member

I don't quite follow, wouldn't the styling already be done by the ChatMessage wrapping the message_col and if not could it not automatically apply it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants