fix(core): Encourage non-interactive flags for scaffolding commands#18804
fix(core): Encourage non-interactive flags for scaffolding commands#18804NTaylorMullen merged 2 commits intomainfrom
Conversation
Summary of ChangesHello @NTaylorMullen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the system's ability to create new applications by preventing command-line interface hangs during the scaffolding process. It achieves this by modifying the core prompts to explicitly instruct the agent to use non-interactive flags with scaffolding tools, thereby streamlining the automated application generation workflow. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly updates the system prompt to enforce non-interactive flags for scaffolding commands. However, the new behavioral evaluation test in evals/interactive-hang.eval.ts contains a critical flaw. It incorrectly attempts to validate the command arguments by testing against the raw JSON string of toolRequest.args instead of parsing it to access the command property, as required by the project's general rules. This makes the test unreliable. I've provided comments with suggestions to fix this.
|
Size Change: +754 B (0%) Total Size: 24.4 MB ℹ️ View Unchanged
|
c5b6739 to
4ce8ec0
Compare
- Updated `newApplicationSteps` system prompt instructions to strongly require non-interactive flags (e.g. `--yes`, `-y`, or `--template`) when executing application scaffolding CLI tools. - Warned the model that omitting these flags for interactive tools will cause the environment to hang. - Added `ALWAYS_PASSES` evaluation case to `evals/interactive-hang.eval.ts` to assert that non-interactive flags are successfully provided for `npm create` and similar commands.
4ce8ec0 to
9e7afe6
Compare
9e7afe6 to
5866201
Compare
Summary
This PR updates the system prompt's New Applications workflow to explicitly enforce the use of non-interactive flags (like
-y,--yes, or specific template flags like--template react-ts) when the agent utilizes scaffolding tools (e.g.,npm create,npm init). This resolves an issue where the CLI would hang waiting for user input during application generation.Details
packages/core/src/prompts/snippets.tswarning that interactive wizards will hang the CLI environment unless bypassed.ALWAYS_PASSESbehavioral evaluation case (should use non-interactive flags when scaffolding a new app) inevals/interactive-hang.eval.tsto guarantee the model consistently avoids interactive hangs during project setup.Related Issues
N/A
How to Validate
Run the behavioral evaluations:
npm run test:always_passing_evals -- -t "should use non-interactive flags when scaffolding a new app"Pre-Merge Checklist