File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,11 @@ function makeEvents(config) {
252
252
} , `Ran the last interaction, ${ interaction } .` , state ) ;
253
253
} ) ;
254
254
255
+ async function clearInteractions ( state ) {
256
+ interactionsSinceLastRun = [ ] ;
257
+ $ ( "#output" ) . empty ( ) ;
258
+ }
259
+
255
260
async function runInteraction ( src , reportAnswer ) {
256
261
// Because of a bug we introduced, a bunch of rooms ended up with states with null
257
262
// interactions. If left null, they will put the editor into an unrecoverable state.
@@ -395,6 +400,9 @@ function makeEvents(config) {
395
400
stop ( ) ;
396
401
addMessage ( { process : async ( ) => { return runProgram ( state ) ; } } ) ;
397
402
break ;
403
+ case "clearInteractions" :
404
+ addMessage ( { process : async ( ) => { return clearInteractions ( state ) ; } } ) ;
405
+ break ;
398
406
case "setContents" :
399
407
addMessage ( { process : async ( ) => { return editorUpdate ( message . text ) ; } } ) ;
400
408
break ;
You can’t perform that action at this time.
0 commit comments