I’m trying to get a SnoopCompile workflow going inside a Pluto notebook. Since SnoopCompile requires a lot of process restarts, it would be nice to have a “Restart” button. I think that this should be possible by sending a CustomEvent to the backend, but I’m unable to locate the current notebook id.
Uncaught TypeError: Cannot read properties of undefined (reading 'notebook')
at restart_nb (eval at ga (editor.9e18b711.js:248:175), <anonymous>:12:30)
at HTMLButtonElement.button.onclick (eval at ga (editor.9e18b711.js:248:175), <anonymous>:7:33)
So, the question is: where I can find the current notebook id?
Not a direct answer to your question but Pluto already has a restart option which gets triggered when you make changes to your environment, maybe have a look into how that works?
Answering your question did help out The following code sets the process status to “no_process”. Clicking next to the cell will then show the “Restart required” message: