@smarter.sh/ui-chat 0.2.5 → 0.2.7
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/smarter-chat-library.es.js +13 -11
- package/dist/smarter-chat-library.es.js.map +1 -1
- package/dist/smarter-chat-library.umd.js +2 -2
- package/dist/smarter-chat-library.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SmarterChat/Component.jsx +36 -32
- package/src/components/SmarterChat/api.js +7 -7
|
@@ -10552,13 +10552,15 @@ const mi = rn.div`
|
|
|
10552
10552
|
ct.TOOL
|
|
10553
10553
|
], Is = !1, Ub = "SmarterChat/1.0", Xo = "application/json";
|
|
10554
10554
|
function rr(e, t = null) {
|
|
10555
|
+
console.log("getCookie(): cookie", e);
|
|
10555
10556
|
let r = null;
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10557
|
+
const n = e.domain;
|
|
10558
|
+
if (window.location.hostname === n && document.cookie && document.cookie !== "") {
|
|
10559
|
+
const a = document.cookie.split(";");
|
|
10560
|
+
for (let o = 0; o < a.length; o++) {
|
|
10561
|
+
const i = a[o].trim();
|
|
10562
|
+
if (i.substring(0, e.name.length + 1) === e.name + "=") {
|
|
10563
|
+
r = decodeURIComponent(i.substring(e.name.length + 1)), console.log("getCookie(): ", e.domain, e.name, r);
|
|
10562
10564
|
break;
|
|
10563
10565
|
}
|
|
10564
10566
|
}
|
|
@@ -10739,22 +10741,22 @@ function lv({
|
|
|
10739
10741
|
// NOT USED. TO DELETE.
|
|
10740
10742
|
toggleMetadata: r,
|
|
10741
10743
|
// show/hide toggle button to show/hide the chat thread metadata
|
|
10742
|
-
csrfCookieName: n,
|
|
10744
|
+
csrfCookieName: n = "csrftoken",
|
|
10743
10745
|
// the Django CSRF cookie.
|
|
10744
10746
|
debugCookieName: a,
|
|
10745
10747
|
// the Smarter chat debug cookie. Set here.
|
|
10746
10748
|
debugCookieExpiration: o,
|
|
10747
10749
|
// the Smarter chat debug cookie. Set here.
|
|
10748
|
-
sessionCookieName: i,
|
|
10750
|
+
sessionCookieName: i = "session_key",
|
|
10749
10751
|
// the Smarter chat session cookie. Set here, where the user creates a new chat session.
|
|
10750
10752
|
sessionCookieExpiration: s,
|
|
10751
10753
|
// the Smarter chat session cookie. Set here, where the user creates a new chat session.
|
|
10752
|
-
authSessionCookieName: c,
|
|
10754
|
+
authSessionCookieName: c = "sessionid",
|
|
10753
10755
|
// the Django session cookie. Set when the user logs in to the Smarter web console app.
|
|
10754
10756
|
showConsole: l = !0,
|
|
10755
10757
|
// show the server console log component
|
|
10756
10758
|
cookieDomain: u
|
|
10757
|
-
// the domain of the cookie. This is added to the cookie meta data
|
|
10759
|
+
// the domain of the cookie. This is added to the cookie meta data to restrict the domain that this component will read cookie data.
|
|
10758
10760
|
}) {
|
|
10759
10761
|
const [h, v] = Me(e), [g, _] = Me(r), [w, I] = Me(!1), [$, P] = Me({}), [z, f] = Me(""), [E, L] = Me(""), [F, K] = Me(""), [j, R] = Me(!1), [B, J] = Me(""), [x, de] = Me(""), [ne, M] = Me(!1), [se, ge] = Me(!1), [pe, A] = Me(av), [q, X] = Me([]), [re, ee] = Me(!1), [ce, U] = Me(!1), [Q, te] = Me(""), [ae, le] = Me(""), Ce = Vt(null), G = Mr(n, null, u), je = Mr(c, null, u), Xe = Mr(i, s, u), nt = Mr(a, o, u), rt = {
|
|
10760
10762
|
authTokenCookie: je,
|
|
@@ -10928,7 +10930,7 @@ function lv({
|
|
|
10928
10930
|
l && /* @__PURE__ */ he(qb, { children: /* @__PURE__ */ he(Bc, { config: $ }) })
|
|
10929
10931
|
] }) }) }) });
|
|
10930
10932
|
}
|
|
10931
|
-
const uv = "0.2.
|
|
10933
|
+
const uv = "0.2.7";
|
|
10932
10934
|
export {
|
|
10933
10935
|
Fs as ConfigPropTypes,
|
|
10934
10936
|
Bc as Console,
|