feat: 对话区域文件上传(粘贴/拖拽) + XLSX支持 + 会话切换无限循环修复

- 对话区域: st.file_uploader + 全局 paste/drop 事件监听 + sessionStorage 桥接
- 文件预览芯片: 上传后显示在对话区域,可逐文件移除
- OCR 双层解析全面接入: file_parser(文字) + ocr_extractor(字段提取)
- XLSX 解析: openpyxl 逐工作表/逐行读取
- 修复: create_session 强制写入 agent_state.session_id
- 修复: load_session_node 不再从磁盘覆盖 session_id
- 修复: 切换会话 _last_switched_to 哨兵防止无限 rerun

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 12:04:02 +08:00
parent da79640259
commit 87ead4fa6a
6 changed files with 268 additions and 29 deletions
+1
View File
@@ -25,6 +25,7 @@ tqdm>=4.65.0
python-dotenv>=1.0.0
httpx>=0.27.0
tiktoken>=0.7.0
openpyxl>=3.1.0
# 测试
pytest>=8.0.0