Skip to content

Commit

Permalink
Merge pull request #802 from lucagobbi/develop
Browse files Browse the repository at this point in the history
bugfix check exit intent on wait confirm
  • Loading branch information
pieroit committed May 5, 2024
2 parents 1c944e3 + c908b8d commit 8b1afd7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/cat/experimental/form/cat_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,20 @@ def next(self):
# could we enrich prompt completion with episodic/declarative memories?
#self.cat.working_memory.episodic_memories = []

if self.check_exit_intent():
self._state = CatFormState.CLOSED

# If state is WAIT_CONFIRM, check user confirm response..
if self._state == CatFormState.WAIT_CONFIRM:
if self.confirm():
self._state = CatFormState.CLOSED
return self.submit(self._model)
else:
self._state = CatFormState.INCOMPLETE
if self.check_exit_intent():
self._state = CatFormState.CLOSED
else:
self._state = CatFormState.INCOMPLETE

if self.check_exit_intent():
self._state = CatFormState.CLOSED

# If the state is INCOMPLETE, execute model update
# (and change state based on validation result)
Expand Down

0 comments on commit 8b1afd7

Please sign in to comment.