chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

feat: add share button

Open celeriev opened this issue 1 year ago • 4 comments

https://github.com/user-attachments/assets/61963e17-a92d-4cfd-bc5c-f8b767f92e4d

celeriev avatar Mar 25 '25 21:03 celeriev

Hi @willydouhard, I started working on this idea of a sharing thread feature, but I'd love to get your guidance. I know you've been considering this feature for a while. I'm curious if you've already thought of the best way to handle this backend-wise.

celeriev avatar Mar 25 '25 21:03 celeriev

hello! I was in offline, but I'm taking this back this week

celeriev avatar Apr 22 '25 15:04 celeriev

Excited about this!

Internally, we've implemented a basic approach for sharing threads using a ?thread_id query param in the start_chat handler. One feature we've appreciated is the ability to include a "header" and "footer" message for shared threads. The header thread includes the original author info. Would this solution support something similar? For instance, could we check if a thread is shared in an on_chat_resume handler and append/prepend header/footer messages accordingly? I reviewed the PR but am not yet familiar enough with the Chainlit source to determine if this is possible.

Screenshot 2025-04-23 at 5 20 03 PM

sanchezedgar avatar Apr 23 '25 21:04 sanchezedgar

Thanks for the feedback @sanchezedgar , I believe we could, yes, I like the header Idea. Let me start by tackling the first blocking points for the PR and we can work on this as well

celeriev avatar Apr 24 '25 13:04 celeriev

Thanks for the PR! I have a couple of questions:

  1. Do you have an estimate for when this will be completed?
  2. Would it be possible to copy the shared chat to another (possibly temporary) table at the moment it’s shared, and then create a new thread from that when someone opens the share link? That way, any future updates by the original user wouldn’t be visible to others viewing the shared link.

mkay1375 avatar Apr 30 '25 14:04 mkay1375

@willydouhard I wonder if it doesn't raise more complexity actually, since one user could share a thread using a specific profile and the end user loading this shared thread might not have permissions for that profile. I imagine this could lead to unexpected failures

celeriev avatar May 12 '25 11:05 celeriev

Hi, thanks for your PR ❤️

Really looking forward to this feature!

claude89757 avatar May 26 '25 18:05 claude89757

@celeriev thanks for the work on this much needed PR. Is this good to go from your perspective? If so please mark it ready for review.

hayescode avatar Jul 01 '25 00:07 hayescode

This PR is stale because it has been open for 14 days with no activity.

github-actions[bot] avatar Jul 27 '25 02:07 github-actions[bot]

@celeriev if you're up for it I think we're ready for this. This is a highly desirable feature and you e done a great job with it. Do you plan on finishing this?

hayescode avatar Aug 16 '25 02:08 hayescode

hello @hayescode , unfortunately, I believe it is not yet fully tested, but I would welcome anyone to take it from there. My main concern would be the way this feature would act with active chat profiles, in case the receiver of the shared thread doesn't have access to the chat profile used by the user owning the shared thread.

celeriev avatar Aug 19 '25 15:08 celeriev

I would love to see this feature in production!

Luttik avatar Sep 03 '25 14:09 Luttik

@celeriev I think since there is still an unresolved change request (even though you left a comment), this PR might be out of focus with the core team... even though it's a very cool and wanted feature. Maybe if you re-request the review or revoke the suggestion we can get this moving again.

Luttik avatar Sep 03 '25 15:09 Luttik

bump!

pindaroso avatar Sep 08 '25 18:09 pindaroso

Superseded by #2489

asvishnyakov avatar Sep 09 '25 03:09 asvishnyakov