feat: clear state after stopping interpretation

This commit is contained in:
karishmas6
2024-06-05 04:33:52 +05:30
parent 5ce97d12ce
commit 2741f3fd16

View File

@@ -186,10 +186,21 @@ export class WorkflowInterpreter {
logger.log('info', 'Stopping the interpretation.');
await this.interpreter.stop();
this.socket.emit('log', '----- The interpretation has been stopped -----', false);
this.clearState();
} else {
logger.log('error', 'Cannot stop: No active interpretation.');
}
};
}
private clearState = () => {
this.debugMessages = [];
this.interpretationIsPaused = false;
this.activeId = null;
this.interpreter = null;
this.breakpoints = [];
this.interpretationResume = null;
this.serializableData = [];
this.binaryData = [];
}
}