I had been meaning to give ChatGPT a go. Preferably from Emacs. As an eshell fan, ChatGPT just seemed like the perfect fit for a shell interface sorts. With that in mind, I set out to wire ChatGPT out with Emacs’s general command interpreter (comint).
I had no previous experience building anything comint-related, so I figured I could just take a peak at an existing comint-derived mode to achieve a similar purpose. inferior-emacs-lisp-mode
(ielm) seemed to fit the bill just fine, so I borrowed quite a bit to assemble a basic shell experience.
From then on, it was mostly about sending each request over