GoogleCloudPlatform / cloud-code-intellij

Plugin to support the Google Cloud Platform in IntelliJ IDEA - Docs and Issues Repository
Apache License 2.0
318 stars 59 forks source link

Duet AI feature doesn't work in PyCharm 2023.2.2 #3167

Closed hclockzz closed 7 months ago

hclockzz commented 8 months ago

I have tested with Duet AI features on VS Code, and it's working as expected. While in PyCharm, code generation is not working. Can follow this link, https://cloud.google.com/code/docs/intellij/write-code-duet-ai#prompt-duet-ai-in-code-file, to test with it. No error logs and notifications when hit the icon for code generation (a pen with a star), but just no reaction.

Expected Behavior

how it works in VSCode

image

Actual Behavior

No response and reaction image

Additional Information

Feel free to deviate from this template as needed, especially if you are submitting a feature request.

etanshaul commented 8 months ago

@hclockzz thanks for the report. We have several fixing coming around feedback / error handling.

In the meantime, to figure out this specific issue, could you please share the logs? The best way to do this:

1) Click the magic wand to trigger something from Duet 2) Use the Duet status bar to submit a feedback report (which will automatically attach the logs):

Screenshot 2023-10-26 at 5 40 35 PM

Some other things to check:

hclockzz commented 8 months ago

I did side-by-side comparison with vscode and pycharm setting and find out the issue. It turns out may relate to two things:

I am not in favor of making dependencies managed by a plugin in real development. But at least this issue is resolved by this way.

etanshaul commented 8 months ago

I switch Cloud SDK from "use a custom local installation" to "Allow the plugin to manage and install the Cloud SDK", and then the IDE installed a newer version.

This is interesting. There is no reliance by any Duet features on the cloud sdk at all - you don't even need it installed. We'll double check though

Update: I just tested this quickly and can confirm that Duet works without having the plugin manage any dependencies. Now that you have Duet working, would you mind trying to unset managed dependencies and seeing if it continues to work? thanks.

etanshaul commented 8 months ago

The most straightforward one is the project field needs to be project id, not just the project name. But I have tried with project id before, so the issue may also relate to the second thing.

When you use the project selection widget, does it do the right thing?

Screenshot 2023-10-30 at 7 58 04 PM

(we'll double check on the name vs id requirement for freeform text entry; update - you are right, this field needs ID, not name. Mainly because ID is unique but name is not. We'll update the wording on this text field to make it clearer. Great callout.).

ivanporty commented 7 months ago

Closing as we didn't have more comments, and significantly improved onboarding process with our 23.10.2 release.