Skip to content

Conversation

@yacineKahlerras
Copy link
Collaborator

No description provided.

@nicolasiscoding
Copy link
Member

nicolasiscoding commented Sep 22, 2025

Also - please go back to the documentation from the prior PR and fix those too. Some of the items there are not accurate, if you need me to be more specific outside of the discord messages I noticed, will point them out as a git issue

@nicolasiscoding
Copy link
Member

Code Review Issues Found

Based on the review comments, I've identified several patterns that need to be addressed throughout this PR:

1. Missing const Declarations

Several JavaScript code examples are missing const declarations for variable assignments. All variable declarations should use const, let, or var for proper JavaScript syntax.

Examples needing fixes:

  • Lines with formData = new FormData() should be const formData = new FormData()
  • Lines with response = await fetch(...) should be const response = await fetch(...)

2. templateId Parameter Behavior Warning

When using the templateId parameter in AI variable generation requests, the aiHint value gets saved as the default AI prompt for that template. This behavior should either be:

  • Removed from examples where this side effect isn't intended
  • Explicitly documented with a warning about this behavior

Files affected: All JavaScript examples in ai-variable-generation.md and related script files

3. Systematic Review Needed

Please review all JavaScript code examples across the PR to ensure:

  • Proper variable declarations with const/let
  • Clear documentation of templateId side effects
  • Consistent coding patterns

This affects multiple files in the PR including the main documentation file and all the supporting script examples.

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.

3 participants