Skip to content

Nx MCP's Generator UI's execution script does not properly handle command args #2631

@nathan-hcltech

Description

@nathan-hcltech

Current Behavior

Generator options that contain a space between words will be truncated in the actual code execution. This behavior is not reproducible when using the regular Generator UI. It only occurred when the "Generate" button on the Generator UI opened by Nx MCP was clicked.

Expected Behavior

Both regular and MCP-triggered Generator UI should behave the same in terms of command arguments processing

Steps to Reproduce

  1. Tell Github Copilot to generate something that requires Nx generator
  2. For any option, set it to a two-word name with a space between
  3. Inspect the generated code whether it is using the intended name

Failure Logs / Images / Videos

  1. Note the last line in the terminal output. The console log should print out a normalized name of the option given to a custom Nx generator.
Image
  1. Notice the output log on the dry run that the normalized name was actually the given name in the generator option without white space.
Image
  1. Notice that the command arguments that were wrapped with quotes in the terminal ended up losing those quotes during the execution of the generator wrapper executed by the MCP.
Image

Environment

  • Nx Console version: 18.59.1
  • VSCode version: 1.102.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions