lisichatbot 1.6.3 → 1.6.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +44 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisichatbot",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -2118,6 +2118,17 @@ async function handleNext() {
2118
2118
  chatState.currentSelection = null;
2119
2119
  disableNextButton();
2120
2120
  await showNextStep();
2121
+
2122
+ // ✅ NEW: Extra scroll after jump to ensure inputs are visible
2123
+ setTimeout(() => {
2124
+ scrollToBottom();
2125
+ }, 350);
2126
+
2127
+ // ✅ NEW: Additional delayed scroll for cases with multiple showMessage calls
2128
+ setTimeout(() => {
2129
+ scrollToBottom();
2130
+ }, 500);
2131
+
2121
2132
  return;
2122
2133
  } else {
2123
2134
  console.error(`❌ No step found with name: "${stepName}"`);
@@ -2150,6 +2161,17 @@ async function handleNext() {
2150
2161
  chatState.currentSelection = null;
2151
2162
  disableNextButton();
2152
2163
  await showNextStep();
2164
+
2165
+ // ✅ NEW: Extra scroll after jump to ensure inputs are visible
2166
+ setTimeout(() => {
2167
+ scrollToBottom();
2168
+ }, 350);
2169
+
2170
+ // ✅ NEW: Additional delayed scroll for cases with multiple showMessage calls
2171
+ setTimeout(() => {
2172
+ scrollToBottom();
2173
+ }, 500);
2174
+
2153
2175
  return;
2154
2176
  } else {
2155
2177
  console.error(`Invalid step number: ${targetStep}`);
@@ -2642,6 +2664,17 @@ async function showNextStep() {
2642
2664
  chatState.currentSelection = null;
2643
2665
  disableNextButton();
2644
2666
  await showNextStep();
2667
+
2668
+ // ✅ NEW: Extra scroll after jump to ensure inputs are visible
2669
+ setTimeout(() => {
2670
+ scrollToBottom();
2671
+ }, 350);
2672
+
2673
+ // ✅ NEW: Additional delayed scroll for cases with multiple showMessage calls
2674
+ setTimeout(() => {
2675
+ scrollToBottom();
2676
+ }, 500);
2677
+
2645
2678
  return;
2646
2679
  } else {
2647
2680
  console.error(`❌ No step found with name: "${stepName}"`);
@@ -2674,6 +2707,17 @@ async function showNextStep() {
2674
2707
  chatState.currentSelection = null;
2675
2708
  disableNextButton();
2676
2709
  await showNextStep();
2710
+
2711
+ // ✅ NEW: Extra scroll after jump to ensure inputs are visible
2712
+ setTimeout(() => {
2713
+ scrollToBottom();
2714
+ }, 350);
2715
+
2716
+ // ✅ NEW: Additional delayed scroll for cases with multiple showMessage calls
2717
+ setTimeout(() => {
2718
+ scrollToBottom();
2719
+ }, 500);
2720
+
2677
2721
  return;
2678
2722
  } else {
2679
2723
  console.error(`Invalid step number: ${targetStep}`);