Feature: Add selected code to chat with file reference
I'd like the ability to select a block of code and (using a shortcut) send it to the chat along with a reference to the file and line range (something like., @file:L130-L140).
The reason is to avoid manually typing prompts like,
"Check this code
....,which you find in /app/domain/file.clj and ..."
This feature would save that effort. Instead the prompt would look like,
"Check @file:L130-140 and ..."
It would definitely be useful for refactoring as well; the eca_edit_tool would take care of the rest.
Together with some custom-command with instructions and https://github.com/editor-code-assistant/eca/issues/163.
Support for # may also make sense. WDYT?
We have an eca-chat-add-context but it doesn't work very well for the described case. And it doesn't contain information about the position in the file (which is not really needed in the system message).
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
We've agreed on those commands:
eca-chat-add-context-to-system-message
eca-chat-add-context-to-user-message
eca-chat-add-filepath-to-user-message