DEV Community

Mike Molinari
Mike Molinari

Posted on

Using ASTs to merge LLM generated snippets in to existing code files with surgical precision.

https://github.com/mmiscool/aiCoder

I’m thrilled to share aiCoder, a project that brings a fresh approach to AI-assisted JavaScript development! By harnessing the power of Abstract Syntax Trees (ASTs), aiCoder makes merging AI-generated code into existing projects smarter and more reliable than ever. Unlike traditional line-based methods that can lead to frustrating conflicts or overwrites, aiCoder works at the syntactic level, ensuring that every snippet integrates seamlessly while preserving the structure and logic of your code. It even keeps your comments intact, so your code stays clear and readable. I’m incredibly excited about how this tool is transforming the way we collaborate with AI, and I can’t wait to see how it boosts productivity and creativity for developers everywhere!

Slide deck explaining how the interesting bits work.
https://docs.google.com/presentation/d/1xdX09ELgW7lMU1E9KWIrpibUYVT1wdaiSvUhFhAT7EI/edit?usp=sharing

Top comments (0)