Skip to content

Add Templates submenu to Code Editor populated from examples#4

Open
google-labs-jules[bot] wants to merge 3 commits intomasterfrom
feature/code-editor-templates
Open

Add Templates submenu to Code Editor populated from examples#4
google-labs-jules[bot] wants to merge 3 commits intomasterfrom
feature/code-editor-templates

Conversation

@google-labs-jules
Copy link
Copy Markdown

@google-labs-jules google-labs-jules bot commented Nov 27, 2025

Added a "Templates" submenu to the "Code Editor" folder in the dat.GUI controls.
Populated the submenu by fetching and parsing paths.txt to find files in src/main/examples.
Each template is added as a button that, when clicked, loads the code into the editor and executes it using the global Eval function.


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.

  • Editor/UI:
    • Adds a Templates submenu under the Code Editor dat.GUI folder in src/ts/world/World.ts.
    • Fetches paths.txt, filters src/main/examples files, and creates buttons per file.
    • On selection, loads file content into the editor (chat variant 1), updates via SetCode, and executes via Eval.
  • Types:
    • Updates build/types/world/World.d.ts to include private addCodeEditorControls.
    • Adds build/types/vehicles/Vehicle.d.ts declarations.
  • Build:
    • Adds build/sketchbook.min.js.LICENSE.txt.

Written by Cursor Bugbot for commit 3403c1e. This will update automatically on new commits. Configure here.

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.
@google-labs-jules
Copy link
Copy Markdown
Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@friuns2
Copy link
Copy Markdown
Owner

friuns2 commented Nov 27, 2025

store executed code in page 1

@friuns2 friuns2 marked this pull request as ready for review November 27, 2025 15:38
@friuns2
Copy link
Copy Markdown
Owner

friuns2 commented Nov 27, 2025

store executed code in page 1

@google-labs-jules
Copy link
Copy Markdown
Author

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).
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.

1 participant