Open Astlaan opened 1 month ago
Regarding your first suggestion... We do have this! Press the "option" key and you should see the "use codebase" text toggle to "use active file".
We just realized yesterday that this isn't documented in the keyboard shortcuts in the "more" page. Thanks for the reminder to get that updated 🙂
Regarding your first suggestion... We do have this! Press the "option" key and you should see the "use codebase" text toggle to "use active file".
We just realized yesterday that this isn't documented in the keyboard shortcuts in the "more" page. Thanks for the reminder to get that updated 🙂
@Patrick-Erichsen Ah, indeed I just saw this ahah. But I think this is only helpful if someone already is familiar with the command. Was my case yesterday, I wasn't aware of it and ended up asking on Discord.
I would instead change to something more similar to Cursor's UI:
Though calling it "with current file" instead of "with context"
100% agree on the "if someone is already familiar" part. I often forget myself that it's available 😅
Would you mind sharing what width your sidebar was in that screenshot, or in general, what width you keep it at? Or just roughly what % of your screen width you use for Chat if you're not sure how to get the exact width.
I think if we were to do something like this, we'd only display the extra "with current file" option above a certain viewport width. We already do that with a few items, e.g. if your on too small of a screen we don't display the "use codebase" option.
There is also the "currentFile" context provider which can be added in config as with "name": "currentFile"
and no params and used like @currentFile
@Patrick-Erichsen In general I think my VS Code would look like this.
It seems the way cursor deals with this is just to hide the extra hints when the sidebar's size is reduced
Regarding your first suggestion... We do have this! Press the "option" key and you should see the "use codebase" text toggle to "use active file".
We just realized yesterday that this isn't documented in the keyboard shortcuts in the "more" page. Thanks for the reminder to get that updated 🙂
I do not have an option key on my keyboard, and your documentation says to use "cmd/ctrl + opt + enter," which is something different than what you wrote above. So this is very confusing. I'm not sure if that's something worth submitting an issue for.
But thanks to your post, I tried pressing the "Alt" key while in the chat window and I think that will submit the current file as context.
Thanks for your post, though as I have been struggling to figure this out for much too long!
Apologies for the confusion @Stampede - just updated the docs to specify the "Alt" key for Windows
Validations
Problem
No response
Solution
My main suggestion is: 1) Add a visual hint for adding the current file as context via
Alt+Enter
, similarly as is already displayed in the Chat for adding the whole Codebase context withCtrl+Enter
Bonus suggestion: 2) Maybe it could be cool as well to add a shortcut to add the current file as context without executing the chat right away, as suggested here for Cursor: https://forum.cursor.com/t/key-map-to-add-current-file-as-context/14211/6