Skip to content

Conversation

@shuv1337
Copy link
Contributor

When reading text files via ReadTool, append any returned attachments (e.g., images) as synthetic file parts; otherwise fall back to the original file part.

  • Session handling (packages/opencode/src/session/prompt.ts):
    • ReadTool file handling:
      • After executing ReadTool for text/plain file inputs, push the text output and then:
        • If result.attachments exist, append them as synthetic file parts with filename defaulted to the original part’s filename.
        • Otherwise, append the original file part.
      • Ensures attachments (e.g., images) from tools are correctly attached to the message.
image image image

@github-actions github-actions bot force-pushed the dev branch 2 times, most recently from 917250b to f4593c6 Compare November 22, 2025 05:02
@shuv1337
Copy link
Contributor Author

@rekram1-node 🙏

@rekram1-node rekram1-node merged commit bdcf864 into anomalyco:dev Nov 22, 2025
4 checks passed
@rekram1-node
Copy link
Collaborator

sorry for delay SO busy lately

github-actions bot pushed a commit to yuguorui/opencode that referenced this pull request Jan 18, 2026
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants