Opencode: Second Impression
Last time I wrote about my first experience using opencode, I was using (and learning) opencode CLI
This time, I switched to Zed editor.
Zed is so amazing that it can work with “Agents” installed on your machine (or it can install them for you) via ACP - Agent Control Protocol
It recognized that opencode was already installed on the machine, and show it in the drop down.
I decided to take it for spin.
So I used Zed’s AI pane, which has opencode embedded in it ❓🤔
So I was indeed talking to opencode, but only in right pane of Zed. 1
It means I could have been using opencode CLI and I would have got the same result (without other Zed panes like file editor, git integration etc.)
OK, that is all fine, but how did opencode perform? You ask.
Excellent!
I used the recommended OpenCode Zen/Big Pickel model.
I gave it the task to port blowfish to my existing hugo theme.
I did couple of things right 😄
I opened parent folder containing my blog, my theme repo and folder where I was trying blowfish locally.
So it had access to both blowfish code, as well as my theme’s code.
Possibly due to idiosyncrasies of my theme, it took some iterations to get to 80%
Remaining 20% took another 80% time (Such is the 80-20 principle 😂)
It made some big blunders in the first go (where the task was high level - port blowfish to my theme)
So I asked it to fix the issues one by one.
And it worked!
At one point though, it committed the go.mod containing the replace directive, which is used for locally testing the theme. 2
I had to manually fix the file and commit the change
I also reviewed the git diffs (when it was only make code changes - no git commits) and asked questions where needed.
It caught some issues (and fixed them) while answering my query.
The last/final part that impressed me was that one change worked locally, but was breaking when deployed to Netlify.
We both (me and opencode) struggled a lot.
Finally it suggested that Netlify has older hugo version installed.
I was skeptical at first, but having no other option, I decided to try it.
and it worked!
I may not have guessed it.
But opencode did.
🙏
I admit, I was harsh during my first interaction with opencode, but it has grown on me.
So current impression about opencode ?
It is awesome!
✌️