IntentLens is a VS Code extension that explains frontend code and diffs in human terms, ideal for reading legacy code, reviewing changes, and onboarding new team members.
Features
Explain Selected Code: Understand what a block of code intends to do in seconds.
Explain Diff Impact: See how a change affects behavior and risk areas.
Beginner Mode: Teaching-style explanations for new developers, mentors, and reviewers.
Quick Start
Configure settings:
intentlens.apiKey: Your OpenAI-compatible API key. DeepSeek keys usually start with sk-.
Result: Component renamed from loadingState to loadingState1 Behavior: Old references may break rendering Risk: All references must be updated, especially dynamic usage Checks: Update references, verify render/styles, refresh tests
Explain Diff Impact
Result: Rename affects reference consistency Impact: Stale references cause render failures Tests: Reference audit, style verification, regression coverage
Demo Scenarios
Onboarding a new dev into a React Hook: select a hook-heavy component and run Explain Selected Code.
Reviewing a form validation diff: run Explain Diff Impact to spot behavior changes and test ideas.
Investigating side effects and dependencies: use Beginner Mode to surface async flow and effect triggers.
Team Adoption Pitch
Instant clarity in reviews: understand intent and impact in ~10 seconds.
No workflow changes: works inside VS Code with two simple commands.
Great for onboarding: explains code like a senior pairing session.
Reduces review churn: highlights risks and missing tests early.
Handles legacy code: summarize intent without reading line-by-line.
Safe and flexible: use your own endpoint or company gateway.
Privacy & Security Notes
The extension sends selected code or file diffs to the configured LLM endpoint.
For enterprise usage, route through an internal gateway or Azure OpenAI.
IntentLens does not upload entire repositories.
FAQ
Why is there no output?
You might not have selected code, the file has no diff, or intentlens.apiKey is not set.
Why can't git diff be fetched?
The file may not be in a Git repo, or git is not available in PATH.
Can it support more languages or frameworks?
Yes. The prompts are language-agnostic; tweak them for your stack.
Can I use a local model?
Yes, if it exposes an OpenAI-compatible chat/completions endpoint.
Does it upload my whole repo?
No. Only the selected code or the unified diff for the active file.
How is this different from Copilot?
IntentLens focuses on explaining intent and impact, not code generation.