mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1119] [CLOSED] Add local PDF, Word and Excel attachments with screenshot previews #3041
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3041
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1119
Author: @medking82
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:codex/document-attachments-new-main-20261006📝 Commits (1)
ef2472eAdd bounded local document attachments and screenshot previews📊 Changes
11 files changed (+991 additions, -27 deletions)
View changed files
📝
docs/DETAILS.md(+20 -0)📝
requirements.txt(+10 -0)➕
serve/file_extract.py(+305 -0)📝
serve/server.py(+33 -1)➕
serve/test_file_extract.py(+183 -0)➕
serve/test_file_extract_http.py(+75 -0)📝
serve/web/app.css(+8 -0)📝
serve/web/app.js(+133 -25)📝
serve/web/index.html(+2 -0)➕
tools/test_chat_attachments.cjs(+211 -0)📝
tools/test_setup_pins.py(+11 -1)📄 Description
When attaching a local document, the web app can now extract PDF text, Word body paragraphs/tables and Excel cached cell values before sending the question. Scanned PDF pages become bounded PNG attachments when vision is enabled. Screenshot previews and pending-read guards also cover pasted or dropped pictures; Send waits for extraction, and New chat ignores cancelled or delayed reads.
This rebuilds our contribution from #724 on the rewritten
main(82f46a8c), following the maintainer's history-cleanup notice. It contains only the original document attachment vertical slice and is independent of durable chat, skills, research policy and adaptive memory.Uploads stay in process memory. A child worker enforces size, time, memory and concurrency limits. The route reuses the existing API-key and own-page admission; malformed/encrypted documents, unsafe Office ZIP/XML and over-limit content return bounded errors or visible extraction notes. Parser dependencies are pinned, including the legacy-install path that adds missing parsers without replacing the runtime.
Validation on Windows, after the new-main port:
No production archive, GPU or real model was used. Unix memory containment is implemented but was not exercised in this Windows validation. Legacy
.doc/.xls, encrypted PDF and OCR are outside this change; a text-only model cannot read scanned-page pictures. Browser draft storage can fill, in which case the UI warns and retains the current in-memory draft.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.