-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
What specific problem does this solve?
Now that we have support for reading images through the read_file tool (feat #5172), the natural next step could be supporting adding images with the "@" function, just like how one would reference a file. This improves Roo in two ways:
- Save a prompt, tokens and time since we don't need to instruct the LLM to use the read_file tool
- Craft a better prompt by referencing the image(s) directly. E.g. "As you can see in @image1.png, the graph is not the same as in @image2.png. Fix it." This would be a big help for all the scientific users of Roo and UI developers.
In view of DRY & SRP, a decision is needed on how we merge this feature request with the existing implementation (Issue #4552) of adding images through the UI. I see three options
- only the @image.png options is supported
- only adding images through Roo's UI is supported (i.e. this feature is rejected)
- both options are supported
In my opinion, it should be both options. Adding it through the UI allows the user to add a large amount of files all at once, while the @ function allows for precise prompt crafting. Ideally, mentioning an image using @ calls the same function which adds an image to the prompt as is currently implemented, with the UI responding immediately upon pressing tab. To do this, the API call should label the mentioned images properly, which is best explained with an example. Say we want to mention 3 images using @ and add a fourth using the UI. Currently we have
<task>
I have attached the images 3.png, 1.png and 2.png. I also added another image. What are they?
</task>
[Image]
[Image]
[Image]
[Image]
Instead the API call should look as follows, where the first three images were added automatically, with their thumbnails showing up as usual once mentioned:
<task>
I have attached the images @3.png, @1.png and @2.png. I also added another image. What are they?
</task>
[3.png]
[1.png]
[2.png]
[Image]
Additional context (optional)
No response
Roo Code Task Links (Optional)
No response
Request checklist
- I've searched existing Issues and Discussions for duplicates
- This describes a specific problem with clear impact and context
Interested in implementing this?
- Yes, I'd like to help implement this feature
Implementation requirements
- I understand this needs approval before implementation begins
How should this be solved? (REQUIRED if contributing, optional otherwise)
No response
How will we know it works? (Acceptance Criteria - REQUIRED if contributing, optional otherwise)
No response
Technical considerations (REQUIRED if contributing, optional otherwise)
No response
Trade-offs and risks (REQUIRED if contributing, optional otherwise)
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status