Skip to content

Split Learning reset into exercise and unit - #3635

Draft
Dhairya Patel (HABER7789) wants to merge 2 commits into
mainfrom
HABER7789/reset-unit-copilot-tool
Draft

Split Learning reset into exercise and unit#3635
Dhairya Patel (HABER7789) wants to merge 2 commits into
mainfrom
HABER7789/reset-unit-copilot-tool

Conversation

@HABER7789

Copy link
Copy Markdown
Contributor

resetExercise reset one .qs file for Q# courses but wiped the entire notebook for notebook courses, while telling Copilot it "only resets an exercise." It now restores just the current activity one file, or one cell.

Adds resetUnit and a qdk-learning-reset-unit tool so chat can reset a whole unit, including by name.

This overlaps with #3627. Reset was picking the wrong notebook cell, because the stored position only moves when you run a cell, not when you click one. So I have fixed that here for reset, and #3627 fixes it more generally across the tools. I will drop my current fix once that merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Splits QDK Learning resets into activity-level and unit-level operations.

Changes:

  • Restores individual notebook cells without affecting other work.
  • Adds whole-unit reset support for Q# and notebook courses.
  • Exposes the new tool through Copilot, commands, telemetry, and agent guidance.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
source/vscode/src/telemetry.ts Adds unit-reset telemetry.
source/vscode/src/learning/service.ts Implements activity and unit reset behavior.
source/vscode/src/learning/python/materialization.ts Restores individual notebook cells.
source/vscode/src/learning/notebookExercises.ts Adds cell source lookup and replacement.
source/vscode/src/learning/commands.ts Updates reset commands and notebook reopening.
source/vscode/src/gh-copilot/tools.ts Registers the unit-reset tool.
source/vscode/src/gh-copilot/learningTools.ts Adds tool orchestration and selected-cell synchronization.
source/vscode/package.json Contributes the command and tool metadata.
source/vscode/ai/qdk-learning.agent.md Documents activity versus unit resets.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +357 to +359
title: "Reset Exercise",
message:
"Reset the current exercise to the original placeholder? Your code will be lost.",
- resetExercise now restores only current activity
- copilot can now reset a whole unit and can target a unit by name
- resetting something with no code, like a markdowncell, will now report instead of silently resetting another cell
@HABER7789
Dhairya Patel (HABER7789) force-pushed the HABER7789/reset-unit-copilot-tool branch from 160de31 to 652220d Compare September 2, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants