lisichatbot 2.1.3 → 2.1.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisichatbot",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -3666,8 +3666,12 @@ function init(flowName, flowConfig, options = {}) {
3666
3666
  flowData = flowConfig;
3667
3667
 
3668
3668
  chatState.step = 0;
3669
- chatState.chatMode = mode; // ✅ NEW: Store mode in chatState as chatMode
3670
-
3669
+ chatState.chatMode = mode;
3670
+ chatState.returnToStep = null;
3671
+ chatState.completed = false;
3672
+ chatState.editPath = [];
3673
+ chatState.prefillOverrideFields = null;
3674
+
3671
3675
  // ✅ NEW: Merge initialData with editData for edit mode
3672
3676
  if (mode === 'edit' && editData && Object.keys(editData).length > 0) {
3673
3677
  console.log('🔧 Edit mode enabled - pre-filling with data:', editData);