Exafunction / codeium-chrome

Free, ultrafast code autocomplete for Chrome
https://www.codeium.com/
MIT License
110 stars 16 forks source link

DeepNote crashes when deleting a code cell #16

Closed li-xin-yi closed 7 months ago

li-xin-yi commented 1 year ago
image image
pqn commented 1 year ago

What's the sequence of steps to reproduce?

li-xin-yi commented 12 months ago
  1. create a code cell
  2. type something
  3. press backspace until there is no content
  4. press backspace once more

A brief demo: deepnote-demo

pqn commented 11 months ago

I haven't had time to test, but I suspect we might need something like this at the top of createInlineCompletionItem():

  if (editor?.getModel()?.isDisposed) {
    return undefined;
  }
li-xin-yi commented 11 months ago

@pqn Thanks for your suggestions. However, it doesn't work. I guess it is not actually relevant to createInlineCompletionItem or other components in Codeium extension. After looking into the JS files provided in the console, I strongly suspect it is because DeepNote invokes some dispose functions after deleting a cell, which includes some obvious React code (as there is almost no React dependency in Codeium extension itself). Maybe some code injected by Codeium makes the Monaco dispose once and Deepnote forces it to dispose again. Just my guess, I'm not very familiar with the front-end tech or Codeium.

pqn commented 11 months ago

I'm not able to reproduce this unfortunately. Does it happen reliably for you?

li-xin-yi commented 7 months ago

Seems fixed now, maybe patched by DeepNote.