fix: crash 'list' object has no attribute 'keys' on image upload, output disappearing on error

Root cause: layout_schema.regions is a list of region dicts, not a dict.
_log_ocr_layers() was calling .keys() on it, causing agent_error.

Also fixed: ProcessSection now stays visible after streaming ends (error or
completion), so generated content is not lost. Header shows ✓/✕/pulse indicators.
Error handler now refreshes session state for partial JRXML download.
This commit is contained in:
2026-05-22 00:01:54 +08:00
parent d600cbf285
commit 339d415322
3 changed files with 29 additions and 5 deletions
+1
View File
@@ -103,6 +103,7 @@ async function handleSend(text: string, files: File[]) {
onAgentError(data) {
chat.setError(data.error)
chat.addMessage({ role: 'assistant', content: `执行异常: ${data.error}`, type: 'error' })
setTimeout(() => session.refreshFromState({}), 500)
},
})
} catch (e: any) {