@flamingo-stack/openframe-frontend-core 0.0.584-1973.5461.1 → 0.0.584

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.
Files changed (162) hide show
  1. package/dist/chat-protocol/events.d.ts +2 -8
  2. package/dist/chat-protocol/events.d.ts.map +1 -1
  3. package/dist/chat-protocol/index.cjs +0 -188
  4. package/dist/chat-protocol/index.cjs.map +1 -1
  5. package/dist/chat-protocol/index.js +0 -188
  6. package/dist/chat-protocol/index.js.map +1 -1
  7. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  8. package/dist/{chunk-U7MJV2V7.cjs → chunk-33DHEEMP.cjs} +33 -33
  9. package/dist/{chunk-U7MJV2V7.cjs.map → chunk-33DHEEMP.cjs.map} +1 -1
  10. package/dist/{chunk-23VBGHBL.js → chunk-3ELW4VML.js} +2 -2
  11. package/dist/{chunk-7KBKLN2Z.cjs → chunk-3ZA2OYRE.cjs} +3 -3
  12. package/dist/{chunk-7KBKLN2Z.cjs.map → chunk-3ZA2OYRE.cjs.map} +1 -1
  13. package/dist/{chunk-73XDYWYG.js → chunk-4T5KOD3G.js} +5 -5
  14. package/dist/{chunk-MI6PPL3P.js → chunk-5CJKZHWO.js} +5 -5
  15. package/dist/{chunk-E7Q24T4G.js → chunk-6BJYPG2V.js} +3 -3
  16. package/dist/{chunk-YXNMLGFI.cjs → chunk-7X5TCK4R.cjs} +10 -10
  17. package/dist/{chunk-YXNMLGFI.cjs.map → chunk-7X5TCK4R.cjs.map} +1 -1
  18. package/dist/{chunk-7DEGEI7G.js → chunk-EJKEDCTH.js} +6 -6
  19. package/dist/{chunk-XIV5VDWL.cjs → chunk-HCKEDTKJ.cjs} +10 -10
  20. package/dist/{chunk-XIV5VDWL.cjs.map → chunk-HCKEDTKJ.cjs.map} +1 -1
  21. package/dist/{chunk-EQGAYDTC.cjs → chunk-IIT5HWLY.cjs} +9 -9
  22. package/dist/{chunk-EQGAYDTC.cjs.map → chunk-IIT5HWLY.cjs.map} +1 -1
  23. package/dist/{chunk-7SMYBCYH.cjs → chunk-IKUSKKFZ.cjs} +540 -883
  24. package/dist/chunk-IKUSKKFZ.cjs.map +1 -0
  25. package/dist/{chunk-JKYALZB7.cjs → chunk-JAJQ5P2Q.cjs} +22 -22
  26. package/dist/{chunk-JKYALZB7.cjs.map → chunk-JAJQ5P2Q.cjs.map} +1 -1
  27. package/dist/{chunk-WAXL3E3B.cjs → chunk-JFKK3ZOA.cjs} +43 -43
  28. package/dist/{chunk-WAXL3E3B.cjs.map → chunk-JFKK3ZOA.cjs.map} +1 -1
  29. package/dist/{chunk-AWAHYAII.js → chunk-JVWRMLQZ.js} +2 -2
  30. package/dist/{chunk-PZ27ELFP.cjs → chunk-JWKAJTNA.cjs} +43 -33
  31. package/dist/chunk-JWKAJTNA.cjs.map +1 -0
  32. package/dist/{chunk-PISJGXXI.js → chunk-KP6VJP36.js} +3 -3
  33. package/dist/{chunk-NSDZAUJK.js → chunk-LNKULR4V.js} +2 -2
  34. package/dist/{chunk-AFQB4YL7.cjs → chunk-MEJFHD5N.cjs} +15 -15
  35. package/dist/{chunk-AFQB4YL7.cjs.map → chunk-MEJFHD5N.cjs.map} +1 -1
  36. package/dist/{chunk-5VHCSN44.js → chunk-MYEG5ZDT.js} +2 -2
  37. package/dist/{chunk-MMA3MTJD.cjs → chunk-P2VRLSAP.cjs} +21 -21
  38. package/dist/{chunk-MMA3MTJD.cjs.map → chunk-P2VRLSAP.cjs.map} +1 -1
  39. package/dist/{chunk-7Q34BVL7.cjs → chunk-Q66AMADB.cjs} +4 -4
  40. package/dist/{chunk-7Q34BVL7.cjs.map → chunk-Q66AMADB.cjs.map} +1 -1
  41. package/dist/{chunk-4ARYZTGV.cjs → chunk-QJR32JM2.cjs} +159 -159
  42. package/dist/{chunk-4ARYZTGV.cjs.map → chunk-QJR32JM2.cjs.map} +1 -1
  43. package/dist/{chunk-M4IIK3B7.js → chunk-RURZ6QLN.js} +3 -3
  44. package/dist/{chunk-TCEU6DCF.js → chunk-TLKHLGAB.js} +3 -3
  45. package/dist/{chunk-JCWUJHOD.js → chunk-TOUD3AGK.js} +23 -13
  46. package/dist/chunk-TOUD3AGK.js.map +1 -0
  47. package/dist/{chunk-CHI7GJ3K.cjs → chunk-UCNEQKIT.cjs} +5 -5
  48. package/dist/{chunk-CHI7GJ3K.cjs.map → chunk-UCNEQKIT.cjs.map} +1 -1
  49. package/dist/{chunk-ZRGBLM6W.cjs → chunk-VOAZU46B.cjs} +69 -69
  50. package/dist/{chunk-ZRGBLM6W.cjs.map → chunk-VOAZU46B.cjs.map} +1 -1
  51. package/dist/{chunk-GYJVLFK5.js → chunk-VZSTL5VG.js} +2 -2
  52. package/dist/{chunk-3CAC3AAE.js → chunk-XPJKQ63S.js} +3 -3
  53. package/dist/{chunk-KSC5LNSY.js → chunk-XWBND4G5.js} +187 -530
  54. package/dist/chunk-XWBND4G5.js.map +1 -0
  55. package/dist/{chunk-22DWXIV3.js → chunk-YFZDIEVC.js} +5 -5
  56. package/dist/{chunk-7J7XDGY6.cjs → chunk-ZHUBNWEX.cjs} +3 -3
  57. package/dist/{chunk-7J7XDGY6.cjs.map → chunk-ZHUBNWEX.cjs.map} +1 -1
  58. package/dist/components/case-studies/index.cjs +9 -9
  59. package/dist/components/case-studies/index.js +3 -3
  60. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  61. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  62. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  63. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  64. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +1 -4
  65. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
  66. package/dist/components/chat/hooks/use-slash-commands.d.ts +3 -3
  67. package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -1
  68. package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +28 -2
  69. package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
  70. package/dist/components/chat/index.cjs +2 -2
  71. package/dist/components/chat/index.js +1 -1
  72. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  73. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  74. package/dist/components/chat/types/component.types.d.ts +0 -4
  75. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  76. package/dist/components/chat/types/message.types.d.ts +1 -35
  77. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  78. package/dist/components/chat/types/unified-chat-state.types.d.ts +3 -3
  79. package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
  80. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  81. package/dist/components/contact/index.cjs +4 -4
  82. package/dist/components/contact/index.js +3 -3
  83. package/dist/components/docs/index.cjs +7 -7
  84. package/dist/components/docs/index.js +6 -6
  85. package/dist/components/embeds/index.cjs +4 -4
  86. package/dist/components/embeds/index.js +3 -3
  87. package/dist/components/faq/index.cjs +4 -4
  88. package/dist/components/faq/index.js +3 -3
  89. package/dist/components/features/index.cjs +3 -3
  90. package/dist/components/features/index.js +2 -2
  91. package/dist/components/help-center-pages/index.cjs +23 -23
  92. package/dist/components/help-center-pages/index.js +14 -14
  93. package/dist/components/index.cjs +36 -36
  94. package/dist/components/index.js +13 -13
  95. package/dist/components/meeting-scheduler/index.cjs +21 -21
  96. package/dist/components/meeting-scheduler/index.js +2 -2
  97. package/dist/components/navigation/index.cjs +6 -6
  98. package/dist/components/navigation/index.js +5 -5
  99. package/dist/components/navigation/navigation-sidebar-item.d.ts.map +1 -1
  100. package/dist/components/onboarding-guides/index.cjs +6 -6
  101. package/dist/components/onboarding-guides/index.js +5 -5
  102. package/dist/components/tickets/index.cjs +7 -7
  103. package/dist/components/tickets/index.js +6 -6
  104. package/dist/components/ui/hover-dropdown.d.ts.map +1 -1
  105. package/dist/components/ui/index.cjs +3 -3
  106. package/dist/components/ui/index.js +2 -2
  107. package/dist/index.cjs +7 -7
  108. package/dist/index.js +6 -6
  109. package/dist/utils/index.cjs.map +1 -1
  110. package/dist/utils/index.js.map +1 -1
  111. package/package.json +1 -1
  112. package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +0 -130
  113. package/src/chat-protocol/events.ts +1 -9
  114. package/src/chat-protocol/nats-decoder.ts +0 -7
  115. package/src/components/chat/__tests__/chat-message-list.test.tsx +0 -70
  116. package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +0 -86
  117. package/src/components/chat/chat-message-enhanced.tsx +13 -28
  118. package/src/components/chat/chat-message-list.tsx +22 -27
  119. package/src/components/chat/embeddable-chat.tsx +36 -55
  120. package/src/components/chat/entity-cards/dispatch.tsx +17 -86
  121. package/src/components/chat/hooks/use-nats-chat-adapter.ts +0 -7
  122. package/src/components/chat/hooks/use-slash-commands.ts +5 -9
  123. package/src/components/chat/hooks/use-sse-chat-adapter.ts +29 -2
  124. package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +0 -56
  125. package/src/components/chat/stream/chat-stream-reducer.ts +0 -31
  126. package/src/components/chat/tool-execution-display.tsx +2 -5
  127. package/src/components/chat/types/component.types.ts +0 -4
  128. package/src/components/chat/types/message.types.ts +0 -39
  129. package/src/components/chat/types/unified-chat-state.types.ts +3 -4
  130. package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +0 -57
  131. package/src/components/chat/utils/process-historical-messages.ts +1 -19
  132. package/src/components/navigation/navigation-sidebar-item.tsx +19 -9
  133. package/src/components/ui/hover-dropdown.tsx +3 -8
  134. package/dist/chat-protocol/source-metadata.d.ts +0 -5
  135. package/dist/chat-protocol/source-metadata.d.ts.map +0 -1
  136. package/dist/chunk-7SMYBCYH.cjs.map +0 -1
  137. package/dist/chunk-JCWUJHOD.js.map +0 -1
  138. package/dist/chunk-KSC5LNSY.js.map +0 -1
  139. package/dist/chunk-PZ27ELFP.cjs.map +0 -1
  140. package/dist/components/chat/utils/chat-source-metadata.d.ts +0 -5
  141. package/dist/components/chat/utils/chat-source-metadata.d.ts.map +0 -1
  142. package/src/chat-protocol/__tests__/source-metadata.test.ts +0 -74
  143. package/src/chat-protocol/source-metadata.ts +0 -202
  144. package/src/components/chat/__tests__/embeddable-chat-sources.test.tsx +0 -411
  145. package/src/components/chat/__tests__/tool-execution-display.test.tsx +0 -93
  146. package/src/components/chat/entity-cards/__tests__/dispatch-video-refs.test.tsx +0 -74
  147. package/src/components/chat/hooks/__tests__/use-slash-commands.test.ts +0 -64
  148. package/src/components/chat/utils/chat-source-metadata.ts +0 -19
  149. /package/dist/{chunk-23VBGHBL.js.map → chunk-3ELW4VML.js.map} +0 -0
  150. /package/dist/{chunk-73XDYWYG.js.map → chunk-4T5KOD3G.js.map} +0 -0
  151. /package/dist/{chunk-MI6PPL3P.js.map → chunk-5CJKZHWO.js.map} +0 -0
  152. /package/dist/{chunk-E7Q24T4G.js.map → chunk-6BJYPG2V.js.map} +0 -0
  153. /package/dist/{chunk-7DEGEI7G.js.map → chunk-EJKEDCTH.js.map} +0 -0
  154. /package/dist/{chunk-AWAHYAII.js.map → chunk-JVWRMLQZ.js.map} +0 -0
  155. /package/dist/{chunk-PISJGXXI.js.map → chunk-KP6VJP36.js.map} +0 -0
  156. /package/dist/{chunk-NSDZAUJK.js.map → chunk-LNKULR4V.js.map} +0 -0
  157. /package/dist/{chunk-5VHCSN44.js.map → chunk-MYEG5ZDT.js.map} +0 -0
  158. /package/dist/{chunk-M4IIK3B7.js.map → chunk-RURZ6QLN.js.map} +0 -0
  159. /package/dist/{chunk-TCEU6DCF.js.map → chunk-TLKHLGAB.js.map} +0 -0
  160. /package/dist/{chunk-GYJVLFK5.js.map → chunk-VZSTL5VG.js.map} +0 -0
  161. /package/dist/{chunk-3CAC3AAE.js.map → chunk-XPJKQ63S.js.map} +0 -0
  162. /package/dist/{chunk-22DWXIV3.js.map → chunk-YFZDIEVC.js.map} +0 -0
