@e-llm-studio/instant-learning 1.3.11 → 1.3.12
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/ILMarketplaceWrapper.js +2 -0
- package/dist/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/ILMarketplaceWrapper.js +2 -0
- package/dist/cjs/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +3 -1
- package/dist/cjs/features/IL-OTJ/ILOTJ.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -0
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -0
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +32 -28
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagement.js +11 -2
- package/dist/cjs/features/LearningManagement/LearningManagement.js.map +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +25 -19
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +65 -29
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js.map +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -0
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js.map +1 -1
- package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js +3 -4
- package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js.map +1 -1
- package/dist/cjs/schema-driven/components/VariantListField.js +1 -2
- package/dist/cjs/schema-driven/components/VariantListField.js.map +1 -1
- package/dist/cjs/schema-driven/primitives/Accordion.js +1 -1
- package/dist/cjs/schema-driven/primitives/Accordion.js.map +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +3 -1
- package/dist/features/IL-OTJ/ILOTJ.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -0
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -0
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.js +32 -28
- package/dist/features/IL-OTJ/_components/ILPopup.js.map +1 -1
- package/dist/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
- package/dist/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -1
- package/dist/features/LearningManagement/LearningManagement.js +11 -2
- package/dist/features/LearningManagement/LearningManagement.js.map +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +25 -19
- package/dist/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +65 -29
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/features/LearningManagement/store/useLMSConfigStore.js.map +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -0
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js.map +1 -1
- package/dist/schema-driven/components/GlobalSetupAccordionField.js +3 -4
- package/dist/schema-driven/components/GlobalSetupAccordionField.js.map +1 -1
- package/dist/schema-driven/components/VariantListField.js +1 -2
- package/dist/schema-driven/components/VariantListField.js.map +1 -1
- package/dist/schema-driven/primitives/Accordion.js +1 -1
- package/dist/schema-driven/primitives/Accordion.js.map +1 -1
- package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -1
- package/dist/types/src/ILMarketplaceWrapper.d.ts +5 -0
- package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts +3 -1
- package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +3 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/GlobalSetupAccordionField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/VariantListField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/primitives/Accordion.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -176,7 +176,7 @@ const InstantLearningModalDynamic = ({
|
|
|
176
176
|
mode,
|
|
177
177
|
is_publishing
|
|
178
178
|
}) => {
|
|
179
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
179
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
180
180
|
const [scopeData, setScopeData] = useState({
|
|
181
181
|
station: initialScope,
|
|
182
182
|
tiers: ["Tier 1"]
|
|
@@ -273,7 +273,7 @@ const InstantLearningModalDynamic = ({
|
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
275
|
}, []);
|
|
276
|
-
useDynamicFormStore((s) => s.globalData);
|
|
276
|
+
const dynamicGlobalData = useDynamicFormStore((s) => s.globalData);
|
|
277
277
|
useDynamicFormStore((s) => s.variantData);
|
|
278
278
|
const dynamicFormSchema = useTeachMeConfigStore(
|
|
279
279
|
(s) => {
|
|
@@ -1390,6 +1390,17 @@ const InstantLearningModalDynamic = ({
|
|
|
1390
1390
|
console.log("variantIds", variantIds);
|
|
1391
1391
|
setShowComparison(true);
|
|
1392
1392
|
}, [variantIds]);
|
|
1393
|
+
const getSuccessToastMessage = useCallback(
|
|
1394
|
+
(fallback) => {
|
|
1395
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
1396
|
+
const rawToast = typeof (uiStateLabels == null ? void 0 : uiStateLabels.successToastMessage) === "string" && uiStateLabels.successToastMessage.trim() !== "" ? uiStateLabels.successToastMessage.trim() : typeof ((_a2 = useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _a2.successToastMessage) === "string" && ((_c2 = (_b2 = useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _b2.successToastMessage) == null ? void 0 : _c2.trim()) !== "" ? (_e2 = (_d2 = useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _d2.successToastMessage) == null ? void 0 : _e2.trim() : void 0;
|
|
1397
|
+
if (rawToast) {
|
|
1398
|
+
return rawToast.replace(/\{scope\}/g, (ruleSet == null ? void 0 : ruleSet.ruleSetName) || "");
|
|
1399
|
+
}
|
|
1400
|
+
return fallback;
|
|
1401
|
+
},
|
|
1402
|
+
[uiStateLabels == null ? void 0 : uiStateLabels.successToastMessage, ruleSet == null ? void 0 : ruleSet.ruleSetName]
|
|
1403
|
+
);
|
|
1393
1404
|
const myCustomHandlers = {
|
|
1394
1405
|
/**
|
|
1395
1406
|
* Handles the 'Let me connect the dots for you...' header message.
|
|
@@ -1895,7 +1906,7 @@ const InstantLearningModalDynamic = ({
|
|
|
1895
1906
|
/* @__PURE__ */ jsx(Check, { className: toastStyles.iconSuccess }),
|
|
1896
1907
|
/* @__PURE__ */ jsx("span", { className: `${toastStyles.toastTitle} ${toastStyles.toastTitleSuccess}`, children: "Success" })
|
|
1897
1908
|
] }),
|
|
1898
|
-
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: isAnyCreated ? "Learning saved successfully!" : "Changes saved successfully!" })
|
|
1909
|
+
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: getSuccessToastMessage(isAnyCreated ? "Learning saved successfully!" : "Changes saved successfully!") })
|
|
1899
1910
|
] })
|
|
1900
1911
|
});
|
|
1901
1912
|
setIsCloseModal(true);
|
|
@@ -3443,7 +3454,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3443
3454
|
/* @__PURE__ */ jsx(Check, { className: toastStyles.iconSuccess }),
|
|
3444
3455
|
/* @__PURE__ */ jsx("span", { className: `${toastStyles.toastTitle} ${toastStyles.toastTitleSuccess}`, children: "Success" })
|
|
3445
3456
|
] }),
|
|
3446
|
-
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: "Learning saved successfully!" })
|
|
3457
|
+
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: getSuccessToastMessage("Learning saved successfully!") })
|
|
3447
3458
|
] })
|
|
3448
3459
|
});
|
|
3449
3460
|
closeTimeoutRef.current = setTimeout(() => {
|
|
@@ -3524,7 +3535,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3524
3535
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
3525
3536
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
3526
3537
|
variantsToUpdate.forEach((variant, index) => {
|
|
3527
|
-
var _a3, _b3, _c3, _d3, _e3, _f3, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2,
|
|
3538
|
+
var _a3, _b3, _c3, _d3, _e3, _f3, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2, _y2, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P;
|
|
3528
3539
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.description || "";
|
|
3529
3540
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
3530
3541
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -3737,7 +3748,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3737
3748
|
tierLinkId: existingLinkId != null ? existingLinkId : null,
|
|
3738
3749
|
variantType: variantTypeToUse,
|
|
3739
3750
|
// Send is_user_accepted_risk directly from the variant state or fallback to props; defaulting to false
|
|
3740
|
-
is_user_accepted_risk: !!((
|
|
3751
|
+
is_user_accepted_risk: !!((_y2 = (_x2 = (structuredAIResponse || [])[index]) == null ? void 0 : _x2.is_user_accepted_risk) != null ? _y2 : variant == null ? void 0 : variant.is_user_accepted_risk),
|
|
3741
3752
|
is_enabled: variant.is_enabled,
|
|
3742
3753
|
appsecData: {
|
|
3743
3754
|
application: (_z = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _z : "",
|
|
@@ -3824,7 +3835,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3824
3835
|
/* @__PURE__ */ jsx(Check, { className: toastStyles.iconSuccess }),
|
|
3825
3836
|
/* @__PURE__ */ jsx("span", { className: `${toastStyles.toastTitle} ${toastStyles.toastTitleSuccess}`, children: "Success" })
|
|
3826
3837
|
] }),
|
|
3827
|
-
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: "Changes saved successfully!" })
|
|
3838
|
+
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: getSuccessToastMessage("Changes saved successfully!") })
|
|
3828
3839
|
] })
|
|
3829
3840
|
});
|
|
3830
3841
|
closeTimeoutRef.current = setTimeout(() => {
|
|
@@ -3898,7 +3909,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3898
3909
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
3899
3910
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
3900
3911
|
allVariants.forEach((variant, index) => {
|
|
3901
|
-
var _a3, _b3, _c3, _d3, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2,
|
|
3912
|
+
var _a3, _b3, _c3, _d3, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2, _y2, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N;
|
|
3902
3913
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.rule_description || variant.description || "";
|
|
3903
3914
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
3904
3915
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -4107,7 +4118,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4107
4118
|
appsecData: {
|
|
4108
4119
|
application: (_x2 = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _x2 : "",
|
|
4109
4120
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
4110
|
-
applicationLevelModuleId: (
|
|
4121
|
+
applicationLevelModuleId: (_y2 = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _y2 : "",
|
|
4111
4122
|
applicationLevelResourceId: (_z = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _z : ""
|
|
4112
4123
|
}
|
|
4113
4124
|
};
|
|
@@ -4210,7 +4221,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4210
4221
|
/* @__PURE__ */ jsx(Check, { className: toastStyles.iconSuccess }),
|
|
4211
4222
|
/* @__PURE__ */ jsx("span", { className: `${toastStyles.toastTitle} ${toastStyles.toastTitleSuccess}`, children: "Success" })
|
|
4212
4223
|
] }),
|
|
4213
|
-
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: "Changes saved successfully!" })
|
|
4224
|
+
/* @__PURE__ */ jsx("p", { className: `${toastStyles.toastMessage} ${toastStyles.toastMessageSuccess}`, children: getSuccessToastMessage("Changes saved successfully!") })
|
|
4214
4225
|
] })
|
|
4215
4226
|
});
|
|
4216
4227
|
closeTimeoutRef.current = setTimeout(() => {
|
|
@@ -4273,8 +4284,32 @@ const InstantLearningModalDynamic = ({
|
|
|
4273
4284
|
scopeData.tiers.length ? scopeData.tiers.map(normalizeTierKey) : void 0,
|
|
4274
4285
|
isEditFlow || isLoadAndEditModeRef.current ? void 0 : [newVariantMapIndexRef.current]
|
|
4275
4286
|
);
|
|
4276
|
-
const
|
|
4287
|
+
const pickTitle = (src) => {
|
|
4288
|
+
if (!src) return "";
|
|
4289
|
+
const preferred = ["rule_title", "ruleTitle", "title", "template_title"];
|
|
4290
|
+
const keys = [
|
|
4291
|
+
...preferred.filter((k) => k in src),
|
|
4292
|
+
...Object.keys(src).filter((k) => /title/i.test(k) && !preferred.includes(k))
|
|
4293
|
+
];
|
|
4294
|
+
for (const k of keys) {
|
|
4295
|
+
const v = src[k];
|
|
4296
|
+
const s = typeof v === "string" ? v : typeof (v == null ? void 0 : v.value) === "string" ? v.value : "";
|
|
4297
|
+
if (s.trim()) return s.trim();
|
|
4298
|
+
}
|
|
4299
|
+
return "";
|
|
4300
|
+
};
|
|
4301
|
+
const draftTierKey = ((_f = scopeData.tiers) == null ? void 0 : _f[0]) ? normalizeTierKey(scopeData.tiers[0]) : "tier_1";
|
|
4302
|
+
const draftVariantIdx = editVariantIndex != null ? editVariantIndex : 0;
|
|
4303
|
+
const draftRootPayload = dynamicFormSchema ? generatePayloadFromSchema(dynamicFormSchema, draftTierKey, draftVariantIdx).rootPayload : {};
|
|
4304
|
+
const effectiveRuleTitle = pickTitle(draftRootPayload) || pickTitle(dynamicGlobalData) || ruleTitle.trim();
|
|
4305
|
+
const canSaveDraft = !isEditFlow && effectiveRuleTitle.length > 0;
|
|
4277
4306
|
const saveDraftDisabledTooltip = isEditFlow ? "Drafts cannot be saved in Edit Mode." : "Add a learning title before saving a draft.";
|
|
4307
|
+
const hasRequiredFieldsForButton = () => {
|
|
4308
|
+
var _a2, _b2, _c2;
|
|
4309
|
+
if (isEditFlow) return true;
|
|
4310
|
+
const jsonSchema = ((_b2 = (_a2 = useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _a2.learningMetadataComponents) == null ? void 0 : _b2.teachMe) || ((_c2 = useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _c2.learningMetadataComponents);
|
|
4311
|
+
return hasRequiredFieldsForCurrentSave(jsonSchema);
|
|
4312
|
+
};
|
|
4278
4313
|
const saveDraft = async () => {
|
|
4279
4314
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
4280
4315
|
if (!canSaveDraft) {
|
|
@@ -4335,8 +4370,8 @@ const InstantLearningModalDynamic = ({
|
|
|
4335
4370
|
}
|
|
4336
4371
|
}
|
|
4337
4372
|
}, [isSaveRule, isAiStreaming]);
|
|
4338
|
-
const editTierKey = ((
|
|
4339
|
-
const editIndex = (
|
|
4373
|
+
const editTierKey = ((_h = ((_g = scopeData == null ? void 0 : scopeData.tiers) == null ? void 0 : _g[0]) || editingTier || "Tier 1") == null ? void 0 : _h.toLowerCase().replace(/ /g, "_")) || "tier_1";
|
|
4374
|
+
const editIndex = (_i = editVariantIndex != null ? editVariantIndex : focusedVariantIndex) != null ? _i : 0;
|
|
4340
4375
|
const isVariantAccordionOpen = editVariantIndex != null;
|
|
4341
4376
|
const currentAccordionData = isVariantAccordionOpen ? structuredAIResponse == null ? void 0 : structuredAIResponse[editIndex] : null;
|
|
4342
4377
|
const activeVariant = structuredAIResponse && (structuredAIResponse == null ? void 0 : structuredAIResponse.find(
|
|
@@ -4434,7 +4469,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4434
4469
|
}
|
|
4435
4470
|
};
|
|
4436
4471
|
const uiStateVariants = isEditFlow ? buildVariantsMap() : {};
|
|
4437
|
-
const marketplaceEditVariantId = instantLearningId && isEditFlow ? "variant_0" in uiStateVariants ? "variant_0" : (
|
|
4472
|
+
const marketplaceEditVariantId = instantLearningId && isEditFlow ? "variant_0" in uiStateVariants ? "variant_0" : (_j = Object.keys(uiStateVariants)[0]) != null ? _j : null : variantIdToBeEdited;
|
|
4438
4473
|
customMetaDataRef.current = {
|
|
4439
4474
|
send_metadata_to_orchestrator: false,
|
|
4440
4475
|
is_draft_flow: isDraftFlow,
|
|
@@ -4445,12 +4480,12 @@ const InstantLearningModalDynamic = ({
|
|
|
4445
4480
|
LearningTerm: dt("agents.LearningTerm", "Learnings"),
|
|
4446
4481
|
mode_name: baseModeName ? baseModeName : void 0,
|
|
4447
4482
|
x_full_url: buildXFullUrl(),
|
|
4448
|
-
agents_from_ilkb_config: (
|
|
4483
|
+
agents_from_ilkb_config: (_k = useLMSConfigStore.getState().lmsConfig) == null ? void 0 : _k.agents,
|
|
4449
4484
|
appsecData: {
|
|
4450
|
-
application: (
|
|
4485
|
+
application: (_l = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _l : "",
|
|
4451
4486
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
4452
|
-
applicationLevelModuleId: (
|
|
4453
|
-
applicationLevelResourceId: (
|
|
4487
|
+
applicationLevelModuleId: (_m = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _m : "",
|
|
4488
|
+
applicationLevelResourceId: (_n = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _n : ""
|
|
4454
4489
|
},
|
|
4455
4490
|
save_api_payload: (() => {
|
|
4456
4491
|
var _a2, _b2, _c2, _d2;
|
|
@@ -4494,7 +4529,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4494
4529
|
)) == null ? void 0 : _g2.tier_id) || "",
|
|
4495
4530
|
topic_id: null,
|
|
4496
4531
|
scope_id: effectiveRuleSetId,
|
|
4497
|
-
question_title:
|
|
4532
|
+
question_title: effectiveRuleTitle,
|
|
4498
4533
|
variantType: resolveVariantTypeForPayload(
|
|
4499
4534
|
tierKey,
|
|
4500
4535
|
targetIndex,
|
|
@@ -4570,7 +4605,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4570
4605
|
description: IL_CONFIG_CONSTANTS.CATEGORY
|
|
4571
4606
|
}
|
|
4572
4607
|
],
|
|
4573
|
-
originalQuestion:
|
|
4608
|
+
originalQuestion: effectiveRuleTitle,
|
|
4574
4609
|
questionId: null,
|
|
4575
4610
|
variantType: resolveVariantTypeForPayload(
|
|
4576
4611
|
tierKey,
|
|
@@ -4719,7 +4754,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4719
4754
|
backward_compatibility: useLearningTemplateStore.getState().backwardCompatibility,
|
|
4720
4755
|
ruleset_id: effectiveRuleSetId,
|
|
4721
4756
|
...initialRuleSetId ? { initial_ruleset_id: initialRuleSetId } : {},
|
|
4722
|
-
current_variants_length: editingRule ? Array.isArray(structuredAIResponse) && structuredAIResponse.length > 0 ? Math.max(((
|
|
4757
|
+
current_variants_length: editingRule ? Array.isArray(structuredAIResponse) && structuredAIResponse.length > 0 ? Math.max(((_o = editingRule == null ? void 0 : editingRule.variants) == null ? void 0 : _o.length) || 0, structuredAIResponse.length) : (_p = editingRule == null ? void 0 : editingRule.variants) == null ? void 0 : _p.length : void 0,
|
|
4723
4758
|
tiers: useLearningTemplateStore.getState().tiers,
|
|
4724
4759
|
authToken: (user == null ? void 0 : user.accessToken) || "",
|
|
4725
4760
|
...is_publishing && { is_publishing }
|
|
@@ -4981,8 +5016,8 @@ const InstantLearningModalDynamic = ({
|
|
|
4981
5016
|
// JSON-driven operational config (dropdown option sources + host-prefilled
|
|
4982
5017
|
// values). Kept out of uiStateLabels so labels stay label-only; the schema
|
|
4983
5018
|
// renderer / ComponentRegistry read these off uiState.
|
|
4984
|
-
dynamicOptions: (
|
|
4985
|
-
prefilledData: (
|
|
5019
|
+
dynamicOptions: (_q = dynamicFormConfig == null ? void 0 : dynamicFormConfig.dynamicOptions) != null ? _q : {},
|
|
5020
|
+
prefilledData: (_r = dynamicFormConfig == null ? void 0 : dynamicFormConfig.prefilledData) != null ? _r : {},
|
|
4986
5021
|
...ilLabels,
|
|
4987
5022
|
scrollTrigger,
|
|
4988
5023
|
...uiStateLabels,
|
|
@@ -5611,7 +5646,7 @@ const InstantLearningModalDynamic = ({
|
|
|
5611
5646
|
ThinkingBulbIconComponent: /* @__PURE__ */ jsx(MockBulbIcon, {}),
|
|
5612
5647
|
customSections: customSections != null ? customSections : /* @__PURE__ */ jsx(Fragment, {}),
|
|
5613
5648
|
customMetaData: customMetaDataRef,
|
|
5614
|
-
chatTitle: editingRule ? ((
|
|
5649
|
+
chatTitle: editingRule ? ((_s = uiStateLabels == null ? void 0 : uiStateLabels.chatTitleEdit) != null ? _s : configuration.CHAT_TITLE_EDIT).replace("{scope}", (ruleSet == null ? void 0 : ruleSet.ruleSetName) || "") : ((_t = uiStateLabels == null ? void 0 : uiStateLabels.chatTitle) != null ? _t : configuration.CHAT_TITLE).replace("{scope}", (ruleSet == null ? void 0 : ruleSet.ruleSetName) || ""),
|
|
5615
5650
|
formTitle: (uiState == null ? void 0 : uiState.formTitle) || configuration.FORM_TITLE,
|
|
5616
5651
|
showSavedMessage: false,
|
|
5617
5652
|
savedMessage,
|
|
@@ -5642,7 +5677,7 @@ const InstantLearningModalDynamic = ({
|
|
|
5642
5677
|
isFormDirty,
|
|
5643
5678
|
initialChatMessage: editingRule ? getEditRuleChatMessage(
|
|
5644
5679
|
editingRule.ruleTitle || "this rule",
|
|
5645
|
-
((
|
|
5680
|
+
((_u = editingVariants == null ? void 0 : editingVariants[focusedVariantIndex != null ? focusedVariantIndex : 0]) == null ? void 0 : _u.is_user_accepted_risk) === true
|
|
5646
5681
|
) : initialChatMessage != null ? initialChatMessage : configuration.INITIAL_CHAT_MESSAGE,
|
|
5647
5682
|
validateCustom: () => {
|
|
5648
5683
|
var _a2, _b2, _c2;
|
|
@@ -5702,10 +5737,11 @@ const InstantLearningModalDynamic = ({
|
|
|
5702
5737
|
initialDraftMessage,
|
|
5703
5738
|
socketTimeOutInMilliSeconds: configuration.SOCKET_TIMEOUT,
|
|
5704
5739
|
userDetails: {
|
|
5705
|
-
name: `${(
|
|
5706
|
-
id: (
|
|
5707
|
-
email: (
|
|
5708
|
-
}
|
|
5740
|
+
name: `${(_v = user == null ? void 0 : user.firstname) != null ? _v : ""} ${(_w = user == null ? void 0 : user.lastname) != null ? _w : ""}`.trim() || "Guest Userr",
|
|
5741
|
+
id: (_x = user == null ? void 0 : user._id) != null ? _x : "Guest Userr",
|
|
5742
|
+
email: (_y = user == null ? void 0 : user.email) != null ? _y : "guestUserr@example.com"
|
|
5743
|
+
},
|
|
5744
|
+
hasRequiredFields: hasRequiredFieldsForButton
|
|
5709
5745
|
}
|
|
5710
5746
|
),
|
|
5711
5747
|
/* @__PURE__ */ jsx(
|