lisichatbot 1.9.5 → 1.9.6
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/package.json +1 -1
- package/src/index.js +10 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -2818,6 +2818,16 @@ async function showNextStep() {
|
|
|
2818
2818
|
console.log(` ✅ Updating current step autoAdvanceDelay:`, result.autoAdvanceDelay);
|
|
2819
2819
|
currentStep.autoAdvanceDelay = result.autoAdvanceDelay;
|
|
2820
2820
|
}
|
|
2821
|
+
|
|
2822
|
+
// ✅ NEW: Support updating chatState.data from onStart
|
|
2823
|
+
if (result.data && typeof result.data === 'object') {
|
|
2824
|
+
console.log(` 📝 onStart returned data to update chatState.data:`, result.data);
|
|
2825
|
+
// Merge returned data into chatState.data
|
|
2826
|
+
Object.keys(result.data).forEach(key => {
|
|
2827
|
+
chatState.data[key] = result.data[key];
|
|
2828
|
+
console.log(` → chatState.data.${key} = ${JSON.stringify(result.data[key])}`);
|
|
2829
|
+
});
|
|
2830
|
+
}
|
|
2821
2831
|
}
|
|
2822
2832
|
|
|
2823
2833
|
// ✅ NEW: Check if onStart wants to jump to step by name
|