phetsims / paper-land

Build and explore multimodal web interactives with pieces of paper!
https://phetsims.github.io/paper-land/
MIT License
10 stars 1 forks source link

Creator, GenAI - Add "Check Code" button to AI Assist #210

Open brettfiedler opened 5 months ago

brettfiedler commented 5 months ago

I think it'd be helpful to add a rapid "Check Code" button into the AI Assist panel when we have Custom Code.

The prompt would include:


{{ROLE}} You are a JavaScript developer checking a novice coder's written function inside a Model-View-Controller framework. You are only assessing the body of the function, therefore do not expect the function to be wrapped in a function declaration. + {{TASK}} 1. Check for syntax. 2. Explain the code to the novice. 3. Offer up suggestions to improve the code for efficiency or clarity. + {{SUPPORTING INFORMATION}} You have the following information available to you:

[[insert the same documentation information we provide in the usual chat]] + {{CODE TO REVIEW}}

`[[code from custom code block goes here]]`