Can this be released as a plain ipynb add-in/extension?

That’s already a thing, and works rather well: https://github.com/jupyterlab/jupyter-ai

The repo README doesn’t make it obvious how it works, but if you go to the Chat Interface portion of the docs it’s illustrated: https://jupyter-ai.readthedocs.io/en/latest/users/index.html...