Let users generate a shareable link for the full conversation thread.
C1ShareThread
component. You provide a generateShareLink(messages)
function; the SDK gathers messages, opens a modal, and handles copying/confirmation.
Frontend: Add a Thread Share trigger
C1Chat
component as explained the Integrating Custom Components guide, so that you can integrate a custom header. Next,
use the C1ShareThread
component to display a share button in your chat header, which automatically opens a modal to generate a share link using the generateShareLink
function you defined.The updated code for the chat page will look something like this:threadManager
and a threadListManager
,
refer to this guidecustomTrigger
to C1ShareThread
:Backend: Implement the thread share endpoint
threadId
./lib/messageStore.ts
) and modify it to persist message history across API routes and requests as follows:Test