@e-llm-studio/instant-learning 1.3.16 → 1.3.17

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.
Files changed (32) hide show
  1. package/dist/cjs/features/IL-OTJ/ILOTJ.js +5 -1
  2. package/dist/cjs/features/IL-OTJ/ILOTJ.js.map +1 -1
  3. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +127 -20
  4. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
  5. package/dist/cjs/features/IL-OTJ/helpers/utils.js +45 -1
  6. package/dist/cjs/features/IL-OTJ/helpers/utils.js.map +1 -1
  7. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +4 -0
  8. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
  9. package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +7 -1
  10. package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
  11. package/dist/cjs/index.js +1 -0
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/features/IL-OTJ/ILOTJ.js +5 -1
  14. package/dist/features/IL-OTJ/ILOTJ.js.map +1 -1
  15. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +127 -20
  16. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
  17. package/dist/features/IL-OTJ/helpers/utils.js +45 -2
  18. package/dist/features/IL-OTJ/helpers/utils.js.map +1 -1
  19. package/dist/features/LearningManagement/components/InstantLearningModal.js +4 -0
  20. package/dist/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
  21. package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +7 -1
  22. package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +3 -0
  25. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
  26. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts +4 -0
  27. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
  28. package/dist/types/src/features/IL-OTJ/helpers/utils.d.ts +12 -2
  29. package/dist/types/src/features/IL-OTJ/helpers/utils.d.ts.map +1 -1
  30. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
  31. package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
  32. package/package.json +2 -2
@@ -21,8 +21,8 @@ import { buildFieldLabelMap, getVariantPrefilledData, resolveSchemaRuleSetId, ge
21
21
  import { useDynamicFormStore } from '../../../schema-driven/store/useDynamicFormStore.js';
22
22
  import { usePendingEditHighlight } from '../../IL-OTJ/_components/hooks/usePendingEditHighlight.js';
23
23
  import ConfirmationModal from './ConfirmationModal.js';
24
+ import { extractUiResponse, extractAndParseWithProperty, parseValidationData, extractAndParseResponse, extractVariantIds } from '../../IL-OTJ/helpers/utils.js';
24
25
  import { useCitations } from '../../IL-OTJ/store/CitationsContext.js';
25
- import { extractAndParseWithProperty, parseValidationData, extractAndParseResponse, extractVariantIds } from '../../IL-OTJ/helpers/utils.js';
26
26
 
27
27
  const MockBulbIcon = () => /* @__PURE__ */ jsx(Lightbulb, { size: 20, strokeWidth: 2, className: "text-blue-600" });
28
28
  const apiConstants = {
@@ -1447,6 +1447,7 @@ const InstantLearningModalDynamic = ({
1447
1447
  * AI sends 1-based indexing, we convert to 0-based.
1448
1448
  */
1449
1449
  "Let me connect the dots for you...": (data) => {
1450
+ const uiResponse = extractUiResponse(data);
1450
1451
  if (typeof data === "string") {
1451
1452
  const variantIndexMatch = data.match(/<!--\s*(\{[^}]*"variant_index"[^}]*\})\s*-->/);
1452
1453
  if (variantIndexMatch) {
@@ -1468,6 +1469,7 @@ const InstantLearningModalDynamic = ({
1468
1469
  }
1469
1470
  }
1470
1471
  }
1472
+ return uiResponse;
1471
1473
  },
1472
1474
  "Crafted Instant Learning with C.A.R.E.": (data) => {
1473
1475
  var _a2, _b2, _c2, _d2, _e2, _f2;
@@ -5714,6 +5716,10 @@ const InstantLearningModalDynamic = ({
5714
5716
  width: "90vw",
5715
5717
  height: "90vh",
5716
5718
  sendMessageInChat,
5719
+ isInitialAddChatMessageFlow: isSendingInitialAddMessageRef.current,
5720
+ onInitialAddChatMessageHandled: () => {
5721
+ isSendingInitialAddMessageRef.current = false;
5722
+ },
5717
5723
  useDynamicForm: true,
5718
5724
  isLoading: saveApiStatus === apiConstants.IN_PROGRESS,
5719
5725
  templateProps: {