@opengeni/react 6.0.0-canary.1 → 6.1.0-canary.0

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 (68) hide show
  1. package/README.md +17 -0
  2. package/dist/capability-catalog-row.d.ts +20 -0
  3. package/dist/{chunk-VRBL3F5E.js → chunk-5GAL23FF.js} +10 -2
  4. package/dist/{chunk-VRBL3F5E.js.map → chunk-5GAL23FF.js.map} +1 -1
  5. package/dist/{chunk-IHQII5WO.js → chunk-G5JFM6ZE.js} +29 -4
  6. package/dist/chunk-G5JFM6ZE.js.map +1 -0
  7. package/dist/{chunk-UMECRJRV.js → chunk-HJ5VJ4JB.js} +21 -12
  8. package/dist/chunk-HJ5VJ4JB.js.map +1 -0
  9. package/dist/{chunk-R4KRSFGA.js → chunk-IP4BUBKH.js} +3 -3
  10. package/dist/{chunk-CC7AVRIJ.js → chunk-KZ4QDBGM.js} +87 -14
  11. package/dist/chunk-KZ4QDBGM.js.map +1 -0
  12. package/dist/{chunk-PZ27MCZP.js → chunk-L5VJYZIW.js} +34 -4
  13. package/dist/chunk-L5VJYZIW.js.map +1 -0
  14. package/dist/{chunk-45XEUVTK.js → chunk-UWVY3OXF.js} +12 -5
  15. package/dist/chunk-UWVY3OXF.js.map +1 -0
  16. package/dist/components/message-timeline.d.ts +2 -2
  17. package/dist/composer.js +4 -4
  18. package/dist/connect-panel.d.ts +2 -1
  19. package/dist/connect-setup.d.ts +3 -1
  20. package/dist/connect.d.ts +1 -0
  21. package/dist/connect.js +620 -424
  22. package/dist/connect.js.map +1 -1
  23. package/dist/connection-catalog.d.ts +6 -1
  24. package/dist/connection-installed.d.ts +1 -0
  25. package/dist/connection-logo.d.ts +4 -2
  26. package/dist/discovery-cache.d.ts +5 -0
  27. package/dist/index.js +7 -7
  28. package/dist/{model-policy-picker-menu-3R336DP2.js → model-policy-picker-menu-RVOQ4ZZG.js} +4 -4
  29. package/dist/model-policy.d.ts +6 -2
  30. package/dist/model-policy.js +1 -1
  31. package/dist/plugin-discovery.d.ts +4 -0
  32. package/dist/realtime.js +2 -2
  33. package/dist/session-ui.js +6 -6
  34. package/dist/session.js +1 -1
  35. package/dist/skill-discovery.d.ts +11 -0
  36. package/dist/timeline/projection.d.ts +3 -1
  37. package/dist/timeline/turn-summary.d.ts +2 -2
  38. package/package.json +3 -3
  39. package/src/capability-catalog-row.tsx +94 -0
  40. package/src/components/markdown.tsx +32 -3
  41. package/src/components/message-timeline.tsx +88 -4
  42. package/src/components/model-picker.tsx +11 -3
  43. package/src/components/model-policy-picker-menu.tsx +10 -3
  44. package/src/components/session-conversation.tsx +1 -3
  45. package/src/components/session-status.tsx +2 -2
  46. package/src/connect-panel.tsx +19 -8
  47. package/src/connect-setup.tsx +49 -14
  48. package/src/connect.ts +6 -0
  49. package/src/connection-catalog.tsx +61 -39
  50. package/src/connection-installed.tsx +2 -0
  51. package/src/connection-logo.tsx +14 -10
  52. package/src/discovery-cache.ts +42 -0
  53. package/src/hooks/use-session-events.ts +24 -2
  54. package/src/model-policy.ts +21 -0
  55. package/src/plugin-details.tsx +8 -5
  56. package/src/plugin-discovery.tsx +87 -71
  57. package/src/skill-discovery.tsx +101 -56
  58. package/src/timeline/projection.ts +31 -1
  59. package/src/timeline/turn-summary.tsx +3 -3
  60. package/styles/compiled.css +27 -0
  61. package/styles/connect.css +56 -15
  62. package/dist/chunk-45XEUVTK.js.map +0 -1
  63. package/dist/chunk-CC7AVRIJ.js.map +0 -1
  64. package/dist/chunk-IHQII5WO.js.map +0 -1
  65. package/dist/chunk-PZ27MCZP.js.map +0 -1
  66. package/dist/chunk-UMECRJRV.js.map +0 -1
  67. /package/dist/{chunk-R4KRSFGA.js.map → chunk-IP4BUBKH.js.map} +0 -0
  68. /package/dist/{model-policy-picker-menu-3R336DP2.js.map → model-policy-picker-menu-RVOQ4ZZG.js.map} +0 -0
@@ -13,7 +13,7 @@ import {
13
13
  MOTION_INSPECT_SCALE,
14
14
  Markdown,
15
15
  prefersReducedMotion
16
- } from "./chunk-IHQII5WO.js";
16
+ } from "./chunk-G5JFM6ZE.js";
17
17
  import {
18
18
  Actions,
19
19
  AttachButton,
@@ -38,7 +38,7 @@ import {
38
38
  Surface,
39
39
  useChatComposerController,
40
40
  useLightboxOptional
41
- } from "./chunk-45XEUVTK.js";
41
+ } from "./chunk-UWVY3OXF.js";
42
42
  import {
43
43
  Tooltip,
44
44
  TooltipContent,
@@ -51,7 +51,7 @@ import {
51
51
  } from "./chunk-WYWRYUNQ.js";
52
52
  import {
53
53
  ModelPolicyPicker
54
- } from "./chunk-R4KRSFGA.js";
54
+ } from "./chunk-IP4BUBKH.js";
55
55
  import {
56
56
  buildTimeline,
57
57
  groupTimeline,
@@ -63,7 +63,7 @@ import {
63
63
  useSession,
64
64
  useSessionEvents,
65
65
  useTurnQueue
66
- } from "./chunk-PZ27MCZP.js";
66
+ } from "./chunk-L5VJYZIW.js";
67
67
  import {
68
68
  useComposer
69
69
  } from "./chunk-NYESIADM.js";
@@ -85,7 +85,7 @@ import {
85
85
  import {
86
86
  projectPickerRows,
87
87
  sortPickerRows
88
- } from "./chunk-VRBL3F5E.js";
88
+ } from "./chunk-5GAL23FF.js";
89
89
  import {
90
90
  cn
91
91
  } from "./chunk-22KP6LR5.js";
@@ -5125,7 +5125,7 @@ function TurnSummary({
5125
5125
  )
5126
5126
  }
5127
5127
  ),
5128
- outcome === "complete" || liveHeader && !outcome ? null : /* @__PURE__ */ jsx14(
5128
+ outcome === "complete" || !outcome && (liveHeader || context.settled) ? null : /* @__PURE__ */ jsx14(
5129
5129
  "span",
5130
5130
  {
5131
5131
  className: cn(
@@ -5421,10 +5421,10 @@ function GeneratedVideoPlayer({
5421
5421
  import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
5422
5422
  var SESSION_STATUS_META = {
5423
5423
  queued: {
5424
- label: "Starting",
5424
+ label: "Queued",
5425
5425
  dotClassName: "bg-og-status-queued",
5426
5426
  badgeClassName: "text-og-fg-muted border-og-border bg-og-status-queued/10",
5427
- pulse: true
5427
+ pulse: false
5428
5428
  },
5429
5429
  running: {
5430
5430
  label: "Running",
@@ -6188,6 +6188,55 @@ function MessageTimeline({
6188
6188
  }, [items, events, shouldRenderAuthNeeded]);
6189
6189
  const sourceItems = events ?? items;
6190
6190
  const olderBoundaryKey = sourceItems?.[0]?.id;
6191
+ const newerBoundaryKey = `${events?.[0]?.sessionId ?? ""}:${olderBoundaryKey ?? ""}`;
6192
+ const newerScopeRef = useRef8(newerBoundaryKey);
6193
+ newerScopeRef.current = newerBoundaryKey;
6194
+ const newerAttemptRef = useRef8(null);
6195
+ const newerRetryButtonRef = useRef8(null);
6196
+ const [newerRetryPending, setNewerRetryPending] = useState15(false);
6197
+ const [newerFailure, setNewerFailure] = useState15(null);
6198
+ useEffect10(() => {
6199
+ newerScopeRef.current = newerBoundaryKey;
6200
+ newerAttemptRef.current = null;
6201
+ setNewerFailure(null);
6202
+ setNewerRetryPending(false);
6203
+ return () => {
6204
+ newerScopeRef.current = "";
6205
+ newerAttemptRef.current = null;
6206
+ };
6207
+ }, [newerBoundaryKey]);
6208
+ const requestNewer = useCallback2(
6209
+ (explicitRetry = false) => {
6210
+ if (newerScopeRef.current !== newerBoundaryKey || !onLoadNewer || loadingNewer || newerAttemptRef.current && (!explicitRetry || newerAttemptRef.current.pending)) {
6211
+ return;
6212
+ }
6213
+ const attempt = { pending: true };
6214
+ newerAttemptRef.current = attempt;
6215
+ if (explicitRetry) setNewerRetryPending(true);
6216
+ const isCurrent = () => newerAttemptRef.current === attempt && newerScopeRef.current === newerBoundaryKey;
6217
+ void Promise.resolve().then(() => isCurrent() ? onLoadNewer() : void 0).then(
6218
+ () => {
6219
+ if (!isCurrent()) return;
6220
+ newerAttemptRef.current = null;
6221
+ if (document.activeElement === newerRetryButtonRef.current) {
6222
+ scrollRef.current?.focus({ preventScroll: true });
6223
+ }
6224
+ setNewerFailure(null);
6225
+ setNewerRetryPending(false);
6226
+ },
6227
+ (reason) => {
6228
+ if (!isCurrent()) return;
6229
+ attempt.pending = false;
6230
+ setNewerRetryPending(false);
6231
+ setNewerFailure({
6232
+ key: newerBoundaryKey,
6233
+ message: reason instanceof Error ? reason.message : String(reason)
6234
+ });
6235
+ }
6236
+ );
6237
+ },
6238
+ [onLoadNewer, loadingNewer, newerBoundaryKey]
6239
+ );
6191
6240
  const previousSourceIdsRef = useRef8(/* @__PURE__ */ new Set());
6192
6241
  const previousSourceBoundaryRef = useRef8(void 0);
6193
6242
  const readingAnchorRef = useRef8(null);
@@ -6951,14 +7000,14 @@ function MessageTimeline({
6951
7000
  const observer = new IntersectionObserver(
6952
7001
  (entries) => {
6953
7002
  if (maxScrollOf(root) > 1 && entries.some((entry) => entry.isIntersecting)) {
6954
- onLoadNewer();
7003
+ requestNewer();
6955
7004
  }
6956
7005
  },
6957
7006
  { root, rootMargin: "0px 0px 1200px 0px" }
6958
7007
  );
6959
7008
  observer.observe(target);
6960
7009
  return () => observer.disconnect();
6961
- }, [hasNewer, loadingNewer, onLoadNewer, firstGroupKey]);
7010
+ }, [hasNewer, loadingNewer, onLoadNewer, requestNewer, firstGroupKey]);
6962
7011
  useEffect10(() => {
6963
7012
  const node = scrollRef.current;
6964
7013
  const inner = node?.firstElementChild;
@@ -7298,6 +7347,32 @@ function MessageTimeline({
7298
7347
  );
7299
7348
  }),
7300
7349
  groups.length > 0 && trailingState ? /* @__PURE__ */ jsx19("div", { "data-og-timeline-trailing-state": "", children: trailingState }) : null,
7350
+ hasNewer && newerFailure?.key === newerBoundaryKey ? /* @__PURE__ */ jsxs13(
7351
+ "div",
7352
+ {
7353
+ "data-og-newer-error": "",
7354
+ className: "flex flex-col items-center gap-2 px-4 py-3 text-center text-og-menu text-og-fg-muted",
7355
+ children: [
7356
+ /* @__PURE__ */ jsxs13("p", { role: "status", className: "max-w-prose [overflow-wrap:anywhere]", children: [
7357
+ "Couldn\u2019t load later activity. ",
7358
+ newerFailure.message
7359
+ ] }),
7360
+ /* @__PURE__ */ jsx19(
7361
+ "button",
7362
+ {
7363
+ ref: newerRetryButtonRef,
7364
+ type: "button",
7365
+ "data-og-retry-newer": "",
7366
+ className: "min-h-11 rounded-og-md border border-og-border px-3 py-2 text-og-fg hover:bg-og-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-og-accent",
7367
+ "aria-disabled": loadingNewer || newerRetryPending,
7368
+ "aria-busy": newerRetryPending,
7369
+ onClick: () => requestNewer(true),
7370
+ children: newerRetryPending ? "Retrying later activity\u2026" : "Retry later activity"
7371
+ }
7372
+ )
7373
+ ]
7374
+ }
7375
+ ) : null,
7301
7376
  hasNewer ? /* @__PURE__ */ jsx19(
7302
7377
  "div",
7303
7378
  {
@@ -9205,9 +9280,7 @@ function Conversation({
9205
9280
  onLoadOlder: feed.loadOlder,
9206
9281
  hasNewer: feed.hasNewer,
9207
9282
  loadingNewer: feed.loadingNewer,
9208
- onLoadNewer: () => {
9209
- void feed.loadNewer();
9210
- },
9283
+ onLoadNewer: feed.loadNewer,
9211
9284
  onJumpToStart: async () => {
9212
9285
  await feed.loadOldest();
9213
9286
  },
@@ -10802,4 +10875,4 @@ export {
10802
10875
  SessionCommandsPanel,
10803
10876
  StartupTimings
10804
10877
  };
10805
- //# sourceMappingURL=chunk-CC7AVRIJ.js.map
10878
+ //# sourceMappingURL=chunk-KZ4QDBGM.js.map