impact-chatbot 3.1.6 → 3.1.7

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/dist/index.cjs.js CHANGED
@@ -9367,7 +9367,10 @@ const SurfaceFrameContent = ({ frame, isFormDisabled = false, messageIndex = 0 }
9367
9367
  if (prompt)
9368
9368
  window.dispatchEvent(new CustomEvent(PROMPT_EVENT, { detail: prompt }));
9369
9369
  }
9370
- else if (data.type === "iui:change" && ask && own) {
9370
+ else if (data.type === "iui:change" && ask && own && !isFormDisabled) {
9371
+ // only while the form waits: once it is submitted or timed out, its page repeats its values every time
9372
+ // the surface is posted into it (disabled after Submit, again on each step of the run), and in
9373
+ // chatbotContext those would be sent in place of the next message the user types
9371
9374
  const values = data.values || {};
9372
9375
  setForm({ values, inputs: Array.isArray(data.inputs) ? data.inputs : Object.keys(values), missing: Array.isArray(data.missing) ? data.missing : [] });
9373
9376
  // as this chat's own inputs record their values, for the step form's Submit (ButtonContent)