fix(patch): cherry-pick 54b7586 to release/v0.40.0-preview.4-pr-26066 [CONFLICTS] by @gemini-cli-robot in https://github.com/google-gemini/gemini-cli/pull/26124
Full Changelog: https://github.com/google-gemini/gemini-cli/compare/v0.40.0-preview.4...v0.40.0-preview.5