@@ -391,60 +391,3 @@ describe('processHistoricalMessages — ASK rows', () => {
391
391
  expect(processHistoricalMessages(dialog).messages).toEqual([]);
392
392
  });
393
393
  });
394
-
395
- describe('processHistoricalMessages — Mingo source metadata', () => {
396
- it.each(['GUIDE', 'SOURCES'] as const)('restores %s metadata on the same assistant turn', type => {
397
- const dialog: HistoricalMessage[] = [
398
- {
399
- id: 'a1',
400
- chatType: 'ADMIN_AI_CHAT',
401
- createdAt: '2026-07-19T09:00:05Z',
402
- owner: { type: 'ASSISTANT' },
403
- messageData: [
404
- {
405
- type,
406
- payload: {
407
- sources: [
408
- {
409
- index: 1,
410
- name: 'Install agent',
411
- path: 'docs/install.md',
412
- documentType: 'markdown',
413
- },
414
- ],
415
- videos: [
416
- {
417
- ref: '[card://video:mux-9b6586b494]',
418
- title: 'Community demo',
419
- url: 'https://stream.mux.com/playback-id.m3u8',
420
- metadata: { videoUrl: 'https://stream.mux.com/playback-id.m3u8' },
421
- },
422
- ],
423
- },
424
- },
425
- { type: 'TEXT', text: 'Install the agent [1]. [card://video:mux-9b6586b494]' },
426
- ],
427
- },
428
- ];
429
-
430
- expect(processHistoricalMessages(dialog).messages[0]).toMatchObject({
431
- role: 'assistant',
432
- sources: [
433
- {
434
- index: 1,
435
- name: 'Install agent',
436
- path: 'docs/install.md',
437
- documentType: 'markdown',
438
- },
439
- ],
440
- refs: [
441
- {
442
- type: 'video',
443
- id: 'mux-9b6586b494',
444
- metadata: { videoUrl: 'https://stream.mux.com/playback-id.m3u8' },
445
- },
446
- ],
447
- content: [{ type: 'text', text: 'Install the agent [1]. [card://video:mux-9b6586b494]' }],
448
- });
449
- });
450
- });
@@ -33,8 +33,7 @@ import {
33
33
  } from '../../../chat-protocol/events';
