Learning Copilot
Learning Copilot is a VS Code extension that uses the GitHub Copilot CLI to:
- generate or modify real project files from a prompt
- automatically convert those solutions into a guided learning scaffold
- create
LEARNING_EXERCISES.md plus an instructor-only answer key
- let learners reveal hints or apply solutions for individual blanks
What It Does
After code generation/modification, the extension can scaffold the result by:
- masking selected logic with typed blank markers (
__LC_BLANK_<id>_START__/END__)
- saving solution mappings (per blank id)
- writing learner instructions to
LEARNING_EXERCISES.md
- saving private artifacts (full solution snapshots + answer keys) in extension storage
It also supports:
- side-by-side compare of current file vs saved solution snapshot
- revealing/applied blank solutions at cursor or next blank
- marking blanks done while keeping your own implementation
Requirements
- VS Code
^1.109.0
- GitHub Copilot CLI access (the extension can install it for you)
- A GitHub account with Copilot entitlement
- Open a workspace/folder before running commands
Quick Start
- Open a project folder in VS Code.
- Run
Learning Copilot: Install/Setup Copilot CLI.
- Run
Learning Copilot: Generate Code Files from Prompt (new project) or Learning Copilot: Modify Workspace From Prompt (existing project).
- Preview and approve file writes.
- Choose
Generate when prompted to build the learning scaffold.
- Work through blanks and exercises, then use blank commands as needed.
When authentication is missing, the extension prompts you to log in and opens a terminal flow for Copilot CLI login.
Commands
Learning Copilot: Install/Setup Copilot CLI
Learning Copilot: Generate Code Files from Prompt
Learning Copilot: Modify Workspace From Prompt
Learning Copilot: Compare Active File With Solution
Learning Copilot: Apply Solution For Blank At Cursor
Learning Copilot: Apply Solution For Next Blank
Learning Copilot: Show Hint For Blank At Cursor
Learning Copilot: Mark Blank As Done At Cursor
Learning Copilot: Open Latest Answer Key
Learning Copilot: Save Last Output
Settings
learningCopilot.copilotPath (default: copilot)
learningCopilot.autoInstallCopilotCli (default: true)
learningCopilot.copilotArgs (default: [])
Output and Storage
- Learner-facing exercises are written to
LEARNING_EXERCISES.md in your workspace.
- Full solution snapshots and answer keys are stored in extension global storage.
- Compare uses the latest snapshot and currently active file.
Development
npm install
npm run compile
Useful scripts:
npm run watch
npm run lint
npm run check-types
npm test
To run locally in VS Code:
- Open this repo.
- Press
F5 to launch an Extension Development Host.
- Run commands from the Command Palette.
Known Limitations
- Requires Copilot CLI availability and authentication.
- Scaffold quality depends on model output and prompt complexity.
- Snapshot/answer-key state is per extension storage, not per git branch.
License
See LICENSE if provided in this repository.
| |