Commit Graph

3 Commits

Author SHA1 Message Date
panda 60e2f520ba fix: image files silently falling to text parser due to suffix dot mismatch
api_server.py passed "jpg" (no dot) from rsplit, but file_parser.py
parser dict keys all have dots (".jpg"), causing image files to fall
through to _parse_text() which fails on binary data, skipping ALL OCR
and layout analysis. Every image upload was affected.

- file_parser.py: normalize file_type to always have leading dot
- api_server.py: use Path.suffix instead of manual rsplit
2026-05-21 23:05:27 +08:00
panda aa1d8a6c52 fix: logging KeyError with reserved 'filename' key, pytest return-not-none warnings
- api_server.py: rename 'filename' to 'file_name' in upload_file log extra
  dict to avoid collision with Python logging's reserved LogRecord attribute
- test_e2e_ocr.py: replace return statements with assert in test functions
  to fix PytestReturnNotNoneWarning
2026-05-21 22:28:07 +08:00
panda 74f3f03d2c feat: 前后端分离架构 — FastAPI SSE后端 + Vue 3前端
将单体 Streamlit 应用拆分为三层架构:
- api_server.py: FastAPI SSE 流式后端 (端口 8000)
- frontend/: Vue 3 + Vite + Pinia 聊天前端 (端口 5173)
- agent/graph.py: 新增 node_start 回调支持
- 更新启动脚本为三服务模式

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 20:04:27 +08:00