continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.25k stars 1.66k forks source link

CMD+L doesn't work once chat is started #2812

Open priyashpatil opened 1 week ago

priyashpatil commented 1 week ago

Before submitting your bug report

Relevant environment info

- OS: MacOS 
- Continue version: pre release 
- IDE version: VSCode
- Model: NA
- config.json:

Description

CMD+L doesn't work when you have already started a chat and then try to start another chat by adding block context.

To reproduce

  1. Start a regular chat with few back and forth messages
  2. From the editor add a code block using CMD+SHIFT+L to the chat
  3. Then try to start the new chat by CMD+L along with the attached code block context.

Log output

No response

sestinj commented 1 week ago

@priyashpatil I think what's happening is that we're not recognizing cmd+L when the cursor is already inside of the input box. Is this consistent with what you're seeing?

priyashpatil commented 1 week ago

@sestinj Can confirm: if input is focused then cmd+L doesn't work.

Also there another related bug, duplicating added context:

  1. Add a code block context cmd+shift+L to existing chat
  2. Focus out of input (click outside of input).
  3. Then cmd+L would start a new chat but it will duplicate the attached code block context.
RomneyDa commented 1 week ago

first bug fixed by https://github.com/continuedev/continue/pull/2834 second bug fixed by https://github.com/continuedev/continue/pull/2842

priyashpatil commented 1 week ago

@RomneyDa the new pre-release has fixed the above mentioned bugs but there's another related bug:

  1. Start a new chat
  2. Add code context CMD+SHIFT+L
  3. Then add another code context CMD+SHIFT+L
  4. Then press CMD+L

This closes the chat sidebar and this seems to be issue on only new Chats.

RomneyDa commented 5 days ago

@priyashpatil was able to duplicate

I kind of feel like this should be normal behavior, and that in this case if people want to clear the box they should just hit delete or cmd + delete

I guess the question is if you had just pulled some code into the chat with Cmd + shift + L and then you hit CMD + L, would you expect it to start a new session with no input? Or to start a new session without changing the input? My intuition is with the new input, because anything in the input feels "unsaved", and to delete it you should manually hit delete (cmd L saves last session)

Thoughts?

priyashpatil commented 4 days ago

@RomneyDa if CMD+L is supposed to start a new chat but if already on a new chat, I think it should ignore the keystroke instead of closing the chat window.