fix: preserve image attachment file paths#23802
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found the following potentially related PRs that address similar image/file path handling issues:
These PRs appear to be addressing the same general problem space of making file paths available when users paste or drag images. The current PR (23802) may build on or supersede these earlier attempts. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #23801
Closes #17488
Type of change
What does this PR do?
When you paste or drag an image into the prompt, the agent only gets raw pixel data. It doesn't know where the original file is, so asking it to copy or reference the image fails. The agent's thinking shows "I don't have a direct file path" and it tries to decode base64 instead.
This preserves the file path through the attachment flow and exposes it to the model as text, so the agent can actually use it.
How did you verify your code works?
Screenshots / recordings
Checklist