feat: add workspace_follow_symlinks setting for symlink-aware tool operations#3242
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Code Review
This pull request introduces the workspace_follow_symlinks configuration setting, allowing file discovery walks, @-mention completions, and search tools to traverse symbolic links. The review feedback identifies two high-severity issues with this implementation: first, a risk of infinite recursion or stack overflow in the manual recursive directory walker (collect_files_recursive) due to a lack of cycle detection; second, a failure in resolving non-existent paths (such as creating new files) inside symlinked directories that resolve outside the workspace, as the canonicalized ancestor check incorrectly rejects them.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…erations When workspace_follow_symlinks is enabled, walk-based tools and UI components follow symbolic links during directory traversal. A symlink inside the workspace that resolves outside is still allowed - the symlink path itself is the gate. Changes: Add follow_symlinks to ToolContext; update resolve_path(); thread setting through file_search, search, project, project_tree; add to EngineConfig; wire through runtime_threads, main, ui; add to Workspace and file_mention; add to config UI; show restart-required hint; add to Settings with env-override support; update tests Note: Requires restart for engine tools. UI-side effects apply immediately.
c6ce9e4 to
b0f10c6
Compare
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
great idea!!! thank you! |
Add workspace_follow_symlinks setting so walk-based tools and UI components follow symbolic links during directory traversal. See commit message for full details.