lisichatbot 1.1.7 → 1.1.9
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 +11 -9
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -110,16 +110,18 @@ function addMessage(content, type = 'bot', hasInput = false, stepNumber = null)
|
|
|
110
110
|
editIcon.style.setProperty('display', 'none', 'important');
|
|
111
111
|
console.log(' ✓ Edit icon hidden (display: none !important)');
|
|
112
112
|
|
|
113
|
-
// Only show if this step has input
|
|
114
|
-
if (hasInput && stepNumber !== null) {
|
|
113
|
+
// Only show if this step has input AND it's a PREVIOUS step (not current)
|
|
114
|
+
if (hasInput && stepNumber !== null && stepNumber < chatState.step) {
|
|
115
115
|
editIcon.setAttribute('data-chat-step', stepNumber);
|
|
116
116
|
editIcon.onclick = (e) => {
|
|
117
117
|
e.stopPropagation();
|
|
118
118
|
editStep(stepNumber);
|
|
119
119
|
};
|
|
120
|
-
editIcon.style.setProperty('display', '
|
|
120
|
+
editIcon.style.setProperty('display', 'block', 'important');
|
|
121
121
|
editIcon.style.setProperty('margin-left', '8px', 'important');
|
|
122
|
-
console.log(` ✏️ Edit icon SHOWN (step ${stepNumber}
|
|
122
|
+
console.log(` ✏️ Edit icon SHOWN (step ${stepNumber} is previous step with input)`);
|
|
123
|
+
} else if (hasInput && stepNumber === chatState.step) {
|
|
124
|
+
console.log(` ⏸️ Edit icon HIDDEN (step ${stepNumber} is CURRENT step)`);
|
|
123
125
|
} else {
|
|
124
126
|
console.log(` ⚪ Edit icon HIDDEN (step ${stepNumber || 'N/A'} has no input)`);
|
|
125
127
|
}
|
|
@@ -147,15 +149,15 @@ function addMessage(content, type = 'bot', hasInput = false, stepNumber = null)
|
|
|
147
149
|
editIconAfterAppend.style.setProperty('display', 'none', 'important');
|
|
148
150
|
editIconAfterAppend.style.setProperty('margin-left', '8px', 'important');
|
|
149
151
|
|
|
150
|
-
// Only show if has input
|
|
151
|
-
if (hasInput && stepNumber !== null) {
|
|
152
|
-
editIconAfterAppend.style.setProperty('display', '
|
|
152
|
+
// Only show if has input AND it's a previous step
|
|
153
|
+
if (hasInput && stepNumber !== null && stepNumber < chatState.step) {
|
|
154
|
+
editIconAfterAppend.style.setProperty('display', 'block', 'important');
|
|
153
155
|
|
|
154
156
|
// Debug: Check spacing
|
|
155
157
|
setTimeout(() => {
|
|
156
158
|
const computedMargin = window.getComputedStyle(editIconAfterAppend).marginLeft;
|
|
157
|
-
const
|
|
158
|
-
console.log(` 📏
|
|
159
|
+
const computedDisplay = window.getComputedStyle(editIconAfterAppend).display;
|
|
160
|
+
console.log(` 📏 Edit icon - Display: ${computedDisplay}, Margin: ${computedMargin}`);
|
|
159
161
|
}, 100);
|
|
160
162
|
}
|
|
161
163
|
}
|