@opengeni/react 7.5.0 → 7.6.0-canary.36938443461001

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 (35) hide show
  1. package/dist/{browser-viewer-Z7S7QEJL.js → browser-viewer-5X47I6T2.js} +3 -3
  2. package/dist/{chunk-FNWQBQOK.js → chunk-55JRUWOA.js} +20 -15
  3. package/dist/chunk-55JRUWOA.js.map +1 -0
  4. package/dist/{chunk-AFLPWUQ7.js → chunk-BI57CQUV.js} +2 -2
  5. package/dist/{chunk-5KYZIQFY.js → chunk-DV2DBNPQ.js} +2 -2
  6. package/dist/{chunk-BDKR6BAR.js → chunk-FGBCYQOT.js} +2 -2
  7. package/dist/{chunk-ZXSEDZP7.js → chunk-KGENSZKS.js} +2 -2
  8. package/dist/{chunk-3IJJEYW4.js → chunk-UJRYEWZI.js} +5 -1
  9. package/dist/{chunk-3IJJEYW4.js.map → chunk-UJRYEWZI.js.map} +1 -1
  10. package/dist/{chunk-LWNLETQT.js → chunk-XA6R7DJQ.js} +2 -2
  11. package/dist/{chunk-2VFNCX4E.js → chunk-YRYF2GLG.js} +3 -3
  12. package/dist/{chunk-M7LBYP63.js → chunk-Z3DISEQN.js} +3 -3
  13. package/dist/composer.js +3 -3
  14. package/dist/connect.js +2 -2
  15. package/dist/index.js +9 -9
  16. package/dist/interaction.js +2 -2
  17. package/dist/{latest-question-IS445HOW.js → latest-question-3BJGKQQ6.js} +3 -3
  18. package/dist/machines.js +2 -2
  19. package/dist/session-ui.js +7 -7
  20. package/dist/session.js +4 -4
  21. package/dist/timeline/genie-loading.d.ts +3 -1
  22. package/package.json +3 -3
  23. package/src/lib/format.ts +12 -0
  24. package/src/timeline/activity-rail.tsx +5 -3
  25. package/src/timeline/genie-loading.tsx +16 -6
  26. package/dist/chunk-FNWQBQOK.js.map +0 -1
  27. /package/dist/{browser-viewer-Z7S7QEJL.js.map → browser-viewer-5X47I6T2.js.map} +0 -0
  28. /package/dist/{chunk-AFLPWUQ7.js.map → chunk-BI57CQUV.js.map} +0 -0
  29. /package/dist/{chunk-5KYZIQFY.js.map → chunk-DV2DBNPQ.js.map} +0 -0
  30. /package/dist/{chunk-BDKR6BAR.js.map → chunk-FGBCYQOT.js.map} +0 -0
  31. /package/dist/{chunk-ZXSEDZP7.js.map → chunk-KGENSZKS.js.map} +0 -0
  32. /package/dist/{chunk-LWNLETQT.js.map → chunk-XA6R7DJQ.js.map} +0 -0
  33. /package/dist/{chunk-2VFNCX4E.js.map → chunk-YRYF2GLG.js.map} +0 -0
  34. /package/dist/{chunk-M7LBYP63.js.map → chunk-Z3DISEQN.js.map} +0 -0
  35. /package/dist/{latest-question-IS445HOW.js.map → latest-question-3BJGKQQ6.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  BrowserViewer
3
- } from "./chunk-BDKR6BAR.js";
3
+ } from "./chunk-FGBCYQOT.js";
4
4
  import "./chunk-YSMMDOOE.js";
5
5
  import "./chunk-JVYQRRC4.js";
6
6
  import "./chunk-RHREZ7BO.js";
7
- import "./chunk-3IJJEYW4.js";
7
+ import "./chunk-UJRYEWZI.js";
8
8
  import "./chunk-5J4FOW6Q.js";
9
9
  import "./chunk-KZ73RL76.js";
10
10
  import "./chunk-NEXLLTP4.js";
@@ -12,4 +12,4 @@ import "./chunk-22KP6LR5.js";
12
12
  export {
13
13
  BrowserViewer
14
14
  };
