Backspace in an empty chat clears the context

hello,


if there are not any content in the chat, when I click the backspace button, the current file context is deleted too, how can I add the current file context back? so it can reference the current file automatically

1 Like

hi, try pressing cmd + r to reset the chat and bring back the current file. note this will also reset the text and any other context you’ve added.

alternatively you can also switch active editors to bring back the current file context. hope this helps!

totally agree. very frustrated.

One more way to bring back any deleted context is using CMD+Z to effectively undo the deletion.

Having said that, we are discussing this feedback with the team. I can’t promise we’ll remove this behavior entirely, but we are discussing it. :bowing_man:

1 Like

I agree that pressing backspace in an empty chat can be inconvenient. However, I believe the bigger issue is that when backspace is pressed and the text disappears, the input box loses focus, requiring me to click it again to continue typing. I hope this aspect can be addressed seriously.

The versions I use are as follows:

Version: 0.44.11
VSCode Version: 1.93.1
Commit: fe574d0820377383143b2ea26aa6ae28b3425220
Date: 2025-01-03T07:59:06.361Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Thanks for pointing this out, have logged it and will hopefully get it fixed in a future update!

1 Like

I’m glad that this version has resolved not only that issue but also the issue where all line feeds were being shown as changes. Thank you for the quick resolution.

This feature or bug is extremely frustrating and has bit both me and my developers multiple times. If you are any bit zealous with your backspaces, you are going to lose your context. You are NOT alerted to this in any way, and so it can be problematic especially when the AI assistant has no issues with hallucinating in lieu of the actual context. For example, a terminal with server logs.

Personally, I think this is a risky design paradigm. Can we please at least add a toggle to turn this off in the Settings? Or give some kind of visual indicator that “Contexts have been removed!”. Perhaps injecting context removal state into the context would also be valuable (to reduce hallucinations).

I’m using this thread, because the Solution noted here isn’t actually for the bug reported. Thanks!