in preferences.py [0:0]
def reset_backend(self, context):
backend = Backend.instance()
backend.reset()
props = bpy.context.scene.meshgen_props
props.state = "READY"
props.history.clear()
for window in bpy.context.window_manager.windows:
for area in window.screen.areas:
if area.type in ["PREFERENCES", "VIEW_3D"]:
area.tag_redraw()