@useinsider/guido 3.2.0-beta.8209d6d → 3.2.0-beta.8220f9d
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/@types/config/schemas.js +38 -36
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +82 -71
- package/dist/components/organisms/chat/blueprint/BlueprintCard.vue.js +20 -0
- package/dist/components/organisms/chat/blueprint/BlueprintCard.vue2.js +20 -0
- package/dist/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue.js +23 -0
- package/dist/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue2.js +18 -0
- package/dist/components/organisms/chat/chatbox/ChatboxContainer.vue.js +18 -0
- package/dist/components/organisms/chat/chatbox/ChatboxContainer.vue2.js +16 -0
- package/dist/components/organisms/chat/chatbox/ChatboxPanel.vue.js +20 -0
- package/dist/components/organisms/chat/chatbox/ChatboxPanel.vue2.js +19 -0
- package/dist/components/organisms/chat/conversation/ChatConversation.vue.js +28 -0
- package/dist/components/organisms/chat/conversation/ChatConversation.vue2.js +20 -0
- package/dist/components/organisms/chat/conversation/ChatWelcome.vue.js +18 -0
- package/dist/components/organisms/chat/conversation/ChatWelcome.vue2.js +11 -0
- package/dist/components/organisms/chat/conversation/QuickActionChips.vue.js +22 -0
- package/dist/components/organisms/chat/conversation/QuickActionChips.vue2.js +42 -0
- package/dist/components/organisms/chat/input/ChatInput.vue.js +29 -0
- package/dist/components/organisms/chat/input/ChatInput.vue2.js +39 -0
- package/dist/components/organisms/chat/input/GuidoAgentSelector.vue.js +22 -0
- package/dist/components/organisms/chat/input/GuidoAgentSelector.vue2.js +29 -0
- package/dist/components/organisms/chat/messages/AiMessage.vue.js +26 -0
- package/dist/components/organisms/chat/messages/AiMessage.vue2.js +41 -0
- package/dist/components/organisms/chat/messages/AiMessageActions.vue.js +18 -0
- package/dist/components/organisms/chat/messages/AiMessageActions.vue2.js +27 -0
- package/dist/components/organisms/chat/messages/ChatLoading.vue.js +18 -0
- package/dist/components/organisms/chat/messages/ChatLoading.vue2.js +30 -0
- package/dist/components/organisms/chat/messages/ChatMessages.vue.js +26 -0
- package/dist/components/organisms/chat/messages/ChatMessages.vue2.js +67 -0
- package/dist/components/organisms/chat/messages/UserMessage.vue.js +18 -0
- package/dist/components/organisms/chat/messages/UserMessage.vue2.js +26 -0
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useChatState.js +130 -0
- package/dist/composables/useChatStreaming.js +191 -0
- package/dist/composables/useConversationEvents.js +37 -0
- package/dist/composables/useEmailTemplateApplier.js +41 -0
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +34 -27
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/core/index.js +127 -0
- package/dist/node_modules/@vueuse/shared/index.js +68 -27
- package/dist/node_modules/dompurify/dist/purify.es.js +595 -0
- package/dist/node_modules/marked/lib/marked.esm.js +1152 -0
- package/dist/services/chatService.js +163 -0
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/@types/chat.d.ts +138 -0
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/Guido.vue.d.ts +4 -0
- package/dist/src/components/organisms/chat/blueprint/BlueprintCard.vue.d.ts +38 -0
- package/dist/src/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue.d.ts +35 -0
- package/dist/src/components/organisms/chat/chatbox/ChatboxContainer.vue.d.ts +4 -0
- package/dist/src/components/organisms/chat/chatbox/ChatboxPanel.vue.d.ts +4 -0
- package/dist/src/components/organisms/chat/conversation/ChatConversation.vue.d.ts +31 -0
- package/dist/src/components/organisms/chat/conversation/ChatWelcome.vue.d.ts +2 -0
- package/dist/src/components/organisms/chat/conversation/QuickActionChips.vue.d.ts +30 -0
- package/dist/src/components/organisms/chat/input/ChatInput.vue.d.ts +37 -0
- package/dist/src/components/organisms/chat/input/GuidoAgentSelector.vue.d.ts +2 -0
- package/dist/src/components/organisms/chat/messages/AiMessage.vue.d.ts +33 -0
- package/dist/src/components/organisms/chat/messages/AiMessageActions.vue.d.ts +18 -0
- package/dist/src/components/organisms/chat/messages/ChatLoading.vue.d.ts +32 -0
- package/dist/src/components/organisms/chat/messages/ChatMessages.vue.d.ts +37 -0
- package/dist/src/components/organisms/chat/messages/UserMessage.vue.d.ts +35 -0
- package/dist/src/composables/useChatState.d.ts +26 -0
- package/dist/src/composables/useChatStreaming.d.ts +26 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useConversationEvents.d.ts +19 -0
- package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/services/chatService.d.ts +16 -0
- package/dist/src/stores/chat.d.ts +323 -0
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/editor.d.ts +23 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/utils/generateId.d.ts +1 -0
- package/dist/src/utils/markdown.d.ts +1 -0
- package/dist/static/templates/empty/style.css.js +1 -0
- package/dist/stores/chat.js +26 -0
- package/dist/stores/editor.js +1 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/generateId.js +7 -0
- package/dist/utils/markdown.js +21 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/package.json +4 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { useTimeoutFn as T, toValue as b, isClient as A, createSingletonPromise as W, noop as L, isObject as q, tryOnScopeDispose as O } from "../shared/index.js";
|
|
2
|
+
import { createFilterWrapper as K, debounceFilter as Q, useDebounceFn as U } from "../shared/index.js";
|
|
3
|
+
import "../../vue-demi/lib/index.js";
|
|
4
|
+
import { computed as C, ref as g, shallowRef as S, watch as P, getCurrentInstance as j, onMounted as B, toRaw as D } from "vue";
|
|
5
|
+
const I = A ? window : void 0, E = A ? window.navigator : void 0;
|
|
6
|
+
function N(e) {
|
|
7
|
+
var t;
|
|
8
|
+
const o = b(e);
|
|
9
|
+
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
10
|
+
}
|
|
11
|
+
function _(...e) {
|
|
12
|
+
let t, o, a, c;
|
|
13
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, a, c] = e, t = I) : [t, o, a, c] = e, !t)
|
|
14
|
+
return L;
|
|
15
|
+
Array.isArray(o) || (o = [o]), Array.isArray(a) || (a = [a]);
|
|
16
|
+
const u = [], d = () => {
|
|
17
|
+
u.forEach((n) => n()), u.length = 0;
|
|
18
|
+
}, p = (n, i, v, m) => (n.addEventListener(i, v, m), () => n.removeEventListener(i, v, m)), f = P(
|
|
19
|
+
() => [N(t), b(c)],
|
|
20
|
+
([n, i]) => {
|
|
21
|
+
if (d(), !n)
|
|
22
|
+
return;
|
|
23
|
+
const v = q(i) ? { ...i } : i;
|
|
24
|
+
u.push(
|
|
25
|
+
...o.flatMap((m) => a.map((y) => p(n, m, y, v)))
|
|
26
|
+
);
|
|
27
|
+
},
|
|
28
|
+
{ immediate: !0, flush: "post" }
|
|
29
|
+
), l = () => {
|
|
30
|
+
f(), d();
|
|
31
|
+
};
|
|
32
|
+
return O(l), l;
|
|
33
|
+
}
|
|
34
|
+
function V() {
|
|
35
|
+
const e = g(!1);
|
|
36
|
+
return j() && B(() => {
|
|
37
|
+
e.value = !0;
|
|
38
|
+
}, void 0), e;
|
|
39
|
+
}
|
|
40
|
+
function M(e) {
|
|
41
|
+
const t = V();
|
|
42
|
+
return C(() => (t.value, !!e()));
|
|
43
|
+
}
|
|
44
|
+
function x(e, t = {}) {
|
|
45
|
+
const {
|
|
46
|
+
controls: o = !1,
|
|
47
|
+
navigator: a = E
|
|
48
|
+
} = t, c = M(() => a && "permissions" in a), u = S(), d = typeof e == "string" ? { name: e } : e, p = S(), f = () => {
|
|
49
|
+
var n, i;
|
|
50
|
+
p.value = (i = (n = u.value) == null ? void 0 : n.state) != null ? i : "prompt";
|
|
51
|
+
};
|
|
52
|
+
_(u, "change", f);
|
|
53
|
+
const l = W(async () => {
|
|
54
|
+
if (c.value) {
|
|
55
|
+
if (!u.value)
|
|
56
|
+
try {
|
|
57
|
+
u.value = await a.permissions.query(d);
|
|
58
|
+
} catch {
|
|
59
|
+
u.value = void 0;
|
|
60
|
+
} finally {
|
|
61
|
+
f();
|
|
62
|
+
}
|
|
63
|
+
if (o)
|
|
64
|
+
return D(u.value);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return l(), o ? {
|
|
68
|
+
state: p,
|
|
69
|
+
isSupported: c,
|
|
70
|
+
query: l
|
|
71
|
+
} : p;
|
|
72
|
+
}
|
|
73
|
+
function G(e = {}) {
|
|
74
|
+
const {
|
|
75
|
+
navigator: t = E,
|
|
76
|
+
read: o = !1,
|
|
77
|
+
source: a,
|
|
78
|
+
copiedDuring: c = 1500,
|
|
79
|
+
legacy: u = !1
|
|
80
|
+
} = e, d = M(() => t && "clipboard" in t), p = x("clipboard-read"), f = x("clipboard-write"), l = C(() => d.value || u), n = g(""), i = g(!1), v = T(() => i.value = !1, c);
|
|
81
|
+
function m() {
|
|
82
|
+
d.value && w(p.value) ? t.clipboard.readText().then((r) => {
|
|
83
|
+
n.value = r;
|
|
84
|
+
}) : n.value = R();
|
|
85
|
+
}
|
|
86
|
+
l.value && o && _(["copy", "cut"], m);
|
|
87
|
+
async function y(r = b(a)) {
|
|
88
|
+
l.value && r != null && (d.value && w(f.value) ? await t.clipboard.writeText(r) : F(r), n.value = r, i.value = !0, v.start());
|
|
89
|
+
}
|
|
90
|
+
function F(r) {
|
|
91
|
+
const s = document.createElement("textarea");
|
|
92
|
+
s.value = r ?? "", s.style.position = "absolute", s.style.opacity = "0", document.body.appendChild(s), s.select(), document.execCommand("copy"), s.remove();
|
|
93
|
+
}
|
|
94
|
+
function R() {
|
|
95
|
+
var r, s, h;
|
|
96
|
+
return (h = (s = (r = document == null ? void 0 : document.getSelection) == null ? void 0 : r.call(document)) == null ? void 0 : s.toString()) != null ? h : "";
|
|
97
|
+
}
|
|
98
|
+
function w(r) {
|
|
99
|
+
return r === "granted" || r === "prompt";
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
isSupported: l,
|
|
103
|
+
text: n,
|
|
104
|
+
copied: i,
|
|
105
|
+
copy: y
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
K as createFilterWrapper,
|
|
110
|
+
W as createSingletonPromise,
|
|
111
|
+
Q as debounceFilter,
|
|
112
|
+
E as defaultNavigator,
|
|
113
|
+
I as defaultWindow,
|
|
114
|
+
A as isClient,
|
|
115
|
+
q as isObject,
|
|
116
|
+
L as noop,
|
|
117
|
+
b as toValue,
|
|
118
|
+
O as tryOnScopeDispose,
|
|
119
|
+
N as unrefElement,
|
|
120
|
+
G as useClipboard,
|
|
121
|
+
U as useDebounceFn,
|
|
122
|
+
_ as useEventListener,
|
|
123
|
+
V as useMounted,
|
|
124
|
+
x as usePermission,
|
|
125
|
+
M as useSupported,
|
|
126
|
+
T as useTimeoutFn
|
|
127
|
+
};
|
|
@@ -1,45 +1,86 @@
|
|
|
1
1
|
import "../../vue-demi/lib/index.js";
|
|
2
|
-
import { unref as
|
|
3
|
-
function
|
|
4
|
-
return
|
|
2
|
+
import { ref as d, readonly as b, unref as y, getCurrentScope as T, onScopeDispose as S } from "vue";
|
|
3
|
+
function g(e) {
|
|
4
|
+
return T() ? (S(e), !0) : !1;
|
|
5
5
|
}
|
|
6
|
+
function a(e) {
|
|
7
|
+
return typeof e == "function" ? e() : y(e);
|
|
8
|
+
}
|
|
9
|
+
const w = typeof window < "u" && typeof document < "u";
|
|
6
10
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
7
|
-
const
|
|
11
|
+
const P = Object.prototype.toString, x = (e) => P.call(e) === "[object Object]", p = () => {
|
|
8
12
|
};
|
|
9
|
-
function h(
|
|
10
|
-
function
|
|
11
|
-
return new Promise((i,
|
|
12
|
-
Promise.resolve(
|
|
13
|
+
function h(e, n) {
|
|
14
|
+
function o(...t) {
|
|
15
|
+
return new Promise((i, r) => {
|
|
16
|
+
Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(i).catch(r);
|
|
13
17
|
});
|
|
14
18
|
}
|
|
15
|
-
return
|
|
19
|
+
return o;
|
|
16
20
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
const
|
|
20
|
-
clearTimeout(u), i(), i =
|
|
21
|
+
function j(e, n = {}) {
|
|
22
|
+
let o, t, i = p;
|
|
23
|
+
const r = (u) => {
|
|
24
|
+
clearTimeout(u), i(), i = p;
|
|
21
25
|
};
|
|
22
26
|
return (u) => {
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
i = n.rejectOnCancel ?
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
},
|
|
27
|
+
const l = a(e), c = a(n.maxWait);
|
|
28
|
+
return o && r(o), l <= 0 || c !== void 0 && c <= 0 ? (t && (r(t), t = null), Promise.resolve(u())) : new Promise((f, m) => {
|
|
29
|
+
i = n.rejectOnCancel ? m : f, c && !t && (t = setTimeout(() => {
|
|
30
|
+
o && r(o), t = null, f(u());
|
|
31
|
+
}, c)), o = setTimeout(() => {
|
|
32
|
+
t && r(t), t = null, f(u());
|
|
33
|
+
}, l);
|
|
30
34
|
});
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
|
-
function
|
|
37
|
+
function D(e) {
|
|
38
|
+
let n;
|
|
39
|
+
function o() {
|
|
40
|
+
return n || (n = e()), n;
|
|
41
|
+
}
|
|
42
|
+
return o.reset = async () => {
|
|
43
|
+
const t = n;
|
|
44
|
+
n = void 0, t && await t;
|
|
45
|
+
}, o;
|
|
46
|
+
}
|
|
47
|
+
function F(e, n = 200, o = {}) {
|
|
34
48
|
return h(
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
j(n, o),
|
|
50
|
+
e
|
|
37
51
|
);
|
|
38
52
|
}
|
|
53
|
+
function W(e, n, o = {}) {
|
|
54
|
+
const {
|
|
55
|
+
immediate: t = !0
|
|
56
|
+
} = o, i = d(!1);
|
|
57
|
+
let r = null;
|
|
58
|
+
function s() {
|
|
59
|
+
r && (clearTimeout(r), r = null);
|
|
60
|
+
}
|
|
61
|
+
function u() {
|
|
62
|
+
i.value = !1, s();
|
|
63
|
+
}
|
|
64
|
+
function l(...c) {
|
|
65
|
+
s(), i.value = !0, r = setTimeout(() => {
|
|
66
|
+
i.value = !1, r = null, e(...c);
|
|
67
|
+
}, a(n));
|
|
68
|
+
}
|
|
69
|
+
return t && (i.value = !0, w && l()), g(u), {
|
|
70
|
+
isPending: b(i),
|
|
71
|
+
start: l,
|
|
72
|
+
stop: u
|
|
73
|
+
};
|
|
74
|
+
}
|
|
39
75
|
export {
|
|
40
76
|
h as createFilterWrapper,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
77
|
+
D as createSingletonPromise,
|
|
78
|
+
j as debounceFilter,
|
|
79
|
+
w as isClient,
|
|
80
|
+
x as isObject,
|
|
81
|
+
p as noop,
|
|
82
|
+
a as toValue,
|
|
83
|
+
g as tryOnScopeDispose,
|
|
84
|
+
F as useDebounceFn,
|
|
85
|
+
W as useTimeoutFn
|
|
45
86
|
};
|