@webless/agent 0.10.2 → 0.10.3
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-Q7H4RRS4.js → chunk-74CSWSC5.js} +39 -30
- package/dist/chunk-74CSWSC5.js.map +1 -0
- package/dist/embed.cjs +38 -29
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.css +86 -130
- package/dist/embed.css.map +1 -1
- package/dist/embed.js +1 -1
- package/dist/react.cjs +38 -29
- package/dist/react.cjs.map +1 -1
- package/dist/react.css +86 -130
- package/dist/react.css.map +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-Q7H4RRS4.js.map +0 -1
package/dist/embed.cjs
CHANGED
|
@@ -3790,6 +3790,7 @@ function joinLabels(labels) {
|
|
|
3790
3790
|
if (labels.length === 2) return `${labels[0]} and ${labels[1]}`;
|
|
3791
3791
|
return `${labels.slice(0, -1).join(", ")} and ${labels.at(-1) ?? ""}`;
|
|
3792
3792
|
}
|
|
3793
|
+
var AGENT_SOFT_REVIEW_STATUS = "Reviewing your details to find the best approach";
|
|
3793
3794
|
function workSummary(steps, failed, brandLabel) {
|
|
3794
3795
|
const activeTool = [...steps].reverse().find(
|
|
3795
3796
|
(step) => step.kind === "tool" && step.state === "active"
|
|
@@ -3804,7 +3805,7 @@ function workSummary(steps, failed, brandLabel) {
|
|
|
3804
3805
|
)}`;
|
|
3805
3806
|
const active = [...steps].reverse().find((step) => step.state === "active");
|
|
3806
3807
|
if (active?.kind === "search") return "Searching this site";
|
|
3807
|
-
if (active) return
|
|
3808
|
+
if (active) return AGENT_SOFT_REVIEW_STATUS;
|
|
3808
3809
|
if (failed) return "Couldn\u2019t complete this request";
|
|
3809
3810
|
const hasError = steps.some((step) => step.state === "error");
|
|
3810
3811
|
const specialists = steps.filter(
|
|
@@ -3898,23 +3899,32 @@ function AgentActivityBubble({
|
|
|
3898
3899
|
onRetryStep
|
|
3899
3900
|
}) {
|
|
3900
3901
|
const active = steps.some((step) => step.state === "active");
|
|
3902
|
+
const statusText = workSummary(steps, failed, brandLabel);
|
|
3903
|
+
const softReview = statusText === AGENT_SOFT_REVIEW_STATUS;
|
|
3901
3904
|
const receiptId = steps.map((step) => step.id).join(":");
|
|
3902
3905
|
const [expandedReceiptId, setExpandedReceiptId] = (0, import_react5.useState)(
|
|
3903
3906
|
null
|
|
3904
3907
|
);
|
|
3905
3908
|
const detailsOpen = !active && expandedReceiptId === receiptId;
|
|
3906
3909
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: "agent-activity-bubble", children: [
|
|
3907
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
{
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3910
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
3911
|
+
"p",
|
|
3912
|
+
{
|
|
3913
|
+
className: `agent-activity-bubble__status${softReview ? " agent-activity-bubble__status--soft" : ""}`,
|
|
3914
|
+
"aria-live": "polite",
|
|
3915
|
+
children: [
|
|
3916
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3917
|
+
"span",
|
|
3918
|
+
{
|
|
3919
|
+
className: `agent-activity-bubble__pulse${active ? " is-active" : failed ? " is-error" : ""}`,
|
|
3920
|
+
"aria-hidden": "true"
|
|
3921
|
+
}
|
|
3922
|
+
),
|
|
3923
|
+
statusText,
|
|
3924
|
+
active ? "..." : ""
|
|
3925
|
+
]
|
|
3926
|
+
}
|
|
3927
|
+
),
|
|
3918
3928
|
!active ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "agent-activity-bubble__details", children: [
|
|
3919
3929
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3920
3930
|
"button",
|
|
@@ -4136,7 +4146,6 @@ function Composer({
|
|
|
4136
4146
|
if (form && form.id !== draft.form?.id) setDraft(createDraft(form));
|
|
4137
4147
|
const savedForm = allowFormResume && !draft.submitted ? draft.form : null;
|
|
4138
4148
|
const activeForm = !disabled && draft.expanded ? savedForm : null;
|
|
4139
|
-
const hasDraft = Object.values(draft.values).some((value2) => value2.trim());
|
|
4140
4149
|
const canSend = !disabled && Boolean(value.trim() || activeForm);
|
|
4141
4150
|
(0, import_react8.useEffect)(() => {
|
|
4142
4151
|
if (activeForm) firstFieldRef.current?.focus();
|
|
@@ -4252,14 +4261,14 @@ function Composer({
|
|
|
4252
4261
|
onSubmit: handleSubmit,
|
|
4253
4262
|
children: [
|
|
4254
4263
|
savedForm ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "composer__resume", children: [
|
|
4255
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children:
|
|
4264
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Share your details and we'll reach out shortly" }),
|
|
4256
4265
|
!activeForm ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4257
4266
|
"button",
|
|
4258
4267
|
{
|
|
4259
4268
|
type: "button",
|
|
4260
4269
|
disabled,
|
|
4261
4270
|
onClick: () => setDraft((current) => ({ ...current, expanded: true })),
|
|
4262
|
-
children:
|
|
4271
|
+
children: "Request follow-up"
|
|
4263
4272
|
}
|
|
4264
4273
|
) : null
|
|
4265
4274
|
] }) : null,
|
|
@@ -7067,7 +7076,11 @@ function AssistEdgeTab({
|
|
|
7067
7076
|
...brandForeground ? { "--as-visitor-text": brandForeground } : {},
|
|
7068
7077
|
...resolvedBorderColor ? { "--as-border": resolvedBorderColor } : {},
|
|
7069
7078
|
...fontFamily ? { "--as-font-display": fontFamily } : {},
|
|
7070
|
-
...pill ? {
|
|
7079
|
+
...pill ? {
|
|
7080
|
+
"--as-surface": "#ffffff",
|
|
7081
|
+
"--as-text": "#171717",
|
|
7082
|
+
backgroundColor: "#ffffff"
|
|
7083
|
+
} : resolvedSurfaceColor ? { "--as-surface": resolvedSurfaceColor } : {},
|
|
7071
7084
|
...!pill && resolvedTextColor ? { "--as-text": resolvedTextColor } : {},
|
|
7072
7085
|
colorScheme: chromeScheme
|
|
7073
7086
|
};
|
|
@@ -7084,23 +7097,19 @@ function AssistEdgeTab({
|
|
|
7084
7097
|
onClick: onOpen,
|
|
7085
7098
|
children: [
|
|
7086
7099
|
pill ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
7087
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
7100
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7088
7101
|
"span",
|
|
7089
7102
|
{
|
|
7090
7103
|
className: `assist-edge-tab__mark assist-edge-tab__mark--chip${mobile ? " assist-edge-tab__mark--mobile" : ""}`,
|
|
7091
7104
|
"aria-hidden": "true",
|
|
7092
|
-
children:
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
},
|
|
7101
|
-
markSourceKey
|
|
7102
|
-
)
|
|
7103
|
-
]
|
|
7105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7106
|
+
TabMarkIcon,
|
|
7107
|
+
{
|
|
7108
|
+
customIconUrl,
|
|
7109
|
+
logoUrl
|
|
7110
|
+
},
|
|
7111
|
+
markSourceKey
|
|
7112
|
+
)
|
|
7104
7113
|
}
|
|
7105
7114
|
),
|
|
7106
7115
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "assist-edge-tab__text", children: [
|