Attachments
Drag and drop files into the composer, or click the + icon to open the native file picker. Loach parses each file and inlines its contents into the request — there is no separate upload step and nothing leaves your machine unless you are using a cloud provider.
Supported file types
Loach recognises three flavours of attachment:
- Images — PNG, JPEG, WEBP and GIF. Sent alongside the text turn to vision-capable models.
- Text and code — about fifty recognised extensions (Python, TypeScript, Rust, Go, JSON, YAML, Markdown, SQL, shell, and so on) plus anything served as a
text/*MIME type. The contents are inlined into the prompt as a fenced code block tagged with the right language. - Documents — PDF and DOCX. Loach extracts the readable text (and the PDF page count) and inlines that. Layout and embedded images are not preserved; everything becomes plain text that the model can reason about.
How attachments enter the prompt
Each attachment is rendered into the user turn as its own block, with the filename as a header so the model knows what it is looking at. Multiple files in one message work — Loach concatenates them in the order you dropped them, then appends your prompt at the bottom. The attachments stay with the message in the transcript, so re-running the conversation later replays the same context.
Caps and truncation
To keep the prompt manageable, Loach applies sensible per-file and per-message limits. When a long PDF or DOCX exceeds its per-file budget, the file chip shows a truncation badge and a one-line note is added inline so the model is told what was cut.
If everything together still does not fit, files that could not be inlined are listed by name in a short trailing footer — so the model knows the file exists and can ask you for an excerpt.
For very large documents, paste the section you actually want reasoned about instead of dropping the whole file. The model gets cleaner context and you burn fewer tokens.
Files Loach cannot decode
Legacy .doc files, archives, binaries and other formats Loach does not parse are kept in the transcript and announced to the model by name, but no readable content is inlined. The model can still acknowledge that “you attached report.zip” and ask for a usable version.
Previews
Clicking an attachment chip opens a per-type preview without leaving the chat. Loach picks the right viewer based on what the file actually is:
- Images — open in a lightbox with a Save button. Click the dim backdrop to close, matching standard lightbox behaviour.
- PDFs with original bytes retained — open as a multi-page rendered preview (lazy per-page rasterisation) with Save.
- Text and code — open in the Code canvas with language-aware highlighting and export.
- DOCX, binaries, and older PDFs without raw bytes — open a file-info card with Save, so you can still pull the attachment back out even when Loach cannot render it inline.