Skip to content
| Marketplace
Sign in
Visual Studio Code>Education>Cupcake Activity Authoring for VS CodeNew to Visual Studio Code? Get it now.
Cupcake Activity Authoring for VS Code

Cupcake Activity Authoring for VS Code

PAWS Lab

|
7 installs
| (0) | Free
Author, validate, and preview interactive Cupcake programming examples and exercises in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cupcake Activity Authoring for VS Code

Create, edit, validate, preview, and AI-author interactive Cupcake coding activities inside Visual Studio Code.

Version 0.1.4 · Built by the PAWS Lab at the University of Pittsburgh.

What this extension is for

Cupcake activities are short programming examples and exercises that students practice in the Cupcake web app. This extension helps authors build those activities in VS Code:

  • Edit activity YAML with schema validation and helpful diagnostics
  • Open a GUI Activity Editor for worked examples, code completion, free coding, parameterized code tracing, multiple-choice questions, Parsons puzzles, and macro visualizations (visual editing, metadata, and preview)
  • Generate or revise activities with AI (Cupcake-hosted models or your own OpenAI-compatible provider / BYOK)
  • Preview the student experience
  • Run code to capture sample output or check answers (requires a Cupcake account)
  • Scaffold starter files for each supported activity type

What's new in 0.1.4

  • Refreshed the GUI editor and preview viewer bundle: shared markdown syntax colouring across activity viewers, editors, and journey lessons, plus a unified bluish snippet underline

What's new in 0.1.4

  • Unified markdown styling across the GUI editor, preview, and journey lessons: consistent sky headings, magenta inline code, and blue links
  • Unified the bluish snippet underline used by the worked-example, code-completion, and Parsons viewers (replacing the mismatched slate underline and red active state)

What's new in 0.1.4

  • Refreshed the activity viewer/preview markdown styling: shared syntax palette for headings, inline code, and links across viewers, editors, and journey lessons
  • Unified the clickable-snippet affordance on the bluish underline in viewers, matching the GUI editor (replacing the mismatched slate underline and red active state)

What's new in 0.1.4

  • Syntax-colored markdown across the GUI editor, preview, and journey lessons: sky headings, magenta inline code, and blue links/markers, matching the authoring editor
  • Unified the clickable snippet affordance on the bluish underline (solid 2px blue with matching hover/active tint) across the viewer and editor

What's new in 0.1.3

  • Refreshed the activity editor and preview styling: unified accent tokens, consistent buttons and headers, and clearer error/warning colors

What's new in 0.1.2

  • Telemetry and execution endpoints moved under the versioned /api/v1 namespace (/api/v1/execution/run, /api/v1/log)

What's new in 0.1.0

  • AI Generate / AI Revise — floating wizard and prompt UI; YAML streams into the open editor
  • Revise-first on YAML tabs — editor title bar shows AI Revise; Generate is available from the Command Palette
  • Editable prompt templates in Settings (cupcake.generation.*) with reset commands
  • Self-contained generated activities (embedded source / includes)
  • Macro visualization: model writes Python source; JSVEE steps are generated by Cupcake

Getting started

After install, open the Get started with Cupcake authoring walkthrough (Help → Get Started, or Command Palette → Welcome: Open Walkthrough…). It walks through create → sample → GUI → blank → preview → YAML/tutorial → report issue.

For schema details after onboarding, use Cupcake: Show Activity Tutorial (markdown tutorials under resources/tutorials/ remain the deep reference).

  1. Install the extension (and the Red Hat YAML extension, which installs automatically as a dependency).
  2. Open a trusted workspace folder — preview and code execution need workspace trust.
  3. Create an activity (or try the sample)
    Command Palette → Cupcake: New Code Completion Task (or another activity type), Cupcake: AI Generate Activity for a new AI-authored draft, or Cupcake: Open Getting Started Sample to copy a tiny known-good activity into cupcake-sample/.
  4. Edit the activity
    • YAML: edit the .yaml file directly (use the sparkle AI Revise action in the editor title bar to refine with AI), or
    • GUI: Command Palette → Cupcake: Open in GUI Editor (worked examples, code completion, free coding, parameterized code tracing, MCQ, macro visualization, Parsons puzzles)
  5. Sign in when you need Cupcake-hosted AI or to run code
    Command Palette → Cupcake: Sign In, then approve the pairing code in your browser.
    Sign-in is required for Cupcake-hosted generation and to run code (for example, generate output or check answers). BYOK generation and local edit/Preview do not require Cupcake sign-in.
  6. Preview
    Use the Preview icon in the editor title bar, or run Cupcake: Preview Activity.
  7. Report a problem
    Command Palette → Cupcake: Report Issue (also in the editor title bar next to the tutorial button). Opens GitHub with extension / VS Code / OS details prefilled.

Editing data collection

The first time you open the GUI Activity Editor, you will be asked whether Cupcake may collect data about how you use the editor (for research and product improvement). Sharing is optional and does not block editing or Preview.

