Skip to content

Conversation

@drizco
Copy link
Contributor

@drizco drizco commented Nov 12, 2025

This pull request enhances the AI Tutor context by tracking and including whether the student has run or edited their source code. These new context flags are now passed through both Python Lab and Web Lab 2, and are surfaced in the AI Tutor's context strings to inform AI responses. This allows the AI Tutor to better understand and respond to the student's progress and actions.

  • Added hasRun and hasEdited boolean flags to the AiTutorContext interface, enabling tracking of whether the student has run or edited their code.
  • Updated context helper classes (AiTutorPythonLabContextHelper and AiTutorWebLab2ContextHelper) to extract and pass hasRun and hasEdited from their parameters into the AI Tutor context.
  • Updated PythonlabView and Weblab2View components to pull hasRun and hasEdited from Redux state and pass them into the AI Tutor context.
  • Added new context strings (HAS_NOT_RUN, HAS_NOT_EDITED) to inform the AI Tutor when the student has not yet run or edited their code, and included these in the context string construction.

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Creation Checklist:

  • Tests provide adequate coverage
  • Privacy impacts have been documented
  • Security impacts have been documented
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Follow-up work items (including potential tech debt) are tracked and linked

@drizco drizco marked this pull request as ready for review November 12, 2025 18:37
Copy link
Contributor

@cnbrenci cnbrenci left a comment

Choose a reason for hiding this comment

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

lgtm

@drizco drizco force-pushed the ryan/tutor/feat/add-has-run-and-has-edited-context-to-lab2 branch from 5aef289 to 9ea36d9 Compare November 13, 2025 18:34
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