DEV Community

dinesh0666
dinesh0666

Posted on

I built a VS Code extension that blocks AI so you can actually learn to code

🧘 I Built a VS Code Extension That Forces You to Code Without AI

We've all been there — you're stuck on a problem, so you hit Cmd+I, Copilot spits out 40 lines, and you paste it in. Problem "solved." But did you solve it?

I built Raw Code Focus — a VS Code extension that completely blocks all AI assistance for a timed session, so you can actually practice thinking through problems yourself.


What It Does

When you start a session:

  • 🚫 Copilot inline completions, Next Edit Suggestions, and Chat are all disabled
  • 🚫 TabNine, Codeium, and VS Code's built-in inline suggestions are off
  • 🚫 The "Generate code ⌘I" hint is hidden
  • ⏱ A live countdown sits in your status bar (turns yellow under 5 min)
  • 📊 Stats are tracked — streaks, total focus time, completion rate

When time's up, everything is silently restored to exactly how it was.


Why I Built It

I noticed I was reaching for Copilot before I'd even fully read the error. That's not learning — it's outsourcing thinking.

Raw Code Focus gives you a guilt-free way to say "for the next hour, it's just me and the compiler." Like going to the gym without a spotter for every rep.


The Tricky Part — Actually Blocking Copilot

Turns out, just toggling one setting isn't enough. Copilot has multiple entry points:

"github.copilot.editor.enableAutoCompletions": false,
"github.copilot.enable": { "*": false },
"github.copilot.inlineSuggest.enable": false,
"github.copilot.nextEditSuggestions.enabled": false,
"inlineChat.enabled": false,
"chat.commandCenter.enabled": false,
"workbench.editor.empty.hint": "hidden"
Enter fullscreen mode Exit fullscreen mode

And settings must be written to both Global and Workspace targets — otherwise a workspace config can silently override the block.

The extension also re-checks every 3 seconds and closes any chat panels that get reopened, so there's no sneaking around it.


The Dashboard

Open the dashboard with Raw Code Focus: Open Dashboard to see:

  • 🔥 Current and longest day streak
  • ⏱ Total accumulated focus time
  • ✅ Session completion rate
  • 📋 Recent session history

Install It

Search Raw Code Focus in VS Code Extensions, or grab it directly:

👉 marketplace.visualstudio.com/items?itemName=DhineshKumar.raw-code-focus

Source code: github.com/dinesh0666/ai-detox


Roadmap

  • [ ] Pomodoro-style session scheduler
  • [ ] Custom session goals and notes
  • [ ] Weekly stats summary notification

Give it a try and let me know what you think! And if you have ideas for what else should be blocked (looking at you, ChatGPT side-by-side windows 👀), drop them in the comments.

Top comments (0)