Ram-090 Claude Opus 4.6 (1M context) commited on
Commit
f97e336
Β·
1 Parent(s): a47bd99

Fix document count to include structured data store rows

Browse files

Status endpoint now counts Excel/CSV rows so Query tab shows documents are loaded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. api.py +3 -1
api.py CHANGED
@@ -149,8 +149,10 @@ os.makedirs(UPLOAD_DIR, exist_ok=True)
149
  # ── Endpoints ────────────────────────────────────────────────────────────────
150
  @app.get("/api/status", response_model=StatusResponse)
151
  def status():
 
 
152
  return StatusResponse(
153
- document_chunks=pipeline.document_count if pipeline else 0,
154
  documents_loaded=[],
155
  uploaded_files=uploaded_files,
156
  similarity_threshold=SIMILARITY_THRESHOLD,
 
149
  # ── Endpoints ────────────────────────────────────────────────────────────────
150
  @app.get("/api/status", response_model=StatusResponse)
151
  def status():
152
+ pipeline_chunks = pipeline.document_count if pipeline else 0
153
+ data_store_rows = sum(len(rows) for rows in data_store.tables.values())
154
  return StatusResponse(
155
+ document_chunks=pipeline_chunks + data_store_rows,
156
  documents_loaded=[],
157
  uploaded_files=uploaded_files,
158
  similarity_threshold=SIMILARITY_THRESHOLD,