To change your choice later: Command Palette → Cupcake: Editing Data Consent.

GUI Activity Editor

For supported YAML files, open the GUI editor with Cupcake: Open in GUI Editor.

Area What you can do
Activity Edit the title, statement/question, program (when applicable), and activity-specific content (explanations, blanks, choices, runs/test cases, hints, JSVEE generate steps)
Metadata & files Set id, authors, topics, and (when applicable) language / source storage (Cupcake: Edit Metadata & Files)
Preview Try the activity as a student would see it

Switch to the text editor anytime with Cupcake: Open as Raw YAML.

Supported activity types

Activity Identifier Notes
Worked Examples worked-example Annotated walkthroughs; GUI editor available
Code Completion code-completion Fill-in-the-blank exercises; GUI editor available
Parsons Puzzles parsons-puzzles Draggable code-block puzzles; GUI editor available
Free Coding free-coding Open-ended tasks with tests; GUI editor available
Parameterized Code Tracing parameterized-code-tracing Randomized tracing problems; GUI editor available
Macro Visualizations macro-visualization Algorithm animations (JSVEE); GUI editor available
Multiple Choice multiple-choice-question Conceptual questions with choices; GUI editor available

Languages: Python, Java, C, C++, JavaScript, TypeScript, SQL, Rust, Go, C#, and R.

Commands

Command Description
Cupcake: Open in GUI Editor Open the visual Activity Editor for the current YAML file
Cupcake: Edit Metadata & Files Open the GUI editor on the metadata tab
Cupcake: Open as Raw YAML Open the file in the default text editor
Cupcake: Preview Activity Open the interactive student preview
Cupcake: Show Activity Tutorial Show authoring guidance for the current activity type
Cupcake: Report Issue Open a GitHub new-issue form with environment info prefilled
Cupcake: Open Getting Started Sample Copy a minimal code-completion sample into the workspace and open it
Cupcake: Sign In / Sign Out / Authentication Status Manage your Cupcake account pairing
Cupcake: AI Generate Activity Command Palette: open an untitled YAML and the generate wizard (not shown on the YAML editor title bar)
Cupcake: AI Revise Activity YAML editor title bar (and Command Palette): revise the active activity and stream changes into that file
Cupcake: Set BYOK API Key / Test BYOK Connection Store/test a local API key (never sent to Cupcake)
Cupcake: Editing Data Consent View or change your editor data-collection preference
Cupcake: New … Task Scaffold a new activity template (one command per activity type)
Cupcake: Generate Macro Steps (JSVEE) Generate animation steps for macro visualizations

AI generation notes

  • Generate (Cupcake: AI Generate Activity) is Command Palette / new-file oriented: it walks a short wizard (activity → language → difficulty), then a prompt QuickPick where ↑/↓ recall recent prompts. Buttons set locale, topics, and provider + model. Progress shows phase plus the latest thinking tokens; YAML streams into the editor.
  • Revise (Cupcake: AI Revise Activity) is the AI action on the YAML editor title bar. It skips the activity wizard and opens the prompt step (provider + model button only).
  • Generated activities are self-contained: source and includes are embedded in the YAML (filename → content), not bare relative paths.
  • Macro visualization: the model authors metadata + embedded Python source; animation steps are produced by Cupcake: Generate Macro Steps (JSVEE) (run automatically after create/revise).
  • Cupcake service requires sign-in with an author-or-higher role. If generation fails with a missing-scope error, sign out and sign in again so your device token includes generation:invoke.
  • BYOK uses cupcake.byok.baseUrl / cupcake.byok.model plus a secret API key. Traffic goes only to your provider.
  • Recent create/revise prompts are stored locally in extension globalState (not uploaded to Cupcake).
  • Prompt templates are editable under Settings (cupcake.generation.*); leave blank to use built-in defaults. Placeholders like {{activityType}} and {{extraInstructions}} are documented on each setting.

Settings

Search for Cupcake in VS Code Settings:

  • cupcake.baseUrl — Cupcake service URL (default: https://adapt2.sis.pitt.edu/cupcake/)
  • cupcake.strictSSL — Strict TLS certificate verification (default: false)
  • cupcake.byok.baseUrl — OpenAI-compatible base URL for BYOK (e.g. https://api.openai.com/v1)
  • cupcake.byok.model — Model name for BYOK (e.g. gpt-4o-mini)
  • cupcake.generation.createSystemPrompt / createUserTemplate — Create prompt templates (multiline; defaults shown; Reset links in the setting description)
  • cupcake.generation.reviseSystemPrompt / reviseUserTemplate — Revise prompt templates (same)
  • Cupcake: Reset AI Prompt Templates — Restore all four prompt settings to defaults

Requirements

  • Red Hat YAML (extension dependency)
  • A trusted workspace for preview and execution

Links

  • Issues: https://github.com/mhassany-pitt/thesis/issues
  • PAWS Lab: https://adapt2.sis.pitt.edu/wiki/PAWS
  • License: MIT
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft