@opengeni/react 7.5.0-canary.36927100590001 → 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.
- package/dist/{chunk-NBOHNRLJ.js → chunk-FNWQBQOK.js} +9 -14
- package/dist/chunk-FNWQBQOK.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/session-ui.js +1 -1
- package/dist/timeline/genie-loading.d.ts +1 -3
- package/package.json +3 -3
- package/src/timeline/activity-rail.tsx +3 -5
- package/src/timeline/genie-loading.tsx +6 -16
- package/dist/chunk-NBOHNRLJ.js.map +0 -1
|
@@ -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
|
|
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,
|
|
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 ??
|
|
3933
|
-
/* @__PURE__ */ jsx8("span", { className: "og-genie-phrase", "aria-hidden": "true", children: slow ? options?.messages?.slowText ??
|
|
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 ??
|
|
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
|
|
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:
|
|
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 && !
|
|
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-
|
|
12190
|
+
//# sourceMappingURL=chunk-FNWQBQOK.js.map
|