@prodact.ai/sdk 0.0.9 → 0.0.10
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/cdn/sdk.global.js +1 -1
- package/dist/cdn/sdk.global.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +78 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +78 -2
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -1987,11 +1987,13 @@ Check the Network tab in DevTools for more details.`
|
|
|
1987
1987
|
role: "assistant",
|
|
1988
1988
|
content: result.message?.content || result.response || "",
|
|
1989
1989
|
visualFlows: result.flows || [],
|
|
1990
|
-
images: result.images || []
|
|
1990
|
+
images: result.images || [],
|
|
1991
|
+
userFlows: result.userFlows || []
|
|
1991
1992
|
};
|
|
1992
1993
|
await this.log("info", "Chat response received", {
|
|
1993
1994
|
hasFlows: (result.flows || []).length > 0,
|
|
1994
|
-
hasImages: (result.images || []).length > 0
|
|
1995
|
+
hasImages: (result.images || []).length > 0,
|
|
1996
|
+
hasUserFlows: (result.userFlows || []).length > 0
|
|
1995
1997
|
});
|
|
1996
1998
|
this.emit("message", chatMessage);
|
|
1997
1999
|
return chatMessage;
|
|
@@ -3504,6 +3506,80 @@ function ProduckChat({
|
|
|
3504
3506
|
]
|
|
3505
3507
|
},
|
|
3506
3508
|
imgIdx
|
|
3509
|
+
)) }),
|
|
3510
|
+
msg.userFlows && msg.userFlows.length > 0 && /* @__PURE__ */ jsx3("div", { style: { marginTop: "12px" }, children: msg.userFlows.filter((uf) => uf.hasReplay).slice(0, 2).map((userFlow, ufIdx) => /* @__PURE__ */ jsxs2(
|
|
3511
|
+
"div",
|
|
3512
|
+
{
|
|
3513
|
+
style: {
|
|
3514
|
+
marginTop: ufIdx > 0 ? "8px" : 0,
|
|
3515
|
+
padding: "12px",
|
|
3516
|
+
borderRadius: "8px",
|
|
3517
|
+
border: `1px solid ${isDark ? "#374151" : "#e5e7eb"}`,
|
|
3518
|
+
backgroundColor: isDark ? "#1f2937" : "#f9fafb"
|
|
3519
|
+
},
|
|
3520
|
+
children: [
|
|
3521
|
+
/* @__PURE__ */ jsxs2("div", { style: {
|
|
3522
|
+
display: "flex",
|
|
3523
|
+
alignItems: "center",
|
|
3524
|
+
justifyContent: "space-between",
|
|
3525
|
+
marginBottom: "8px"
|
|
3526
|
+
}, children: [
|
|
3527
|
+
/* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3528
|
+
/* @__PURE__ */ jsx3("span", { style: { fontSize: "16px" }, children: "\u{1F3AC}" }),
|
|
3529
|
+
/* @__PURE__ */ jsx3("span", { style: {
|
|
3530
|
+
fontWeight: 600,
|
|
3531
|
+
fontSize: "13px",
|
|
3532
|
+
color: isDark ? "#f3f4f6" : "#111827"
|
|
3533
|
+
}, children: userFlow.title })
|
|
3534
|
+
] }),
|
|
3535
|
+
/* @__PURE__ */ jsxs2("span", { style: {
|
|
3536
|
+
fontSize: "11px",
|
|
3537
|
+
padding: "2px 6px",
|
|
3538
|
+
backgroundColor: primaryColor + "20",
|
|
3539
|
+
color: primaryColor,
|
|
3540
|
+
borderRadius: "4px"
|
|
3541
|
+
}, children: [
|
|
3542
|
+
userFlow.eventCount,
|
|
3543
|
+
" steps"
|
|
3544
|
+
] })
|
|
3545
|
+
] }),
|
|
3546
|
+
/* @__PURE__ */ jsx3("p", { style: {
|
|
3547
|
+
fontSize: "12px",
|
|
3548
|
+
color: isDark ? "#9ca3af" : "#6b7280",
|
|
3549
|
+
marginBottom: "10px",
|
|
3550
|
+
lineHeight: 1.4
|
|
3551
|
+
}, children: userFlow.description }),
|
|
3552
|
+
/* @__PURE__ */ jsxs2(
|
|
3553
|
+
"button",
|
|
3554
|
+
{
|
|
3555
|
+
onClick: () => {
|
|
3556
|
+
const replayUrl = `${window.location.origin}/recordings/${userFlow.recordingId}`;
|
|
3557
|
+
window.open(replayUrl, "_blank", "width=1200,height=800");
|
|
3558
|
+
},
|
|
3559
|
+
style: {
|
|
3560
|
+
display: "flex",
|
|
3561
|
+
alignItems: "center",
|
|
3562
|
+
gap: "6px",
|
|
3563
|
+
padding: "8px 12px",
|
|
3564
|
+
backgroundColor: primaryColor,
|
|
3565
|
+
color: "#fff",
|
|
3566
|
+
border: "none",
|
|
3567
|
+
borderRadius: "6px",
|
|
3568
|
+
fontSize: "12px",
|
|
3569
|
+
fontWeight: 500,
|
|
3570
|
+
cursor: "pointer",
|
|
3571
|
+
width: "100%",
|
|
3572
|
+
justifyContent: "center"
|
|
3573
|
+
},
|
|
3574
|
+
children: [
|
|
3575
|
+
/* @__PURE__ */ jsx3("span", { children: "\u25B6\uFE0F" }),
|
|
3576
|
+
/* @__PURE__ */ jsx3("span", { children: "Watch Session Replay" })
|
|
3577
|
+
]
|
|
3578
|
+
}
|
|
3579
|
+
)
|
|
3580
|
+
]
|
|
3581
|
+
},
|
|
3582
|
+
userFlow.id || ufIdx
|
|
3507
3583
|
)) })
|
|
3508
3584
|
]
|
|
3509
3585
|
}
|