Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemini Code Assist does not work with special HEX strings (billing account id) in code #910

Open
michimeier opened this issue Jun 6, 2024 · 5 comments

Comments

@michimeier
Copy link

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

  1. Open a Python file (or create a new one)
  2. 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)
    
  3. Save the file
  4. Select all the code
  5. Open Gemini Code Assist
  6. 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.

@galz10
Copy link
Collaborator

galz10 commented Jun 6, 2024

Can you please file this using send feedback in the extension.

@michimeier
Copy link
Author

Done.

@davidponder
Copy link
Contributor

Thanks! We'll take a look at those and weigh back in here ASAP!

@glouischandra
Copy link
Collaborator

Hi @michimeier, can you still repro the issue in the latest version of Gemini CodeAssist? We've released a bunch of fixes since june.

@michimeier
Copy link
Author

Hi @glouischandra, I can still reproduce the issue with the latest version of Gemini CodeAssist (v2.21.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants