lisichatbot 2.0.1 → 2.0.2
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 +8 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -213,16 +213,21 @@ function updateEditIcons() {
|
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
|
|
216
|
+
// ✅ FIX: In edit mode, keep edit icons visible even after completion
|
|
217
|
+
if (chatState.completed && chatState.chatMode !== 'edit') {
|
|
217
218
|
editIcon.style.setProperty('display', 'none', 'important');
|
|
218
|
-
console.log(` 🏁 Step ${stepNumber}: Icon HIDDEN (flow completed)`);
|
|
219
|
+
console.log(` 🏁 Step ${stepNumber}: Icon HIDDEN (flow completed in create mode)`);
|
|
219
220
|
return;
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
// ✅ NEW: Check if edit icon should be forced to show (even without input)
|
|
223
224
|
const forceShowEdit = stepData && stepData.showEditIcon === true;
|
|
224
225
|
|
|
225
|
-
|
|
226
|
+
// ✅ FIX: In edit mode, show edit icons for all completed steps (not just previous)
|
|
227
|
+
const shouldShowInEditMode = chatState.chatMode === 'edit' && chatState.completed && isLatest;
|
|
228
|
+
const shouldShowNormally = stepNumber < chatState.step && isLatest;
|
|
229
|
+
|
|
230
|
+
if ((hasInput || forceShowEdit) && (shouldShowInEditMode || shouldShowNormally)) {
|
|
226
231
|
editIcon.onclick = (e) => {
|
|
227
232
|
e.stopPropagation();
|
|
228
233
|
e.preventDefault();
|