Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for the-codegen-project canceled.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| \`\`\` | ||
|
|
||
| ${deps}`; | ||
| }).join(''); |
There was a problem hiding this comment.
Examples joined without separator breaks markdown formatting
Low Severity
When the get_usage_example tool returns multiple examples, they're joined with an empty string via .join(''). Each example template ends with ${deps} (dependencies or empty string) and the next starts with ## ${example.title}. Without a proper separator like '\n\n', the Markdown heading of the second example runs directly into the first example's content, breaking the heading formatting and making the output difficult to read.
| const entries = Object.entries(g) | ||
| .map(([key, value]) => { | ||
| if (typeof value === 'string') { | ||
| return ` ${key}: '${value}'`; |
There was a problem hiding this comment.
Unescaped strings in generated config produce invalid output
Low Severity
The generateMjsConfig function wraps string values in single quotes without escaping embedded single quotes (lines 137, 152). If inputPath or outputPath contains a ' character (e.g., ./test's/spec.yaml), the generated JavaScript is syntactically invalid. Similarly, generateYamlConfig directly interpolates strings without quoting (lines 173, 184), so paths containing # or : produce invalid YAML where content after # becomes a comment.
Additional Locations (2)
| // Check if preset is valid | ||
| if (!generators[preset]) { | ||
| errors.push(`Generator at index ${i}: unknown preset "${preset}"`); | ||
| } else if (inputType && !availablePresets.includes(preset)) { |
There was a problem hiding this comment.
validateConfig crashes on invalid inputType values
Medium Severity
The validateConfig function crashes when config.inputType is a truthy but invalid value (e.g., "invalid"). Line 364-365 adds an error for invalid inputType but continues processing. At line 380, inputTypeGenerators[inputType] returns undefined for invalid types. Then at line 391, the condition inputType && !availablePresets.includes(preset) calls .includes() on undefined, throwing a TypeError. A validation function shouldn't crash on invalid input.
|
🎉 This PR is included in version 0.63.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Note
Introduces an MCP server for The Codegen Project with HTTP endpoint and supporting assets.
app/api/mcp/route.tsexposing tools:create_config,add_generator,list_generators,validate_config,get_usage_example,get_imports; registerscodegen://docs*resources and acodegen-guidelinespromptlib/tools/*,lib/data/*and bundles docs inlib/resources/bundled-docs.tsapp/page.tsx,layout.tsx,not-found.tsx) and config (next.config.js,eslint.config.mjs), plus projectREADME.mdand.gitignoreWritten by Cursor Bugbot for commit 730205f. This will update automatically on new commits. Configure here.