Skip to content

Add text file attachments to chat turns#142

Merged
BunsDev merged 5 commits into
mainfrom
okcode/file-context-drag-drop
Apr 1, 2026
Merged

Add text file attachments to chat turns#142
BunsDev merged 5 commits into
mainfrom
okcode/file-context-drag-drop

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented Apr 1, 2026

Summary

  • Add first-class file attachment handling alongside images in the composer, persistence layer, and chat send flow.
  • Persist and restore file attachments in drafts, including drag-and-drop and retry behavior.
  • Pass UTF-8 text file contents into Codex and Claude turns, with size limits and truncation safeguards.
  • Extend server-side attachment validation and storage to support file attachments and resolve existing attachment IDs more reliably.
  • Update chat UI copy and state derivation so file attachments count as sendable content.

Testing

  • Not run (PR content only).
  • Existing tests updated for composer send-state and draft attachment persistence behavior.
  • Recommended checks: bun fmt, bun lint, bun typecheck.

BunsDev added 3 commits March 31, 2026 22:11
- Support text file attachments alongside images
- Persist, validate, and forward file context through server and UI
- Relax attachment lookup to handle non-image files
- Update draft store and composer UI to use attachment terminology
- Adjust picker defaults, labels, and draft tests for attachment handling
- Add explicit type guards when filtering image and file attachments
- Keep composer and timeline attachment handling type-safe
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Apr 1, 2026 3:23am

@github-actions github-actions Bot added size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Apr 1, 2026
- Replace flatMap-based hydration with an explicit loop
- Preserve file and image attachment reconstruction while skipping invalid entries
@github-actions github-actions Bot added size:M and removed size:XXL labels Apr 1, 2026
@BunsDev BunsDev merged commit 833df83 into main Apr 1, 2026
8 of 9 checks passed
@BunsDev BunsDev deleted the okcode/file-context-drag-drop branch April 1, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant