ℹ первые строки таблиц в модалке, v1.11

This commit is contained in:
2026-06-17 07:33:37 +04:00
parent f627572abb
commit 30460cc78c
2 changed files with 14 additions and 1 deletions
+5
View File
@@ -151,6 +151,10 @@ class ContractsApp:
paragraphs = sum(1 for e in elements if e.get("type") == "paragraph")
tables = sum(1 for e in elements if e.get("type") == "table")
table_rows = sum(len(e.get("rows", [])) for e in elements if e.get("type") == "table")
table_headers = [
e["rows"][0] if e.get("rows") else []
for e in elements if e.get("type") == "table"
]
return {
"type": "file_done",
"name": name,
@@ -159,6 +163,7 @@ class ContractsApp:
"paragraphs": paragraphs,
"tables": tables,
"table_rows": table_rows,
"table_headers": table_headers,
"errors": errors,
"text_len": len(text) if text else 0,
"text_preview": text[:200] if text else "",