@opengeni/react 3.7.0-canary.7 → 3.8.0-canary.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.
Files changed (72) hide show
  1. package/README.md +6 -0
  2. package/dist/chat.js +1 -1
  3. package/dist/chunk-5M6VTFJ5.js +171 -0
  4. package/dist/chunk-5M6VTFJ5.js.map +1 -0
  5. package/dist/{chunk-IOLVN74D.js → chunk-6J56T3MG.js} +15 -1
  6. package/dist/chunk-6J56T3MG.js.map +1 -0
  7. package/dist/{chunk-BQGIXRKV.js → chunk-7BWFU6H4.js} +22 -4
  8. package/dist/chunk-7BWFU6H4.js.map +1 -0
  9. package/dist/{chunk-3HIF5IFC.js → chunk-7W6PVVTK.js} +63 -18
  10. package/dist/chunk-7W6PVVTK.js.map +1 -0
  11. package/dist/{chunk-ZFOFY5ST.js → chunk-NLTS7JHI.js} +16 -31
  12. package/dist/chunk-NLTS7JHI.js.map +1 -0
  13. package/dist/chunk-NOSYBS2D.js +208 -0
  14. package/dist/chunk-NOSYBS2D.js.map +1 -0
  15. package/dist/{chunk-F2CFHN3Y.js → chunk-YAIPFO5D.js} +2 -1
  16. package/dist/chunk-YAIPFO5D.js.map +1 -0
  17. package/dist/chunk-YBM6CQRU.js +292 -0
  18. package/dist/chunk-YBM6CQRU.js.map +1 -0
  19. package/dist/chunk-ZYRGEKWS.js +216 -0
  20. package/dist/chunk-ZYRGEKWS.js.map +1 -0
  21. package/dist/components/composer.d.ts +4 -2
  22. package/dist/components/message-timeline.d.ts +9 -2
  23. package/dist/components/timeline-annotation-chrome.d.ts +25 -0
  24. package/dist/components/timeline-annotation-layout.d.ts +42 -0
  25. package/dist/components/timeline-annotation-markers.d.ts +8 -0
  26. package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
  27. package/dist/components/timeline-annotation-shared.d.ts +31 -0
  28. package/dist/components/timeline-annotations-dialog.d.ts +1 -1
  29. package/dist/components/timeline-annotations.d.ts +8 -2
  30. package/dist/composer.js +2 -2
  31. package/dist/hooks/use-composer.d.ts +2 -0
  32. package/dist/index.js +9 -6
  33. package/dist/index.js.map +1 -1
  34. package/dist/interaction.js +6 -6
  35. package/dist/machines.js +1 -1
  36. package/dist/{queue-surface-implementation-XL2A6PBM.js → queue-surface-implementation-LK3S4BIW.js} +5 -2
  37. package/dist/{queue-surface-implementation-XL2A6PBM.js.map → queue-surface-implementation-LK3S4BIW.js.map} +1 -1
  38. package/dist/session-ui.js +8 -5
  39. package/dist/session.js +1 -1
  40. package/dist/timeline-annotation-markers-DRSTLEM6.js +165 -0
  41. package/dist/timeline-annotation-markers-DRSTLEM6.js.map +1 -0
  42. package/dist/timeline-annotation-selection-IHLUGVND.js +236 -0
  43. package/dist/timeline-annotation-selection-IHLUGVND.js.map +1 -0
  44. package/dist/timeline-annotations-dialog-6Q53N5FG.js +262 -0
  45. package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +1 -0
  46. package/package.json +2 -2
  47. package/src/components/chat-composer.tsx +5 -2
  48. package/src/components/composer.tsx +40 -5
  49. package/src/components/copy-button.tsx +1 -0
  50. package/src/components/machines-dashboard.tsx +1 -16
  51. package/src/components/message-timeline.tsx +357 -297
  52. package/src/components/timeline-annotation-chrome.tsx +183 -0
  53. package/src/components/timeline-annotation-layout.ts +268 -0
  54. package/src/components/timeline-annotation-markers.tsx +185 -0
  55. package/src/components/timeline-annotation-reveal-context.ts +9 -0
  56. package/src/components/timeline-annotation-selection.tsx +99 -54
  57. package/src/components/timeline-annotation-shared.ts +245 -0
  58. package/src/components/timeline-annotations-dialog.tsx +172 -128
  59. package/src/components/timeline-annotations.tsx +178 -45
  60. package/src/hooks/use-composer.ts +17 -0
  61. package/styles/compiled.css +86 -22
  62. package/dist/chunk-3HIF5IFC.js.map +0 -1
  63. package/dist/chunk-BQGIXRKV.js.map +0 -1
  64. package/dist/chunk-F2CFHN3Y.js.map +0 -1
  65. package/dist/chunk-IOLVN74D.js.map +0 -1
  66. package/dist/chunk-W3OUAH6M.js +0 -170
  67. package/dist/chunk-W3OUAH6M.js.map +0 -1
  68. package/dist/chunk-ZFOFY5ST.js.map +0 -1
  69. package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
  70. package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
  71. package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
  72. package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
