sourcegraph / jetbrains

Apache License 2.0
78 stars 24 forks source link

Restart Cody in case of webview renderer crash #2645

Closed pkukielka closed 1 week ago

pkukielka commented 1 week ago

Changes

Looks like webview renderer process crashes from time to time for some users - especially in cases like long running IDE or suspending/unsuspending OS.

We might not be able to fully fix the root cause, but we should handle the crash and recover from it. For now, I'm just restarting the agent which also restarts the webview. I was trying to only restart the webviews and keep the agent running, but I did not managed to do it on the first try. Let's merge this as it improves current situation significantly, and I will work on better/quicker restoration of the state in the followup PR(s).

Test plan

  1. Start IntelliJ with Cody panel opened
  2. Open process explorer and kill jcef Helper (Renderer)
  3. Go back to IntelliJ - Cody panel should restart itself