@inf-monkeys-tech/monkeys-design 2.0.118 → 2.0.120
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.
|
@@ -11840,14 +11840,66 @@ var AGENT_CONVERSATION_MODEL_SCHEMA = zod.z.toJSONSchema(
|
|
|
11840
11840
|
AgentConversationModelSchema,
|
|
11841
11841
|
{ io: "input" }
|
|
11842
11842
|
);
|
|
11843
|
+
function AgentConversationSkeleton({ label }) {
|
|
11844
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11845
|
+
"div",
|
|
11846
|
+
{
|
|
11847
|
+
role: "status",
|
|
11848
|
+
"aria-label": label,
|
|
11849
|
+
"aria-busy": "true",
|
|
11850
|
+
"data-conversation-loading": "true",
|
|
11851
|
+
className: "flex h-full min-h-0 w-full flex-col gap-6 overflow-hidden p-4 sm:p-6",
|
|
11852
|
+
children: [
|
|
11853
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11854
|
+
"div",
|
|
11855
|
+
{
|
|
11856
|
+
"aria-hidden": "true",
|
|
11857
|
+
className: "mx-auto flex w-full max-w-5xl min-h-0 flex-1 flex-col gap-8",
|
|
11858
|
+
children: [
|
|
11859
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11860
|
+
BaseSkeleton,
|
|
11861
|
+
{
|
|
11862
|
+
variant: "block",
|
|
11863
|
+
className: "h-12 w-1/3 shrink-0 self-end"
|
|
11864
|
+
}
|
|
11865
|
+
),
|
|
11866
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-2/3 flex-col gap-3", children: [
|
|
11867
|
+
/* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { variant: "circle", className: "size-8" }),
|
|
11868
|
+
/* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { className: "w-full" }),
|
|
11869
|
+
/* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { className: "w-4/5" }),
|
|
11870
|
+
/* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { className: "w-3/5" })
|
|
11871
|
+
] })
|
|
11872
|
+
]
|
|
11873
|
+
}
|
|
11874
|
+
),
|
|
11875
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11876
|
+
"div",
|
|
11877
|
+
{
|
|
11878
|
+
"aria-hidden": "true",
|
|
11879
|
+
"data-slot": "composer",
|
|
11880
|
+
className: "mx-auto w-full max-w-5xl shrink-0",
|
|
11881
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { variant: "block", className: "h-32 w-full rounded-2xl" })
|
|
11882
|
+
}
|
|
11883
|
+
)
|
|
11884
|
+
]
|
|
11885
|
+
}
|
|
11886
|
+
);
|
|
11887
|
+
}
|
|
11843
11888
|
var AgentConversationRuntimeContext = React8.createContext(null);
|
|
11844
11889
|
function AgentConversationCapabilityRenderer(context) {
|
|
11845
11890
|
const Runtime = React8.useContext(AgentConversationRuntimeContext);
|
|
11846
11891
|
if (!context.access.allowed)
|
|
11847
11892
|
return /* @__PURE__ */ jsxRuntime.jsx(CapabilityStatus, { kind: "forbidden", translate: context.translate });
|
|
11848
|
-
if (context.loading && !context.readOnly)
|
|
11849
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CapabilityStatus, { kind: "loading", translate: context.translate });
|
|
11850
11893
|
const parsed = AgentConversationModelSchema.safeParse(context.model);
|
|
11894
|
+
if (context.loading && !parsed.success)
|
|
11895
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11896
|
+
AgentConversationSkeleton,
|
|
11897
|
+
{
|
|
11898
|
+
label: context.translate(
|
|
11899
|
+
DESIGN_CAPABILITY_I18N_KEYS.status.loading.title
|
|
11900
|
+
)
|
|
11901
|
+
}
|
|
11902
|
+
);
|
|
11851
11903
|
if (!parsed.success || !Runtime)
|
|
11852
11904
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11853
11905
|
CapabilityStatus,
|
|
@@ -11859,19 +11911,27 @@ function AgentConversationCapabilityRenderer(context) {
|
|
|
11859
11911
|
);
|
|
11860
11912
|
const model = parsed.data;
|
|
11861
11913
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11862
|
-
|
|
11914
|
+
"div",
|
|
11863
11915
|
{
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11916
|
+
className: "contents",
|
|
11917
|
+
"aria-busy": context.loading === true,
|
|
11918
|
+
...context.loading ? { inert: "" } : {},
|
|
11919
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11920
|
+
Runtime,
|
|
11921
|
+
{
|
|
11922
|
+
...model,
|
|
11923
|
+
sessionId: model.sessionId ?? "",
|
|
11924
|
+
readOnly: context.readOnly === true,
|
|
11925
|
+
onSessionStarted: context.readOnly ? void 0 : (sessionId) => context.emitIntent("sessionStarted", { sessionId }),
|
|
11926
|
+
onContinue: context.readOnly || context.loading ? void 0 : (messageId, runId) => context.emitIntent(
|
|
11927
|
+
"continue",
|
|
11928
|
+
{ messageId, runId },
|
|
11929
|
+
{ awaitCompletion: true }
|
|
11930
|
+
)
|
|
11931
|
+
},
|
|
11932
|
+
model.agentId
|
|
11872
11933
|
)
|
|
11873
|
-
}
|
|
11874
|
-
model.agentId
|
|
11934
|
+
}
|
|
11875
11935
|
);
|
|
11876
11936
|
}
|
|
11877
11937
|
var VERSION = "1";
|