cody icon indicating copy to clipboard operation
cody copied to clipboard

bug: cannot add selection to chat for follow-up message

Open hlhdai opened this issue 1 year ago • 3 comments

Version

v1.17.1715730510 (pre-release)

Describe the bug

I've upgraded to latest pre-release to use gpt4o and the Add selection to chat broke, this option under Cody right click menu is not visible for follow-up message image

Expected behavior

it should allow to add context to chat for follow-up message like current release version

Additional context

No response

hlhdai avatar May 15 '24 03:05 hlhdai

Bug is still present in 1.18.0, keyboard shortcut is broken as well.

chris-wickens avatar May 15 '24 16:05 chris-wickens

Also on Windows 11 v1.19.1715872539 (pre-release)

See the Video i cant hit Alt + L

https://github.com/sourcegraph/cody/assets/6785110/0118322a-cf20-4651-8162-639477df6adb

SphaeroX avatar May 16 '24 17:05 SphaeroX

Something similar is going on v1.18.0 on MacOS VS Code where

  • No cody chat is open
  • opt + L with selection would open new chat window with selection mentioned

Now it doesn't open the chat window unless there is no selection. Otherwise it replaces the text with ¬ instead of triggering the cody new chat with selection keybind that I use on a daily.

oscar-romero-jorge avatar May 17 '24 05:05 oscar-romero-jorge

@abeatrix , could you help triage this? This could be Cody Ignore, token limits?, something else?

dominiccooney avatar May 22 '24 00:05 dominiccooney

@abeatrix , could you help triage this? This could be Cody Ignore, token limits?, something else?

@dominiccooney thanks for the ping! I just encountered the same issue today and created a PR to fix this. It's already been merged and should be available in tomorrow's pre-release!

Here is the PR: https://github.com/sourcegraph/cody/pull/4242

abeatrix avatar May 22 '24 01:05 abeatrix

@abeatrix hi, I am at the latest pre-release version and this bug still remains. The option Add selection to chat is now visible but does not take any effect, it does not mention selection to the chat input for follow-up message

hlhdai avatar May 23 '24 02:05 hlhdai

@abeatrix hi, I am at the latest pre-release version and this bug still remains. The option Add selection to chat is now visible but does not take any effect, it does not mention selection to the chat input for follow-up message

I also find this error to be destructive and it should be priority number 1 as it obeys my entire workflow. Because I can no longer work with the shortcut.

SphaeroX avatar May 23 '24 07:05 SphaeroX

@abeatrix hi, I am at the latest pre-release version and this bug still remains. The option Add selection to chat is now visible but does not take any effect, it does not mention selection to the chat input for follow-up message

I also find this error to be destructive and it should be priority number 1 as it obeys my entire workflow. Because I can no longer work with the shortcut.

same here, that's why I keep checking on this thread. It really impacts on my daily basic

hlhdai avatar May 23 '24 07:05 hlhdai

Something similar is going on v1.18.0 on MacOS VS Code where

* No cody chat is open

* opt + L with selection would open new chat window with selection mentioned

Now it doesn't open the chat window unless there is no selection. Otherwise it replaces the text with ¬ instead of triggering the cody new chat with selection keybind that I use on a daily.

I have the exact same issue when using the "opt + L" keyboard shortcut and having code or text selected. It replaces the selected text with ¬ instead of opening a new chat.

If I open a new chat first with "opt + L" (without having any text selected), then select text and hit "opt + L" it correctly places the lines selected into the already open chat.

I am on VSCode version 1.89.1 and Cody version 1.18.1 on MacOS

christo-olivier avatar May 23 '24 13:05 christo-olivier

Same here. Only works with fresh new chat window. And only sometimes. Worked better before changing this behaviour.

espiat avatar May 24 '24 09:05 espiat

Hi.

I found an workaround.

Go to keyboard shortcuts and change shortcut for "Add selection for ..."

then go to keybindings.json and find new shortcut.

like this:

{ "key": "alt+oem_1", "command": "cody.mention.selection", "when": "cody.activated && cody.hasNewChatOpened && editorHasSelection && editorTextFocus && !editorReadonly && !explorerViewletFocus" },

erase "&& cody.hasNewChatOpened" from "when" parameter.

like this:

"when": "cody.activated && editorHasSelection && editorTextFocus && !editorReadonly && !explorerViewletFocus"

then you can add code to the chat without to open a new chat every time.

espiat avatar May 24 '24 12:05 espiat

In the last preview when I tested it today everything was fixed, now it works great with the new chat too!

SphaeroX avatar May 24 '24 12:05 SphaeroX

Thank you all for raising the issue and special thanks to @SphaeroX for confirming that the fix in the latest pre-release version (v1.19.1716563719) worked 🤗

The fix will be included in our stable release v1.20 next Wednesday, so please try the pre-release version in the meantime and let us know if it doesn't work for you 😄

abeatrix avatar May 24 '24 18:05 abeatrix

anyone else can confirm if it is fixed? It still always opens new chat with Option+L in my case and can not add selection for followup message. I am at the latest prerelease

hlhdai avatar May 25 '24 04:05 hlhdai

anyone else can confirm if it is fixed? It still always opens new chat with Option+L in my case and can not add selection for followup message. I am at the latest prerelease

I tried it yesterday and it wasn't working but didn't have time to fully verify. On the current pre-release of 1.19.1716650133 it works again!

oscar-romero-jorge avatar May 26 '24 04:05 oscar-romero-jorge

swithcing to pre release version v1.19.1716736523 solves the problem. many thanks.

espiat avatar May 27 '24 11:05 espiat

v1.19.1717154261 (pre-release)

unfortunately, the error has returned, can we reopen the ticket?

SphaeroX avatar May 31 '24 12:05 SphaeroX

~v1.19.1716736523 is the latest one I could install that still had the fix in.~ If we could reopen the issue, @abeatrix 🙏

Update, went through and tested up to v1.19.1717082144 it works. On v1.19.1717120199 seems like it still works but with the updated shorthand reference @.

oscar-romero-jorge avatar Jun 04 '24 14:06 oscar-romero-jorge

Related to https://github.com/sourcegraph/cody/issues/4419

SphaeroX avatar Jun 04 '24 15:06 SphaeroX