Dalius's blog

Thursday, July 17, 2025

AI attempts #2

I am still experimenting with LLM in programming and just want to share what works and what does not for me.

Tools I use or have used for context:

  • nvim + codecompanion - not using anymore as I don’t like where it is heading

  • nvim + gp.nvim - it is just chat in neovim, but it is all I need usually

  • opencode.ai - open source Claude Code alternative

First what has worked:

  • Generating unit tests for existing code without tests. This is absolutely awesome - I just give some context info and it generates tests for me. I just follow one rule: before using AI I plan what tests I expect to have.

  • Asking for simple snippets of code or questions how to do something. Usually results are good. Unless I ask for something that does not exists, then AI confidently says that you can do something, while actually I can’t. Quite frequently happens when asking about CLI params.

  • Converting webapp to generate PDFs in front-end instead of back-end. This one has partially worked. Initially it have tried to make it work with pdfkit (as in back-end), but has not managed to make it work in Browser. Then I allowed it to try different library. It has used jspdf. I had to instruct it to make some more changes and it has made almost working code. I had to fix one minor bug and it has generated PDF in front-end. It still need quite some changes, but I have initial working version what is quite cool.

    How I did that: opencode.ai + Claude Sonnet 3.5 via Github Copilot. I gave specific references to files where I want changes to be made.

What has not worked (opencode.ai):

  • Merging feature flags: this looked like something what AI could do easily. Unfortunately what is 5 minutes task for me is 30-60 minutes task for AI and even after that result is not good enough. I guess this could be useful if refined more and converted to script that runs in background and creates PR for my review. Maybe.

    How I did that: opencode.ai + Claude Sonnet 3.5 via Github Copilot. I have detailed instructions how to merge feature flags, what to look for, what to do and etc.

  • I wanted to convert ghlite.nvim plugin (Lua in Neovim) to be async instead of using callbacks (almost callback hell). I have tried to do that using opencode.ai by giving minimal instructions. It have tried to do that using co-routines and later plenary.nvim. Neither solution has worked.