VEXVEX turns code written in VS Code into an interactive lesson. It sends the active file, or the selected code, to Gemini and presents a short quiz that explains the code's behavior, architecture, and tradeoffs. Use It
You can also run VEX: Generate Quiz from Current File from the Command Palette. If you select code before running it, VEX teaches from that selection instead of the whole file. Teaching Modes
Requirements
The key is sent only to Google's Gemini API over HTTPS. Source code is included in the request so Gemini can create an evidence-based quiz. DevelopmentRun Architecture
Inspecting Local AnalysisThe analyzer only reads the active editor document. It uses VS Code's document symbol provider for language-aware symbols and adds lightweight import/export entries from the active file. It does not scan or send the entire workspace. To inspect the discovered structure:
The quiz still contains five questions. Gemini receives the active file source plus the local symbol structure, never the rest of the workspace. Workspace ContextVEX also builds a small ranked subset around the active file. Direct relative imports score 50, direct importers score 20, second-level related files score 20, and referenced symbols or definitions score 40. The active file itself scores 100. The analyzer does not recursively load the whole dependency graph. These limits can be changed under Settings > Extensions > VEX:
The complete active file remains the primary source sent to Gemini. Related files contribute only their highest-ranked metadata and budgeted excerpts. Gemini Context SelectionBefore the Gemini request, Selector limits are configurable under Settings > Extensions > VEX:
Token estimates use approximately four characters per token and do not require a tokenizer dependency. The extension logs Git Change ContextWhen the active file is inside a Git repository, VEX reads the current working-tree diff with Git analysis is optional. If Git is unavailable, the folder is not a repository, or the diff cannot be read, VEX continues generating the normal active-file quiz without change context. Git diagnostics are logged under Agent Summary APIAn external coding-agent integration can provide an optional The summary is treated as observable input only. VEX does not generate or infer it, and it never attempts to retrieve hidden model reasoning. The combined summary is normalized to a strict maximum of 300 words. When no summary is supplied, the Copilot Chat HandoffVS Code does not expose a public API for third-party extensions to silently read an existing GitHub Copilot Chat transcript. VEX therefore provides an explicit This does not scrape Copilot's private history or chain-of-thought. If VEX was not mentioned in a chat session, that session's prior turns are not available to VEX through the public API. Quiz Code ReferencesEach quiz question may include a validated reference to a file, symbol, and one-based line range from the supplied Local Learning HistoryVEX stores quiz attempts locally in VS Code workspace state. Each attempt contains only the question, concept, correctness, difficulty, timestamp, and associated file/project. The store is bounded to the most recent 200 attempts. Before generating a quiz, VEX derives a compact learner profile containing understood concepts, frequently missed concepts, recent topics, and an approximate difficulty level. Only that profile is included in the Gemini context; the complete learning history is never transmitted. Repeated misses increase the priority of that concept, while consistently correct concepts are eligible for fewer basic questions. Gemini Request CachingVEX hashes active source, bounded project structure, Git changes, learner profile, agent summary, and context settings. It locally caches active-file analysis, project structure, assembled learning contexts, and validated quizzes in VS Code workspace state. API keys are never cached or included in cache keys. Normal quiz generation reuses a cached quiz when the relevant context, mode/difficulty, learner profile, and five-question count are unchanged. Use VEX: Regenerate Quiz (Bypass Cache) or the Regenerate quiz button to force a new Gemini request. Cache decisions are logged under |