Gemini Code Assist does not work with special HEX strings (billing account id) in code
michimeier opened this issue · comments
Version information
Cloud Code Extension version:
[6.6.2024, 11:14:48] Cloud Code version 2.11.3
[6.6.2024, 11:14:48] Version detail: 640379469 built on 2024-06-05T04:43:08.222Z
VSCode version: 1.90.0 (Universal) / Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
OS: macOS Sonoma 14.5 (23F79)
Cloud SDK:
Google Cloud SDK 479.0.0
beta 2024.05.31
bq 2.1.5
core 2024.05.31
gcloud-crc32c 1.0.0
gsutil 5.29
Description
Using Gemini Code Assist: Chat in VS Code leads to an error Sorry, I can't help you with this.
when selecting a part of the code in the editor and clicking on "Explain this". The "Context Sources" is the right one but it does not fulfill the request. Also directly asking for generating code does not work.
Repro step
- Open a Python file (or create a new one)
- Add the following code:
billing_account_id = "000000-000FFF-FFFFFF" # This id is an example (hopefully) having no real project behind it print(billing_account_id)
- Save the file
- Select all the code
- Open Gemini Code Assist
- Click on Explain this
Problem cause and workaround
The Google Cloud billing account id looks like it is the root cause of the problem.
Adding or removing a random character of the "hex" string like identifier solves the problem and Gemini Code Assist can "Explain this" selected code.
If you change one of the "HEX" characters in the string (except "-") to be out of the HEX code boundaries (e.g. to "G" or "Z"), than the problem also disappears.
Can you please file this using send feedback in the extension.
Done.
Thanks! We'll take a look at those and weigh back in here ASAP!