lisichatbot 2.1.1 → 2.1.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 +5 -4
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -231,10 +231,11 @@ function updateEditIcons() {
|
|
|
231
231
|
// ✅ FIX: In edit mode, show edit icons for all completed steps (not just previous)
|
|
232
232
|
const shouldShowInEditMode = chatState.chatMode === 'edit' && chatState.completed && isLatest;
|
|
233
233
|
const shouldShowNormally = stepNumber < chatState.step && isLatest;
|
|
234
|
-
// ✅ In editSteps mode, show
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
// ✅ In editSteps mode, show for visited steps (not the current one being shown)
|
|
235
|
+
const isInEditStepsMode = chatState.editSteps && chatState.editSteps.length > 0;
|
|
236
|
+
const editStepPosition = isInEditStepsMode ? chatState.editSteps.indexOf(stepNumber) : -1;
|
|
237
|
+
const shouldShowInEditSteps = isInEditStepsMode && isLatest &&
|
|
238
|
+
editStepPosition !== -1 && editStepPosition < chatState.editStepsIndex;
|
|
238
239
|
|
|
239
240
|
if ((hasInput || forceShowEdit) && (shouldShowInEditMode || shouldShowNormally || shouldShowInEditSteps)) {
|
|
240
241
|
editIcon.onclick = (e) => {
|