continue icon indicating copy to clipboard operation
continue copied to clipboard

[BUG] When the cursor is in the chat text box, `CMD-V` pastes things in the Jupyter Notebook!

Open ibehnam opened this issue 1 year ago • 5 comments

Before submitting your bug report

Relevant environment info

- OS: macOS Sonoma
- Continue: experimental pre-release
- IDE: VSCode

Description

When interacting with AI, if I paste something (like a piece of text) using CMD-V, it pastes it in the editor instead. For example, I use Jupyter Notebook and Continue has messed with the notebook cells many times because of this bug.

To reproduce

No response

Log output

No response

ibehnam avatar Apr 05 '24 05:04 ibehnam

@ibehnam as mentioned in the other post, there is probably a particular VS Code keyboard shortcut that when disabled stops this from happening (I think it is notebook.cell.paste, but need to double-check). Would be useful to have confirmation of this, but I'll try anyway to see if we can override the shortcut from the webview.

sestinj avatar Apr 05 '24 06:04 sestinj

I have the same problem. Two additional observations:

  • This only happens if I work on a jupyter notebook. No problems in a regualar python file.
  • The error happens also if you right click in the chat-window and select "Paste" in the pop up menu. So I doubt that it's only related to keyboard shortcuts.

I'm on windows btw

kaixxx avatar Apr 15 '24 12:04 kaixxx

@kaixxx @ibehnam I finally tracked this down today and was able to stop it from happening on my machine: https://github.com/continuedev/continue/commit/1b30b9e312b3f16d6504d3e03bf90df7d9b180a5

0.9.124 is being released right now, but I'll wait for confirmation before closing this issue. Let me know how it works!

sestinj avatar May 02 '24 21:05 sestinj

@sestinj Thank you for looking into this! I've tested 0.9.124 pre-release and it improved a lot, but there are still some problems:

  • Ctrl+C and Ctrl+V works initially, I can copy text back and forth between the jupyter notebook and the continue window.
  • When I select 'paste' in the context menu of the continue window, everything breaks again. After that, even Ctrl+V doesn't work anymore. I have to restart VsCode to restore the initial behavior.

For the time beeing, I'm going to avoid using the context menu. But it would be great if you could try to resolve this issue too. Thanks!

kaixxx avatar May 03 '24 09:05 kaixxx

This is still a problem. I am experiencing exactly the same behavior as described by @kaixxx. I'm on a Windows machine and after using the context menu to paste a piece of code at the current cursor position, that piece of code gets re-pasted into a new Jupyter cell whenever I try to paste something else.

TomasMiskov avatar Sep 09 '24 10:09 TomasMiskov