15
- //# sourceMappingURL=browser-viewer-Z7S7QEJL.js.map
15
+ //# sourceMappingURL=browser-viewer-5X47I6T2.js.map
@@ -28,11 +28,11 @@ import {
28
28
  useSessionControl,
29
29
  useSessionEvents,
30
30
  useTurnQueue
31
- } from "./chunk-M7LBYP63.js";
31
+ } from "./chunk-Z3DISEQN.js";
32
32
  import {
33
33
  buildTimeline,
34
34
  groupTimeline
35
- } from "./chunk-ZXSEDZP7.js";
35
+ } from "./chunk-KGENSZKS.js";
36
36
  import {
37
37
  mcpToolLeaf,
38
38
  toolDisplayName
@@ -57,7 +57,7 @@ import {
57
57
  useForcedDefaultOpen,
58
58
  useTimelineSearchNavigation,
59
59
  useTimelineSearchReveal
60
- } from "./chunk-AFLPWUQ7.js";
60
+ } from "./chunk-BI57CQUV.js";
61
61
  import {
62
62
  prefersReducedMotion
63
63
  } from "./chunk-GIMRELBW.js";
@@ -95,10 +95,10 @@ import {
95
95
  Status,
96
96
  Surface,
97
97
  useChatComposerController
98
- } from "./chunk-2VFNCX4E.js";
98
+ } from "./chunk-YRYF2GLG.js";
99
99
  import {
100
100
  useComposer
101
- } from "./chunk-5KYZIQFY.js";
101
+ } from "./chunk-DV2DBNPQ.js";
102
102
  import {
103
103
  LightboxProvider,
104
104
  Tooltip,
@@ -120,7 +120,7 @@ import {
120
120
  stringifyPayload,
121
121
  truncate,
122
122
  tryParseJson
123
- } from "./chunk-3IJJEYW4.js";
123
+ } from "./chunk-UJRYEWZI.js";
124
124
  import {
125
125
  allowanceLabels,
126
126
  allowanceResetSentence,
@@ -3889,13 +3889,16 @@ var PHRASES = [
3889
3889
  "Putting a wish into motion\u2026",
3890
3890
  "A little hocus. A little pocus\u2026"
3891
3891
  ];
3892
+ var WAITING_PHRASES = ["Waiting for a response\u2026"];
3892
3893
  function GenieLoading({
3893
3894
  startedAt,
3895
+ phase = "preparing",
3894
3896
  onShowDetails,
3895
3897
  detailsOpen = false
3896
3898
  }) {
3897
3899
  const options = useContext4(GenieLoadingOptionsContext);
3898
- const phrases = options?.phrases?.length ? options.phrases : PHRASES;
3900
+ const waiting = phase === "waiting";
3901
+ const phrases = options?.phrases?.length ? options.phrases : waiting ? WAITING_PHRASES : PHRASES;
3899
3902
  const theme = useThemeType(void 0);
3900
3903
  const [phrase, setPhrase] = useState7(0);
3901
3904
  const [showDetails, setShowDetails] = useState7(false);
@@ -3910,7 +3913,7 @@ function GenieLoading({
3910
3913
  const timer = window.setInterval(update, 5e3);
3911
3914
  return () => window.clearInterval(timer);
3912
3915
  }, [startedAt, phrases]);
3913
- if (options?.render) return options.render({ startedAt, detailsOpen, onShowDetails });
3916
+ if (options?.render) return options.render({ startedAt, phase, detailsOpen, onShowDetails });
3914
3917
  return /* @__PURE__ */ jsxs6("div", { className: "og-genie-loading", children: [
3915
3918
  /* @__PURE__ */ jsx8(
3916
3919
  "div",
@@ -3926,8 +3929,8 @@ function GenieLoading({
3926
3929
  }
3927
3930
  ),
3928
3931
  /* @__PURE__ */ jsxs6("div", { className: "og-genie-copy", children: [
3929
- /* @__PURE__ */ jsx8("span", { className: "sr-only", role: "status", children: slow ? options?.messages?.slowStatus ?? "Preparing your task. Taking longer than usual." : options?.messages?.status ?? "Preparing your task." }),
3930
- /* @__PURE__ */ jsx8("span", { className: "og-genie-phrase", "aria-hidden": "true", children: slow ? options?.messages?.slowText ?? "A little longer than usual\u2026" : phrases[phrase % phrases.length] }, slow ? "slow" : phrase),
3932
+ /* @__PURE__ */ jsx8("span", { className: "sr-only", role: "status", children: slow ? options?.messages?.slowStatus ?? (waiting ? "Waiting for a response. Taking longer than usual." : "Preparing your task. Taking longer than usual.") : options?.messages?.status ?? (waiting ? "Waiting for a response." : "Preparing your task.") }),
3933
+ /* @__PURE__ */ jsx8("span", { className: "og-genie-phrase", "aria-hidden": "true", children: slow ? options?.messages?.slowText ?? (waiting ? "Still waiting for a response\u2026" : "A little longer than usual\u2026") : phrases[phrase % phrases.length] }, slow ? "slow" : phrase),
3931
3934
  showDetails || detailsOpen ? /* @__PURE__ */ jsxs6(
3932
3935
  "button",
3933
3936
  {
@@ -3936,7 +3939,7 @@ function GenieLoading({
3936
3939
  "aria-expanded": detailsOpen,
3937
3940
  onClick: onShowDetails,
3938
3941
  children: [
3939
- detailsOpen ? options?.messages?.hideDetails ?? "Hide details" : options?.messages?.showDetails ?? "Behind the magic",
3942
+ detailsOpen ? options?.messages?.hideDetails ?? "Hide details" : options?.messages?.showDetails ?? (waiting ? "Show details" : "Behind the magic"),
3940
3943
  /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: " \u2197" })
3941
3944
  ]
3942
3945
  }
@@ -4022,7 +4025,8 @@ function ActivityRail({
4022
4025
  const providerResponded = phases.some(
4023
4026
  (item) => item.phase === "provider_first_byte" && item.status === "complete"
4024
4027
  );
4025
- const preparing = !hasWork && !interrupted && (startupActive ?? (!providerResponded && phases.some((item) => item.status === "running")));
4028
+ const responsePending = phases.some((item) => item.phase === "provider_first_byte");
4029
+ const loading = !hasWork && !interrupted && (startupActive ?? (!providerResponded && phases.some((item) => item.status === "running")));
4026
4030
  const visibleItems = debug || detailsOpen ? items : items.filter(
4027
4031
  (item) => item.kind === "startup-phase" ? item.status === "failed" || item.status === "cancelled" : item.kind !== "reasoning" || item.text.trim().length > 0
4028
4032
  );
@@ -4070,7 +4074,7 @@ function ActivityRail({
4070
4074
  className
4071
4075
  ),
4072
4076
  children: [
4073
- /* @__PURE__ */ jsx10(AnimatePresence, { initial: false, children: preparing && !debug ? /* @__PURE__ */ jsx10(
4077
+ /* @__PURE__ */ jsx10(AnimatePresence, { initial: false, children: loading && !debug ? /* @__PURE__ */ jsx10(
4074
4078
  motion.div,
4075
4079
  {
4076
4080
  initial: { opacity: 0 },
@@ -4089,6 +4093,7 @@ function ActivityRail({
4089
4093
  GenieLoading,
4090
4094
  {
4091
4095
  startedAt,
4096
+ phase: responsePending ? "waiting" : "preparing",
4092
4097
  detailsOpen,
4093
4098
  onShowDetails: () => setDetailsOpen((open) => !open)
4094
4099
  }
@@ -4096,7 +4101,7 @@ function ActivityRail({
4096
4101
  },
4097
4102
  "startup"
4098
4103
  ) : null }),
4099
- detailsOpen && !debug && !preparing ? /* @__PURE__ */ jsx10(
4104
+ detailsOpen && !debug && !loading ? /* @__PURE__ */ jsx10(
4100
4105
  "button",
4101
4106
  {
4102
4107
  type: "button",
@@ -12187,4 +12192,4 @@ export {
12187
12192
  SessionCommands,
12188
12193
  StartupTimings
12189
12194
  };
12190
- //# sourceMappingURL=chunk-FNWQBQOK.js.map
12195
+ //# sourceMappingURL=chunk-55JRUWOA.js.map