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

Rubberduck often will hang on generating output #92

Open
wilrodriguez opened this issue Apr 26, 2023 · 4 comments
Open

Rubberduck often will hang on generating output #92

wilrodriguez opened this issue Apr 26, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@wilrodriguez
Copy link

Describe the bug

I've noticed many times when I launch rubberduck from my context menu after selecting a code block for explanation, generating unit tests, or its other options, it will often hang on generating output. Other times, it will simply open the rubberduck sidebar and then not do anything. I've also seen it work with no problem after sending the same command from the context menu a few times. I did notice that if I change my model to GPT-4 and let it fail to connect, then change it back to 3.5-turbo and click the retry button, it'll send the API request with no problem. Notably I don't seem to have any issues with executing new chat questions from the side bar, it's only with context menu operations.

How to reproduce

At the moment, all context menu operations seem to cause this behavior in my environment. However, it's a bit harder to narrow down exactly what is causing the behavior since it seems to be erratic and there's nothing I've noticed in the logs that really gives me a hint as to what's going on, even with debug turned on.

Expected behavior

Should be able to select code and execute rubberduck operations via the context menu.

Additional information

  • Version of the extension impacted: v1.15.0
  • VS Code Info:
    Version: 1.77.3
    Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
    Date: 2023-04-12T09:19:37.325Z
    Electron: 19.1.11
    Chromium: 102.0.5005.196
    Node.js: 16.14.2
    V8: 10.2.154.26-electron.0
    OS: Darwin x64 22.4.0
    Sandboxed: No
@wilrodriguez wilrodriguez added the bug Something isn't working label Apr 26, 2023
@lgrammel
Copy link
Contributor

Thanks for the bug report!

I have noticed some flakiness after a VS Code restartet. Does this happen always or primarily after a VS Code restart? Does it affect only code generation or also code editing?

@wilrodriguez
Copy link
Author

So, I actually just had it explain some code and when I clicked the button in the context menu, it took me to the rubberduck side bar and had a explain code chat, but based on the debug output, it didn't do anything and the UI was just saying "Generating output. But, then, I started a new chat and I can see that in the logs, it added instructions to continue the conversation from the block of code I had submitted initially, so in this way it ended up working out just fine... so there's that at least. But it was certainly weird that it didn't actually kick off the conversation in the first place.

@wilrodriguez
Copy link
Author

So, I did eventually determine what was going on here. The code generation does not actually kick off unless the rubberduck pane is in focus when you issue the command from the context menu. The odd behavior I was seeing was caused by the fact that when you choose a generate action, it does actually open the pane, so successive commands will eventually work, but things get extra confusing thanks to #75. So, I'm guessing this is more of a race condition issue where something isn't waiting long enough for the pane to change (or something like that, it's not like I've looked at the source code or know anything about vs code plugin development).

@lgrammel
Copy link
Contributor

Thanks for looking into this. Sadly I won't have time in the foreseeable future to work on Rubberduck. Fortunately there are now many alternative extensions with similar functionality that you could use instead and Copilot has chat functionality as well.

@lgrammel lgrammel added the help wanted Extra attention is needed label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants