N-Jet VS Code Extension
AI coding agent sidebar for VS Code — connects to the N-Jet backend with repository awareness, self-validation, and streaming responses.
v0.3.0 moves N-Jet from "AI chat with code awareness" toward a coding agent that verifies its own work.
Features
- Activity bar N-Jet icon with sidebar webview (React)
- Auto-connect on startup when a token is stored in SecretStorage
- Status bar indicator: Connecting, Connected, Reconnecting, Authentication failed, Offline
- Progressive diagnostics: Connecting → Checking server → Validating account → Connected as user@email.com
- N-Jet: Login opens browser sign-in at
https://www.n-jetai.com/njet/vscode-connect (no token paste required)
- Browser handoff uses your existing n-jetai.com Supabase session and returns
vscode://n-jetcoder.njet/auth?token=...
- Token fallback: N-Jet: Login with API Token (only when browser sign-in is unavailable)
- Workspace header: project name, git branch, workspace path, indexed file count
- Repository intelligence: framework, language, package manager, build system, database detection
- Persistent local index + cross-session workspace memory for symbol lookups
- Incremental re-index on file save;
N-Jet: Reindex Repository command
- Multi-file planning for large feature requests before streaming a response
- Self-validation loop: after edits, runs
npm run build, lint, typecheck, and test (when present); auto-fixes failures up to 3 retries
- Diff preview: side-by-side old/new diffs via
vscode.diff; Accept all / Reject / Accept selected files
- Agent confidence: Low / Medium / High score before applying edits (context coverage + validation history)
- Symbol graph: import/export, API routes, and database model edges for cross-file reasoning
- Context efficiency: caps symbols, file excerpts, and graph neighbors to keep prompts small
- Error-aware coding: parses build/lint/type errors and streams fixes without asking for pasted logs
- Agent file editing: parses
njet-edit blocks and applies workspace changes with confirmation
- Preview integration:
N-Jet: Open Preview + detected Vite/Next/Node dev URLs in context
- Model modes: Fast / Balanced / Deep (composer selector +
njet.modelMode setting)
- Session restore across extension reloads (chat history + account)
- Health check (
GET /api/v1/health) and auth validation (GET /api/v1/me)
- Auto-reconnect on network loss, backend restart, and extension reload
- Debug logging:
[NJET_EXTENSION_*], [NJET_INDEX], [NJET_VALIDATE], [NJET_EDIT], [NJET_PLAN]
- Secure token storage via VS Code SecretStorage
- N-Jet: Login command for API token entry
- Streaming chat via
POST /api/v1/chat (SSE)
Settings
| Setting |
Default |
Description |
njet.apiBaseUrl |
https://api.n-jetai.com |
API origin (without /api/v1) |
njet.apiToken |
— |
Use N-Jet: Login instead (SecretStorage) |
njet.projectId |
general |
Project ID sent with chat requests |
Development
cd extensions/njet
npm install
npm install --prefix webview
npm run build
Press F5 in VS Code with the extensions/njet folder open (or add a launch config) to run the Extension Development Host.
Commands
- N-Jet: Login — browser sign-in (token fallback: Login with API Token)
- N-Jet: Logout — clear stored token
- N-Jet: Open Chat — focus the sidebar
- N-Jet: Reindex Repository — rebuild index + symbol graph
- N-Jet: Run Validation — run build/lint/typecheck/test suite manually
- N-Jet: Apply Pending Edits — apply queued agent proposals
- N-Jet: Open Preview — open detected dev preview URL
Agent workflow (v0.3.0)
- User request → repository index + symbol graph + compact context injected
- Multi-file plan streamed with assistant response
njet-edit blocks parsed → diff preview with confidence badge
- User accepts (all or selected files) → edits applied
- Validation suite runs → failures summarized → auto-fix stream (max 3 retries)
- Success or final failure surfaced in sidebar + Output channel
| |