this is very easy (and fun) to do in emacs with gptel as well
you can do a lot of very neat stuff when your llm has full access to a lisp repl that can self modify itself / the ui its running in