Repository navigation
fix(cli): prevent @path expansion in pasted text by default - #29458
MartinCajiao wants to merge 6 commits into
Conversation
|
📊 PR Size: size/M
|
Summary of ChangesHello, 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 improves the safety of the CLI by changing the default behavior for handling pasted text. By enabling Highlights
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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the default value of the ui.escapePastedAtSymbols setting from false to true, ensuring that @ symbols in pasted text are escaped by default to prevent unintended @path expansion. The documentation, settings schema, and test suites have been updated to align with this new default behavior. There are no review comments to address, and I have no additional feedback to provide.
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. This PR will be closed in 7 days if it remains without that designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
|
This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
Summary
Pasting shell text such as
user@host:~/project$ cat @id_rsacan trigger@pathexpansion and upload a file the user only meant to paste. This changesui.escapePastedAtSymbolsto default totrue, with regression coverage for clipboard and bracketed terminal paste. Typing@pathmanually still includes a file.Scope
This is a partial mitigation for #26730: it addresses the request to disable expansion in pasted text by default. It does not add confirmation before uploading sensitive files or heuristics for common shell prompts; those remain outside this change.
Related Issue
Related to #26730
How to Validate
npx vitest run src/config/settingsSchema.test.ts src/ui/components/InputPrompt.test.tsx -t "escape @ symbols" --maxWorkers=1(3 passed)npm run docs:settings --ignore-scriptsgenerated the updated docs and schema successfully.