From 360379136b83dfd5ee1c4207ad2a975da5e11ad1 Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Wed, 15 Apr 2026 22:43:31 -0700 Subject: [PATCH] =?UTF-8?q?feat(upload):=20support=20Excel=20and=20Word=20?= =?UTF-8?q?file=20attachments=20=E2=80=94=20v0.50.61?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squash-merges PR #571 (rebased from contributor PR #566 by @renheqiang). Adds .xls/.xlsx/.doc/.docx to the file picker and MIME map. 1319 tests pass. --- CHANGELOG.md | 5 +++++ api/config.py | 5 +++++ static/index.html | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2b6e1..b416a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Hermes Web UI -- Changelog +## [v0.50.61] — 2026-04-16 + +### Added +- **Office file attachments** — `.xls`, `.xlsx`, `.doc`, and `.docx` files can now be selected via the attach button. The file picker's `accept` attribute is extended to include Office MIME types, and the backend MIME map is updated so these files are served with correct content-type headers when accessed through the workspace file browser. Files are saved as binary to the workspace; the AI can reference them by name the same way it does PDFs. (PR #566 by @renheqiang) + ## [v0.50.60] — 2026-04-16 ### Changed diff --git a/api/config.py b/api/config.py index 520dffc..f5567a2 100644 --- a/api/config.py +++ b/api/config.py @@ -342,6 +342,7 @@ MAX_UPLOAD_BYTES = 20 * 1024 * 1024 # ── File type maps ─────────────────────────────────────────────────────────── IMAGE_EXTS = {".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".bmp"} MD_EXTS = {".md", ".markdown", ".mdown"} +OFFICE_EXTS = {".xls", ".xlsx", ".doc", ".docx"} CODE_EXTS = { ".py", ".js", @@ -380,6 +381,10 @@ MIME_MAP = { ".bmp": "image/bmp", ".pdf": "application/pdf", ".json": "application/json", + ".xls": "application/vnd.ms-excel", + ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + ".doc": "application/msword", + ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", } # ── Toolsets (from config.yaml or hardcoded default) ───────────────────────── diff --git a/static/index.html b/static/index.html index 6d02137..95454db 100644 --- a/static/index.html +++ b/static/index.html @@ -274,7 +274,7 @@