@opengeni/react 7.5.0-canary.36919050519001 → 7.5.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.
@@ -3889,16 +3889,13 @@ 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"];
3893
3892
  function GenieLoading({
3894
3893
  startedAt,
3895
- phase = "preparing",
3896
3894
  onShowDetails,
3897
3895
  detailsOpen = false
3898
3896
  }) {
3899
3897
  const options = useContext4(GenieLoadingOptionsContext);
3900
- const waiting = phase === "waiting";
3901
- const phrases = options?.phrases?.length ? options.phrases : waiting ? WAITING_PHRASES : PHRASES;
3898
+ const phrases = options?.phrases?.length ? options.phrases : PHRASES;
3902
3899
  const theme = useThemeType(void 0);
3903
3900
  const [phrase, setPhrase] = useState7(0);
3904
3901
  const [showDetails, setShowDetails] = useState7(false);
@@ -3913,7 +3910,7 @@ function GenieLoading({
3913
3910
  const timer = window.setInterval(update, 5e3);
3914
3911
  return () => window.clearInterval(timer);
3915
3912
  }, [startedAt, phrases]);
3916
- if (options?.render) return options.render({ startedAt, phase, detailsOpen, onShowDetails });
3913
+ if (options?.render) return options.render({ startedAt, detailsOpen, onShowDetails });
3917
3914
  return /* @__PURE__ */ jsxs6("div", { className: "og-genie-loading", children: [
3918
3915
  /* @__PURE__ */ jsx8(
3919
3916
  "div",
@@ -3929,8 +3926,8 @@ function GenieLoading({
3929
3926
  }
3930
3927
  ),
3931
3928
  /* @__PURE__ */ jsxs6("div", { className: "og-genie-copy", children: [
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),
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),
3934
3931
  showDetails || detailsOpen ? /* @__PURE__ */ jsxs6(
3935
3932
  "button",
3936
3933
  {
@@ -3939,7 +3936,7 @@ function GenieLoading({
3939
3936
  "aria-expanded": detailsOpen,
3940
3937
  onClick: onShowDetails,
3941
3938
  children: [
3942
- detailsOpen ? options?.messages?.hideDetails ?? "Hide details" : options?.messages?.showDetails ?? (waiting ? "Show details" : "Behind the magic"),
3939
+ detailsOpen ? options?.messages?.hideDetails ?? "Hide details" : options?.messages?.showDetails ?? "Behind the magic",
3943
3940
  /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: " \u2197" })
3944
3941
  ]
3945
3942
  }
@@ -4025,8 +4022,7 @@ function ActivityRail({
4025
4022
  const providerResponded = phases.some(
4026
4023
  (item) => item.phase === "provider_first_byte" && item.status === "complete"
4027
4024
  );
4028
- const responsePending = phases.some((item) => item.phase === "provider_first_byte");
4029
- const loading = !hasWork && !interrupted && (startupActive ?? (!providerResponded && phases.some((item) => item.status === "running")));
4025
+ const preparing = !hasWork && !interrupted && (startupActive ?? (!providerResponded && phases.some((item) => item.status === "running")));
4030
4026
  const visibleItems = debug || detailsOpen ? items : items.filter(
4031
4027
  (item) => item.kind === "startup-phase" ? item.status === "failed" || item.status === "cancelled" : item.kind !== "reasoning" || item.text.trim().length > 0
4032
4028
  );
@@ -4074,7 +4070,7 @@ function ActivityRail({
4074
4070
  className
4075
4071
  ),
4076
4072
  children: [
4077
- /* @__PURE__ */ jsx10(AnimatePresence, { initial: false, children: loading && !debug ? /* @__PURE__ */ jsx10(
4073
+ /* @__PURE__ */ jsx10(AnimatePresence, { initial: false, children: preparing && !debug ? /* @__PURE__ */ jsx10(
4078
4074
  motion.div,
4079
4075
  {
4080
4076
  initial: { opacity: 0 },
@@ -4093,7 +4089,6 @@ function ActivityRail({
4093
4089
  GenieLoading,
4094
4090
  {
4095
4091
  startedAt,
4096
- phase: responsePending ? "waiting" : "preparing",
4097
4092
  detailsOpen,
4098
4093
  onShowDetails: () => setDetailsOpen((open) => !open)
4099
4094
  }
@@ -4101,7 +4096,7 @@ function ActivityRail({
4101
4096
  },
4102
4097
  "startup"
4103
4098
  ) : null }),
4104
- detailsOpen && !debug && !loading ? /* @__PURE__ */ jsx10(
4099
+ detailsOpen && !debug && !preparing ? /* @__PURE__ */ jsx10(
4105
4100
  "button",
4106
4101
  {
4107
4102
  type: "button",
@@ -12192,4 +12187,4 @@ export {
12192
12187
  SessionCommands,
12193
12188
  StartupTimings
12194
12189
  };
12195
- //# sourceMappingURL=chunk-NBOHNRLJ.js.map
12190
+ //# sourceMappingURL=chunk-FNWQBQOK.js.map