You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to auto-select files to add to context by using @reference in create prompt window #175
I'd like to be able to construct a prompt by referencing files using an @reference to relevant files (ideally with tab-complete by string matching to an indexed tree of the workspace filenames). I believe Cline/Roo have a nice implementation of this to look at.
Example prompt:
Please reference @settings.py for style/layout inspiration, and the documentation @rio.Text.txt @rio.TextInput.txt @rio.Column.txt @rio.Dropdown.txt etc, and make a page for user @search.py (currently a placeholder) that is based on the fields present in @profile_extractor.py#L29-82 as well as @example_data.json
The above will automatically select the settings and search files from codebase, and also attach the relevant component documentation files I have locally as well.
Probably exactly verbatim, with the relevant codesnippet backticked with line reference.
But for practical usage, I've only applied it by selecting the relevant lines in the code file viewer, and "adding to context" with keyboard shortcut - never typed in the chatbox.
Couldnt find it at first, seems like Windsurf hasn't detected extension update - but tried now in VSCode. Wonder if thats related to any other issues I have..anyways
It works! However my main intent behind @referencing in prompt-window is to avoid traversing through the filetree manually/with the cursor - otherwise I could just check the include box as I am currently. Example of Roo prompt window here:
Was always a python programmer, wish I knew JS beyond basic vibecoding, otherwise I'd love to try making PRs..alas I'm stuck to raising issues (for now).
Heres my attempt at finding relevant Roo scripts (yup, using gemini coder to help) - would really love this feature but I think this is as far as I know how to help! I think you already might already be halfway there if already tracking workspace files
I'm trying to find the best solution to fit in the general vibe of working with Gemini Coder. It is a little bit different from other tools as it resolves around file tree and prompt sections:
<files>
[context files]
</files>
[instructions]
Referencing regular context files in instructions would not play nicely as we don't include them inline with text but above in a dedicated section. It would also quickly expand the chat box to unusable sizes.
Suggested workflow is to use command "Go to file...", then you can write file name, hit space, enter some part of directory. This does not work this nicely in Roo. In there you hit space and you're out of the file selection tool. Once you have file opened, it is included in context and you can reference it in instructions if you want to direct LLM to something specifically:
Activity
robertpiosik commentedon Apr 29, 2025
Hi, nice idea, thanks! How should
@profile_extractor.py#L29-82look like in a message?azidancorp commentedon Apr 29, 2025
Probably exactly verbatim, with the relevant codesnippet backticked with line reference.
But for practical usage, I've only applied it by selecting the relevant lines in the code file viewer, and "adding to context" with keyboard shortcut - never typed in the chatbox.
robertpiosik commentedon Apr 30, 2025
Hi @azidancorp, you can reference files from context menu:
Please let me know how you find it 🤓
azidancorp commentedon Apr 30, 2025
Couldnt find it at first, seems like Windsurf hasn't detected extension update - but tried now in VSCode. Wonder if thats related to any other issues I have..anyways
It works! However my main intent behind @referencing in prompt-window is to avoid traversing through the filetree manually/with the cursor - otherwise I could just check the include box as I am currently. Example of Roo prompt window here:
Was always a python programmer, wish I knew JS beyond basic vibecoding, otherwise I'd love to try making PRs..alas I'm stuck to raising issues (for now).
Heres my attempt at finding relevant Roo scripts (yup, using gemini coder to help) - would really love this feature but I think this is as far as I know how to help! I think you already might already be halfway there if already tracking workspace files
https://pastebin.com/2JkRNBfW
Glad to see the rapid development!
robertpiosik commentedon Apr 30, 2025
I'm trying to find the best solution to fit in the general vibe of working with Gemini Coder. It is a little bit different from other tools as it resolves around file tree and prompt sections:
Referencing regular context files in instructions would not play nicely as we don't include them inline with text but above in a dedicated section. It would also quickly expand the chat box to unusable sizes.
Suggested workflow is to use command "Go to file...", then you can write file name, hit space, enter some part of directory. This does not work this nicely in Roo. In there you hit space and you're out of the file selection tool. Once you have file opened, it is included in context and you can reference it in instructions if you want to direct LLM to something specifically:
Let me know if it makes sense.