Conversation
… without session ID
|
Hi @Adib234, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
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 addresses an issue where the Plan Mode policy regex strictly required a session ID in file paths, causing failures in environments or tests lacking this ID. By relaxing the validation, the system now correctly handles file operations in Plan Mode for paths both with and without a session ID, improving flexibility and robustness. The changes include a policy update and corresponding test adjustments and additions. 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 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. Footnotes
|
|
Size Change: -4 B (0%) Total Size: 26.3 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request refactors the plan-mode.test.ts integration tests to simplify their execution. It transitions from using rig.runInteractive with stdin and run.type for prompts to using rig.run with direct args, removing the need for interactive input simulation and the associated setup prompt disabling. The tests also adopt more direct assertions by checking toolLogs for tool call presence and success. Additionally, a new test case is introduced to verify that write_file operations to the plans directory are permitted in plan mode even without an explicit session ID in the path. To accommodate this, the plan.toml policy is updated to make the argsPattern for write_file more flexible, allowing an optional session ID segment in the target file path.
|
/patch preview |
|
🚀 [Step 1/4] Patch workflow(s) waiting for approval! 📋 Details:
⏳ Status: The patch creation workflow has been triggered and is waiting for deployment approval. Please visit the specific workflow links below and approve the runs. 🔗 Track Progress: |
|
/patch stable |
|
🚀 [Step 1/4] Patch workflow(s) waiting for approval! 📋 Details:
⏳ Status: The patch creation workflow has been triggered and is waiting for deployment approval. Please visit the specific workflow links below and approve the runs. 🔗 Track Progress: |
… without session ID (google-gemini#23695)
… without session ID (google-gemini#23695)
… without session ID (google-gemini#23695)
Summary
Relax the file path validation for
write_fileandreplacetools in Plan Mode to allow paths that do not include a session ID segment.Details
The previous policy regex for Plan Mode required exactly two subdirectories under
.gemini/tmp/(typically[user-hash]/[session-id]) before reaching theplans/directory. This caused issues in environments or test cases where the session ID was missing from the path.This PR:
argsPatterninplan.tomlto make the second subdirectory segment optional.integration-tests/plan-mode.test.tsby replacingrunInteractivewith the more directrunmethod.write_fileis allowed in Plan Mode even when a session ID is not present in the path.Related Issues
fixes #23696
How to Validate
Run the Plan Mode integration tests:
npm test -w @google/gemini-cli-core -- integration-tests/plan-mode.test.tsPre-Merge Checklist
npm run test)