fix(core): correct escaped interpolation in system prompt#18557
fix(core): correct escaped interpolation in system prompt#18557NTaylorMullen merged 1 commit 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 addresses a critical bug in the system prompt where a conditional interpolation for interactive options was mistakenly escaped, leading to a literal string being displayed. The changes ensure that the prompt dynamically includes or omits the interactive summary based on the 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 fixes a bug where a template literal interpolation was being escaped in the system prompt, causing it to be displayed as a literal string. The change removes the incorrect escaping and also refines the surrounding whitespace to ensure correct formatting in both interactive and non-interactive modes. The snapshot tests have been updated accordingly to reflect the corrected output. The changes are well-implemented and address the issue effectively.
|
Size Change: -4 B (0%) Total Size: 23.9 MB ℹ️ View Unchanged
|
- Fixes a bug in the `workflowStepStrategy` function where `options.interactive` was incorrectly escaped, leaking as a literal string in the system prompt. - Refines spacing for the strategy section when in non-interactive mode. - Updates snapshot tests to reflect the corrected output. Fixes https://github.com/google-gemini/gemini-cli/issues/ntm/fixsysbug
31a8d0e to
5b2efbe
Compare
Summary
Fixes a bug in the system prompt where
options.interactivewas incorrectly escaped, leaking as a literal string. Corrects the interpolation and refines spacing for the strategy section in non-interactive mode.Details
${options.interactive ...}inworkflowStepStrategywithinpackages/core/src/prompts/snippets.ts.@google/gemini-cli-coreto reflect the fixed output.Related Issues
Fixes https://github.com/google-gemini/gemini-cli/issues/ntm/fixsysbug
How to Validate
npm test -w @google/gemini-cli-core -- src/core/prompts.test.ts${options.interactive ...}string.Pre-Merge Checklist