Closed zhujessica closed 3 years ago
Worked for me! A couple notes:
- Instead of setting the variable to 0, could we set it to
None
?- Could we prepend the
CreateVariableAction
's for each variable to the program (instead of appending them)? That way, they're set before any action in the program occurs, similar to how Convo asks for the variables before any action in the program occurs
- I don't think I can currently set the variable to 'None' as is since Convo uses that as a default value of prompting the user for an input. In the case of creating a variable, a user always has to answer the question 'What should be the initial value?' So there are two options here: one is leaving it as is, or giving it a different value than just '0', or the second value is when the user connects an intent to a procedure, automatically prompt the user to give an initial value for any entities/variables. I agree that the first option isn't really the best, and a default value of 0 is not ideal. The only issue with the second is that it might confuse the user since they might not want the variable to have a 'default' value, and they only want user input. What do you think?
Makes sense— Yes, for now let's leave it, and if we run into issues with it being 0 later, we can deal with it then.
Feel free to merge this!
When a user connects an intent to a procedure, any entities corresponding to that intent are created as variables (set to a default value of 0) in the procedure. This action is added onto the end of the list of actions associated with the procedure. The user can then proceed to edit the procedure and use the variables/entities associated with that intent. When running a procedure via recognizing an intent, we take any values the user gives as entities and replace the original
CreateVariableAction
with a newCreateVariableAction
that is set to the new value given by the user.