34
34
  // One normalizer for ask rows, shared with the live decoder — history and the
35
35
  // stream must agree on which options are usable.
36
- import { decodeNatsChunk, normalizeAskOptions } from '../../../chat-protocol/nats-decoder';
37
- import type { ChatRef } from '../chat-ref.types';
36
+ import { normalizeAskOptions } from '../../../chat-protocol/nats-decoder';
38
37
  import { applyApprovalStatusToSegment } from '../stream/message-mutations';
39
38
  import {
40
39
  MESSAGE_TYPE,
@@ -47,10 +46,8 @@ import {
47
46
  type MessageProcessingOptions,
48
47
  type MessageData,
49
48
  type MessageOwner,
50
- type ChatSource,
51
49
  } from '../types';
52
50
  import { approvalDisplaysInline } from './approval-display';
53
- import { mergeChatRefs, mergeChatSources } from './chat-source-metadata';
54
51
  import { type MessageSegmentAccumulator, createMessageSegmentAccumulator } from './message-segment-accumulator';
55
52
  import { getCommandText } from './tool-call-helpers';
56
53
 
@@ -124,10 +121,6 @@ export function decodeHistoricalMessageData(data: MessageData): ChatStreamEvent
124
121
  }
125
122
  return null;
126
123
 
127
- case MESSAGE_TYPE.GUIDE:
128
- case MESSAGE_TYPE.SOURCES:
129
- return decodeNatsChunk({ type: data.type, payload: data.payload });
130
-
131
124
  // Same completeness gate as the live decoder (`decodeNatsChunk`): a
