@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.
|
@@ -11807,14 +11807,66 @@ var AGENT_CONVERSATION_MODEL_SCHEMA = z.toJSONSchema(
|
|
|
11807
11807
|
AgentConversationModelSchema,
|
|
11808
11808
|
{ io: "input" }
|
|
11809
11809
|
);
|
|
11810
|
+
function AgentConversationSkeleton({ label }) {
|
|
11811
|
+
return /* @__PURE__ */ jsxs(
|
|
11812
|
+
"div",
|
|
11813
|
+
{
|
|
11814
|
+
role: "status",
|
|
11815
|
+
"aria-label": label,
|
|
11816
|
+
"aria-busy": "true",
|
|
11817
|
+
"data-conversation-loading": "true",
|
|
11818
|
+
className: "flex h-full min-h-0 w-full flex-col gap-6 overflow-hidden p-4 sm:p-6",
|
|
11819
|
+
children: [
|
|
11820
|
+
/* @__PURE__ */ jsxs(
|
|
11821
|
+
"div",
|
|
11822
|
+
{
|
|
11823
|
+
"aria-hidden": "true",
|
|
11824
|
+
className: "mx-auto flex w-full max-w-5xl min-h-0 flex-1 flex-col gap-8",
|
|
11825
|
+
children: [
|
|
11826
|
+
/* @__PURE__ */ jsx(
|
|
11827
|
+
BaseSkeleton,
|
|
11828
|
+
{
|
|
11829
|
+
variant: "block",
|
|
11830
|
+
className: "h-12 w-1/3 shrink-0 self-end"
|
|
11831
|
+
}
|
|
11832
|
+
),
|
|
11833
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-2/3 flex-col gap-3", children: [
|
|
11834
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { variant: "circle", className: "size-8" }),
|
|
11835
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { className: "w-full" }),
|
|
11836
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { className: "w-4/5" }),
|
|
11837
|
+
/* @__PURE__ */ jsx(BaseSkeleton, { className: "w-3/5" })
|
|
11838
|
+
] })
|
|
11839
|
+
]
|
|
11840
|
+
}
|
|
11841
|
+
),
|
|
11842
|
+
/* @__PURE__ */ jsx(
|
|
11843
|
+
"div",
|
|
11844
|
+
{
|
|
11845
|
+
"aria-hidden": "true",
|
|
11846
|
+
"data-slot": "composer",
|
|
11847
|
+
className: "mx-auto w-full max-w-5xl shrink-0",
|
|
11848
|
+
children: /* @__PURE__ */ jsx(BaseSkeleton, { variant: "block", className: "h-32 w-full rounded-2xl" })
|
|
11849
|
+
}
|
|
11850
|
+
)
|
|
11851
|
+
]
|
|
11852
|
+
}
|
|
11853
|
+
);
|
|
11854
|
+
}
|
|
11810
11855
|
var AgentConversationRuntimeContext = createContext(null);
|
|
11811
11856
|
function AgentConversationCapabilityRenderer(context) {
|
|
11812
11857
|
const Runtime = useContext(AgentConversationRuntimeContext);
|
|
11813
11858
|
if (!context.access.allowed)
|
|
11814
11859
|
return /* @__PURE__ */ jsx(CapabilityStatus, { kind: "forbidden", translate: context.translate });
|
|
11815
|
-
if (context.loading && !context.readOnly)
|
|
11816
|
-
return /* @__PURE__ */ jsx(CapabilityStatus, { kind: "loading", translate: context.translate });
|
|
11817
11860
|
const parsed = AgentConversationModelSchema.safeParse(context.model);
|
|
11861
|
+
if (context.loading && !parsed.success)
|
|
11862
|
+
return /* @__PURE__ */ jsx(
|
|
11863
|
+
AgentConversationSkeleton,
|
|
11864
|
+
{
|
|
11865
|
+
label: context.translate(
|
|
11866
|
+
DESIGN_CAPABILITY_I18N_KEYS.status.loading.title
|
|
11867
|
+
)
|
|
11868
|
+
}
|
|
11869
|
+
);
|
|
11818
11870
|
if (!parsed.success || !Runtime)
|
|
11819
11871
|
return /* @__PURE__ */ jsx(
|
|
11820
11872
|
CapabilityStatus,
|
|
@@ -11826,19 +11878,27 @@ function AgentConversationCapabilityRenderer(context) {
|
|
|
11826
11878
|
);
|
|
11827
11879
|
const model = parsed.data;
|
|
11828
11880
|
return /* @__PURE__ */ jsx(
|
|
11829
|
-
|
|
11881
|
+
"div",
|
|
11830
11882
|
{
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11883
|
+
className: "contents",
|
|
11884
|
+
"aria-busy": context.loading === true,
|
|
11885
|
+
...context.loading ? { inert: "" } : {},
|
|
11886
|
+
children: /* @__PURE__ */ jsx(
|
|
11887
|
+
Runtime,
|
|
11888
|
+
{
|
|
11889
|
+
...model,
|
|
11890
|
+
sessionId: model.sessionId ?? "",
|
|
11891
|
+
readOnly: context.readOnly === true,
|
|
11892
|
+
onSessionStarted: context.readOnly ? void 0 : (sessionId) => context.emitIntent("sessionStarted", { sessionId }),
|
|
11893
|
+
onContinue: context.readOnly || context.loading ? void 0 : (messageId, runId) => context.emitIntent(
|
|
11894
|
+
"continue",
|
|
11895
|
+
{ messageId, runId },
|
|
11896
|
+
{ awaitCompletion: true }
|
|
11897
|
+
)
|
|
11898
|
+
},
|
|
11899
|
+
model.agentId
|
|
11839
11900
|
)
|
|
11840
|
-
}
|
|
11841
|
-
model.agentId
|
|
11901
|
+
}
|
|
11842
11902
|
);
|
|
11843
11903
|
}
|
|
11844
11904
|
var VERSION = "1";
|