Skip to content

Conversation

celeriev
Copy link
Contributor

@celeriev celeriev commented Mar 25, 2025

Latest change:

Screen.Recording.2025-05-12.at.13.42.55.mov

History:
3ff1de9

Screen.Recording.Mar.25.2025.mov

@celeriev
Copy link
Contributor Author

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.

Copy link
Collaborator

@willydouhard willydouhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution, it looks great! I added a few comments

return

new_thread_id = str(uuid.uuid4())
init_http_context(thread_id=new_thread_id, user=user)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot make it work without actually. I may be missing something

@celeriev
Copy link
Contributor Author

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

@sanchezedgar
Copy link

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

@celeriev
Copy link
Contributor Author

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

@mkay1375
Copy link

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.

@celeriev
Copy link
Contributor Author

celeriev commented May 12, 2025

@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

@claude89757
Copy link

Hi, thanks for your PR ❤️

Really looking forward to this feature!

@hayescode
Copy link
Contributor

@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.

Copy link

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

@github-actions github-actions bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jul 27, 2025
@hayescode hayescode added enhancement New feature or request and removed stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed labels Jul 31, 2025
@hayescode hayescode added the keep-for-a-while Don’t mark as stale. This label should be used only for confirmed bugs or other important things label Jul 31, 2025
@hayescode
Copy link
Contributor

@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?

@celeriev
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request keep-for-a-while Don’t mark as stale. This label should be used only for confirmed bugs or other important things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants