<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jitesh Sharma on Medium]]></title>
        <description><![CDATA[Stories by Jitesh Sharma on Medium]]></description>
        <link>https://medium.com/@jitesh.shar01?source=rss-345c39cb84b7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3KYFwVWp4aispj03</url>
            <title>Stories by Jitesh Sharma on Medium</title>
            <link>https://medium.com/@jitesh.shar01?source=rss-345c39cb84b7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 23:36:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jitesh.shar01/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Built a Local AI Coding Agent Inside VS Code. Here’s What I Learned.]]></title>
            <link>https://medium.com/@jitesh.shar01/freecoder-local-ai-5454c00bd560?source=rss-345c39cb84b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5454c00bd560</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[vscode-extension]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[ollama]]></category>
            <dc:creator><![CDATA[Jitesh Sharma]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 15:15:45 GMT</pubDate>
            <atom:updated>2026-11-01T15:15:45.324Z</atom:updated>
            <content:encoded><![CDATA[<p>Writing my first Medium article feels a little strange. I’m more comfortable writing code than writing about it, but I thought this project was worth sharing.</p><p>You know that small pause before pasting your code into an AI chat tool? The moment when you wonder whether you should really be sending your code somewhere else?</p><p>I’ve had that thought more times than I’d like to admit.</p><p>So I started building something called <strong>FreeCoder</strong>.</p><p>It’s a VS Code extension that runs AI locally using Ollama. My code stays on my machine, there’s no subscription, and the agent can’t modify files without my approval.</p><p>Before making any changes, it shows me a plan and a diff. I review them first, and only then can it apply the changes.</p><p>One thing to mention: this is still a learning project. I haven’t published it on the VS Code Marketplace or npm. I’m mainly experimenting to see how much a small local model can actually do.</p><p>Here’s a quick look at how it works.</p><figure><img alt="freecoder-create-file" src="https://cdn-images-1.medium.com/max/928/1*m8DDVsfplHO3Ghz8h7l4fw.gif" /></figure><h3>Why I built it</h3><p>There were three reasons behind this project.</p><ul><li><strong>Cost:</strong> Most AI coding tools with agent capabilities require a subscription. I wanted to experiment something without another monthly expense.</li><li><strong>Privacy:</strong> Not all code is suitable for sharing with external AI services. Running a model locally felt like a better option.</li><li><strong>Curiosity:</strong> I wanted to find out whether a small model running on an ordinary laptop could handle coding tasks without relying on a large cloud model.</li></ul><p>The last reason was probably the biggest one.</p><h3>A quick look at FreeCoder</h3><p>FreeCoder lives in the VS Code sidebar and currently has three main features:</p><ul><li><strong>Chat:</strong> Chat with a locally running Ollama model.</li><li><strong>Project Map:</strong> Understand the project structure and relationships between files.</li><li><strong>Agent:</strong> Plan changes, generate code, show diffs, apply changes, validate, and undo.</li></ul><p>All the demos in this article use qwen3.5:4b through Ollama.</p><figure><img alt="freecoder-chat" src="https://cdn-images-1.medium.com/max/480/1*aydryM0iq9EtsrdukafhRw.gif" /></figure><p>[GIF: freecoder-project-map.gif]</p><p>[IMAGE: sidebar next to config.yaml]</p><h3>How the agent works</h3><p>I didn’t want the AI to directly modify files after receiving a prompt.</p><p>Instead, I divided the process into six steps:</p><ol><li><strong>Understand:</strong> A resolver checks whether the request is clear. If something is ambiguous, it asks for clarification.</li><li><strong>Plan:</strong> A planner identifies which files need to be created, modified, or deleted.</li><li><strong>Generate:</strong> After approval, the model generates the changes.</li><li><strong>Review:</strong> The proposed changes open in VS Code’s diff editor.</li><li><strong>Apply:</strong> I review the diff and decide whether to apply it.</li><li><strong>Validate:</strong> FreeCoder runs available project checks and provides an Undo option.</li></ol><figure><img alt="diff-review" src="https://cdn-images-1.medium.com/max/1024/1*niQN-h-QYXDX4pCLnZxEFQ.png" /></figure><p>Why so many steps?</p><p>Because small models can be confidently wrong. I’d rather spend a few seconds reviewing a diff than spend my evening fixing something the AI decided to change.</p><h3>Giving the model the right context</h3><p>This was one of the more interesting problems. Small models have limited context windows. Sending the entire project with every request didn’t seem like a good idea.</p><p>I also wanted to avoid introducing a vector database.</p><p>Instead, I used the TypeScript compiler API to build a simple import graph. It tracks which JavaScript and TypeScript files import other files. When the agent works on a file, it gets the target file, its dependencies, the files that depend on it, and relevant search results.</p><p>It doesn’t need the entire project to make a reasonably informed change.</p><p>My demo project produced 14 files and 14 relationships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*z-wtanEZI4z5xssgS3VKsA.gif" /></figure><h3>Making sure the AI doesn’t mess up my files</h3><p>This was probably the part I spent the most time thinking about.</p><p>I wanted the agent to be useful, but I didn’t want it to have complete control over my project. So I added three safeguards.</p><p><strong>1. Read-only diff</strong></p><p>The proposed changes open in a read-only virtual document. I can review them, but I can’t accidentally edit or save the generated version.</p><p><strong>2. Check before applying</strong></p><p>If I manually change a file after the model has read it, FreeCoder detects the difference and stops the operation instead of overwriting my work.</p><p><strong>3. Safe undo</strong></p><p>After applying changes, FreeCoder remembers exactly what it wrote. Before undoing, it checks whether the file has changed again.</p><p>If I’ve made additional edits, Undo refuses to overwrite them.</p><p>I actually like this behavior more than some of the bigger features. An AI tool should know when not to touch something.</p><figure><img alt="Undo changes" src="https://cdn-images-1.medium.com/max/1000/1*BU2JsR80Wzdms8YkFWpumg.gif" /></figure><h3>Checking the generated code</h3><p>After applying changes, FreeCoder looks for existing scripts in package.json, such as:</p><ul><li>typecheck</li><li>lint</li><li>test</li></ul><p>It runs whichever scripts are available and displays whether they passed, failed, or were skipped.</p><p>In one of my demos, npm run lint passed in 4.4 seconds.</p><p>It’s basic validation, but it’s a useful starting point.</p><h3>What it can’t do yet</h3><p>FreeCoder is still far from being a replacement for tools like Cursor. There are quite a few limitations:</p><ul><li>It currently supports local Ollama models for agent operations.</li><li>The knowledge graph tracks imports, not function-level relationships.</li><li>The main focus is JavaScript and TypeScript.</li><li>Rename operations and larger refactoring tasks aren’t supported yet.</li><li>Validation only runs existing npm scripts.</li><li>Undo currently covers the last completed task.</li><li>It generates complete files rather than smaller patches.</li><li>Small models can be slow. Planning alone took over a minute in one recording.</li></ul><p>For now, I’d rather make the existing workflow reliable than keep adding features.</p><h3>Trying it yourself</h3><p>FreeCoder isn’t published on the VS Code Marketplace yet, but the source code is available on GitHub.</p><p><strong>Repository:</strong> <a href="https://github.com/Jiteshsharma01/freecoder">https://github.com/Jiteshsharma01/freecoder</a></p><p>To try it:</p><ol><li>Install <a href="https://ollama.com/">Ollama</a>.</li><li>Pull a model such as qwen3.5:4b.</li><li>Download the project and install the .vsix file through VS Code&#39;s Extensions panel using <strong>Install from VSIX...</strong>.</li><li>Open the FreeCoder sidebar and select your model.</li></ol><p>I’d suggest starting with a small task and reviewing the generated diff before applying anything.</p><h3>A small takeaway</h3><p>When I started this project, I thought getting a local model to generate code would be the difficult part.</p><p>It wasn’t.</p><p>The harder part was deciding what the model should see, when it should ask questions, and how to make sure it couldn’t accidentally damage existing work.</p><p>I learned that a small model can do quite useful things when the system around it is designed properly.</p><p>FreeCoder is still a work in progress, and I have plenty left to figure out.</p><p>But for now, I’m happy that it works.</p><p>And writing this article was probably more uncomfortable than debugging the extension (at least the extension doesn’t expect me to publish my thoughts publicly).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5454c00bd560" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>