Expand pasted text placeholders in AskUserDialog and InputPrompt#19286
Expand pasted text placeholders in AskUserDialog and InputPrompt#19286korade-krushna wants to merge 5 commits intogoogle-gemini:mainfrom
Conversation
Summary of ChangesHello @korade-krushna, 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 resolves a bug where large pasted text in user input fields was being submitted as a collapsed placeholder string instead of its actual content. The solution centralizes the logic for expanding these placeholders into a reusable utility, which is then integrated into 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 effectively resolves the issue of unexpanded pasted text in AskUserDialog by centralizing the expansion logic into a new expandPastedContent utility. The refactoring in AskUserDialog and InputPrompt to use this shared function is clean and improves code maintainability. The addition of specific test cases for paste expansion scenarios is also a great enhancement, ensuring the fix is robust. Overall, this is a well-executed change that improves both functionality and code quality.
|
Hey @korade-krushna i accidentally reviewed #19946 before getting to this one, my apologies! Looks like both are accomplishing the same end goal. So going to close this one, but next time i will be more diligent in taking a look at PRs opened first. 👍 |
|
No Worries @jackwotherspoon |
Summary
This PR fixes a bug where large pasted text in the AskUserDialog was submitted as a collapsed placeholder string (e.g.,
[Pasted Text: 19 lines]) instead of the actual content. It also centralizes the paste expansion logic into a shared utility.Details
TEXTquestions andCHOICEquestion custom options correctly expand pasted content before submission.Related Issues
Fixes #19238
How to Validate
npm test -w @google/gemini-cli -- src/ui/components/InputPrompt.test.tsx src/ui/components/AskUserDialog.test.tsxPre-Merge Checklist