@liveblocks/react 3.13.0 → 3.13.1-hackathon
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.
- package/dist/_private.cjs +7 -7
- package/dist/_private.d.cts +2 -2
- package/dist/_private.d.ts +2 -2
- package/dist/_private.js +1 -1
- package/dist/{chunk-C7F5PZXE.cjs → chunk-73OAUQFM.cjs} +2 -2
- package/dist/chunk-73OAUQFM.cjs.map +1 -0
- package/dist/{chunk-RTM66YNN.js → chunk-A3DIFDDH.js} +2 -2
- package/dist/{chunk-QFAOGFJK.cjs → chunk-JXNC4PPG.cjs} +294 -40
- package/dist/chunk-JXNC4PPG.cjs.map +1 -0
- package/dist/{chunk-ERRJHA6O.js → chunk-VSUKKNOK.js} +256 -2
- package/dist/chunk-VSUKKNOK.js.map +1 -0
- package/dist/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/{room-CEMGQ1Mj.d.cts → room-CVCL9bCW.d.cts} +88 -2
- package/dist/{room-CEMGQ1Mj.d.ts → room-CVCL9bCW.d.ts} +88 -2
- package/dist/suspense.cjs +4 -4
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-C7F5PZXE.cjs.map +0 -1
- package/dist/chunk-ERRJHA6O.js.map +0 -1
- package/dist/chunk-QFAOGFJK.cjs.map +0 -1
- /package/dist/{chunk-RTM66YNN.js.map → chunk-A3DIFDDH.js.map} +0 -0
|
@@ -512,6 +512,12 @@ function makeAiChatsQueryKey(query) {
|
|
|
512
512
|
function makeInboxNotificationsQueryKey(query) {
|
|
513
513
|
return _core.stableStringify.call(void 0, _nullishCoalesce(query, () => ( {})));
|
|
514
514
|
}
|
|
515
|
+
function makeAgentSessionsQueryKey(roomId, options) {
|
|
516
|
+
return _core.stableStringify.call(void 0, [roomId, _nullishCoalesce(options, () => ( {}))]);
|
|
517
|
+
}
|
|
518
|
+
function makeAgentMessagesQueryKey(roomId, sessionId, options) {
|
|
519
|
+
return _core.stableStringify.call(void 0, [roomId, sessionId, _nullishCoalesce(options, () => ( {}))]);
|
|
520
|
+
}
|
|
515
521
|
function usify(promise) {
|
|
516
522
|
if ("status" in promise) {
|
|
517
523
|
return promise;
|
|
@@ -978,6 +984,19 @@ var UmbrellaStore = class {
|
|
|
978
984
|
#roomVersionsLastRequestedAtByRoom = /* @__PURE__ */ new Map();
|
|
979
985
|
// Notification Settings
|
|
980
986
|
#notificationSettings;
|
|
987
|
+
// Agent Sessions
|
|
988
|
+
#roomsByRoomId = /* @__PURE__ */ new Map();
|
|
989
|
+
// TODO: the need for this seems wrong, i need to explore if maybe this stuff belongs in in RoomContext and not here
|
|
990
|
+
#agentSessionsByRoomId = /* @__PURE__ */ new Map();
|
|
991
|
+
#agentMessagesBySessionId = /* @__PURE__ */ new Map();
|
|
992
|
+
// Signals for agent sessions and messages to trigger reactivity
|
|
993
|
+
// We use a version counter to track changes
|
|
994
|
+
#agentSessionsSignal = new (0, _core.MutableSignal)({
|
|
995
|
+
version: 0
|
|
996
|
+
});
|
|
997
|
+
#agentMessagesSignal = new (0, _core.MutableSignal)({
|
|
998
|
+
version: 0
|
|
999
|
+
});
|
|
981
1000
|
constructor(client) {
|
|
982
1001
|
this.#client = client[_core.kInternal].as();
|
|
983
1002
|
this.optimisticUpdates = createStore_forOptimistic(this.#client);
|
|
@@ -1349,6 +1368,94 @@ var UmbrellaStore = class {
|
|
|
1349
1368
|
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1350
1369
|
}
|
|
1351
1370
|
);
|
|
1371
|
+
const loadingAgentSessions = new (0, _core.DefaultMap)(
|
|
1372
|
+
(queryKey) => {
|
|
1373
|
+
const [roomId, options] = JSON.parse(queryKey);
|
|
1374
|
+
const resource = new PaginatedResource(async (cursor) => {
|
|
1375
|
+
const room = this.#roomsByRoomId.get(roomId);
|
|
1376
|
+
if (!room) {
|
|
1377
|
+
throw new Error(
|
|
1378
|
+
`Room ${roomId} not found. Make sure you're calling useAgentSessions inside a RoomProvider.`
|
|
1379
|
+
);
|
|
1380
|
+
}
|
|
1381
|
+
const typedRoom = room;
|
|
1382
|
+
const result = await typedRoom.fetchAgentSessions({
|
|
1383
|
+
cursor,
|
|
1384
|
+
since: _optionalChain([options, 'optionalAccess', _8 => _8.since]),
|
|
1385
|
+
metadata: _optionalChain([options, 'optionalAccess', _9 => _9.metadata])
|
|
1386
|
+
});
|
|
1387
|
+
this.updateAgentSessions(roomId, result.sessions, "list");
|
|
1388
|
+
return _nullishCoalesce(result.nextCursor, () => ( null));
|
|
1389
|
+
});
|
|
1390
|
+
const signal = _core.DerivedSignal.from(
|
|
1391
|
+
resource.signal,
|
|
1392
|
+
this.#agentSessionsSignal,
|
|
1393
|
+
(resourceResult, _signalState) => {
|
|
1394
|
+
if (resourceResult.isLoading || resourceResult.error) {
|
|
1395
|
+
return resourceResult;
|
|
1396
|
+
}
|
|
1397
|
+
const sessionsMap = this.#agentSessionsByRoomId.get(roomId);
|
|
1398
|
+
const sessions = sessionsMap ? Array.from(sessionsMap.values()) : [];
|
|
1399
|
+
const page = resourceResult.data;
|
|
1400
|
+
return {
|
|
1401
|
+
isLoading: false,
|
|
1402
|
+
sessions,
|
|
1403
|
+
hasFetchedAll: page.hasFetchedAll,
|
|
1404
|
+
isFetchingMore: page.isFetchingMore,
|
|
1405
|
+
fetchMoreError: page.fetchMoreError,
|
|
1406
|
+
fetchMore: page.fetchMore
|
|
1407
|
+
};
|
|
1408
|
+
},
|
|
1409
|
+
_core.shallow2
|
|
1410
|
+
);
|
|
1411
|
+
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1412
|
+
}
|
|
1413
|
+
);
|
|
1414
|
+
const loadingAgentMessages = new (0, _core.DefaultMap)(
|
|
1415
|
+
(queryKey) => {
|
|
1416
|
+
const [roomId, sessionId, options] = JSON.parse(queryKey);
|
|
1417
|
+
const resource = new PaginatedResource(async (cursor) => {
|
|
1418
|
+
const room = this.#roomsByRoomId.get(roomId);
|
|
1419
|
+
if (!room) {
|
|
1420
|
+
throw new Error(
|
|
1421
|
+
`Room ${roomId} not found. Make sure you're calling useAgentSession inside a RoomProvider.`
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
const typedRoom = room;
|
|
1425
|
+
const result = await typedRoom.fetchAgentMessages(sessionId, {
|
|
1426
|
+
cursor,
|
|
1427
|
+
limit: _optionalChain([options, 'optionalAccess', _10 => _10.limit])
|
|
1428
|
+
});
|
|
1429
|
+
this.updateAgentMessages(roomId, sessionId, result.messages, "list");
|
|
1430
|
+
return _nullishCoalesce(result.nextCursor, () => ( null));
|
|
1431
|
+
});
|
|
1432
|
+
const signal = _core.DerivedSignal.from(
|
|
1433
|
+
resource.signal,
|
|
1434
|
+
this.#agentMessagesSignal,
|
|
1435
|
+
(resourceResult, _signalState) => {
|
|
1436
|
+
if (resourceResult.isLoading || resourceResult.error) {
|
|
1437
|
+
return resourceResult;
|
|
1438
|
+
}
|
|
1439
|
+
const messagesMap = this.#agentMessagesBySessionId.get(sessionId);
|
|
1440
|
+
const messages = messagesMap ? Array.from(messagesMap.values()).sort(
|
|
1441
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1442
|
+
(a, b) => a.timestamp - b.timestamp
|
|
1443
|
+
) : [];
|
|
1444
|
+
const page = resourceResult.data;
|
|
1445
|
+
return {
|
|
1446
|
+
isLoading: false,
|
|
1447
|
+
messages,
|
|
1448
|
+
hasFetchedAll: page.hasFetchedAll,
|
|
1449
|
+
isFetchingMore: page.isFetchingMore,
|
|
1450
|
+
fetchMoreError: page.fetchMoreError,
|
|
1451
|
+
fetchMore: page.fetchMore
|
|
1452
|
+
};
|
|
1453
|
+
},
|
|
1454
|
+
_core.shallow2
|
|
1455
|
+
);
|
|
1456
|
+
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1457
|
+
}
|
|
1458
|
+
);
|
|
1352
1459
|
this.outputs = {
|
|
1353
1460
|
threadifications,
|
|
1354
1461
|
threads,
|
|
@@ -1364,7 +1471,9 @@ var UmbrellaStore = class {
|
|
|
1364
1471
|
aiChats,
|
|
1365
1472
|
messagesByChatId,
|
|
1366
1473
|
aiChatById,
|
|
1367
|
-
urlMetadataByUrl
|
|
1474
|
+
urlMetadataByUrl,
|
|
1475
|
+
loadingAgentSessions,
|
|
1476
|
+
loadingAgentMessages
|
|
1368
1477
|
};
|
|
1369
1478
|
autobind(this);
|
|
1370
1479
|
}
|
|
@@ -1585,6 +1694,61 @@ var UmbrellaStore = class {
|
|
|
1585
1694
|
result.subscriptions.deleted
|
|
1586
1695
|
);
|
|
1587
1696
|
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Registers a room instance for agent session fetching.
|
|
1699
|
+
* Called by RoomProvider when it mounts.
|
|
1700
|
+
*/
|
|
1701
|
+
registerRoom(roomId, room) {
|
|
1702
|
+
this.#roomsByRoomId.set(roomId, room);
|
|
1703
|
+
}
|
|
1704
|
+
/**
|
|
1705
|
+
* Unregisters a room instance.
|
|
1706
|
+
* Called by RoomProvider when it unmounts.
|
|
1707
|
+
*/
|
|
1708
|
+
unregisterRoom(roomId) {
|
|
1709
|
+
this.#roomsByRoomId.delete(roomId);
|
|
1710
|
+
this.#agentSessionsByRoomId.delete(roomId);
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Updates the agent sessions cache based on WebSocket events.
|
|
1714
|
+
*/
|
|
1715
|
+
updateAgentSessions(roomId, sessions, operation) {
|
|
1716
|
+
let sessionsMap = this.#agentSessionsByRoomId.get(roomId);
|
|
1717
|
+
if (!sessionsMap) {
|
|
1718
|
+
sessionsMap = /* @__PURE__ */ new Map();
|
|
1719
|
+
this.#agentSessionsByRoomId.set(roomId, sessionsMap);
|
|
1720
|
+
}
|
|
1721
|
+
for (const session of sessions) {
|
|
1722
|
+
if (operation === "deleted") {
|
|
1723
|
+
sessionsMap.delete(session.sessionId);
|
|
1724
|
+
} else {
|
|
1725
|
+
sessionsMap.set(session.sessionId, session);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
this.#agentSessionsSignal.mutate((state) => {
|
|
1729
|
+
state.version++;
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Updates the agent messages cache based on WebSocket events.
|
|
1734
|
+
*/
|
|
1735
|
+
updateAgentMessages(_roomId, sessionId, messages, operation) {
|
|
1736
|
+
let messagesMap = this.#agentMessagesBySessionId.get(sessionId);
|
|
1737
|
+
if (!messagesMap) {
|
|
1738
|
+
messagesMap = /* @__PURE__ */ new Map();
|
|
1739
|
+
this.#agentMessagesBySessionId.set(sessionId, messagesMap);
|
|
1740
|
+
}
|
|
1741
|
+
for (const message of messages) {
|
|
1742
|
+
if (operation === "deleted") {
|
|
1743
|
+
messagesMap.delete(message.id);
|
|
1744
|
+
} else {
|
|
1745
|
+
messagesMap.set(message.id, message);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
this.#agentMessagesSignal.mutate((state) => {
|
|
1749
|
+
state.version++;
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1588
1752
|
async fetchUnreadNotificationsCount(queryKey, signal) {
|
|
1589
1753
|
const query = JSON.parse(queryKey);
|
|
1590
1754
|
const result = await this.#client.getUnreadInboxNotificationsCount({
|
|
@@ -1995,7 +2159,7 @@ function applyUpsertComment(thread, comment) {
|
|
|
1995
2159
|
updatedAt: new Date(
|
|
1996
2160
|
Math.max(
|
|
1997
2161
|
thread.updatedAt.getTime(),
|
|
1998
|
-
_optionalChain([comment, 'access',
|
|
2162
|
+
_optionalChain([comment, 'access', _11 => _11.editedAt, 'optionalAccess', _12 => _12.getTime, 'call', _13 => _13()]) || comment.createdAt.getTime()
|
|
1999
2163
|
)
|
|
2000
2164
|
),
|
|
2001
2165
|
comments: updatedComments
|
|
@@ -2152,7 +2316,7 @@ function selectorFor_useUnreadInboxNotificationsCount(result) {
|
|
|
2152
2316
|
return ASYNC_OK("count", result.count);
|
|
2153
2317
|
}
|
|
2154
2318
|
function selectorFor_useUser(state, userId) {
|
|
2155
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2319
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _14 => _14.isLoading])) {
|
|
2156
2320
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2157
2321
|
}
|
|
2158
2322
|
if (state.error) {
|
|
@@ -2170,7 +2334,7 @@ function selectorFor_useUser(state, userId) {
|
|
|
2170
2334
|
};
|
|
2171
2335
|
}
|
|
2172
2336
|
function selectorFor_useRoomInfo(state, roomId) {
|
|
2173
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2337
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _15 => _15.isLoading])) {
|
|
2174
2338
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2175
2339
|
}
|
|
2176
2340
|
if (state.error) {
|
|
@@ -2188,7 +2352,7 @@ function selectorFor_useRoomInfo(state, roomId) {
|
|
|
2188
2352
|
};
|
|
2189
2353
|
}
|
|
2190
2354
|
function selectorFor_useGroupInfo(state, groupId) {
|
|
2191
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2355
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _16 => _16.isLoading])) {
|
|
2192
2356
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2193
2357
|
}
|
|
2194
2358
|
if (state.error) {
|
|
@@ -2358,7 +2522,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2358
2522
|
}
|
|
2359
2523
|
function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
2360
2524
|
const { store, notificationsPoller: poller } = getLiveblocksExtrasForClient(client);
|
|
2361
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2525
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _17 => _17.query]));
|
|
2362
2526
|
_react.useEffect.call(void 0,
|
|
2363
2527
|
() => void store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2364
2528
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
@@ -2386,7 +2550,7 @@ function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
|
2386
2550
|
function useInboxNotificationsSuspense_withClient(client, options) {
|
|
2387
2551
|
ensureNotServerSide();
|
|
2388
2552
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2389
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2553
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _18 => _18.query]));
|
|
2390
2554
|
use(
|
|
2391
2555
|
store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2392
2556
|
);
|
|
@@ -2402,7 +2566,7 @@ function useInboxNotificationsSuspense_withClient(client, options) {
|
|
|
2402
2566
|
}
|
|
2403
2567
|
function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
2404
2568
|
const { store, unreadNotificationsCountPollersByQueryKey: pollers } = getLiveblocksExtrasForClient(client);
|
|
2405
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2569
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _19 => _19.query]));
|
|
2406
2570
|
const poller = pollers.getOrCreate(queryKey);
|
|
2407
2571
|
_react.useEffect.call(void 0,
|
|
2408
2572
|
() => void store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2431,7 +2595,7 @@ function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
|
2431
2595
|
function useUnreadInboxNotificationsCountSuspense_withClient(client, options) {
|
|
2432
2596
|
ensureNotServerSide();
|
|
2433
2597
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2434
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2598
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _20 => _20.query]));
|
|
2435
2599
|
use(
|
|
2436
2600
|
store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
2437
2601
|
);
|
|
@@ -2602,7 +2766,7 @@ function useUpdateNotificationSettings_withClient(client) {
|
|
|
2602
2766
|
store.optimisticUpdates.remove(optimisticUpdateId);
|
|
2603
2767
|
if (err instanceof _core.HttpError) {
|
|
2604
2768
|
if (err.status === 422) {
|
|
2605
|
-
const msg = [_optionalChain([err, 'access',
|
|
2769
|
+
const msg = [_optionalChain([err, 'access', _21 => _21.details, 'optionalAccess', _22 => _22.error]), _optionalChain([err, 'access', _23 => _23.details, 'optionalAccess', _24 => _24.reason])].filter(Boolean).join("\n");
|
|
2606
2770
|
_core.console.error(msg);
|
|
2607
2771
|
}
|
|
2608
2772
|
client[_core.kInternal].emitError(
|
|
@@ -2837,7 +3001,7 @@ function useGroupInfoSuspense_withClient(client, groupId) {
|
|
|
2837
3001
|
function useAiChats(options) {
|
|
2838
3002
|
const client = useClient();
|
|
2839
3003
|
const store = getUmbrellaStoreForClient(client);
|
|
2840
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
3004
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _25 => _25.query]));
|
|
2841
3005
|
useEnsureAiConnection(client);
|
|
2842
3006
|
_react.useEffect.call(void 0,
|
|
2843
3007
|
() => void store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2861,7 +3025,7 @@ function useAiChatsSuspense(options) {
|
|
|
2861
3025
|
const client = useClient();
|
|
2862
3026
|
const store = getUmbrellaStoreForClient(client);
|
|
2863
3027
|
useEnsureAiConnection(client);
|
|
2864
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
3028
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _26 => _26.query]));
|
|
2865
3029
|
use(store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded());
|
|
2866
3030
|
const result = useAiChats(options);
|
|
2867
3031
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -2873,7 +3037,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2873
3037
|
const store = getUmbrellaStoreForClient(client);
|
|
2874
3038
|
useEnsureAiConnection(client);
|
|
2875
3039
|
_react.useEffect.call(void 0,
|
|
2876
|
-
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3040
|
+
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _27 => _27.branchId]), () => ( null))).waitUntilLoaded()
|
|
2877
3041
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
2878
3042
|
//
|
|
2879
3043
|
// It is important to call waitUntil on *every* render.
|
|
@@ -2884,7 +3048,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2884
3048
|
// *next* render after that, a *new* fetch/promise will get created.
|
|
2885
3049
|
);
|
|
2886
3050
|
return useSignal(
|
|
2887
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3051
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _28 => _28.branchId]), () => ( null))).signal
|
|
2888
3052
|
);
|
|
2889
3053
|
}
|
|
2890
3054
|
function useAiChatMessagesSuspense(chatId, options) {
|
|
@@ -2893,7 +3057,7 @@ function useAiChatMessagesSuspense(chatId, options) {
|
|
|
2893
3057
|
const store = getUmbrellaStoreForClient(client);
|
|
2894
3058
|
useEnsureAiConnection(client);
|
|
2895
3059
|
use(
|
|
2896
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3060
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _29 => _29.branchId]), () => ( null))).waitUntilLoaded()
|
|
2897
3061
|
);
|
|
2898
3062
|
const result = useAiChatMessages(chatId, options);
|
|
2899
3063
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -3012,12 +3176,12 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
3012
3176
|
if (result.error) return IDLE;
|
|
3013
3177
|
const messages = result.messages;
|
|
3014
3178
|
const lastMessage = messages[messages.length - 1];
|
|
3015
|
-
if (_optionalChain([lastMessage, 'optionalAccess',
|
|
3179
|
+
if (_optionalChain([lastMessage, 'optionalAccess', _30 => _30.role]) !== "assistant") return IDLE;
|
|
3016
3180
|
if (lastMessage.status !== "generating" && lastMessage.status !== "awaiting-tool")
|
|
3017
3181
|
return IDLE;
|
|
3018
3182
|
const contentSoFar = lastMessage.contentSoFar;
|
|
3019
3183
|
const lastPart = contentSoFar[contentSoFar.length - 1];
|
|
3020
|
-
if (_optionalChain([lastPart, 'optionalAccess',
|
|
3184
|
+
if (_optionalChain([lastPart, 'optionalAccess', _31 => _31.type]) === "tool-invocation") {
|
|
3021
3185
|
return {
|
|
3022
3186
|
status: "generating",
|
|
3023
3187
|
partType: "tool-invocation",
|
|
@@ -3026,7 +3190,7 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
3026
3190
|
} else {
|
|
3027
3191
|
return {
|
|
3028
3192
|
status: "generating",
|
|
3029
|
-
partType: _optionalChain([lastPart, 'optionalAccess',
|
|
3193
|
+
partType: _optionalChain([lastPart, 'optionalAccess', _32 => _32.type])
|
|
3030
3194
|
};
|
|
3031
3195
|
}
|
|
3032
3196
|
},
|
|
@@ -3054,7 +3218,7 @@ function useSendAiMessage(chatId, options) {
|
|
|
3054
3218
|
"chatId must be provided to either `useSendAiMessage` or its returned function."
|
|
3055
3219
|
)));
|
|
3056
3220
|
const messages = client[_core.kInternal].ai.signals.getChatMessagesForBranch\u03A3(resolvedChatId).get();
|
|
3057
|
-
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess',
|
|
3221
|
+
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess', _33 => _33.copilotId])) {
|
|
3058
3222
|
_core.console.warn(
|
|
3059
3223
|
`No copilot ID was provided to useSendAiMessage when sending the message "${messageText.slice(
|
|
3060
3224
|
0,
|
|
@@ -3066,8 +3230,8 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
3066
3230
|
)}\u2026", copilotId: "co_xxx" })'`
|
|
3067
3231
|
);
|
|
3068
3232
|
}
|
|
3069
|
-
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess',
|
|
3070
|
-
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access',
|
|
3233
|
+
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess', _34 => _34.copilotId]))), () => ( client[_core.kInternal].ai.getLastUsedCopilotId(resolvedChatId)));
|
|
3234
|
+
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access', _35 => _35[messages.length - 1], 'optionalAccess', _36 => _36.id]), () => ( null));
|
|
3071
3235
|
const content = [{ type: "text", text: messageText }];
|
|
3072
3236
|
const newMessageId = client[_core.kInternal].ai[_core.kInternal].context.messagesStore.createOptimistically(
|
|
3073
3237
|
resolvedChatId,
|
|
@@ -3087,14 +3251,14 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
3087
3251
|
{ id: newMessageId, parentMessageId: lastMessageId, content },
|
|
3088
3252
|
targetMessageId,
|
|
3089
3253
|
{
|
|
3090
|
-
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess',
|
|
3254
|
+
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess', _37 => _37.stream]))),
|
|
3091
3255
|
copilotId: resolvedCopilotId,
|
|
3092
|
-
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess',
|
|
3256
|
+
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess', _38 => _38.timeout])))
|
|
3093
3257
|
}
|
|
3094
3258
|
);
|
|
3095
3259
|
return newMessage;
|
|
3096
3260
|
},
|
|
3097
|
-
[client, chatId, _optionalChain([options, 'optionalAccess',
|
|
3261
|
+
[client, chatId, _optionalChain([options, 'optionalAccess', _39 => _39.copilotId]), _optionalChain([options, 'optionalAccess', _40 => _40.stream]), _optionalChain([options, 'optionalAccess', _41 => _41.timeout])]
|
|
3098
3262
|
);
|
|
3099
3263
|
}
|
|
3100
3264
|
function createSharedContext(client) {
|
|
@@ -3129,7 +3293,7 @@ function createSharedContext(client) {
|
|
|
3129
3293
|
}
|
|
3130
3294
|
function useEnsureNoLiveblocksProvider(options) {
|
|
3131
3295
|
const existing = useClientOrNull();
|
|
3132
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
3296
|
+
if (!_optionalChain([options, 'optionalAccess', _42 => _42.allowNesting]) && existing !== null) {
|
|
3133
3297
|
throw new Error(
|
|
3134
3298
|
"You cannot nest multiple LiveblocksProvider instances in the same React tree."
|
|
3135
3299
|
);
|
|
@@ -3296,7 +3460,7 @@ var _useAiChatMessagesSuspense = useAiChatMessagesSuspense;
|
|
|
3296
3460
|
var _useUrlMetadata = useUrlMetadata;
|
|
3297
3461
|
var _useUrlMetadataSuspense = useUrlMetadataSuspense;
|
|
3298
3462
|
function useSyncStatus_withClient(client, options) {
|
|
3299
|
-
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3463
|
+
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _43 => _43.smooth]), () => ( false)));
|
|
3300
3464
|
if (smooth) {
|
|
3301
3465
|
return useSyncStatusSmooth_withClient(client);
|
|
3302
3466
|
} else {
|
|
@@ -3476,8 +3640,8 @@ function makeRoomExtrasForClient(client) {
|
|
|
3476
3640
|
if (innerError.status === 403) {
|
|
3477
3641
|
const detailedMessage = [
|
|
3478
3642
|
innerError.message,
|
|
3479
|
-
_optionalChain([innerError, 'access',
|
|
3480
|
-
_optionalChain([innerError, 'access',
|
|
3643
|
+
_optionalChain([innerError, 'access', _44 => _44.details, 'optionalAccess', _45 => _45.suggestion]),
|
|
3644
|
+
_optionalChain([innerError, 'access', _46 => _46.details, 'optionalAccess', _47 => _47.docs])
|
|
3481
3645
|
].filter(Boolean).join("\n");
|
|
3482
3646
|
_core.console.error(detailedMessage);
|
|
3483
3647
|
}
|
|
@@ -3578,6 +3742,8 @@ function makeRoomContextBundle(client) {
|
|
|
3578
3742
|
// prettier-ignore
|
|
3579
3743
|
useMutation,
|
|
3580
3744
|
useThreads,
|
|
3745
|
+
useAgentSessions,
|
|
3746
|
+
useAgentSession,
|
|
3581
3747
|
useSearchComments,
|
|
3582
3748
|
// prettier-ignore
|
|
3583
3749
|
useCreateThread,
|
|
@@ -3627,6 +3793,8 @@ function makeRoomContextBundle(client) {
|
|
|
3627
3793
|
// prettier-ignore
|
|
3628
3794
|
useMutation,
|
|
3629
3795
|
useThreads: useThreadsSuspense,
|
|
3796
|
+
useAgentSessions: useAgentSessionsSuspense,
|
|
3797
|
+
useAgentSession: useAgentSessionSuspense,
|
|
3630
3798
|
// prettier-ignore
|
|
3631
3799
|
useCreateThread,
|
|
3632
3800
|
useDeleteThread,
|
|
@@ -3766,6 +3934,41 @@ function RoomProviderInner(props) {
|
|
|
3766
3934
|
(message) => void handleCommentEvent(message)
|
|
3767
3935
|
);
|
|
3768
3936
|
}, [client, room]);
|
|
3937
|
+
_react.useEffect.call(void 0, () => {
|
|
3938
|
+
const { store } = getRoomExtrasForClient(client);
|
|
3939
|
+
function handleAgentSessionEvent(message) {
|
|
3940
|
+
if (message.type === _core.ServerMsgCode.AGENT_SESSIONS) {
|
|
3941
|
+
const agentSessionsMsg = message;
|
|
3942
|
+
if (agentSessionsMsg.operation !== "list") {
|
|
3943
|
+
store.updateAgentSessions(
|
|
3944
|
+
room.id,
|
|
3945
|
+
agentSessionsMsg.sessions,
|
|
3946
|
+
agentSessionsMsg.operation
|
|
3947
|
+
);
|
|
3948
|
+
}
|
|
3949
|
+
} else if (message.type === _core.ServerMsgCode.AGENT_MESSAGES) {
|
|
3950
|
+
const agentMessagesMsg = message;
|
|
3951
|
+
if (agentMessagesMsg.operation !== "list") {
|
|
3952
|
+
store.updateAgentMessages(
|
|
3953
|
+
room.id,
|
|
3954
|
+
agentMessagesMsg.sessionId,
|
|
3955
|
+
agentMessagesMsg.messages,
|
|
3956
|
+
agentMessagesMsg.operation
|
|
3957
|
+
);
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
}
|
|
3961
|
+
return room.events.agentSessions.subscribe(
|
|
3962
|
+
(message) => void handleAgentSessionEvent(message)
|
|
3963
|
+
);
|
|
3964
|
+
}, [client, room]);
|
|
3965
|
+
_react.useEffect.call(void 0, () => {
|
|
3966
|
+
const { store } = getRoomExtrasForClient(client);
|
|
3967
|
+
store.registerRoom(room.id, room);
|
|
3968
|
+
return () => {
|
|
3969
|
+
store.unregisterRoom(room.id);
|
|
3970
|
+
};
|
|
3971
|
+
}, [client, room]);
|
|
3769
3972
|
_react.useEffect.call(void 0, () => {
|
|
3770
3973
|
const pair = stableEnterRoom(roomId, frozenProps);
|
|
3771
3974
|
setRoomLeavePair(pair);
|
|
@@ -3781,7 +3984,7 @@ function RoomProviderInner(props) {
|
|
|
3781
3984
|
}
|
|
3782
3985
|
function useRoom(options) {
|
|
3783
3986
|
const room = useRoomOrNull();
|
|
3784
|
-
if (room === null && !_optionalChain([options, 'optionalAccess',
|
|
3987
|
+
if (room === null && !_optionalChain([options, 'optionalAccess', _48 => _48.allowOutsideRoom])) {
|
|
3785
3988
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3786
3989
|
}
|
|
3787
3990
|
return room;
|
|
@@ -4091,6 +4294,53 @@ function useThreads(options = {}) {
|
|
|
4091
4294
|
useScrollToCommentOnLoadEffect(scrollOnLoad, result);
|
|
4092
4295
|
return result;
|
|
4093
4296
|
}
|
|
4297
|
+
function useAgentSessions(options) {
|
|
4298
|
+
const room = useRoom();
|
|
4299
|
+
const client = useClient();
|
|
4300
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4301
|
+
const queryKey = makeAgentSessionsQueryKey(room.id, options);
|
|
4302
|
+
const loadableResource = store.outputs.loadingAgentSessions.getOrCreate(queryKey);
|
|
4303
|
+
_react.useEffect.call(void 0, () => {
|
|
4304
|
+
void loadableResource.waitUntilLoaded();
|
|
4305
|
+
});
|
|
4306
|
+
return useSignal(loadableResource.signal);
|
|
4307
|
+
}
|
|
4308
|
+
function useAgentSession(sessionId, options) {
|
|
4309
|
+
const room = useRoom();
|
|
4310
|
+
const client = useClient();
|
|
4311
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4312
|
+
const queryKey = makeAgentMessagesQueryKey(room.id, sessionId, options);
|
|
4313
|
+
_react.useEffect.call(void 0, () => {
|
|
4314
|
+
void store.outputs.loadingAgentMessages.getOrCreate(queryKey).waitUntilLoaded();
|
|
4315
|
+
});
|
|
4316
|
+
return useSignal(
|
|
4317
|
+
store.outputs.loadingAgentMessages.getOrCreate(queryKey).signal
|
|
4318
|
+
);
|
|
4319
|
+
}
|
|
4320
|
+
function useAgentSessionsSuspense(options) {
|
|
4321
|
+
ensureNotServerSide();
|
|
4322
|
+
const client = useClient();
|
|
4323
|
+
const room = useRoom();
|
|
4324
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4325
|
+
const queryKey = makeAgentSessionsQueryKey(room.id, options);
|
|
4326
|
+
use(store.outputs.loadingAgentSessions.getOrCreate(queryKey).waitUntilLoaded());
|
|
4327
|
+
const result = useAgentSessions(options);
|
|
4328
|
+
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
4329
|
+
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
4330
|
+
return result;
|
|
4331
|
+
}
|
|
4332
|
+
function useAgentSessionSuspense(sessionId, options) {
|
|
4333
|
+
ensureNotServerSide();
|
|
4334
|
+
const client = useClient();
|
|
4335
|
+
const room = useRoom();
|
|
4336
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4337
|
+
const queryKey = makeAgentMessagesQueryKey(room.id, sessionId, options);
|
|
4338
|
+
use(store.outputs.loadingAgentMessages.getOrCreate(queryKey).waitUntilLoaded());
|
|
4339
|
+
const result = useAgentSession(sessionId, options);
|
|
4340
|
+
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
4341
|
+
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
4342
|
+
return result;
|
|
4343
|
+
}
|
|
4094
4344
|
function useSearchComments(options) {
|
|
4095
4345
|
const [result, setResult] = _react.useState.call(void 0, {
|
|
4096
4346
|
isLoading: true
|
|
@@ -4101,7 +4351,7 @@ function useSearchComments(options) {
|
|
|
4101
4351
|
const room = useRoom();
|
|
4102
4352
|
const queryKey = _core.stableStringify.call(void 0, [room.id, options.query]);
|
|
4103
4353
|
_react.useEffect.call(void 0, () => {
|
|
4104
|
-
const currentRequestId = (_nullishCoalesce(_optionalChain([currentRequestInfo, 'access',
|
|
4354
|
+
const currentRequestId = (_nullishCoalesce(_optionalChain([currentRequestInfo, 'access', _49 => _49.current, 'optionalAccess', _50 => _50.id]), () => ( 0))) + 1;
|
|
4105
4355
|
const controller = new AbortController();
|
|
4106
4356
|
currentRequestInfo.current = { id: currentRequestId, controller };
|
|
4107
4357
|
setResult((result2) => {
|
|
@@ -4118,12 +4368,12 @@ function useSearchComments(options) {
|
|
|
4118
4368
|
{ signal: controller.signal }
|
|
4119
4369
|
).then(({ data }) => {
|
|
4120
4370
|
if (controller.signal.aborted) return;
|
|
4121
|
-
if (_optionalChain([currentRequestInfo, 'access',
|
|
4371
|
+
if (_optionalChain([currentRequestInfo, 'access', _51 => _51.current, 'optionalAccess', _52 => _52.id]) !== currentRequestId) return;
|
|
4122
4372
|
setResult({ isLoading: false, results: data });
|
|
4123
4373
|
currentRequestInfo.current = null;
|
|
4124
4374
|
}).catch((err) => {
|
|
4125
4375
|
if (controller.signal.aborted) return;
|
|
4126
|
-
if (_optionalChain([currentRequestInfo, 'access',
|
|
4376
|
+
if (_optionalChain([currentRequestInfo, 'access', _53 => _53.current, 'optionalAccess', _54 => _54.id]) !== currentRequestId) return;
|
|
4127
4377
|
setResult({ isLoading: false, error: err });
|
|
4128
4378
|
currentRequestInfo.current = null;
|
|
4129
4379
|
});
|
|
@@ -4184,7 +4434,7 @@ function useCreateRoomThread(roomId) {
|
|
|
4184
4434
|
thread: newThread,
|
|
4185
4435
|
roomId
|
|
4186
4436
|
});
|
|
4187
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4437
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _55 => _55.map, 'call', _56 => _56((attachment) => attachment.id)]);
|
|
4188
4438
|
client[_core.kInternal].httpClient.createThread({
|
|
4189
4439
|
roomId,
|
|
4190
4440
|
threadId,
|
|
@@ -4226,7 +4476,7 @@ function useDeleteRoomThread(roomId) {
|
|
|
4226
4476
|
const { store, onMutationFailure } = getRoomExtrasForClient(client);
|
|
4227
4477
|
const userId = getCurrentUserId(client);
|
|
4228
4478
|
const existing = store.outputs.threads.get().get(threadId);
|
|
4229
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
4479
|
+
if (_optionalChain([existing, 'optionalAccess', _57 => _57.comments, 'optionalAccess', _58 => _58[0], 'optionalAccess', _59 => _59.userId]) !== userId) {
|
|
4230
4480
|
throw new Error("Only the thread creator can delete the thread");
|
|
4231
4481
|
}
|
|
4232
4482
|
const optimisticId = store.optimisticUpdates.add({
|
|
@@ -4367,7 +4617,7 @@ function useCreateRoomComment(roomId) {
|
|
|
4367
4617
|
type: "create-comment",
|
|
4368
4618
|
comment
|
|
4369
4619
|
});
|
|
4370
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4620
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _60 => _60.map, 'call', _61 => _61((attachment) => attachment.id)]);
|
|
4371
4621
|
client[_core.kInternal].httpClient.createComment({
|
|
4372
4622
|
roomId,
|
|
4373
4623
|
threadId,
|
|
@@ -4442,7 +4692,7 @@ function useEditRoomComment(roomId) {
|
|
|
4442
4692
|
metadata: updatedMetadata
|
|
4443
4693
|
}
|
|
4444
4694
|
});
|
|
4445
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4695
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _62 => _62.map, 'call', _63 => _63((attachment) => attachment.id)]);
|
|
4446
4696
|
client[_core.kInternal].httpClient.editComment({
|
|
4447
4697
|
roomId,
|
|
4448
4698
|
threadId,
|
|
@@ -4797,7 +5047,7 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
4797
5047
|
}
|
|
4798
5048
|
return {
|
|
4799
5049
|
status: "subscribed",
|
|
4800
|
-
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess',
|
|
5050
|
+
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess', _64 => _64.readAt]), () => ( null)),
|
|
4801
5051
|
subscribe,
|
|
4802
5052
|
unsubscribe
|
|
4803
5053
|
};
|
|
@@ -5008,7 +5258,7 @@ function useThreadsSuspense(options = {}) {
|
|
|
5008
5258
|
return result;
|
|
5009
5259
|
}
|
|
5010
5260
|
function selectorFor_useAttachmentUrl(state) {
|
|
5011
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
5261
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _65 => _65.isLoading])) {
|
|
5012
5262
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
5013
5263
|
}
|
|
5014
5264
|
if (state.error) {
|
|
@@ -5096,6 +5346,8 @@ var _useMyPresence = useMyPresence;
|
|
|
5096
5346
|
var _useOthersMapped = useOthersMapped;
|
|
5097
5347
|
var _useOthersMappedSuspense = useOthersMappedSuspense;
|
|
5098
5348
|
var _useThreads = useThreads;
|
|
5349
|
+
var _useAgentSessions = useAgentSessions;
|
|
5350
|
+
var _useAgentSession = useAgentSession;
|
|
5099
5351
|
var _useSearchComments = useSearchComments;
|
|
5100
5352
|
var _useThreadsSuspense = useThreadsSuspense;
|
|
5101
5353
|
var _useRoomSubscriptionSettings = useRoomSubscriptionSettings;
|
|
@@ -5244,5 +5496,7 @@ var _useUpdateMyPresence = useUpdateMyPresence;
|
|
|
5244
5496
|
|
|
5245
5497
|
|
|
5246
5498
|
|
|
5247
|
-
|
|
5248
|
-
|
|
5499
|
+
|
|
5500
|
+
|
|
5501
|
+
exports.ClientContext = ClientContext; exports.useClientOrNull = useClientOrNull; exports.useClient = useClient; exports.RoomContext = RoomContext; exports.useLatest = useLatest; exports.RegisterAiKnowledge = RegisterAiKnowledge; exports.RegisterAiTool = RegisterAiTool; exports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector; exports.useSignal = useSignal; exports.getUmbrellaStoreForClient = getUmbrellaStoreForClient; exports.useCreateAiChat = useCreateAiChat; exports.useDeleteAiChat = useDeleteAiChat; exports.useAiChatStatus = useAiChatStatus; exports.useSendAiMessage = useSendAiMessage; exports.LiveblocksProvider = LiveblocksProvider; exports.createLiveblocksContext = createLiveblocksContext; exports.useInboxNotifications = useInboxNotifications; exports.useInboxNotificationsSuspense = useInboxNotificationsSuspense; exports.useMarkAllInboxNotificationsAsRead = useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = useMarkInboxNotificationAsRead; exports.useDeleteAllInboxNotifications = useDeleteAllInboxNotifications; exports.useDeleteInboxNotification = useDeleteInboxNotification; exports.useUnreadInboxNotificationsCount = useUnreadInboxNotificationsCount; exports.useUnreadInboxNotificationsCountSuspense = useUnreadInboxNotificationsCountSuspense; exports.useNotificationSettings = useNotificationSettings; exports.useNotificationSettingsSuspense = useNotificationSettingsSuspense; exports.useUpdateNotificationSettings = useUpdateNotificationSettings; exports.useRoomInfo = useRoomInfo; exports.useRoomInfoSuspense = useRoomInfoSuspense; exports.useGroupInfo = useGroupInfo; exports.useGroupInfoSuspense = useGroupInfoSuspense; exports._useInboxNotificationThread = _useInboxNotificationThread; exports._useUser = _useUser; exports._useUserSuspense = _useUserSuspense; exports._useUserThreads_experimental = _useUserThreads_experimental; exports._useUserThreadsSuspense_experimental = _useUserThreadsSuspense_experimental; exports._useAiChats = _useAiChats; exports._useAiChatsSuspense = _useAiChatsSuspense; exports._useAiChat = _useAiChat; exports._useAiChatSuspense = _useAiChatSuspense; exports._useAiChatMessages = _useAiChatMessages; exports._useAiChatMessagesSuspense = _useAiChatMessagesSuspense; exports._useUrlMetadata = _useUrlMetadata; exports._useUrlMetadataSuspense = _useUrlMetadataSuspense; exports.useSyncStatus = useSyncStatus; exports.useErrorListener = useErrorListener; exports.useStatus = useStatus; exports.useReportTextEditor = useReportTextEditor; exports.useYjsProvider = useYjsProvider; exports.useCreateTextMention = useCreateTextMention; exports.useDeleteTextMention = useDeleteTextMention; exports.useResolveMentionSuggestions = useResolveMentionSuggestions; exports.useMentionSuggestionsCache = useMentionSuggestionsCache; exports.useLostConnectionListener = useLostConnectionListener; exports.useHistory = useHistory; exports.useUndo = useUndo; exports.useRedo = useRedo; exports.useCanUndo = useCanUndo; exports.useCanRedo = useCanRedo; exports.useOthersConnectionIds = useOthersConnectionIds; exports.useCreateRoomThread = useCreateRoomThread; exports.useDeleteRoomThread = useDeleteRoomThread; exports.useEditRoomThreadMetadata = useEditRoomThreadMetadata; exports.useCreateRoomComment = useCreateRoomComment; exports.useEditRoomComment = useEditRoomComment; exports.useDeleteComment = useDeleteComment; exports.useDeleteRoomComment = useDeleteRoomComment; exports.useAddRoomCommentReaction = useAddRoomCommentReaction; exports.useRemoveReaction = useRemoveReaction; exports.useRemoveRoomCommentReaction = useRemoveRoomCommentReaction; exports.useMarkThreadAsRead = useMarkThreadAsRead; exports.useMarkRoomThreadAsRead = useMarkRoomThreadAsRead; exports.useMarkThreadAsResolved = useMarkThreadAsResolved; exports.useMarkRoomThreadAsResolved = useMarkRoomThreadAsResolved; exports.useMarkThreadAsUnresolved = useMarkThreadAsUnresolved; exports.useMarkRoomThreadAsUnresolved = useMarkRoomThreadAsUnresolved; exports.useSubscribeToThread = useSubscribeToThread; exports.useUnsubscribeFromThread = useUnsubscribeFromThread; exports.useThreadSubscription = useThreadSubscription; exports.useRoomThreadSubscription = useRoomThreadSubscription; exports.useHistoryVersionData = useHistoryVersionData; exports.useUpdateRoomSubscriptionSettings = useUpdateRoomSubscriptionSettings; exports.useOthersConnectionIdsSuspense = useOthersConnectionIdsSuspense; exports.useAttachmentUrl = useAttachmentUrl; exports.useRoomAttachmentUrl = useRoomAttachmentUrl; exports.useAttachmentUrlSuspense = useAttachmentUrlSuspense; exports.useRoomPermissions = useRoomPermissions; exports.createRoomContext = createRoomContext; exports._RoomProvider = _RoomProvider; exports._useBroadcastEvent = _useBroadcastEvent; exports._useOthersListener = _useOthersListener; exports._useRoom = _useRoom; exports._useIsInsideRoom = _useIsInsideRoom; exports._useAddReaction = _useAddReaction; exports._useMutation = _useMutation; exports._useCreateThread = _useCreateThread; exports._useDeleteThread = _useDeleteThread; exports._useEditThreadMetadata = _useEditThreadMetadata; exports._useCreateComment = _useCreateComment; exports._useEditComment = _useEditComment; exports._useEditCommentMetadata = _useEditCommentMetadata; exports._useEventListener = _useEventListener; exports._useMyPresence = _useMyPresence; exports._useOthersMapped = _useOthersMapped; exports._useOthersMappedSuspense = _useOthersMappedSuspense; exports._useThreads = _useThreads; exports._useAgentSessions = _useAgentSessions; exports._useAgentSession = _useAgentSession; exports._useSearchComments = _useSearchComments; exports._useThreadsSuspense = _useThreadsSuspense; exports._useRoomSubscriptionSettings = _useRoomSubscriptionSettings; exports._useRoomSubscriptionSettingsSuspense = _useRoomSubscriptionSettingsSuspense; exports._useHistoryVersions = _useHistoryVersions; exports._useHistoryVersionsSuspense = _useHistoryVersionsSuspense; exports._useOther = _useOther; exports._useOthers = _useOthers; exports._useOtherSuspense = _useOtherSuspense; exports._useOthersSuspense = _useOthersSuspense; exports._useStorage = _useStorage; exports._useStorageSuspense = _useStorageSuspense; exports._useSelf = _useSelf; exports._useSelfSuspense = _useSelfSuspense; exports._useStorageRoot = _useStorageRoot; exports._useUpdateMyPresence = _useUpdateMyPresence;
|
|
5502
|
+
//# sourceMappingURL=chunk-JXNC4PPG.cjs.map
|