Release v0.4.7#21
Merged
Merged
Conversation
…document extraction Introduce a comprehensive attachment system that allows users to attach files to their prompts via the native OS file picker (/attach or Ctrl+F), drag-and-drop from the terminal, or the programmatic API. Key changes: - New src/attachments.ts module with file parsing, validation, and text extraction for CSV, DOCX, JSON, MD, PDF, TXT, XLSX, and images (PNG, JPEG, WebP) - Document text extraction using mammoth (DOCX), pdf-parse (PDF), and read-excel-file (XLSX); plain-text fallback for other formats - Image signature validation with proper MIME type detection - Size and count limits: 20 files, 10 MB per file, 25 MB total, 200K chars per file, 500K chars total - AI SDK client updated to send image parts as data URLs for vision-capable models - Agent runTurn now accepts attachments, formats them as XML context blocks, and sends images as multi-part content when the model supports them - UI composer shows attached files with visual indicators, supports backspace-to-remove and escape-to-clear - Drag-and-drop detection: multi-file paths pasted from the terminal are consumed as attachments only when every token is a supported file - Queue system updated to carry attachments through multi-turn flows - Session transcript stores attachment summaries for history/resume - Updated README with attachment feature documentation - Added test:attachments npm script and unit tests for path parsing, document extraction, and content limits - Added dependencies: mammoth, pdf-parse, read-excel-file
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new
This release introduces a file attachment system — users can now attach documents and images to their prompts for richer context.
Features
/attachorCtrl+Fto open the native OS file picker (macOS, Windows, Linux)Dependencies added
mammoth— DOCX text extractionpdf-parse— PDF text extractionread-excel-file— XLSX text extraction