feat: add share button
https://github.com/user-attachments/assets/61963e17-a92d-4cfd-bc5c-f8b767f92e4d
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.
hello! I was in offline, but I'm taking this back this week
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.
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
Thanks for the PR! I have a couple of questions:
- Do you have an estimate for when this will be completed?
- 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.
@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
Hi, thanks for your PR ❤️
Really looking forward to this feature!
@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.
This PR is stale because it has been open for 14 days with no activity.
@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?
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.
I would love to see this feature in production!
@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.
bump!
Superseded by #2489