Inline Diffs and Document Reading: See What Changed, Read Any File
Two features that make muxd a sharper coding agent: you can now see exactly what the agent changed in every file edit, and it can read documents you throw at it — PDFs, Office files, HTML, and more.
Inline Diffs
When the agent edits a file, muxd now shows a styled inline diff right in the chat stream. Deletions in red, additions in green, with context lines so you can see where the change landed.
--- a/store.go
+++ b/store.go
@@ -31,7 +31,9 @@
- db, err := sql.Open("sqlite", dsn+"?_pragma=journal_mode(wal)")
+ db, err := sql.Open("sqlite", dsn+"?_pragma=journal_mode(wal)&_pragma=busy_timeout(5000)")
if err != nil {
return nil, fmt.Errorf("open db: %w", err)
}
+ db.SetMaxOpenConns(1)
+ db.SetConnMaxLifetime(5 * time.Minute)
No more guessing what the agent did. Every file_edit and file_write (overwrites) shows the diff automatically. New file creation shows a brief notice instead.
Why This Matters
AI agents can silently change things you did not ask for. A renamed variable here, a removed comment there, an "improved" function signature that breaks your tests. Inline diffs surface all of this immediately. You see the change before you even run the code.
Configuration
Diffs are on by default. If you find them noisy, turn them off:
/config set show_diffs false
Large diffs (100+ changed lines) are automatically truncated with a summary so they do not flood your terminal.
Document Reading
muxd can now extract text from common document formats. This works in two places:
- file_read tool: When the agent reads a document file during its work, it automatically extracts text instead of showing binary garbage.
- Chat attachments: Paste a document path into your message and the agent reads its contents.
Supported Formats
| Format | Extensions | What You Get |
|---|---|---|
.pdf | Extracted text with page breaks | |
| Word | .docx | Paragraphs as plain text |
| Excel | .xlsx | Tab-separated values per sheet |
| PowerPoint | .pptx | Slide text in order |
| HTML | .html, .htm | Text with links preserved as markdown |
| CSV | .csv | Tab-separated (already text, just normalized) |
| JSON | .json | Pretty-printed with indentation |
| XML | .xml | Text content, tags stripped |
Use Cases
- "Read this spec": Drop a PDF requirements doc into the chat. The agent extracts the text and can answer questions or write code based on it.
- "Check this spreadsheet": Point the agent at an Excel file and it reads every sheet as structured text.
- "Summarize these slides": The agent reads PowerPoint slides in order and can summarize or act on the content.
- "Parse this HTML": The agent strips tags, keeps links, and works with the text content.
Size Limits
Documents over 10 MB are rejected to prevent accidental context blowout. Extracted text is capped at 100,000 characters with a truncation notice if the document is longer.
How It Works Under the Hood
A new docread package handles all extraction. Pure Go libraries — no CGo, no external binaries, no system dependencies. Works on Windows, Mac, and Linux without setup.
When file_read encounters a supported extension, it routes through docread.Extract() instead of reading raw bytes. The extracted text gets a header showing the source file and format, then the agent works with it as normal text.
Get Started
Update to the latest muxd:
go install github.com/batalabs/muxd@latest
Both features work out of the box. No configuration needed for document reading. Diffs appear automatically on your next file edit.