Add Templates submenu to Code Editor populated from examples#4
Add Templates submenu to Code Editor populated from examples#4google-labs-jules[bot] wants to merge 3 commits intomasterfrom
Conversation
Fetches files from src/main/examples listed in paths.txt and adds them as clickable items in a new Templates submenu within the Code Editor dat.GUI folder. Clicking an item fetches the file content, updates the editor, and executes the code.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
|
store executed code in page 1 |
|
store executed code in page 1 |
I have updated the logic to execute the template code in variant 1 (Page 1) and switch to it, instead of overwriting the current variant. |
When a template is selected, the editor now switches to variant 1 (Page 1) and loads the code there, preventing overwrite of the current work buffer (unless it is already page 1).
Added a "Templates" submenu to the "Code Editor" folder in the dat.GUI controls.
Populated the submenu by fetching and parsing
paths.txtto find files insrc/main/examples.Each template is added as a button that, when clicked, loads the code into the editor and executes it using the global
Evalfunction.PR created automatically by Jules for task 7462273000911847330 started by @friuns2
Note
Adds a Templates submenu under Code Editor that lists example files from paths.txt and loads/executes the selected template in the in-page editor.
Templatessubmenu under theCode Editordat.GUI folder insrc/ts/world/World.ts.paths.txt, filterssrc/main/examplesfiles, and creates buttons per file.chatvariant 1), updates viaSetCode, and executes viaEval.build/types/world/World.d.tsto includeprivate addCodeEditorControls.build/types/vehicles/Vehicle.d.tsdeclarations.build/sketchbook.min.js.LICENSE.txt.Written by Cursor Bugbot for commit 3403c1e. This will update automatically on new commits. Configure here.