@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
|
@@ -253,6 +253,8 @@ const InstantLearningModalDynamic = ({
|
|
|
253
253
|
postSaveCallback,
|
|
254
254
|
onSuccessfulSaveCloseCallback,
|
|
255
255
|
initialChatMessage,
|
|
256
|
+
initialChatHistory = [],
|
|
257
|
+
initialChatSessionId,
|
|
256
258
|
initialAddChatMessage,
|
|
257
259
|
applicationIntegrationId,
|
|
258
260
|
contentModeMappingId,
|
|
@@ -267,7 +269,7 @@ const InstantLearningModalDynamic = ({
|
|
|
267
269
|
is_publishing,
|
|
268
270
|
projectId
|
|
269
271
|
}) => {
|
|
270
|
-
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;
|
|
272
|
+
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;
|
|
271
273
|
const [scopeData, setScopeData] = useState({
|
|
272
274
|
station: initialScope,
|
|
273
275
|
tiers: ["Tier 1"]
|
|
@@ -748,6 +750,8 @@ const InstantLearningModalDynamic = ({
|
|
|
748
750
|
const [ruleIdInCurrentSession, setRuleIdInCurrentSession] = useState([]);
|
|
749
751
|
const [editVariantIndex, setEditVariantIndex] = useState(void 0);
|
|
750
752
|
const [sendMessageInChat, setSendMessageInChat] = useState("");
|
|
753
|
+
const chatHistoryRef = useRef(initialChatHistory);
|
|
754
|
+
const chatSessionIdRef = useRef(initialChatSessionId);
|
|
751
755
|
const isSendingInitialAddMessageRef = useRef(false);
|
|
752
756
|
const [stagedAiResponse, setStagedAiResponse] = useState(null);
|
|
753
757
|
const [variantIds, setVariantIds] = useState([]);
|
|
@@ -3650,7 +3654,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3650
3654
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
3651
3655
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
3652
3656
|
variantsToUpdate.forEach((variant, index) => {
|
|
3653
|
-
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,
|
|
3657
|
+
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;
|
|
3654
3658
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.description || "";
|
|
3655
3659
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
3656
3660
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -3866,7 +3870,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3866
3870
|
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),
|
|
3867
3871
|
is_enabled: variant.is_enabled,
|
|
3868
3872
|
appsecData: {
|
|
3869
|
-
application: (
|
|
3873
|
+
application: (_z2 = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _z2 : "",
|
|
3870
3874
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
3871
3875
|
applicationLevelModuleId: (_A = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _A : "",
|
|
3872
3876
|
applicationLevelResourceId: (_B = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _B : ""
|
|
@@ -4024,7 +4028,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4024
4028
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
4025
4029
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
4026
4030
|
allVariants.forEach((variant, index) => {
|
|
4027
|
-
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,
|
|
4031
|
+
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;
|
|
4028
4032
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.rule_description || variant.description || "";
|
|
4029
4033
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
4030
4034
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -4234,7 +4238,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4234
4238
|
application: (_x2 = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _x2 : "",
|
|
4235
4239
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
4236
4240
|
applicationLevelModuleId: (_y2 = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _y2 : "",
|
|
4237
|
-
applicationLevelResourceId: (
|
|
4241
|
+
applicationLevelResourceId: (_z2 = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _z2 : ""
|
|
4238
4242
|
}
|
|
4239
4243
|
};
|
|
4240
4244
|
const baselineVariants = baselineTierVariants.get(tierKey) || [];
|
|
@@ -5129,12 +5133,16 @@ const InstantLearningModalDynamic = ({
|
|
|
5129
5133
|
conflictReason,
|
|
5130
5134
|
usedFor: resolveIsEditMode({ flow: flow != null ? flow : mode === "EDIT" ? "edit" : void 0, editingRule, editingVariants }) ? "Edit" : "Create",
|
|
5131
5135
|
scopeId: effectiveRuleSetId,
|
|
5136
|
+
instanceId: (_q = useLearningTemplateStore.getState().ilInstanceId) != null ? _q : void 0,
|
|
5137
|
+
appIntegrationId: applicationIntegrationId,
|
|
5132
5138
|
projectId: projectId || (uiStateLabels == null ? void 0 : uiStateLabels.projectId),
|
|
5133
5139
|
// JSON-driven operational config (dropdown option sources + host-prefilled
|
|
5134
5140
|
// values). Kept out of uiStateLabels so labels stay label-only; the schema
|
|
5135
5141
|
// renderer / ComponentRegistry read these off uiState.
|
|
5136
|
-
dynamicOptions: (
|
|
5137
|
-
prefilledData: (
|
|
5142
|
+
dynamicOptions: (_r = dynamicFormConfig == null ? void 0 : dynamicFormConfig.dynamicOptions) != null ? _r : {},
|
|
5143
|
+
prefilledData: (_s = dynamicFormConfig == null ? void 0 : dynamicFormConfig.prefilledData) != null ? _s : {},
|
|
5144
|
+
getChatHistory: () => chatHistoryRef.current,
|
|
5145
|
+
getChatSessionId: () => chatSessionIdRef.current,
|
|
5138
5146
|
...ilLabels,
|
|
5139
5147
|
scrollTrigger,
|
|
5140
5148
|
...uiStateLabels,
|
|
@@ -5779,7 +5787,7 @@ const InstantLearningModalDynamic = ({
|
|
|
5779
5787
|
ThinkingBulbIconComponent: /* @__PURE__ */ jsx(MockBulbIcon, {}),
|
|
5780
5788
|
customSections: customSections != null ? customSections : /* @__PURE__ */ jsx(Fragment, {}),
|
|
5781
5789
|
customMetaData: customMetaDataRef,
|
|
5782
|
-
chatTitle: editingRule ? ((
|
|
5790
|
+
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) || ""),
|
|
5783
5791
|
formTitle: (uiState == null ? void 0 : uiState.formTitle) || configuration.FORM_TITLE,
|
|
5784
5792
|
showSavedMessage: false,
|
|
5785
5793
|
savedMessage,
|
|
@@ -5814,8 +5822,14 @@ const InstantLearningModalDynamic = ({
|
|
|
5814
5822
|
isFormDirty,
|
|
5815
5823
|
initialChatMessage: editingRule ? getEditRuleChatMessage(
|
|
5816
5824
|
editingRule.ruleTitle || "this rule",
|
|
5817
|
-
((
|
|
5825
|
+
((_v = editingVariants == null ? void 0 : editingVariants[focusedVariantIndex != null ? focusedVariantIndex : 0]) == null ? void 0 : _v.is_user_accepted_risk) === true
|
|
5818
5826
|
) : initialChatMessage != null ? initialChatMessage : configuration.INITIAL_CHAT_MESSAGE,
|
|
5827
|
+
initialChatHistory,
|
|
5828
|
+
initialChatSessionId,
|
|
5829
|
+
onChatHistoryChange: (messages, sessionId) => {
|
|
5830
|
+
chatHistoryRef.current = messages;
|
|
5831
|
+
chatSessionIdRef.current = sessionId;
|
|
5832
|
+
},
|
|
5819
5833
|
validateCustom: () => {
|
|
5820
5834
|
var _a2, _b2, _c2;
|
|
5821
5835
|
if (saveApiStatus === apiConstants.SUCCESS || isSavedSuccessfully) return false;
|
|
@@ -5874,9 +5888,9 @@ const InstantLearningModalDynamic = ({
|
|
|
5874
5888
|
initialDraftMessage,
|
|
5875
5889
|
socketTimeOutInMilliSeconds: configuration.SOCKET_TIMEOUT,
|
|
5876
5890
|
userDetails: {
|
|
5877
|
-
name: `${(
|
|
5878
|
-
id: (
|
|
5879
|
-
email: (
|
|
5891
|
+
name: `${(_w = user == null ? void 0 : user.firstname) != null ? _w : ""} ${(_x = user == null ? void 0 : user.lastname) != null ? _x : ""}`.trim() || "Guest Userr",
|
|
5892
|
+
id: (_y = user == null ? void 0 : user._id) != null ? _y : "Guest Userr",
|
|
5893
|
+
email: (_z = user == null ? void 0 : user.email) != null ? _z : "guestUserr@example.com"
|
|
5880
5894
|
},
|
|
5881
5895
|
hasRequiredFields: hasRequiredFieldsForButton
|
|
5882
5896
|
}
|