cody icon indicating copy to clipboard operation
cody copied to clipboard

bug: Can't copy text from the chat

Open mcheviron opened this issue 1 year ago • 14 comments

Version

1.16.1

Describe the bug

When I am in the chat window and I want to copy text, neither the normal cmd+c nor the right click then picking "Copy" work for me. In fact it works intermittently and I don't know why honestly

Expected behavior

Selected text to be copyable from the chat window

Additional context

No response

mcheviron avatar May 03 '24 20:05 mcheviron

I can reproduce this intermittently.

dominiccooney avatar May 08 '24 12:05 dominiccooney

This is still present in version 1.18.0

Screen-Recording-2024-05-23-at-7

Iravata avatar May 23 '24 03:05 Iravata

Related bug, but not as bad as this one: you can't select code as it's streaming

toolmantim avatar May 23 '24 04:05 toolmantim

For everyone who's not able to copy to clipboard from Cody chat, which version of VS Code are you on? They fixed a bug in VS Code in 1.89.0: https://github.com/sourcegraph/sourcegraph/issues/62361#issuecomment-2091490763. Could you please try upgrading to that version and reporting back?

sqs avatar May 23 '24 06:05 sqs

I am on 1.89.1 still same issue.

Iravata avatar May 23 '24 06:05 Iravata

For everyone who's not able to copy to clipboard from Cody chat, which version of VS Code are you on? They fixed a bug in VS Code in 1.89.0: sourcegraph/sourcegraph#62361 (comment). Could you please try upgrading to that version and reporting back?

Version: 1.89.1 Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685 Date: 2024-05-07T05:14:32.757Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Darwin arm64 23.5.0

The issue is intermittent, that's why i didn't have a video when i opened the bug. for example i just tried now and i could copy, but last night i couldn't

mcheviron avatar May 23 '24 07:05 mcheviron

Same issue here on VSCode 1.89.1, Win 11, I find alt tabbing will bring back copy functionality if it was bugged

Lebofly avatar May 24 '24 01:05 Lebofly

@sqs The bug is really irritating as users can't utilize the tool fully. Even though it was reported multiple times, the request is being closed or not being paid attention (refer [https://github.com/sourcegraph/sourcegraph/issues/62361]. I am using VS Code 1.90.2 on Linux. Details attached.

Screenshot from 2024-06-25 11-45-03

vmdamn avatar Jun 25 '24 06:06 vmdamn

@vmdamn I'm sorry you are still seeing this issue. I am not able to repro on Linux or macOS on the same Electron version. Could you please see if the same issue occurs in another webview, such as the Markdown preview?

  1. Open any .md file
  2. Run the Markdown: Open Preview to the Side command
  3. Try copying in the rendered Markdown webview

I want to see if this is a Cody-specific problem, or if it is a webview problem.

Also, could you please try a few different ways of copying:

  1. Selecting text and pressing Ctrl+C or Cmd+C
  2. Selecting text, right-clicking, and clicking Copy

image

sqs avatar Jun 25 '24 06:06 sqs

Hi @sqs,

I took the steps as you mentioned:

For a text based Cody answer, no code:

  1. Right clicking and clicking copy is not working.
  2. Manually moving the mouse over the selected text and then pressing Ctrl+C and Ctrl+V is working but destroying the formatting of the text. So not very useful if I want to save say certain bullet points in my notes.

For the code based answer, copy code button(first of the three icon buttons) is working. Right clicking and clicking copy is not working. Manually moving the mouse over the selected code and then pressing Ctrl+C and Ctrl+V is working.

vmdamn avatar Jun 25 '24 07:06 vmdamn

@vmdamn OK, so to summarize:

  • right-click copy is not working at all
  • Ctrl+C copy works but loses formatting when you paste

Can you please try right-click copy in the Markdown preview (built into VS Code) as I suggested above? I am curious if that works for you in that Markdown preview webview.

As for losing formatting, I am not able to repro that. When I paste into Google Docs, it retains the bullet list, background color, foreground color, and font. Where are you trying to paste it into, so I can try to repro?

sqs avatar Jun 25 '24 08:06 sqs

@sqs Yeah summary is right.

Copying (Ctrl+C) from markdown preview tab to my notes tab, formatting is working (if I deliberately insert formatting into .md file)

Copying (Ctrl+C) from a Cody answer tab to markdown(.md file) tab/my notes tab, formatting is not working though text is copied successfully using Ctrl+C/Ctrl+V.

Are you reproducing the whole environment to reproduce the bug? I don't see any reason why the bug cannot be reproduced if the whole environment is same.

vmdamn avatar Jun 25 '24 11:06 vmdamn

@vmdamn

  1. When you say "my notes tab", which application are you pasting it into? I want to repro the whole environment you are using so I can try to repro the bug.
  2. Can you please try right-click copy from the Markdown preview (built into VS Code)? I want to see if the problem is with all VS Code webviews, or just Cody's webview.

sqs avatar Jun 26 '24 00:06 sqs

I'm also having the same issue with Cody 1.28 and vscode 1.91.1 on Macos

lucasvinhas avatar Jul 30 '24 14:07 lucasvinhas