@genpact/genome.mfe.mgtwin-app 1.1.307-alpha → 1.1.308-alpha
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/{ArrowLeftCircleIcon-2e5f0c8d.mjs → ArrowLeftCircleIcon-993ac03f.mjs} +1 -1
- package/dist/{AssessmentAMA-d2ff1a93.mjs → AssessmentAMA-c1648b25.mjs} +307 -307
- package/dist/{AssessmentSimulation-9dd58c5a.mjs → AssessmentSimulation-a2ed91b2.mjs} +5 -5
- package/dist/{EditSkillAdminData-1d9b87ec.mjs → EditSkillAdminData-a27bcfaa.mjs} +3 -3
- package/dist/{EditSkillData-d3269296.mjs → EditSkillData-5f338b53.mjs} +3 -3
- package/dist/{HomeView-98ebc873.mjs → HomeView-72aa4511.mjs} +5 -5
- package/dist/{Loading-7954e824.mjs → Loading-3de5336b.mjs} +1 -1
- package/dist/{LoadingSimulation-3fa186ff.mjs → LoadingSimulation-29658196.mjs} +1 -1
- package/dist/{Modal-973c394c.mjs → Modal-16cb2a7b.mjs} +1 -1
- package/dist/{PaperAirplaneIcon-f85390a4.mjs → PaperAirplaneIcon-eec60dcc.mjs} +1 -1
- package/dist/{PromptTesting-2e15a200.mjs → PromptTesting-b4401def.mjs} +3 -3
- package/dist/{SkillAutomation-5a05ed10.mjs → SkillAutomation-a914a3d9.mjs} +3 -3
- package/dist/{SkillData-6bb28237.mjs → SkillData-11d63828.mjs} +3 -3
- package/dist/{Testcase-a0f25f19.mjs → Testcase-3ab139a1.mjs} +3 -3
- package/dist/{UnderMaintenance-5390c2b6.mjs → UnderMaintenance-112eb20d.mjs} +1 -1
- package/dist/{_commonjsHelpers-0bdc57e4.mjs → _commonjsHelpers-60049552.mjs} +1 -1
- package/dist/{api-ba4f94c0.mjs → api-080ff48b.mjs} +1 -1
- package/dist/{main-d03f0d98.mjs → main-b726e9f4.mjs} +1225 -1225
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,42 +1,281 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { d as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { p as
|
|
1
|
+
import { _ as V, a as Z, L as Q } from "./LoadingSimulation-29658196.mjs";
|
|
2
|
+
import { _ as H, Q as P, a as j } from "./Modal-16cb2a7b.mjs";
|
|
3
|
+
import { d as g, r as o, H as N, o as c, c as r, a as e, u as w, y as I, t as E, G as z, p as L, g as $, C as D, z as W, h as p, F as K, e as Y, f as R, b as v, k as F, w as J, m as X, L as aa, q as U, s as ea, l as la } from "./main-b726e9f4.mjs";
|
|
4
|
+
import { _ as S } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { p as O, g as sa } from "./api-080ff48b.mjs";
|
|
6
6
|
import "./loadernew-ac153a51.mjs";
|
|
7
|
-
const
|
|
7
|
+
const ia = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, ta = ["href"], na = /* @__PURE__ */ e("img", {
|
|
8
8
|
class: "h-11 w-auto cursor-pointer",
|
|
9
|
-
src:
|
|
9
|
+
src: V,
|
|
10
10
|
alt: "Genome Logo"
|
|
11
|
-
}, null, -1),
|
|
12
|
-
|
|
13
|
-
],
|
|
11
|
+
}, null, -1), da = [
|
|
12
|
+
na
|
|
13
|
+
], oa = ["href"], ca = /* @__PURE__ */ e("img", {
|
|
14
14
|
class: "h-9 w-28 cursor-pointer md:w-36",
|
|
15
|
-
src:
|
|
15
|
+
src: H,
|
|
16
16
|
alt: "Aiguru Logo"
|
|
17
|
-
}, null, -1),
|
|
18
|
-
|
|
19
|
-
],
|
|
17
|
+
}, null, -1), ra = [
|
|
18
|
+
ca
|
|
19
|
+
], _a = /* @__PURE__ */ g({
|
|
20
20
|
__name: "headerAMA",
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
21
|
+
setup(s) {
|
|
22
|
+
const a = o(""), i = o("");
|
|
23
|
+
return N === "prod" ? a.value = "https://genome.genpact.com" : a.value = "https://genome-dev.genpact.com", N === "prod" ? i.value = "https://genome.genpact.com/#aiguru" : i.value = "https://genome-dev.genpact.com/#aiguru", (n, k) => (c(), r("nav", ia, [
|
|
24
|
+
e("a", {
|
|
25
25
|
class: "px-2 md:px-0 lg:px-0",
|
|
26
|
-
href:
|
|
26
|
+
href: a.value,
|
|
27
27
|
target: "_blank"
|
|
28
|
-
},
|
|
29
|
-
|
|
28
|
+
}, da, 8, ta),
|
|
29
|
+
e("a", {
|
|
30
30
|
class: "px-2 md:px-0 lg:px-0",
|
|
31
|
-
href:
|
|
31
|
+
href: i.value,
|
|
32
32
|
target: "_blank"
|
|
33
|
-
},
|
|
33
|
+
}, ra, 8, oa)
|
|
34
|
+
]));
|
|
35
|
+
}
|
|
36
|
+
}), ka = { class: "flex items-end justify-start" }, fa = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, ma = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]" }, ba = /* @__PURE__ */ e("div", { class: "w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]" }, " Need help with a concept, information on Genpact offerings, productivity tips or Gen AI ideas - Ask me anything ", -1), ua = /* @__PURE__ */ e("br", null, null, -1), pa = /* @__PURE__ */ g({
|
|
37
|
+
__name: "greetingsAMA",
|
|
38
|
+
setup(s) {
|
|
39
|
+
const a = w(), i = ` Hi ${a.learnerName || "Expert"}, and welcome to ${a.amaSkillName || "SkillName"} !`, n = I(() => i);
|
|
40
|
+
return I(() => a.welcomeMessage), (k, m) => (c(), r("section", null, [
|
|
41
|
+
e("div", ka, [
|
|
42
|
+
e("div", fa, [
|
|
43
|
+
e("div", ma, E(n.value), 1),
|
|
44
|
+
ba
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
ua
|
|
48
|
+
]));
|
|
49
|
+
}
|
|
50
|
+
}), ga = { class: "fontFormattingAMA flex items-end justify-start py-2" }, ha = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Aa = ["innerHTML"], va = /* @__PURE__ */ g({
|
|
51
|
+
__name: "responseAMA",
|
|
52
|
+
props: {
|
|
53
|
+
answer: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: !0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
setup(s) {
|
|
59
|
+
const a = s, i = I(() => {
|
|
60
|
+
const n = a.answer.replace(/[*#]/g, "").replace(
|
|
61
|
+
/Assessment Rating & Feedback/g,
|
|
62
|
+
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
63
|
+
), k = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
|
|
64
|
+
return n.replace(k, (m, t, l) => `<a href="${l}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${t}</a>`);
|
|
65
|
+
});
|
|
66
|
+
return (n, k) => (c(), r("div", ga, [
|
|
67
|
+
e("div", ha, [
|
|
68
|
+
e("span", {
|
|
69
|
+
class: "fontFormattingAMA",
|
|
70
|
+
innerHTML: i.value
|
|
71
|
+
}, null, 8, Aa)
|
|
72
|
+
])
|
|
73
|
+
]));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const ya = /* @__PURE__ */ S(va, [["__scopeId", "data-v-38edcca6"]]), xa = { class: "flex justify-end items-end py-3" }, Sa = { class: "max-w-[80%]" }, Ma = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, wa = /* @__PURE__ */ g({
|
|
77
|
+
__name: "learnerAMA",
|
|
78
|
+
props: {
|
|
79
|
+
question: {
|
|
80
|
+
type: String,
|
|
81
|
+
required: !0
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
setup(s) {
|
|
85
|
+
return (a, i) => (c(), r("div", xa, [
|
|
86
|
+
e("div", Sa, [
|
|
87
|
+
e("div", Ma, E(s.question), 1)
|
|
88
|
+
])
|
|
89
|
+
]));
|
|
90
|
+
}
|
|
91
|
+
}), Ca = (s) => (L("data-v-12a02acf"), s = s(), $(), s), Pa = { class: "flex w-full flex-col items-start justify-start bg-white" }, Ra = { class: "bot-typing-animation gap-1" }, Ia = { class: "block w-full text-lg italic text-gray-800" }, Ea = /* @__PURE__ */ Ca(() => /* @__PURE__ */ e("span", { class: "dot-animation" }, [
|
|
92
|
+
/* @__PURE__ */ e("span", null, "."),
|
|
93
|
+
/* @__PURE__ */ e("span", null, "."),
|
|
94
|
+
/* @__PURE__ */ e("span", null, ".")
|
|
95
|
+
], -1)), La = /* @__PURE__ */ z('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>', 1), $a = /* @__PURE__ */ g({
|
|
96
|
+
__name: "LoadingResponseAMA",
|
|
97
|
+
setup(s) {
|
|
98
|
+
const a = o("Generating response"), i = o([
|
|
99
|
+
"This may take a few seconds",
|
|
100
|
+
"Fetching the best response for you",
|
|
101
|
+
"Thinking... give me a moment",
|
|
102
|
+
"One moment while I gather the information",
|
|
103
|
+
"Hang in tight, we are almost there",
|
|
104
|
+
"Almost there... just a bit longer",
|
|
105
|
+
"Compiling a response for you"
|
|
106
|
+
]);
|
|
107
|
+
return setTimeout(() => {
|
|
108
|
+
const n = Math.floor(Math.random() * i.value.length);
|
|
109
|
+
a.value = i.value[n];
|
|
110
|
+
}, 15e3), (n, k) => (c(), r("div", Pa, [
|
|
111
|
+
e("div", Ra, [
|
|
112
|
+
e("div", Ia, E(a.value), 1),
|
|
113
|
+
Ea
|
|
114
|
+
]),
|
|
115
|
+
La
|
|
116
|
+
]));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const Da = /* @__PURE__ */ S($a, [["__scopeId", "data-v-12a02acf"]]), Ta = { key: 0 }, qa = { key: 1 }, Ga = {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: "flex"
|
|
122
|
+
}, Na = /* @__PURE__ */ g({
|
|
123
|
+
__name: "conversationAMA",
|
|
124
|
+
setup(s) {
|
|
125
|
+
let a = o(""), i = o("");
|
|
126
|
+
a.value = '<a style="color:#00AECF;"', i.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
127
|
+
const n = w(), k = o();
|
|
128
|
+
return D(() => {
|
|
129
|
+
var l;
|
|
130
|
+
const m = document.getElementsByName("askQuestion"), t = Array.from(m);
|
|
131
|
+
m.length && ((l = t == null ? void 0 : t.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
132
|
+
}), W(() => {
|
|
133
|
+
var l;
|
|
134
|
+
const m = document.getElementsByName("askQuestion"), t = Array.from(m);
|
|
135
|
+
m.length && ((l = t == null ? void 0 : t.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
136
|
+
}), (m, t) => (c(), r("div", {
|
|
137
|
+
ref_key: "nestedElement",
|
|
138
|
+
ref: k,
|
|
139
|
+
class: "smooth-scroll overflow-auto md:px-6 px-2"
|
|
140
|
+
}, [
|
|
141
|
+
p(pa),
|
|
142
|
+
(c(!0), r(K, null, Y(v(n).conversations, (l, f) => (c(), r("div", { key: f }, [
|
|
143
|
+
l.question ? (c(), r("div", Ta, [
|
|
144
|
+
p(wa, {
|
|
145
|
+
question: l.question,
|
|
146
|
+
c2question: l.c2question,
|
|
147
|
+
"show-feedback": l.showFeedback,
|
|
148
|
+
id: `qId${f}`,
|
|
149
|
+
name: "askQuestion",
|
|
150
|
+
"que-id": f
|
|
151
|
+
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
152
|
+
])) : R("", !0),
|
|
153
|
+
l.answer ? (c(), r("div", qa, [
|
|
154
|
+
p(ya, {
|
|
155
|
+
question: l == null ? void 0 : l.question,
|
|
156
|
+
c2question: l == null ? void 0 : l.c2question,
|
|
157
|
+
"show-sources": l == null ? void 0 : l.showSources,
|
|
158
|
+
questionId: l.id,
|
|
159
|
+
answer: l.answer.replaceAll("<a", v(a)).replaceAll("<ul", v(i)),
|
|
160
|
+
"show-feedback": l.showFeedback,
|
|
161
|
+
"related-ques": l.relatedQues,
|
|
162
|
+
"options-array": l.optionsArray,
|
|
163
|
+
"ans-id": f
|
|
164
|
+
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
165
|
+
])) : R("", !0)
|
|
166
|
+
]))), 128)),
|
|
167
|
+
v(n).dotLoader ? (c(), r("div", Ga, [
|
|
168
|
+
p(Da)
|
|
169
|
+
])) : R("", !0)
|
|
170
|
+
], 512));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
const Oa = /* @__PURE__ */ S(Na, [["__scopeId", "data-v-e6168dd4"]]), C = (s) => (L("data-v-9b275ff5"), s = s(), $(), s), Fa = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, Ua = { class: "py-2" }, Ba = { class: "flex" }, Va = { class: "z-1 relative w-full" }, Za = { class: "relative w-full" }, Qa = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, Ha = { key: 0 }, ja = /* @__PURE__ */ C(() => /* @__PURE__ */ e("path", { d: "M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z" }, null, -1)), za = [
|
|
174
|
+
ja
|
|
175
|
+
], Wa = {
|
|
176
|
+
key: 1,
|
|
177
|
+
class: "tooltip"
|
|
178
|
+
}, Ka = /* @__PURE__ */ C(() => /* @__PURE__ */ e("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), Ya = /* @__PURE__ */ C(() => /* @__PURE__ */ e("img", {
|
|
179
|
+
class: "w-7 h-7",
|
|
180
|
+
src: Z,
|
|
181
|
+
alt: "watingIcon"
|
|
182
|
+
}, null, -1)), Ja = [
|
|
183
|
+
Ka,
|
|
184
|
+
Ya
|
|
185
|
+
], Xa = { class: "flex justify-start" }, ae = /* @__PURE__ */ C(() => /* @__PURE__ */ e("div", { class: "pt-1 text-start font-sans" }, [
|
|
186
|
+
/* @__PURE__ */ e("div", { class: "text-xs font-bold text-gray-500 md:text-sm" }, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
|
|
187
|
+
], -1)), ee = /* @__PURE__ */ g({
|
|
188
|
+
__name: "NewQuestionAMA",
|
|
189
|
+
setup(s) {
|
|
190
|
+
const a = w(), i = F();
|
|
191
|
+
a.question = "";
|
|
192
|
+
const n = o(null), k = o(!1), m = o(P), t = o(!1);
|
|
193
|
+
D(() => {
|
|
194
|
+
n.value.focus();
|
|
195
|
+
});
|
|
196
|
+
const l = (b) => new URLSearchParams(window.location.search).get(b) || "";
|
|
197
|
+
o(l("amaId")), o(l("corpusId"));
|
|
198
|
+
const f = (b) => {
|
|
199
|
+
const d = b.length;
|
|
200
|
+
m.value = P - d, k.value = d >= P;
|
|
201
|
+
}, h = async () => {
|
|
202
|
+
var b, d, u, _, A, q;
|
|
203
|
+
try {
|
|
204
|
+
if (a.question.trim().length < 1) {
|
|
205
|
+
i.setError("Please enter answer!");
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
t.value = !0, a.dotLoader = !0;
|
|
209
|
+
const y = {
|
|
210
|
+
question: a.question
|
|
211
|
+
};
|
|
212
|
+
a.conversations.push(y);
|
|
213
|
+
const x = o("");
|
|
214
|
+
x.value = a.question, a.question = "";
|
|
215
|
+
const G = {
|
|
216
|
+
amaName: a.amaSkillName,
|
|
217
|
+
question: x.value,
|
|
218
|
+
past_messages: a.past_messages
|
|
219
|
+
}, M = await O("/agenticRAG", G);
|
|
220
|
+
if (((d = (b = M == null ? void 0 : M.data) == null ? void 0 : b.body) == null ? void 0 : d.answer) === "") {
|
|
221
|
+
console.log("in the if case calling api again");
|
|
222
|
+
const B = await O("/agenticRAG", G);
|
|
223
|
+
a.addConversation((u = B.data) == null ? void 0 : u.body, "new");
|
|
224
|
+
} else
|
|
225
|
+
a.addConversation((_ = M.data) == null ? void 0 : _.body, "new");
|
|
226
|
+
t.value = !1, a.dotLoader = !1;
|
|
227
|
+
} catch (y) {
|
|
228
|
+
if (console.error(y), a.dotLoader = !1, t.value = !1, U.isAxiosError(y)) {
|
|
229
|
+
const x = y;
|
|
230
|
+
console.log("Error found!"), console.error((A = x.response) == null ? void 0 : A.data), i.setError(((q = x.response) == null ? void 0 : q.data).message);
|
|
231
|
+
} else
|
|
232
|
+
i.setError("There was an issue, please contact helpmate");
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
return (b, d) => (c(), r("div", Fa, [
|
|
236
|
+
e("div", Ua, [
|
|
237
|
+
e("div", Ba, [
|
|
238
|
+
e("div", Va, [
|
|
239
|
+
e("div", Za, [
|
|
240
|
+
e("div", Qa, [
|
|
241
|
+
t.value ? (c(), r("div", Wa, Ja)) : (c(), r("div", Ha, [
|
|
242
|
+
(c(), r("svg", {
|
|
243
|
+
onClick: d[0] || (d[0] = (u) => h()),
|
|
244
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
245
|
+
fill: "currentColor",
|
|
246
|
+
class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
|
|
247
|
+
viewBox: "0 0 16 16"
|
|
248
|
+
}, za))
|
|
249
|
+
]))
|
|
250
|
+
]),
|
|
251
|
+
e("div", Xa, [
|
|
252
|
+
J(e("input", {
|
|
253
|
+
onKeyup: [
|
|
254
|
+
d[1] || (d[1] = aa((u) => t.value ? "" : h(), ["enter"])),
|
|
255
|
+
d[3] || (d[3] = (u) => f(v(a).question))
|
|
256
|
+
],
|
|
257
|
+
"onUpdate:modelValue": d[2] || (d[2] = (u) => v(a).question = u),
|
|
258
|
+
class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",
|
|
259
|
+
placeholder: "Write your answer here...",
|
|
260
|
+
type: "text",
|
|
261
|
+
ref_key: "AiSearch",
|
|
262
|
+
ref: n
|
|
263
|
+
}, null, 544), [
|
|
264
|
+
[X, v(a).question]
|
|
265
|
+
])
|
|
266
|
+
])
|
|
267
|
+
]),
|
|
268
|
+
ae
|
|
269
|
+
])
|
|
270
|
+
])
|
|
271
|
+
])
|
|
34
272
|
]));
|
|
35
273
|
}
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
274
|
+
});
|
|
275
|
+
const le = /* @__PURE__ */ S(ee, [["__scopeId", "data-v-9b275ff5"]]), se = (s) => {
|
|
276
|
+
var a;
|
|
277
|
+
return (a = ie.find((i) => i.skill_id === s)) == null ? void 0 : a.skill_name;
|
|
278
|
+
}, ie = [
|
|
40
279
|
{
|
|
41
280
|
skill_alias: "Accounts Payable",
|
|
42
281
|
skill_name: "Accounts Payable",
|
|
@@ -780,264 +1019,25 @@ const na = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#0
|
|
|
780
1019
|
skill_name: "Dataschool Simulation",
|
|
781
1020
|
skill_id: "7bd03cb6-79ad-4e2a-8a8b-88dc16147369"
|
|
782
1021
|
}
|
|
783
|
-
],
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
return R(() => e.welcomeMessage), (_, m) => (o(), r("section", null, [
|
|
788
|
-
a("div", ua, [
|
|
789
|
-
a("div", pa, [
|
|
790
|
-
a("div", ga, E(c.value), 1),
|
|
791
|
-
ha
|
|
792
|
-
])
|
|
793
|
-
]),
|
|
794
|
-
Aa
|
|
795
|
-
]));
|
|
796
|
-
}
|
|
797
|
-
}), ya = { class: "fontFormattingAMA flex items-end justify-start py-2" }, xa = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Sa = ["innerHTML"], Ma = /* @__PURE__ */ p({
|
|
798
|
-
__name: "responseAMA",
|
|
799
|
-
props: {
|
|
800
|
-
answer: {
|
|
801
|
-
type: String,
|
|
802
|
-
required: !0
|
|
803
|
-
}
|
|
804
|
-
},
|
|
805
|
-
setup(i) {
|
|
806
|
-
const e = i, t = R(() => {
|
|
807
|
-
const c = e.answer.replace(/[*#]/g, "").replace(
|
|
808
|
-
/Assessment Rating & Feedback/g,
|
|
809
|
-
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
810
|
-
), _ = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
|
|
811
|
-
return c.replace(_, (m, n, l) => `<a href="${l}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${n}</a>`);
|
|
812
|
-
});
|
|
813
|
-
return (c, _) => (o(), r("div", ya, [
|
|
814
|
-
a("div", xa, [
|
|
815
|
-
a("span", {
|
|
816
|
-
class: "fontFormattingAMA",
|
|
817
|
-
innerHTML: t.value
|
|
818
|
-
}, null, 8, Sa)
|
|
819
|
-
])
|
|
820
|
-
]));
|
|
821
|
-
}
|
|
822
|
-
});
|
|
823
|
-
const wa = /* @__PURE__ */ x(Ma, [["__scopeId", "data-v-38edcca6"]]), Ca = { class: "flex justify-end items-end py-3" }, Pa = { class: "max-w-[80%]" }, Ia = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, Ra = /* @__PURE__ */ p({
|
|
824
|
-
__name: "learnerAMA",
|
|
825
|
-
props: {
|
|
826
|
-
question: {
|
|
827
|
-
type: String,
|
|
828
|
-
required: !0
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
setup(i) {
|
|
832
|
-
return (e, t) => (o(), r("div", Ca, [
|
|
833
|
-
a("div", Pa, [
|
|
834
|
-
a("div", Ia, E(i.question), 1)
|
|
835
|
-
])
|
|
836
|
-
]));
|
|
837
|
-
}
|
|
838
|
-
}), Ea = (i) => (L("data-v-12a02acf"), i = i(), $(), i), La = { class: "flex w-full flex-col items-start justify-start bg-white" }, $a = { class: "bot-typing-animation gap-1" }, Da = { class: "block w-full text-lg italic text-gray-800" }, Ta = /* @__PURE__ */ Ea(() => /* @__PURE__ */ a("span", { class: "dot-animation" }, [
|
|
839
|
-
/* @__PURE__ */ a("span", null, "."),
|
|
840
|
-
/* @__PURE__ */ a("span", null, "."),
|
|
841
|
-
/* @__PURE__ */ a("span", null, ".")
|
|
842
|
-
], -1)), qa = /* @__PURE__ */ K('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>', 1), Ga = /* @__PURE__ */ p({
|
|
843
|
-
__name: "LoadingResponseAMA",
|
|
844
|
-
setup(i) {
|
|
845
|
-
const e = d("Generating response"), t = d([
|
|
846
|
-
"This may take a few seconds",
|
|
847
|
-
"Fetching the best response for you",
|
|
848
|
-
"Thinking... give me a moment",
|
|
849
|
-
"One moment while I gather the information",
|
|
850
|
-
"Hang in tight, we are almost there",
|
|
851
|
-
"Almost there... just a bit longer",
|
|
852
|
-
"Compiling a response for you"
|
|
853
|
-
]);
|
|
854
|
-
return setTimeout(() => {
|
|
855
|
-
const c = Math.floor(Math.random() * t.value.length);
|
|
856
|
-
e.value = t.value[c];
|
|
857
|
-
}, 15e3), (c, _) => (o(), r("div", La, [
|
|
858
|
-
a("div", $a, [
|
|
859
|
-
a("div", Da, E(e.value), 1),
|
|
860
|
-
Ta
|
|
861
|
-
]),
|
|
862
|
-
qa
|
|
863
|
-
]));
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
const Na = /* @__PURE__ */ x(Ga, [["__scopeId", "data-v-12a02acf"]]), Oa = { key: 0 }, Fa = { key: 1 }, Ua = {
|
|
867
|
-
key: 0,
|
|
868
|
-
class: "flex"
|
|
869
|
-
}, Ba = /* @__PURE__ */ p({
|
|
870
|
-
__name: "conversationAMA",
|
|
871
|
-
setup(i) {
|
|
872
|
-
let e = d(""), t = d("");
|
|
873
|
-
e.value = '<a style="color:#00AECF;"', t.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
874
|
-
const c = w(), _ = d();
|
|
875
|
-
return D(() => {
|
|
876
|
-
var l;
|
|
877
|
-
const m = document.getElementsByName("askQuestion"), n = Array.from(m);
|
|
878
|
-
m.length && ((l = n == null ? void 0 : n.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
879
|
-
}), Y(() => {
|
|
880
|
-
var l;
|
|
881
|
-
const m = document.getElementsByName("askQuestion"), n = Array.from(m);
|
|
882
|
-
m.length && ((l = n == null ? void 0 : n.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
883
|
-
}), (m, n) => (o(), r("div", {
|
|
884
|
-
ref_key: "nestedElement",
|
|
885
|
-
ref: _,
|
|
886
|
-
class: "smooth-scroll overflow-auto md:px-6 px-2"
|
|
887
|
-
}, [
|
|
888
|
-
u(va),
|
|
889
|
-
(o(!0), r(J, null, X(g(c).conversations, (l, k) => (o(), r("div", { key: k }, [
|
|
890
|
-
l.question ? (o(), r("div", Oa, [
|
|
891
|
-
u(Ra, {
|
|
892
|
-
question: l.question,
|
|
893
|
-
c2question: l.c2question,
|
|
894
|
-
"show-feedback": l.showFeedback,
|
|
895
|
-
id: `qId${k}`,
|
|
896
|
-
name: "askQuestion",
|
|
897
|
-
"que-id": k
|
|
898
|
-
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
899
|
-
])) : I("", !0),
|
|
900
|
-
l.answer ? (o(), r("div", Fa, [
|
|
901
|
-
u(wa, {
|
|
902
|
-
question: l == null ? void 0 : l.question,
|
|
903
|
-
c2question: l == null ? void 0 : l.c2question,
|
|
904
|
-
"show-sources": l == null ? void 0 : l.showSources,
|
|
905
|
-
questionId: l.id,
|
|
906
|
-
answer: l.answer.replaceAll("<a", g(e)).replaceAll("<ul", g(t)),
|
|
907
|
-
"show-feedback": l.showFeedback,
|
|
908
|
-
"related-ques": l.relatedQues,
|
|
909
|
-
"options-array": l.optionsArray,
|
|
910
|
-
"ans-id": k
|
|
911
|
-
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
912
|
-
])) : I("", !0)
|
|
913
|
-
]))), 128)),
|
|
914
|
-
g(c).dotLoader ? (o(), r("div", Ua, [
|
|
915
|
-
u(Na)
|
|
916
|
-
])) : I("", !0)
|
|
917
|
-
], 512));
|
|
918
|
-
}
|
|
919
|
-
});
|
|
920
|
-
const Va = /* @__PURE__ */ x(Ba, [["__scopeId", "data-v-e6168dd4"]]), C = (i) => (L("data-v-01e01fd2"), i = i(), $(), i), Za = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, Qa = { class: "py-2" }, Ha = { class: "flex" }, ja = { class: "z-1 relative w-full" }, za = { class: "relative w-full" }, Wa = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, Ka = { key: 0 }, Ya = /* @__PURE__ */ C(() => /* @__PURE__ */ a("path", { d: "M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z" }, null, -1)), Ja = [
|
|
921
|
-
Ya
|
|
922
|
-
], Xa = {
|
|
923
|
-
key: 1,
|
|
924
|
-
class: "tooltip"
|
|
925
|
-
}, ae = /* @__PURE__ */ C(() => /* @__PURE__ */ a("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), ee = /* @__PURE__ */ C(() => /* @__PURE__ */ a("img", {
|
|
926
|
-
class: "w-7 h-7",
|
|
927
|
-
src: H,
|
|
928
|
-
alt: "watingIcon"
|
|
929
|
-
}, null, -1)), le = [
|
|
930
|
-
ae,
|
|
931
|
-
ee
|
|
932
|
-
], se = { class: "flex justify-start" }, ie = /* @__PURE__ */ C(() => /* @__PURE__ */ a("div", { class: "pt-1 text-start font-sans" }, [
|
|
933
|
-
/* @__PURE__ */ a("div", { class: "text-xs font-bold text-gray-500 md:text-sm" }, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
|
|
934
|
-
], -1)), te = /* @__PURE__ */ p({
|
|
935
|
-
__name: "NewQuestionAMA",
|
|
936
|
-
setup(i) {
|
|
937
|
-
const e = w(), t = B();
|
|
938
|
-
e.question = "";
|
|
939
|
-
const c = d(null), _ = d(!1), m = d(P), n = d(!1);
|
|
940
|
-
D(() => {
|
|
941
|
-
c.value.focus();
|
|
942
|
-
});
|
|
943
|
-
const l = (b) => new URLSearchParams(window.location.search).get(b) || "", k = d(l("amaId")), h = d(l("corpusId")), S = (b) => {
|
|
944
|
-
const s = b.length;
|
|
945
|
-
m.value = P - s, _.value = s >= P;
|
|
946
|
-
}, A = async () => {
|
|
947
|
-
var b, s, f, q, G, N;
|
|
948
|
-
try {
|
|
949
|
-
if (e.question.trim().length < 1) {
|
|
950
|
-
t.setError("Please enter answer!");
|
|
951
|
-
return;
|
|
952
|
-
}
|
|
953
|
-
n.value = !0, e.dotLoader = !0;
|
|
954
|
-
const v = {
|
|
955
|
-
question: e.question
|
|
956
|
-
};
|
|
957
|
-
e.conversations.push(v);
|
|
958
|
-
const y = d("");
|
|
959
|
-
y.value = e.question, e.question = "";
|
|
960
|
-
const O = {
|
|
961
|
-
amaId: k.value,
|
|
962
|
-
amaCorpusId: h.value,
|
|
963
|
-
past_messages: e.past_messages,
|
|
964
|
-
question: y.value,
|
|
965
|
-
prompt: e.generatedPrompt
|
|
966
|
-
}, M = await U("/agenticRAG", O);
|
|
967
|
-
if (((s = (b = M == null ? void 0 : M.data) == null ? void 0 : b.body) == null ? void 0 : s.answer) === "") {
|
|
968
|
-
console.log("in the if case calling api again");
|
|
969
|
-
const Z = await U("/agenticRAG", O);
|
|
970
|
-
e.addConversation((f = Z.data) == null ? void 0 : f.body, "new");
|
|
971
|
-
} else
|
|
972
|
-
e.addConversation((q = M.data) == null ? void 0 : q.body, "new");
|
|
973
|
-
n.value = !1, e.dotLoader = !1;
|
|
974
|
-
} catch (v) {
|
|
975
|
-
if (console.error(v), e.dotLoader = !1, n.value = !1, V.isAxiosError(v)) {
|
|
976
|
-
const y = v;
|
|
977
|
-
console.log("Error found!"), console.error((G = y.response) == null ? void 0 : G.data), t.setError(((N = y.response) == null ? void 0 : N.data).message);
|
|
978
|
-
} else
|
|
979
|
-
t.setError("There was an issue, please contact helpmate");
|
|
980
|
-
}
|
|
981
|
-
};
|
|
982
|
-
return (b, s) => (o(), r("div", Za, [
|
|
983
|
-
a("div", Qa, [
|
|
984
|
-
a("div", Ha, [
|
|
985
|
-
a("div", ja, [
|
|
986
|
-
a("div", za, [
|
|
987
|
-
a("div", Wa, [
|
|
988
|
-
n.value ? (o(), r("div", Xa, le)) : (o(), r("div", Ka, [
|
|
989
|
-
(o(), r("svg", {
|
|
990
|
-
onClick: s[0] || (s[0] = (f) => A()),
|
|
991
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
992
|
-
fill: "currentColor",
|
|
993
|
-
class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
|
|
994
|
-
viewBox: "0 0 16 16"
|
|
995
|
-
}, Ja))
|
|
996
|
-
]))
|
|
997
|
-
]),
|
|
998
|
-
a("div", se, [
|
|
999
|
-
aa(a("input", {
|
|
1000
|
-
onKeyup: [
|
|
1001
|
-
s[1] || (s[1] = la((f) => n.value ? "" : A(), ["enter"])),
|
|
1002
|
-
s[3] || (s[3] = (f) => S(g(e).question))
|
|
1003
|
-
],
|
|
1004
|
-
"onUpdate:modelValue": s[2] || (s[2] = (f) => g(e).question = f),
|
|
1005
|
-
class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",
|
|
1006
|
-
placeholder: "Write your answer here...",
|
|
1007
|
-
type: "text",
|
|
1008
|
-
ref_key: "AiSearch",
|
|
1009
|
-
ref: c
|
|
1010
|
-
}, null, 544), [
|
|
1011
|
-
[ea, g(e).question]
|
|
1012
|
-
])
|
|
1013
|
-
])
|
|
1014
|
-
]),
|
|
1015
|
-
ie
|
|
1016
|
-
])
|
|
1017
|
-
])
|
|
1018
|
-
])
|
|
1019
|
-
]));
|
|
1020
|
-
}
|
|
1021
|
-
});
|
|
1022
|
-
const ne = /* @__PURE__ */ x(te, [["__scopeId", "data-v-01e01fd2"]]), T = (i) => (L("data-v-ae80186a"), i = i(), $(), i), de = /* @__PURE__ */ T(() => /* @__PURE__ */ a("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
|
|
1023
|
-
/* @__PURE__ */ a("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
|
|
1024
|
-
/* @__PURE__ */ a("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ")
|
|
1025
|
-
], -1)), oe = {
|
|
1022
|
+
], T = (s) => (L("data-v-466e517f"), s = s(), $(), s), te = /* @__PURE__ */ T(() => /* @__PURE__ */ e("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
|
|
1023
|
+
/* @__PURE__ */ e("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
|
|
1024
|
+
/* @__PURE__ */ e("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ")
|
|
1025
|
+
], -1)), ne = {
|
|
1026
1026
|
key: 1,
|
|
1027
1027
|
className: "h-screen flex flex-col items-stretch"
|
|
1028
|
-
},
|
|
1028
|
+
}, de = { class: "z-20" }, oe = /* @__PURE__ */ T(() => /* @__PURE__ */ e("div", { class: "mt-6" }, null, -1)), ce = { class: "flex h-full items-stretch overflow-hidden" }, re = { class: "mx-auto w-11/12 bg-white" }, _e = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, ke = /* @__PURE__ */ T(() => /* @__PURE__ */ e("div", { class: "mt-[160px]" }, null, -1)), fe = { class: "relative" }, me = /* @__PURE__ */ g({
|
|
1029
1029
|
__name: "AssessmentAMA",
|
|
1030
|
-
setup(
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
|
|
1030
|
+
setup(s) {
|
|
1031
|
+
const a = o(!0), i = o(!1), n = w(), k = F();
|
|
1032
|
+
o("");
|
|
1033
|
+
const t = o(((f) => new URLSearchParams(window.location.search).get(f) || "")("amaId"));
|
|
1034
|
+
n.amaSkillId = t.value ?? "", D(async () => {
|
|
1035
|
+
a.value = !0, await l(), a.value = !1;
|
|
1036
1036
|
});
|
|
1037
1037
|
const l = async () => {
|
|
1038
|
-
var
|
|
1038
|
+
var f, h, b, d, u;
|
|
1039
1039
|
try {
|
|
1040
|
-
if (
|
|
1040
|
+
if (t.value === null)
|
|
1041
1041
|
throw {
|
|
1042
1042
|
response: {
|
|
1043
1043
|
status: 424,
|
|
@@ -1047,43 +1047,43 @@ const ne = /* @__PURE__ */ x(te, [["__scopeId", "data-v-01e01fd2"]]), T = (i) =>
|
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
1049
|
console.log("before calling get learner");
|
|
1050
|
-
const
|
|
1051
|
-
`/getLearnerData?forSimulation=true&skillForSimulation=${
|
|
1050
|
+
const _ = await sa(
|
|
1051
|
+
`/getLearnerData?forSimulation=true&skillForSimulation=${t.value}`
|
|
1052
1052
|
);
|
|
1053
|
-
|
|
1054
|
-
} catch (
|
|
1055
|
-
if (console.error(
|
|
1056
|
-
const
|
|
1057
|
-
if (console.log("Error found!"), console.error((h =
|
|
1058
|
-
|
|
1053
|
+
n.initialize(_.data), n.amaSkillName = se(n.amaSkillId) || "", a.value = !1;
|
|
1054
|
+
} catch (_) {
|
|
1055
|
+
if (console.error(_), a.value = !1, U.isAxiosError(_) && ((f = _.response) != null && f.status) || _ && typeof _ == "object" && "response" in _ && _.response && typeof _.response == "object" && "status" in _.response && _.response.status) {
|
|
1056
|
+
const A = _;
|
|
1057
|
+
if (console.log("Error found!"), console.error((h = A.response) == null ? void 0 : h.data), ((b = A.response) == null ? void 0 : b.status) === 424 || ((d = A.response) == null ? void 0 : d.status) === 425) {
|
|
1058
|
+
i.value = !0;
|
|
1059
1059
|
return;
|
|
1060
1060
|
}
|
|
1061
|
-
|
|
1061
|
+
k.setError(((u = A.response) == null ? void 0 : u.data).message);
|
|
1062
1062
|
} else
|
|
1063
|
-
|
|
1063
|
+
k.setError("There was an issue, please contact helpmate");
|
|
1064
1064
|
}
|
|
1065
1065
|
};
|
|
1066
|
-
return (
|
|
1067
|
-
|
|
1068
|
-
default:
|
|
1069
|
-
|
|
1066
|
+
return (f, h) => (c(), r("section", null, [
|
|
1067
|
+
p(j, { "is-visible": i.value }, {
|
|
1068
|
+
default: ea(() => [
|
|
1069
|
+
te
|
|
1070
1070
|
]),
|
|
1071
1071
|
_: 1
|
|
1072
1072
|
}, 8, ["is-visible"]),
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1073
|
+
e("div", null, [
|
|
1074
|
+
a.value ? (c(), la(Q, { key: 0 })) : (c(), r("main", ne, [
|
|
1075
|
+
e("div", de, [
|
|
1076
|
+
p(_a)
|
|
1077
1077
|
]),
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1078
|
+
oe,
|
|
1079
|
+
e("div", ce, [
|
|
1080
|
+
e("div", re, [
|
|
1081
|
+
e("div", _e, [
|
|
1082
|
+
p(Oa),
|
|
1083
|
+
ke
|
|
1084
1084
|
]),
|
|
1085
|
-
|
|
1086
|
-
|
|
1085
|
+
e("div", fe, [
|
|
1086
|
+
p(le)
|
|
1087
1087
|
])
|
|
1088
1088
|
])
|
|
1089
1089
|
])
|
|
@@ -1092,7 +1092,7 @@ const ne = /* @__PURE__ */ x(te, [["__scopeId", "data-v-01e01fd2"]]), T = (i) =>
|
|
|
1092
1092
|
]));
|
|
1093
1093
|
}
|
|
1094
1094
|
});
|
|
1095
|
-
const
|
|
1095
|
+
const ye = /* @__PURE__ */ S(me, [["__scopeId", "data-v-466e517f"]]);
|
|
1096
1096
|
export {
|
|
1097
|
-
|
|
1097
|
+
ye as default
|
|
1098
1098
|
};
|