diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 5b4a1c5c..abd26222 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -1749,7 +1749,7 @@ def create_app(args): "status": "healthy", "working_directory": str(args.working_dir), "input_directory": str(args.input_dir), - "indexed_files": len(doc_manager.indexed_files), + "indexed_files": doc_manager.indexed_files, "configuration": { # LLM configuration binding/host address (if applicable)/model (if applicable) "llm_binding": args.llm_binding, diff --git a/lightrag/api/static/index.html b/lightrag/api/static/index.html index 8e6748a8..b32be046 100644 --- a/lightrag/api/static/index.html +++ b/lightrag/api/static/index.html @@ -620,6 +620,9 @@ if (response.ok) { const data = await response.json(); + // Convert indexed_files to array if it's not already + const files = Array.isArray(data.indexed_files) ? data.indexed_files : data.indexed_files.split(','); + healthInfo.innerHTML = `
Working Directory: ${data.working_directory}
Input Directory: ${data.input_directory}
-Indexed Files: ${data.indexed_files}
+Indexed Files: (${files.length} files)
+