@e-llm-studio/instant-learning 1.3.15-alpha.3 → 1.3.15-alpha.5
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/cjs/features/IL-OTJ/ILOTJ.js +6 -0
- package/dist/cjs/features/IL-OTJ/ILOTJ.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +9 -3
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagement.js.map +1 -1
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js.map +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +4 -0
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +4 -0
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +26 -12
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +4 -2
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js.map +1 -1
- package/dist/cjs/schema-driven/components/PromptTextEditorField.js +26 -11
- package/dist/cjs/schema-driven/components/PromptTextEditorField.js.map +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +6 -0
- package/dist/features/IL-OTJ/ILOTJ.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +9 -3
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/features/LearningManagement/LearningManagement.js.map +1 -1
- package/dist/features/LearningManagement/LearningTemplateLayout.js.map +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleContent.js +4 -0
- package/dist/features/LearningManagement/RuleContent/RuleContent.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +4 -0
- package/dist/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +26 -12
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +4 -2
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js.map +1 -1
- package/dist/schema-driven/components/PromptTextEditorField.js +26 -11
- package/dist/schema-driven/components/PromptTextEditorField.js.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +3 -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 +4 -0
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +7 -0
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +7 -0
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts +7 -0
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.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/PromptTextEditorField.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -261,6 +261,8 @@ const InstantLearningModalDynamic = ({
|
|
|
261
261
|
postSaveCallback,
|
|
262
262
|
onSuccessfulSaveCloseCallback,
|
|
263
263
|
initialChatMessage,
|
|
264
|
+
initialChatHistory = [],
|
|
265
|
+
initialChatSessionId,
|
|
264
266
|
initialAddChatMessage,
|
|
265
267
|
applicationIntegrationId,
|
|
266
268
|
contentModeMappingId,
|
|
@@ -275,7 +277,7 @@ const InstantLearningModalDynamic = ({
|
|
|
275
277
|
is_publishing,
|
|
276
278
|
projectId
|
|
277
279
|
}) => {
|
|
278
|
-
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;
|
|
280
|
+
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, _z;
|
|
279
281
|
const [scopeData, setScopeData] = React.useState({
|
|
280
282
|
station: initialScope,
|
|
281
283
|
tiers: ["Tier 1"]
|
|
@@ -756,6 +758,8 @@ const InstantLearningModalDynamic = ({
|
|
|
756
758
|
const [ruleIdInCurrentSession, setRuleIdInCurrentSession] = React.useState([]);
|
|
757
759
|
const [editVariantIndex, setEditVariantIndex] = React.useState(void 0);
|
|
758
760
|
const [sendMessageInChat, setSendMessageInChat] = React.useState("");
|
|
761
|
+
const chatHistoryRef = React.useRef(initialChatHistory);
|
|
762
|
+
const chatSessionIdRef = React.useRef(initialChatSessionId);
|
|
759
763
|
const isSendingInitialAddMessageRef = React.useRef(false);
|
|
760
764
|
const [stagedAiResponse, setStagedAiResponse] = React.useState(null);
|
|
761
765
|
const [variantIds, setVariantIds] = React.useState([]);
|
|
@@ -3658,7 +3662,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3658
3662
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
3659
3663
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
3660
3664
|
variantsToUpdate.forEach((variant, index) => {
|
|
3661
|
-
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,
|
|
3665
|
+
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, _z2, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P;
|
|
3662
3666
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.description || "";
|
|
3663
3667
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
3664
3668
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -3874,7 +3878,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3874
3878
|
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),
|
|
3875
3879
|
is_enabled: variant.is_enabled,
|
|
3876
3880
|
appsecData: {
|
|
3877
|
-
application: (
|
|
3881
|
+
application: (_z2 = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _z2 : "",
|
|
3878
3882
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
3879
3883
|
applicationLevelModuleId: (_A = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _A : "",
|
|
3880
3884
|
applicationLevelResourceId: (_B = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _B : ""
|
|
@@ -4032,7 +4036,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4032
4036
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
4033
4037
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
4034
4038
|
allVariants.forEach((variant, index) => {
|
|
4035
|
-
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,
|
|
4039
|
+
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, _z2, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N;
|
|
4036
4040
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.rule_description || variant.description || "";
|
|
4037
4041
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
4038
4042
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -4242,7 +4246,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4242
4246
|
application: (_x2 = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _x2 : "",
|
|
4243
4247
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
4244
4248
|
applicationLevelModuleId: (_y2 = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _y2 : "",
|
|
4245
|
-
applicationLevelResourceId: (
|
|
4249
|
+
applicationLevelResourceId: (_z2 = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _z2 : ""
|
|
4246
4250
|
}
|
|
4247
4251
|
};
|
|
4248
4252
|
const baselineVariants = baselineTierVariants.get(tierKey) || [];
|
|
@@ -5137,12 +5141,16 @@ const InstantLearningModalDynamic = ({
|
|
|
5137
5141
|
conflictReason,
|
|
5138
5142
|
usedFor: learningFlow.resolveIsEditMode({ flow: flow != null ? flow : mode === "EDIT" ? "edit" : void 0, editingRule, editingVariants }) ? "Edit" : "Create",
|
|
5139
5143
|
scopeId: effectiveRuleSetId,
|
|
5144
|
+
instanceId: (_q = useLearningTemplateStore.useLearningTemplateStore.getState().ilInstanceId) != null ? _q : void 0,
|
|
5145
|
+
appIntegrationId: applicationIntegrationId,
|
|
5140
5146
|
projectId: projectId || (uiStateLabels == null ? void 0 : uiStateLabels.projectId),
|
|
5141
5147
|
// JSON-driven operational config (dropdown option sources + host-prefilled
|
|
5142
5148
|
// values). Kept out of uiStateLabels so labels stay label-only; the schema
|
|
5143
5149
|
// renderer / ComponentRegistry read these off uiState.
|
|
5144
|
-
dynamicOptions: (
|
|
5145
|
-
prefilledData: (
|
|
5150
|
+
dynamicOptions: (_r = dynamicFormConfig == null ? void 0 : dynamicFormConfig.dynamicOptions) != null ? _r : {},
|
|
5151
|
+
prefilledData: (_s = dynamicFormConfig == null ? void 0 : dynamicFormConfig.prefilledData) != null ? _s : {},
|
|
5152
|
+
getChatHistory: () => chatHistoryRef.current,
|
|
5153
|
+
getChatSessionId: () => chatSessionIdRef.current,
|
|
5146
5154
|
...ilLabels,
|
|
5147
5155
|
scrollTrigger,
|
|
5148
5156
|
...uiStateLabels,
|
|
@@ -5787,7 +5795,7 @@ const InstantLearningModalDynamic = ({
|
|
|
5787
5795
|
ThinkingBulbIconComponent: /* @__PURE__ */ jsxRuntime.jsx(MockBulbIcon, {}),
|
|
5788
5796
|
customSections: customSections != null ? customSections : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}),
|
|
5789
5797
|
customMetaData: customMetaDataRef,
|
|
5790
|
-
chatTitle: editingRule ? ((
|
|
5798
|
+
chatTitle: editingRule ? ((_t = uiStateLabels == null ? void 0 : uiStateLabels.chatTitleEdit) != null ? _t : configuration.CHAT_TITLE_EDIT).replace("{scope}", (ruleSet == null ? void 0 : ruleSet.ruleSetName) || "") : ((_u = uiStateLabels == null ? void 0 : uiStateLabels.chatTitle) != null ? _u : configuration.CHAT_TITLE).replace("{scope}", (ruleSet == null ? void 0 : ruleSet.ruleSetName) || ""),
|
|
5791
5799
|
formTitle: (uiState == null ? void 0 : uiState.formTitle) || configuration.FORM_TITLE,
|
|
5792
5800
|
showSavedMessage: false,
|
|
5793
5801
|
savedMessage,
|
|
@@ -5822,8 +5830,14 @@ const InstantLearningModalDynamic = ({
|
|
|
5822
5830
|
isFormDirty,
|
|
5823
5831
|
initialChatMessage: editingRule ? getEditRuleChatMessage(
|
|
5824
5832
|
editingRule.ruleTitle || "this rule",
|
|
5825
|
-
((
|
|
5833
|
+
((_v = editingVariants == null ? void 0 : editingVariants[focusedVariantIndex != null ? focusedVariantIndex : 0]) == null ? void 0 : _v.is_user_accepted_risk) === true
|
|
5826
5834
|
) : initialChatMessage != null ? initialChatMessage : configuration.INITIAL_CHAT_MESSAGE,
|
|
5835
|
+
initialChatHistory,
|
|
5836
|
+
initialChatSessionId,
|
|
5837
|
+
onChatHistoryChange: (messages, sessionId) => {
|
|
5838
|
+
chatHistoryRef.current = messages;
|
|
5839
|
+
chatSessionIdRef.current = sessionId;
|
|
5840
|
+
},
|
|
5827
5841
|
validateCustom: () => {
|
|
5828
5842
|
var _a2, _b2, _c2;
|
|
5829
5843
|
if (saveApiStatus === apiConstants.SUCCESS || isSavedSuccessfully) return false;
|
|
@@ -5882,9 +5896,9 @@ const InstantLearningModalDynamic = ({
|
|
|
5882
5896
|
initialDraftMessage,
|
|
5883
5897
|
socketTimeOutInMilliSeconds: configuration.SOCKET_TIMEOUT,
|
|
5884
5898
|
userDetails: {
|
|
5885
|
-
name: `${(
|
|
5886
|
-
id: (
|
|
5887
|
-
email: (
|
|
5899
|
+
name: `${(_w = user == null ? void 0 : user.firstname) != null ? _w : ""} ${(_x = user == null ? void 0 : user.lastname) != null ? _x : ""}`.trim() || "Guest Userr",
|
|
5900
|
+
id: (_y = user == null ? void 0 : user._id) != null ? _y : "Guest Userr",
|
|
5901
|
+
email: (_z = user == null ? void 0 : user.email) != null ? _z : "guestUserr@example.com"
|
|
5888
5902
|
},
|
|
5889
5903
|
hasRequiredFields: hasRequiredFieldsForButton
|
|
5890
5904
|
}
|