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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisichatbot",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -213,16 +213,21 @@ function updateEditIcons() {
213
213
  return;
214
214
  }
215
215
 
216
- if (chatState.completed) {
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
- if ((hasInput || forceShowEdit) && stepNumber < chatState.step && isLatest) {
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();