@@ -1,8 +1,12 @@
1
1
  import {
2
2
  EmptyQueueStateSurface,
3
+ TimelineAnnotationCards,
3
4
  TimelineAnnotationsChip,
4
5
  requestQueueDraftEdit
5
- } from "./chunk-W3OUAH6M.js";
6
+ } from "./chunk-YBM6CQRU.js";
7
+ import {
8
+ TimelineAnnotationSourceRootContext
9
+ } from "./chunk-5M6VTFJ5.js";
6
10
  import {
7
11
  Actions,
8
12
  AttachButton,
@@ -27,7 +31,7 @@ import {
27
31
  Surface,
28
32
  useChatComposerController,
29
33
  useLightboxOptional
30
- } from "./chunk-BQGIXRKV.js";
34
+ } from "./chunk-7BWFU6H4.js";
31
35
  import {
32
36
  ModelPolicyPicker
33
37
  } from "./chunk-R4KRSFGA.js";
@@ -45,7 +49,7 @@ import {
45
49
  } from "./chunk-BXJOQFCD.js";
46
50
  import {
47
51
  useComposer
48
- } from "./chunk-IOLVN74D.js";
52
+ } from "./chunk-6J56T3MG.js";
49
53
  import {
50
54
  formatBytes,
51
55
  formatClockTime,
@@ -68,7 +72,7 @@ import {
68
72
  MOTION_INSPECT_SCALE,
69
73
  Markdown,
70
74
  prefersReducedMotion
71
- } from "./chunk-F2CFHN3Y.js";
75
+ } from "./chunk-YAIPFO5D.js";
72
76
  import {
73
77
  Tooltip,
74
78
  TooltipContent,
@@ -4874,7 +4878,8 @@ function machineInputSummaryIsUseful(kind, cleanedSummary) {
4874
4878
 
4875
4879
  // src/components/message-timeline.tsx
4876
4880
  import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
4877
- var TimelineAnnotationSelection = lazy3(() => import("./timeline-annotation-selection-3L7LHGG2.js"));
4881
+ var TimelineAnnotationSelection = lazy3(() => import("./timeline-annotation-selection-IHLUGVND.js"));
4882
+ var TimelineAnnotationMarkers = lazy3(() => import("./timeline-annotation-markers-DRSTLEM6.js"));
4878
4883
  var PIN_THRESHOLD_PX = 48;
4879
4884
  var JUMP_TO_LATEST_CATCHUP_DEBT_PX = 240;
4880
4885
  var OLDER_PREFETCH_MARGIN_PX = 400;
@@ -4948,6 +4953,7 @@ function MessageTimeline({
4948
4953
  events,
4949
4954
  items,
4950
4955
  status: _status,
4956
+ renderMessageActions,
4951
4957
  renderMessageText,
4952
4958
  onOpenSession,
4953
4959
  onMemoryClick,
@@ -4962,6 +4968,8 @@ function MessageTimeline({
4962
4968
  turnSummary,
4963
4969
  autoFollow = true,
4964
4970
  onAnnotate,
4971
+ draftAnnotations,
4972
+ onDraftAnnotationSelect,
4965
4973
  hasOlder = false,
4966
4974
  loadingOlder = false,
4967
4975
  onLoadOlder,
@@ -5287,6 +5295,7 @@ function MessageTimeline({
5287
5295
  () => ({
5288
5296
  userMessageDisclosureContext,
5289
5297
  behavior: {
5298
+ renderMessageActions,
5290
5299
  renderMessageText,
5291
5300
  onOpenSession,
5292
5301
  onMemoryClick,
@@ -5306,6 +5315,7 @@ function MessageTimeline({
5306
5315
  onMemoryClick,
5307
5316
  onOpenSession,
5308
5317
  onReconnect,
5318
+ renderMessageActions,
5309
5319
  renderMessageText,
5310
5320
  resolveProviderLogo,
5311
5321
  toolRegistry,
@@ -5910,7 +5920,7 @@ function MessageTimeline({
5910
5920
  }
5911
5921
  releasePinAfterScrollSettled(node);
5912
5922
  };
5913
- return /* @__PURE__ */ jsx14(LightboxProvider, { children: /* @__PURE__ */ jsx14(FoldMemoryProvider, { value: foldMemoryRef.current, children: /* @__PURE__ */ jsx14(SeenActivityIdsProvider, { value: seenActivityIdsRef.current, children: /* @__PURE__ */ jsx14(TimelineComputeLabelProvider, { value: computeLabel ?? null, children: /* @__PURE__ */ jsx14(EntranceAnimationProvider, { value: false, children: /* @__PURE__ */ jsx14(TooltipProvider, { delayDuration: 400, children: /* @__PURE__ */ jsxs8("div", { className: cn("og-root relative flex min-h-0 flex-col", className), children: [
5923
+ return /* @__PURE__ */ jsx14(LightboxProvider, { children: /* @__PURE__ */ jsx14(FoldMemoryProvider, { value: foldMemoryRef.current, children: /* @__PURE__ */ jsx14(SeenActivityIdsProvider, { value: seenActivityIdsRef.current, children: /* @__PURE__ */ jsx14(TimelineComputeLabelProvider, { value: computeLabel ?? null, children: /* @__PURE__ */ jsx14(EntranceAnimationProvider, { value: false, children: /* @__PURE__ */ jsx14(TooltipProvider, { delayDuration: 400, children: /* @__PURE__ */ jsx14(TimelineAnnotationSourceRootContext.Provider, { value: scrollRef, children: /* @__PURE__ */ jsxs8("div", { className: cn("og-root relative flex min-h-0 flex-col", className), children: [
5914
5924
  onAnnotate ? /* @__PURE__ */ jsx14(Suspense3, { fallback: null, children: /* @__PURE__ */ jsx14(
5915
5925
  TimelineAnnotationSelection,
5916
5926
  {
@@ -6086,6 +6096,14 @@ function MessageTimeline({
6086
6096
  )
6087
6097
  }
6088
6098
  ),
6099
+ draftAnnotations && draftAnnotations.length > 0 ? /* @__PURE__ */ jsx14(Suspense3, { fallback: null, children: /* @__PURE__ */ jsx14(
6100
+ TimelineAnnotationMarkers,
6101
+ {
6102
+ rootRef: scrollRef,
6103
+ annotations: draftAnnotations,
6104
+ onSelect: onDraftAnnotationSelect
6105
+ }
6106
+ ) }) : null,
6089
6107
  /* @__PURE__ */ jsx14(AnimatePresence, { children: loadingNewer ? /* @__PURE__ */ jsx14(
6090
6108
  motion.div,
6091
6109
  {
@@ -6150,7 +6168,7 @@ function MessageTimeline({
6150
6168
  ]
6151
6169
  }
6152
6170
  ) : null })
6153
- ] }) }) }) }) }) }) });
6171
+ ] }) }) }) }) }) }) }) });
6154
6172
  }
6155
6173
  function timelineGroupsRenderEqual(previous, next) {
6156
6174
  try {
@@ -6273,6 +6291,7 @@ var TimelineGroupEntry = memo(function TimelineGroupEntry2({
6273
6291
  });
6274
6292
  var TimelineGroupView = memo(function TimelineGroupView2({
6275
6293
  group,
6294
+ renderMessageActions,
6276
6295
  renderMessageText,
6277
6296
  onOpenSession,
6278
6297
  onMemoryClick,
@@ -6385,6 +6404,7 @@ var TimelineGroupView = memo(function TimelineGroupView2({
6385
6404
  {
6386
6405
  resetKeys: [
6387
6406
  child,
6407
+ renderMessageActions,
6388
6408
  renderMessageText,
6389
6409
  onOpenSession,
6390
6410
  onMemoryClick,
@@ -6400,6 +6420,7 @@ var TimelineGroupView = memo(function TimelineGroupView2({
6400
6420
  TimelineGroupView2,
6401
6421
  {
6402
6422
  group: child,
6423
+ renderMessageActions,
6403
6424
  renderMessageText,
6404
6425
  onOpenSession,
6405
6426
  onMemoryClick,
@@ -6445,6 +6466,7 @@ var TimelineGroupView = memo(function TimelineGroupView2({
6445
6466
  TimelineRow,
6446
6467
  {
6447
6468
  item: group.item,
6469
+ renderMessageActions,
6448
6470
  renderMessageText,
6449
6471
  onReconnect,
6450
6472
  resolveProviderLogo,
@@ -6625,6 +6647,7 @@ function durationBetween(startedAt, endedAt) {
6625
6647
  }
6626
6648
  function TimelineRow({
6627
6649
  item,
6650
+ renderMessageActions,
6628
6651
  renderMessageText,
6629
6652
  onReconnect,
6630
6653
  resolveProviderLogo,
@@ -6633,11 +6656,25 @@ function TimelineRow({
6633
6656
  }) {
6634
6657
  switch (item.kind) {
6635
6658
  case "user-message":
6636
- return /* @__PURE__ */ jsx14(UserMessageRow, { item, renderMessageText });
6659
+ return /* @__PURE__ */ jsx14(
6660
+ UserMessageRow,
6661
+ {
6662
+ item,
6663
+ renderMessageActions,
6664
+ renderMessageText
6665
+ }
6666
+ );
6637
6667
  case "human-input":
6638
6668
  return /* @__PURE__ */ jsx14(HumanInputConversationRow, { item });
6639
6669
  case "agent-message":
6640
- return /* @__PURE__ */ jsx14(AgentMessageRow, { item, renderMessageText });
6670
+ return /* @__PURE__ */ jsx14(
6671
+ AgentMessageRow,
6672
+ {
6673
+ item,
6674
+ renderMessageActions,
6675
+ renderMessageText
6676
+ }
6677
+ );
6641
6678
  case "worker-completion":
6642
6679
  return /* @__PURE__ */ jsx14(WorkerCompletionRow, { item, onOpenSession });
6643
6680
  case "session-status":
@@ -6735,6 +6772,7 @@ function MessageFooterTime({ occurredAt }) {
6735
6772
  }
6736
6773
  function UserMessageRow({
6737
6774
  item,
6775
+ renderMessageActions,
6738
6776
  renderMessageText
6739
6777
  }) {
6740
6778
  const enter = useEntranceAnimation();
@@ -6747,11 +6785,14 @@ function UserMessageRow({
6747
6785
  ${annotation.note}`).join("\n\n"),
6748
6786
  label: "Copy message",
6749
6787
  className: "w-fit max-w-full min-w-0",
6750
- trailing: /* @__PURE__ */ jsx14(MessageFooterTime, { occurredAt: item.occurredAt }),
6788
+ trailing: /* @__PURE__ */ jsxs8(Fragment4, { children: [
6789
+ renderMessageActions?.(item),
6790
+ /* @__PURE__ */ jsx14(MessageFooterTime, { occurredAt: item.occurredAt })
6791
+ ] }),
6751
6792
  children: /* @__PURE__ */ jsxs8("div", { className: MESSAGE_BUBBLE_CLASS, children: [
6752
6793
  item.text ? /* @__PURE__ */ jsx14("div", { "data-og-annotation-source-key": item.annotationSource?.eventId, children: renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx14(UserMessageBody, { messageId: item.id, text: item.text, children: /* @__PURE__ */ jsx14(Markdown, { children: item.text }) }) }) : null,
6753
6794
  (item.annotations?.length ?? 0) > 0 ? /* @__PURE__ */ jsx14(
6754
- TimelineAnnotationsChip,
6795
+ TimelineAnnotationCards,
6755
6796
  {
6756
6797
  annotations: item.annotations ?? [],
6757
6798
  className: item.text ? "mt-2" : void 0
@@ -6883,21 +6924,25 @@ ${answers}` : ""}`].filter(Boolean).join("\n\n");
6883
6924
  }
6884
6925
  function AgentMessageRow({
6885
6926
  item,
6927
+ renderMessageActions,
6886
6928
  renderMessageText
6887
6929
  }) {
6888
6930
  const enter = useEntranceAnimation();
6889
6931
  const body = renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx14(Markdown, { streaming: item.streaming, children: item.text });
6890
- return /* @__PURE__ */ jsx14("div", { "data-og-annotation-source-key": item.annotationSource?.eventId, children: /* @__PURE__ */ jsx14(
6932
+ return /* @__PURE__ */ jsx14(
6891
6933
  CopyHoverFrame,
6892
6934
  {
6893
6935
  copyText: item.text,
6894
6936
  label: "Copy message",
6895
6937
  align: "start",
6896
6938
  className: cn(enter && "animate-og-enter", "min-w-0 text-og-md leading-7 text-og-fg"),
6897
- trailing: item.streaming ? null : /* @__PURE__ */ jsx14(MessageFooterTime, { occurredAt: item.occurredAt }),
6898
- children: body
6939
+ trailing: item.streaming ? null : /* @__PURE__ */ jsxs8(Fragment4, { children: [
6940
+ renderMessageActions?.(item),
6941
+ /* @__PURE__ */ jsx14(MessageFooterTime, { occurredAt: item.occurredAt })
6942
+ ] }),
6943
+ children: /* @__PURE__ */ jsx14("div", { "data-og-annotation-source-key": item.annotationSource?.eventId, children: body })
6899
6944
  }
6900
- ) });
6945
+ );
6901
6946
  }
6902
6947
  function workerCompletionMeta(item) {
6903
6948
  if (item.childStatus === "failed") {
@@ -7471,7 +7516,7 @@ function authReasonLine(reason) {
7471
7516
  import { Loader2Icon } from "lucide-react";
7472
7517
  import { lazy as lazy4, Suspense as Suspense4 } from "react";
7473
7518
  import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
7474
- var loadQueueSurface = () => import("./queue-surface-implementation-XL2A6PBM.js");
7519
+ var loadQueueSurface = () => import("./queue-surface-implementation-LK3S4BIW.js");
7475
7520
  var QueueSurface = createQueueSurface(loadQueueSurface);
7476
7521
  function createQueueSurface(loadImplementation) {
7477
7522
  const LazyQueueSurface = lazy4(async () => ({
@@ -7622,7 +7667,7 @@ function ChatComposer({
7622
7667
  /* @__PURE__ */ jsx16(RestoredResources, {}),
7623
7668
  /* @__PURE__ */ jsx16(Attachments, {}),
7624
7669
  header,
7625
- composer.annotations && composer.annotations.length > 0 ? /* @__PURE__ */ jsx16("div", { className: "px-3 pt-2 sm:px-4", children: /* @__PURE__ */ jsx16(
7670
+ composer.annotations && composer.annotations.length > 0 && composer.updateAnnotation && composer.removeAnnotation ? /* @__PURE__ */ jsx16("div", { className: "px-3.5 pt-2 md:px-4", children: /* @__PURE__ */ jsx16(
7626
7671
  TimelineAnnotationsChip,
7627
7672
  {
7628
7673
  annotations: composer.annotations,
@@ -9290,4 +9335,4 @@ export {
9290
9335
  SessionChrome,
9291
9336
  SessionCommandsPanel
9292
9337
  };
9293
- //# sourceMappingURL=chunk-3HIF5IFC.js.map
9338
+ //# sourceMappingURL=chunk-7W6PVVTK.js.map