4 ms·
I've been building and using these tools for well more than a year now, so here's my journey on building and using them (ORDER BY DESC datetime). (1) My view n
by jeswin 2y ago
I've been building and using these tools for well more than a year now, so here's my journey on building and using them (ORDER BY DESC datetime).
(1) My view now (Nov 2024) is that code building is very conversational and iterative. You need to be able to tweak aspects of generated code by talking to the LLM. For example: "Can you use a params object instead of individual parameters in addToCart?". You also need the ability to sync generated code into your project, run it, and pipe any errors back into the model for refinement. So basically, a very incremental approach to writing it.
For this I made a Chrome plugin, which allowed ChatGPT and Claude to edit source code (using Chrome's File System APIs). You can see a video here: https://www.youtube.com/watch?v=HHzqlI6LLp8 https://www.youtube.com/watch?v=HHzqlI6LLp8
The code is here, but its WIP and for very early users; so please don't give negative reviews yet: https://github.com/codespin-ai/codespin-chrome-extension https://github.com/codespin-ai/codespin-chrome-extension
(2) Earlier this year, I thought I should build a VS Code plugin. It actually works quite well, allows you to edit code without leaving VSCode. It does stuff like adding dependencies, model selection, prompt histories, sharing git diffs etc. Towards the end, I was convinced that edits need to be conversations, and hence I don't use it as much these days.
Link: https://github.com/codespin-ai/codespin-vscode-extension https://github.com/codespin-ai/codespin-vscode-extension
(3) Prior to that (2023), I built this same thing in CLI. The idea was that you'd include prompt files in your project, and say something like `my-magical-tool gen prompt.md`. Code would be mostly written as markdown prompt files, and almost never edited directly. In the end, I felt that some form of IDE integration is required - which led to the VSCode extension above.
Link: https://github.com/codespin-ai/codespin https://github.com/codespin-ai/codespin
All of these tools were primarily built with AI. So these are not hypotheticals. In addition, I've built half a dozen projects with it; some of it code running in production and hobby stuff like webjsx.org.
Basically, my takeaway is this: code editing is conversational. You need to design a project to be AI-friendly, which means smaller, modular code which can be easily understood by LLMs. Also, my way of using AI is not auto-complete based; I prefer generating from higher level inputs spanning multiple files.
- skp1995 2y agothats a great way to build a tool which solves your need. In Aide as well, we realised that the major missing loop was the self-correction one, it needs to iteratively expand and do more Our proactive agent is our first stab at that, and we also realised that the flow from chat -> edit needs to be very free form and the edits are a bit more high level. I do think you will find value in Aide, do let me know if you got a chance to try it out
- jeswin 2y ago> I do think you will find value in Aide, do let me know if you got a chance to try it out Absolutely, will do it over the weekend. Best of luck with the launch.
- DeathArrow 2y ago>I do think you will find value in Aide, do let me know if you got a chance to try it out Is there a relationship between Aide and Aider or it's just a name resemblance?
- skp1995 2y agojust a name resemblance, no relationship otherwise
- DeathArrow 2y agoBut why use the web interface instead of Copilot, Cursor, Zed, Cline, Aider?
- jeswin 2y agoThere are some advantages. 1) Cost. More people have ChatGPT/Claude than CoPilot. And it's cheaper to load large contexts into ChatGPT than into the API. For example, o1-preview is $15/million tokens. And it's a fixed $20/m that someone can use for everything else as well. Of course, there are times when I just use the VS Code plugin via API as well. 2) I want to stay in VS Code. So that excludes some of the options you mentioned 3) I don't find tiled VSCode + ChatGPT much of a hindrance. 4) Things might have improved a bit, but previously the Web-based chat interface was more refined/mature than the integrated interface.