Improve implicit context in chat
My suggestion:
- When Chat is EMPTY - whatever the user sees visually, the chat will get as context automatically, and we render it (this means if users has two groups side by side we add both editors as context).
- When Chat is not EMPTY, or the user manually edited the context in any way we stop automatically adding stuff.
- In whatever situation: if an active editor is not part of the context we render it grayed out / italic as we do today. There is only one active editor (even for multiple groups)
- If user has selection in any of the files in context, we render the selection in context (as before) and pass that to the LLM
My proposal makes a difference between EMPTY chat and non empty. The reason for that is that EMPTY chat the user is starting, and we need to automatically help them fill out the context. As soon as they already started the conversation there is context. And we should train users to start a new chat for new topics (they will get a better result with crisp context).
It is also important to track as soon as user makes any manual edit to the context. By doing that the user is saying "I want to be in control and will figure out context" - so in that case we also stop auto adding active file.
fyi @roblourens @bpasero @jo-oikawa
This makes good sense to me 🎩
We need this feature
While it looks like the reverted changes in the current insiders build has improved this quite a lot, I feel like the old behaviour was such that even when a selection was not made the current cursor position was taken into context not just the entire file. Is there any chance that this could be brought back or introduced as a configuration setting?
the current cursor position was taken into context
double checking in our previous versions, i don't think we've ever done this.
the current viewport will be included automatically if there is no selection, not necessarily the entire file.
My apologies, I installed the previous version to test myself and you are correct. I think the recent changes threw me off with how it used to work since the new way was so jarring. Happy to have the changes reverted!
no worries @danwall ! thanks for trying it out and sorry if it broke your workflow - the original implicit flow should be out in stable very shortly
After more thinking here's another simple proposal:
- Ask mode we stop sending viewport. We only send selection if the user explicitly selected something (on selection we render
:6-19) - We get rid of the eye of sauron UI
- We have the dashed-italics experience. In ask/edit mode the dashed-italics experience is by default added. In agent by default it is not added
- We preserve state of dashed item (added / not added) across modes in a workspace.
- Ask mode we stop sending viewport.
I'd love to know the thinking behind this.
It seems to me that if you are looking at code and want to ask/edit, then this is most likely what you want to be included as context.
If you think about copilot as a coworker sitting next to you, it makes sense that they have the same context that you do at any given moment looking at the same screen - at least as a starting point before looking at the rest of the file and beyond.
i have something queued for insiders after the june release - moving to July iteration!
closing with https://github.com/microsoft/vscode/issues/251453#issuecomment-3103774565
Sounds like this was on the testplan, lmk if there is something new to verify here
yep! nothing else really needed here, thanks!