@flamingo-stack/openframe-frontend-core 0.0.583 → 0.0.584-1973.5420.1
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/chat-protocol/events.d.ts +8 -2
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +177 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +177 -0
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/chat-protocol/source-metadata.d.ts +3 -0
- package/dist/chat-protocol/source-metadata.d.ts.map +1 -0
- package/dist/{chunk-EATPU5EF.cjs → chunk-3MAG3EG4.cjs} +9 -9
- package/dist/{chunk-EATPU5EF.cjs.map → chunk-3MAG3EG4.cjs.map} +1 -1
- package/dist/{chunk-IKUSKKFZ.cjs → chunk-4TZOFXPH.cjs} +712 -432
- package/dist/chunk-4TZOFXPH.cjs.map +1 -0
- package/dist/{chunk-WMRXB6RS.js → chunk-54WRMPCY.js} +3 -3
- package/dist/{chunk-WTC6QQNX.cjs → chunk-7IVT56YY.cjs} +3 -3
- package/dist/{chunk-WTC6QQNX.cjs.map → chunk-7IVT56YY.cjs.map} +1 -1
- package/dist/{chunk-PFKWJ6PJ.js → chunk-AQW2PDRS.js} +2 -2
- package/dist/{chunk-DROXHJVZ.js → chunk-AVVKXNGI.js} +2 -2
- package/dist/{chunk-YNLIXABT.cjs → chunk-CE6CA6EM.cjs} +43 -43
- package/dist/{chunk-YNLIXABT.cjs.map → chunk-CE6CA6EM.cjs.map} +1 -1
- package/dist/{chunk-TRD2YICZ.cjs → chunk-CGLQLBMQ.cjs} +21 -21
- package/dist/{chunk-TRD2YICZ.cjs.map → chunk-CGLQLBMQ.cjs.map} +1 -1
- package/dist/{chunk-XWBND4G5.js → chunk-CO4WRST6.js} +301 -21
- package/dist/chunk-CO4WRST6.js.map +1 -0
- package/dist/{chunk-IJVWKLJK.cjs → chunk-DHLD3JXN.cjs} +69 -69
- package/dist/{chunk-IJVWKLJK.cjs.map → chunk-DHLD3JXN.cjs.map} +1 -1
- package/dist/{chunk-M6ZUEBDK.cjs → chunk-F2EN6MXN.cjs} +159 -159
- package/dist/{chunk-M6ZUEBDK.cjs.map → chunk-F2EN6MXN.cjs.map} +1 -1
- package/dist/{chunk-J3EEL6YC.js → chunk-FH2FH337.js} +5 -5
- package/dist/{chunk-L26MD32B.js → chunk-GDHI3JN5.js} +3 -3
- package/dist/{chunk-VWHEXQ64.js → chunk-GFIH73Q3.js} +3 -3
- package/dist/{chunk-R5A3MGMY.js → chunk-H6GYY5CB.js} +3 -3
- package/dist/{chunk-FCLM2RXI.js → chunk-HGJAUYHW.js} +2 -2
- package/dist/{chunk-RBDVHLT5.cjs → chunk-HKKQCVVY.cjs} +22 -22
- package/dist/{chunk-RBDVHLT5.cjs.map → chunk-HKKQCVVY.cjs.map} +1 -1
- package/dist/{chunk-KDWNMFX4.cjs → chunk-JEMGFSC2.cjs} +24 -24
- package/dist/{chunk-KDWNMFX4.cjs.map → chunk-JEMGFSC2.cjs.map} +1 -1
- package/dist/{chunk-BTBW4L2W.cjs → chunk-JX6RSSZP.cjs} +33 -33
- package/dist/{chunk-BTBW4L2W.cjs.map → chunk-JX6RSSZP.cjs.map} +1 -1
- package/dist/{chunk-WHNC7C76.js → chunk-KN2ZCZQ7.js} +5 -5
- package/dist/{chunk-WBTKXNKZ.cjs → chunk-MYVHYVQM.cjs} +10 -10
- package/dist/{chunk-WBTKXNKZ.cjs.map → chunk-MYVHYVQM.cjs.map} +1 -1
- package/dist/{chunk-3TNM6SDP.cjs → chunk-PI3BNDCW.cjs} +15 -15
- package/dist/{chunk-3TNM6SDP.cjs.map → chunk-PI3BNDCW.cjs.map} +1 -1
- package/dist/{chunk-XZ3MKTJZ.js → chunk-PWI66GZF.js} +2 -2
- package/dist/{chunk-IFPGXSMZ.cjs → chunk-RTI3TYMX.cjs} +3 -3
- package/dist/{chunk-IFPGXSMZ.cjs.map → chunk-RTI3TYMX.cjs.map} +1 -1
- package/dist/{chunk-6BI3AYBY.cjs → chunk-SS2TCIKA.cjs} +4 -4
- package/dist/{chunk-6BI3AYBY.cjs.map → chunk-SS2TCIKA.cjs.map} +1 -1
- package/dist/{chunk-HIHPWVKP.js → chunk-T35JA5XV.js} +5 -5
- package/dist/{chunk-EZ5VU5WS.js → chunk-TLZ7HTXP.js} +2 -2
- package/dist/{chunk-OCXFFGFA.cjs → chunk-UZUG7QZ3.cjs} +10 -10
- package/dist/{chunk-OCXFFGFA.cjs.map → chunk-UZUG7QZ3.cjs.map} +1 -1
- package/dist/{chunk-3RR67XC2.cjs → chunk-W46U5J3H.cjs} +5 -5
- package/dist/{chunk-3RR67XC2.cjs.map → chunk-W46U5J3H.cjs.map} +1 -1
- package/dist/{chunk-IOP7BCRQ.js → chunk-WFF5JMQ2.js} +6 -6
- package/dist/{chunk-AJLF6MBD.js → chunk-X4HLHN36.js} +3 -3
- package/dist/{chunk-PMA7DVQR.js → chunk-ZWB64HOD.js} +4 -4
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +4 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +2 -28
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +2 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +35 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +3 -3
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-source-metadata.d.ts +5 -0
- package/dist/components/chat/utils/chat-source-metadata.d.ts.map +1 -0
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +36 -36
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +130 -0
- package/src/chat-protocol/events.ts +9 -1
- package/src/chat-protocol/nats-decoder.ts +7 -0
- package/src/chat-protocol/source-metadata.ts +187 -0
- package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +86 -0
- package/src/components/chat/__tests__/embeddable-chat-sources.test.tsx +171 -0
- package/src/components/chat/__tests__/tool-execution-display.test.tsx +93 -0
- package/src/components/chat/chat-message-enhanced.tsx +28 -13
- package/src/components/chat/chat-message-list.tsx +1 -0
- package/src/components/chat/embeddable-chat.tsx +10 -1
- package/src/components/chat/entity-cards/__tests__/dispatch-video-refs.test.tsx +74 -0
- package/src/components/chat/entity-cards/dispatch.tsx +48 -11
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +7 -0
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +2 -29
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +56 -0
- package/src/components/chat/stream/chat-stream-reducer.ts +31 -0
- package/src/components/chat/tool-execution-display.tsx +5 -2
- package/src/components/chat/types/component.types.ts +2 -0
- package/src/components/chat/types/message.types.ts +39 -0
- package/src/components/chat/types/unified-chat-state.types.ts +4 -3
- package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +57 -0
- package/src/components/chat/utils/chat-source-metadata.ts +19 -0
- package/src/components/chat/utils/process-historical-messages.ts +19 -1
- package/dist/chunk-IKUSKKFZ.cjs.map +0 -1
- package/dist/chunk-XWBND4G5.js.map +0 -1
- /package/dist/{chunk-WMRXB6RS.js.map → chunk-54WRMPCY.js.map} +0 -0
- /package/dist/{chunk-PFKWJ6PJ.js.map → chunk-AQW2PDRS.js.map} +0 -0
- /package/dist/{chunk-DROXHJVZ.js.map → chunk-AVVKXNGI.js.map} +0 -0
- /package/dist/{chunk-J3EEL6YC.js.map → chunk-FH2FH337.js.map} +0 -0
- /package/dist/{chunk-L26MD32B.js.map → chunk-GDHI3JN5.js.map} +0 -0
- /package/dist/{chunk-VWHEXQ64.js.map → chunk-GFIH73Q3.js.map} +0 -0
- /package/dist/{chunk-R5A3MGMY.js.map → chunk-H6GYY5CB.js.map} +0 -0
- /package/dist/{chunk-FCLM2RXI.js.map → chunk-HGJAUYHW.js.map} +0 -0
- /package/dist/{chunk-WHNC7C76.js.map → chunk-KN2ZCZQ7.js.map} +0 -0
- /package/dist/{chunk-XZ3MKTJZ.js.map → chunk-PWI66GZF.js.map} +0 -0
- /package/dist/{chunk-HIHPWVKP.js.map → chunk-T35JA5XV.js.map} +0 -0
- /package/dist/{chunk-EZ5VU5WS.js.map → chunk-TLZ7HTXP.js.map} +0 -0
- /package/dist/{chunk-IOP7BCRQ.js.map → chunk-WFF5JMQ2.js.map} +0 -0
- /package/dist/{chunk-AJLF6MBD.js.map → chunk-X4HLHN36.js.map} +0 -0
- /package/dist/{chunk-PMA7DVQR.js.map → chunk-ZWB64HOD.js.map} +0 -0
|
@@ -284,6 +284,8 @@ function createSseFrameDecoder() {
|
|
|
284
284
|
var MESSAGE_TYPE = {
|
|
285
285
|
TEXT: "TEXT",
|
|
286
286
|
THINKING: "THINKING",
|
|
287
|
+
GUIDE: "GUIDE",
|
|
288
|
+
SOURCES: "SOURCES",
|
|
287
289
|
ASK: "ASK",
|
|
288
290
|
EXECUTING_TOOL: "EXECUTING_TOOL",
|
|
289
291
|
EXECUTED_TOOL: "EXECUTED_TOOL",
|
|
@@ -305,6 +307,176 @@ var MESSAGE_TYPE = {
|
|
|
305
307
|
DIALOG_CLOSED: "DIALOG_CLOSED"
|
|
306
308
|
};
|
|
307
309
|
|
|
310
|
+
// src/chat-protocol/source-metadata.ts
|
|
311
|
+
var CARD_REFERENCE = /^\[card:\/\/([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)\]$/;
|
|
312
|
+
function requiredString(value) {
|
|
313
|
+
if (typeof value !== "string") return null;
|
|
314
|
+
const normalized = value.trim();
|
|
315
|
+
return normalized ? normalized : null;
|
|
316
|
+
}
|
|
317
|
+
function optionalString(value) {
|
|
318
|
+
return requiredString(value) ?? void 0;
|
|
319
|
+
}
|
|
320
|
+
function httpsUrl(value) {
|
|
321
|
+
const candidate = optionalString(value);
|
|
322
|
+
if (!candidate) return void 0;
|
|
323
|
+
try {
|
|
324
|
+
return new URL(candidate).protocol === "https:" ? candidate : void 0;
|
|
325
|
+
} catch {
|
|
326
|
+
return void 0;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function youtubeId(value) {
|
|
330
|
+
const candidate = optionalString(value);
|
|
331
|
+
if (!candidate) return void 0;
|
|
332
|
+
if (/^[A-Za-z0-9_-]{11}$/.test(candidate)) return candidate;
|
|
333
|
+
const url = httpsUrl(candidate);
|
|
334
|
+
if (!url) return void 0;
|
|
335
|
+
const parsed = new URL(url);
|
|
336
|
+
const hostname = parsed.hostname.toLowerCase();
|
|
337
|
+
const youtubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
|
|
338
|
+
if (!youtubeHost) return void 0;
|
|
339
|
+
const pathId = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : parsed.pathname.match(/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/)?.[1];
|
|
340
|
+
const id = pathId ?? parsed.searchParams.get("v") ?? void 0;
|
|
341
|
+
return id && /^[A-Za-z0-9_-]{11}$/.test(id) ? id : void 0;
|
|
342
|
+
}
|
|
343
|
+
function nullableString(value) {
|
|
344
|
+
return value === null ? null : optionalString(value);
|
|
345
|
+
}
|
|
346
|
+
function normalizeSourceItems(value) {
|
|
347
|
+
if (!Array.isArray(value)) return void 0;
|
|
348
|
+
const items = value.flatMap((candidate) => {
|
|
349
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
350
|
+
const item = candidate;
|
|
351
|
+
const id = requiredString(item.id);
|
|
352
|
+
const documentType = requiredString(item.documentType);
|
|
353
|
+
const name = requiredString(item.name);
|
|
354
|
+
if (!id || !documentType || !name) return [];
|
|
355
|
+
const externalUrl = httpsUrl(item.externalUrl);
|
|
356
|
+
const targetPlatform = nullableString(item.targetPlatform);
|
|
357
|
+
const path = nullableString(item.path);
|
|
358
|
+
return [
|
|
359
|
+
{
|
|
360
|
+
id,
|
|
361
|
+
documentType,
|
|
362
|
+
name,
|
|
363
|
+
...externalUrl ? { externalUrl } : {},
|
|
364
|
+
...targetPlatform !== void 0 ? { targetPlatform } : {},
|
|
365
|
+
...path !== void 0 ? { path } : {}
|
|
366
|
+
}
|
|
367
|
+
];
|
|
368
|
+
});
|
|
369
|
+
return items.length > 0 ? items : void 0;
|
|
370
|
+
}
|
|
371
|
+
function normalizeSources(value) {
|
|
372
|
+
if (!Array.isArray(value)) return [];
|
|
373
|
+
const seen = /* @__PURE__ */ new Set();
|
|
374
|
+
const sources = [];
|
|
375
|
+
for (const candidate of value) {
|
|
376
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
|
|
377
|
+
const source = candidate;
|
|
378
|
+
const index = source.index;
|
|
379
|
+
const name = requiredString(source.name);
|
|
380
|
+
const path = requiredString(source.path);
|
|
381
|
+
const documentType = requiredString(source.documentType);
|
|
382
|
+
const validIndex = typeof index === "number" && Number.isFinite(index) && Number.isInteger(index) && index > 0 && !seen.has(index);
|
|
383
|
+
if (!validIndex || !name || !path || !documentType) continue;
|
|
384
|
+
seen.add(index);
|
|
385
|
+
const externalUrl = httpsUrl(source.externalUrl);
|
|
386
|
+
const targetPlatform = nullableString(source.targetPlatform);
|
|
387
|
+
const id = optionalString(source.id);
|
|
388
|
+
const sourceRepo = optionalString(source.sourceRepo);
|
|
389
|
+
const label = optionalString(source.label);
|
|
390
|
+
const items = normalizeSourceItems(source.items);
|
|
391
|
+
sources.push({
|
|
392
|
+
index,
|
|
393
|
+
name,
|
|
394
|
+
path,
|
|
395
|
+
documentType,
|
|
396
|
+
...externalUrl ? { externalUrl } : {},
|
|
397
|
+
...targetPlatform !== void 0 ? { targetPlatform } : {},
|
|
398
|
+
...id ? { id } : {},
|
|
399
|
+
...sourceRepo ? { sourceRepo } : {},
|
|
400
|
+
...label ? { label } : {},
|
|
401
|
+
...items ? { items } : {}
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
return sources;
|
|
405
|
+
}
|
|
406
|
+
function normalizeVideoMetadata(value) {
|
|
407
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
408
|
+
const input = value;
|
|
409
|
+
const metadata = {};
|
|
410
|
+
for (const key of ["videoUrl", "highlightVideoUrl", "videoPoster", "highlightVideoPoster"]) {
|
|
411
|
+
const url = httpsUrl(input[key]);
|
|
412
|
+
if (url) metadata[key] = url;
|
|
413
|
+
}
|
|
414
|
+
const id = youtubeId(input.youtubeUrl);
|
|
415
|
+
if (id) metadata.youtubeUrl = id;
|
|
416
|
+
return metadata;
|
|
417
|
+
}
|
|
418
|
+
function normalizeVideos(value) {
|
|
419
|
+
if (!Array.isArray(value)) return [];
|
|
420
|
+
return value.flatMap((candidate) => {
|
|
421
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
422
|
+
const video = candidate;
|
|
423
|
+
const match = typeof video.ref === "string" ? CARD_REFERENCE.exec(video.ref) : null;
|
|
424
|
+
if (!match || match[1] !== "video") return [];
|
|
425
|
+
const id = match[2];
|
|
426
|
+
const title = optionalString(video.title) ?? id;
|
|
427
|
+
const url = httpsUrl(video.url) ?? null;
|
|
428
|
+
const sourceRepo = optionalString(video.sourceRepo);
|
|
429
|
+
const metadata = normalizeVideoMetadata(video.metadata);
|
|
430
|
+
if (url) {
|
|
431
|
+
const idFromUrl = youtubeId(url);
|
|
432
|
+
if (idFromUrl) {
|
|
433
|
+
metadata.youtubeUrl = idFromUrl;
|
|
434
|
+
delete metadata.videoUrl;
|
|
435
|
+
} else {
|
|
436
|
+
metadata.videoUrl = url;
|
|
437
|
+
delete metadata.youtubeUrl;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return [
|
|
441
|
+
{
|
|
442
|
+
type: "video",
|
|
443
|
+
id,
|
|
444
|
+
title,
|
|
445
|
+
url,
|
|
446
|
+
...sourceRepo ? { sourceRepo } : {},
|
|
447
|
+
...Object.keys(metadata).length > 0 ? { metadata } : {}
|
|
448
|
+
}
|
|
449
|
+
];
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
function normalizeCards(value) {
|
|
453
|
+
if (!Array.isArray(value)) return [];
|
|
454
|
+
return value.flatMap((candidate) => {
|
|
455
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
456
|
+
const card = candidate;
|
|
457
|
+
const match = typeof card.ref === "string" ? CARD_REFERENCE.exec(card.ref) : null;
|
|
458
|
+
if (!match || match[1] === "video") return [];
|
|
459
|
+
const type = requiredString(card.entityType);
|
|
460
|
+
const id = requiredString(card.entityId);
|
|
461
|
+
if (!type || !id || type !== match[1] || id !== match[2]) return [];
|
|
462
|
+
return [{ type, id, title: id, url: null }];
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
function sourceMetadataEvent(payload) {
|
|
466
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
|
|
467
|
+
const metadata = payload;
|
|
468
|
+
const sources = normalizeSources(metadata.sources);
|
|
469
|
+
const refs = [...normalizeVideos(metadata.videos), ...normalizeCards(metadata.cards)];
|
|
470
|
+
const refsByIdentity = /* @__PURE__ */ new Map();
|
|
471
|
+
refs.forEach((ref) => {
|
|
472
|
+
const identity = `${ref.type}:${ref.id}`;
|
|
473
|
+
if (!refsByIdentity.has(identity)) refsByIdentity.set(identity, ref);
|
|
474
|
+
});
|
|
475
|
+
const uniqueRefs = Array.from(refsByIdentity.values());
|
|
476
|
+
if (sources.length === 0 && uniqueRefs.length === 0) return null;
|
|
477
|
+
return { type: "sources", sources, ...uniqueRefs.length > 0 ? { refs: uniqueRefs } : {} };
|
|
478
|
+
}
|
|
479
|
+
|
|
308
480
|
// src/chat-protocol/nats-decoder.ts
|
|
309
481
|
function isRecord(value) {
|
|
310
482
|
return typeof value === "object" && value !== null;
|
|
@@ -373,6 +545,11 @@ function decodeNatsChunk(chunk) {
|
|
|
373
545
|
return { type: "thinking-delta", text: data.text, ...seq };
|
|
374
546
|
}
|
|
375
547
|
return null;
|
|
548
|
+
case MESSAGE_TYPE.GUIDE:
|
|
549
|
+
case MESSAGE_TYPE.SOURCES: {
|
|
550
|
+
const event = sourceMetadataEvent(data.payload);
|
|
551
|
+
return event ? { ...event, ...seq } : null;
|
|
552
|
+
}
|
|
376
553
|
// An ask card is only an ask card with something to pick: a question and at
|
|
377
554
|
// least one option. Anything less is dropped rather than rendered as an
|
|
378
555
|
// empty card the user can't answer — the backend already falls back to a
|