@burdenoff/website-sdk 2026.829.2 → 2026.829.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -327,6 +327,16 @@ var RECORD_EXPLORE_CLICK_MUTATION = (
327
327
  }
328
328
  `
329
329
  );
330
+ var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
331
+ /* GraphQL */
332
+ `
333
+ mutation CreateExploreShareLink($conversationToken: String!) {
334
+ createExploreShareLink(conversationToken: $conversationToken) {
335
+ shareToken
336
+ }
337
+ }
338
+ `
339
+ );
330
340
 
331
341
  // src/data/products.ts
332
342
  var ECOSYSTEM_PRODUCTS = [
@@ -1259,6 +1269,16 @@ function useExploreChat(options = {}) {
1259
1269
  return null;
1260
1270
  }, [messages]);
1261
1271
  const canSend = (phase === "ready" || phase === "error") && catalog.enabled && turnCount < catalog.limits.maxTurnsPerConversation;
1272
+ const createShareLink = useCallback(async () => {
1273
+ const token = conversationTokenRef.current;
1274
+ if (!token) return null;
1275
+ try {
1276
+ const result = await client.mutate(CREATE_EXPLORE_SHARE_LINK_MUTATION, { conversationToken: token });
1277
+ return result?.data?.createExploreShareLink?.shareToken ?? null;
1278
+ } catch {
1279
+ return null;
1280
+ }
1281
+ }, [client]);
1262
1282
  const recordClick = useCallback(
1263
1283
  (messageId, kind, url) => {
1264
1284
  const token = conversationTokenRef.current;
@@ -1291,7 +1311,8 @@ function useExploreChat(options = {}) {
1291
1311
  openConversation,
1292
1312
  deleteConversation,
1293
1313
  clearHistory,
1294
- recordClick
1314
+ recordClick,
1315
+ createShareLink
1295
1316
  };
1296
1317
  }
1297
1318
  var optimisticCounter = 0;