132
125
  // persisted row without a question or without options is not a card the
133
126
  // user can answer, so it replays as nothing rather than as empty chrome.
@@ -598,8 +591,6 @@ export function processHistoricalMessages(
598
591
  // MAX persisted seq across the rows grouped into the current assistant turn
599
592
  // — carried onto the flushed message's streamSeq for per-role merge coverage.
600
593
  let currentAssistantStreamSeq: number | undefined;
601
- let currentAssistantSources: ChatSource[] | undefined;
602
- let currentAssistantRefs: ChatRef[] | undefined;
603
594
 
604
595
  /**
605
596
  * Flush the current assistant message to processedMessages.
@@ -617,8 +608,6 @@ export function processHistoricalMessages(
617
608
  authorType: assistantType,
618
609
  timestamp: currentAssistantTimestamp || new Date(),
619
610
  avatar: assistantAvatar,
620
- ...(currentAssistantSources ? { sources: currentAssistantSources } : {}),
621
- ...(currentAssistantRefs ? { refs: currentAssistantRefs } : {}),
622
611
  ...(currentAssistantStreamSeq !== undefined ? { streamSeq: currentAssistantStreamSeq } : {}),
623
612
  });
624
613
  accumulator.resetSegments();
@@ -634,8 +623,6 @@ export function processHistoricalMessages(
634
623
  currentAssistantTimestamp = null;
635
624
  lastAssistantId = null;
636
625
  currentAssistantStreamSeq = undefined;
637
- currentAssistantSources = undefined;
638
- currentAssistantRefs = undefined;
639
626
  };
640
627
 
641
628
  messages.forEach((msg, index) => {
@@ -702,11 +689,6 @@ export function processHistoricalMessages(
702
689
  messageDataArray.forEach(data => {
703
690
  const event = decodeHistoricalMessageData(data);
704
691
  if (!event) return;
705
- if (event.type === 'sources') {
706
- currentAssistantSources = mergeChatSources(currentAssistantSources, event.sources);
707
- if (event.refs) currentAssistantRefs = mergeChatRefs(currentAssistantRefs, event.refs);
708
- return;
709
- }
710
692
  applyHistoryEvent(
711
693
  event,
712
694
  accumulator,
@@ -52,21 +52,31 @@ export const NavigationSidebarItemButton = memo(function NavigationSidebarItemBu
52
52
  const hasUnread = unreadCount > 0;
53
53
 
54
54
  const className = cn(
55
- 'relative flex w-full items-center justify-start',
55
+ // `isolate` scopes the hover layer's negative z-index to this row, so it
56
+ // paints over the row's own background and under its content instead of
57
+ // sliding behind the sidebar.
58
+ 'relative isolate flex w-full items-center justify-start',
56
59
  'h-14 p-[var(--spacing-system-m)]',
57
- // 150ms, not 300: the outgoing and incoming entries cross-fade, so for the
58
- // whole duration TWO rows read as half-active. At 300ms that window is long
59
- // enough to look like a flicker rather than a transition.
60
- 'transition-colors duration-150',
61
- '[&_svg]:transition-colors [&_svg]:duration-150',
60
+ // The hover/pending wash is its own LAYER, and that separation is the whole
61
+ // point. Hover and active both want the row's background-color, so a
62
+ // `transition-colors` that smooths hover necessarily smooths the accent too
63
+ // — and it runs on the OUTGOING row as well as the incoming one. Measured on
64
+ // a real navigation: for 150ms two rows carried the accent background AND
65
+ // the accent bar, mid-fade, with nothing to say which one was the page you
66
+ // were actually on. Shortening it (300ms -> 150ms) only shortened the lie.
67
+ //
68
+ // Split apart, each gets the timing its meaning calls for: the wash fades,
69
+ // because it is decoration reacting to a cursor; the accent switches in a
70
+ // single frame, because it is a statement of fact — exactly one row is the
71
+ // current page, at every instant, including the instant the route commits.
72
+ "after:pointer-events-none after:absolute after:inset-0 after:-z-10 after:bg-ods-bg-hover after:opacity-0 after:transition-opacity after:duration-150 after:content-['']",
62
73
  "before:absolute before:bottom-0 before:left-0 before:top-0 before:w-1 before:content-['']",
63
- 'before:transition-colors before:duration-150',
64
74
  // Pending borrows the HOVER weight and nothing else — no accent bar, no
65
75
  // accent text, no `aria-current`. It says "this row is working", not "this
66
76
  // is where you are", and it reads as the row staying pressed under the
67
77
  // cursor, which is exactly what happened.
68
- !isActive && !disabled && 'text-ods-text-primary hover:bg-ods-bg-hover [&_svg]:fill-ods-text-secondary',
69
- !isActive && !disabled && isPending && 'bg-ods-bg-hover',
78
+ !isActive && !disabled && 'text-ods-text-primary hover:after:opacity-100 [&_svg]:fill-ods-text-secondary',
79
+ !isActive && !disabled && isPending && 'after:opacity-100',
70
80
  !isActive && disabled && 'text-ods-text-secondary [&_svg]:fill-ods-text-secondary',
71
81
  isActive &&
72
82
  !disabled && [
@@ -106,7 +106,6 @@ export function HoverDropdown({
106
106
  }: HoverDropdownProps) {
107
107
  const [open, setOpen] = useState(false);
108
108
  const timeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined);
109
- const clickPinnedRef = useRef(false);
110
109
  const containerRef = useRef<HTMLDivElement>(null);
111
110
  const panelRef = useRef<HTMLDivElement>(null);
112
111
 
@@ -157,22 +156,18 @@ export function HoverDropdown({
157
156
  }, []);
158
157
 
159
158
  const hide = useCallback(() => {
160
- if (clickPinnedRef.current) return;
161
159
  timeoutRef.current = setTimeout(() => setOpen(false), hideDelay);
162
160
  }, [hideDelay]);
163
161
 
164
162
  // Click handler — touch / mobile (no hover) + desktop users who
165
- // expect clicking a chip to open a menu. The first desktop click can arrive
166
- // after mouse-enter already opened the panel; pin it open instead of blindly
167
- // toggling it closed. A second click closes it. `stopPropagation` prevents the click
163
+ // expect clicking a chip to open a menu. Toggles the dropdown state
164
+ // so a second click closes it. `stopPropagation` prevents the click
168
165
  // from bubbling to ancestor handlers (the chip's parent message
169
166
  // bubble shouldn't react to chip clicks).
170
167
  const toggle = useCallback((e: React.MouseEvent) => {
171
168
  e.stopPropagation();
172
169
  clearTimeout(timeoutRef.current);
173
- const pinned = !clickPinnedRef.current;
174
- clickPinnedRef.current = pinned;
175
- setOpen(pinned);
170
+ setOpen(prev => !prev);
176
171
  }, []);
177
172
 
178
173
  // Every hook is above this line: an `items` list that goes from empty to
@@ -1,5 +0,0 @@
1
- import type { ChatRef } from '../components/chat/chat-ref.types';
2
- import type { SourcesEvent } from './events';
3
- export declare function isSourceMetadataCardRef(ref: ChatRef): boolean;
4
- export declare function sourceMetadataEvent(payload: unknown): SourcesEvent | null;
5
- //# sourceMappingURL=source-metadata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-metadata.d.ts","sourceRoot":"","sources":["../../src/chat-protocol/source-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK7C,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAE7D;AAmLD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAazE"}