lisichatbot 2.1.2 → 2.1.3
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 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -2363,7 +2363,16 @@ async function handleNext() {
|
|
|
2363
2363
|
}
|
|
2364
2364
|
});
|
|
2365
2365
|
}
|
|
2366
|
-
|
|
2366
|
+
|
|
2367
|
+
// ✅ Support updating chatState.data from onNext (same as onStart)
|
|
2368
|
+
if (result && typeof result === 'object' && result.data && typeof result.data === 'object') {
|
|
2369
|
+
console.log(` 📝 onNext returned data to update chatState.data:`, result.data);
|
|
2370
|
+
Object.keys(result.data).forEach(key => {
|
|
2371
|
+
chatState.data[key] = result.data[key];
|
|
2372
|
+
console.log(` → chatState.data.${key} = ${JSON.stringify(result.data[key])}`);
|
|
2373
|
+
});
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2367
2376
|
// ✅ NEW: Check if onNext wants to jump to step by name
|
|
2368
2377
|
if (result && typeof result === 'object' && result.goToStepName) {
|
|
2369
2378
|
console.log(`🎯 onNext requested jump to step name: "${result.goToStepName}"`);
|