From ebe7620b5f41521d95f1768ca295ef2f29dcb247 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 26 Mar 2025 23:24:26 +0800 Subject: [PATCH 1/3] Add pipeline_status endpoint to log filter --- lightrag/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/utils.py b/lightrag/utils.py index e493ea02..b397b710 100644 --- a/lightrag/utils.py +++ b/lightrag/utils.py @@ -75,7 +75,7 @@ class LightragPathFilter(logging.Filter): def __init__(self): super().__init__() # Define paths to be filtered - self.filtered_paths = ["/documents", "/health", "/webui/"] + self.filtered_paths = ["/documents", "/health", "/webui/", "/documents/pipeline_status"] # self.filtered_paths = ["/health", "/webui/"] def filter(self, record): From e7f68f7b776f338e980292e86d8c773ef46eb719 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 26 Mar 2025 23:49:14 +0800 Subject: [PATCH 2/3] fixed the Tooltip positioning issue: - Changed all Tooltip position styles from fixed to absolute - Maintained the position: relative on parent elements (already present in the group relative class) --- lightrag_webui/src/features/DocumentManager.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightrag_webui/src/features/DocumentManager.tsx b/lightrag_webui/src/features/DocumentManager.tsx index e66066fe..3b4bc933 100644 --- a/lightrag_webui/src/features/DocumentManager.tsx +++ b/lightrag_webui/src/features/DocumentManager.tsx @@ -284,7 +284,7 @@ export default function DocumentManager() {
{getDisplayFileName(doc, 35)}
-
+
{doc.file_path}
@@ -295,7 +295,7 @@ export default function DocumentManager() {
{doc.id}
-
+
{doc.file_path}
@@ -306,7 +306,7 @@ export default function DocumentManager() {
{doc.content_summary}
-
+
{doc.content_summary}
From dfa63e863c887e50985df5eab7bd5e6dfd96fd12 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 26 Mar 2025 23:53:41 +0800 Subject: [PATCH 3/3] Fix linting --- lightrag/api/utils_api.py | 9 ++++++--- lightrag/utils.py | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lightrag/api/utils_api.py b/lightrag/api/utils_api.py index cc0d1341..32a453bf 100644 --- a/lightrag/api/utils_api.py +++ b/lightrag/api/utils_api.py @@ -8,7 +8,6 @@ from typing import Optional, List, Tuple import sys from ascii_colors import ASCIIColors import logging -from ascii_colors import ASCIIColors from lightrag.api import __api_version__ from fastapi import HTTPException, Security, Request, status from dotenv import load_dotenv @@ -17,15 +16,18 @@ from starlette.status import HTTP_403_FORBIDDEN from .auth import auth_handler from ..prompt import PROMPTS + def check_env_file(): """ Check if .env file exists and handle user confirmation if needed. Returns True if should continue, False if should exit. """ if not os.path.exists(".env"): - warning_msg = "Warning: .env file not found. Some features may not work properly." + warning_msg = ( + "Warning: .env file not found. Some features may not work properly." + ) ASCIIColors.yellow(warning_msg) - + # Check if running in interactive terminal if sys.stdin.isatty(): response = input("Do you want to continue? (yes/no): ") @@ -34,6 +36,7 @@ def check_env_file(): return False return True + # Load environment variables load_dotenv() diff --git a/lightrag/utils.py b/lightrag/utils.py index b397b710..07f8c4b7 100644 --- a/lightrag/utils.py +++ b/lightrag/utils.py @@ -75,7 +75,12 @@ class LightragPathFilter(logging.Filter): def __init__(self): super().__init__() # Define paths to be filtered - self.filtered_paths = ["/documents", "/health", "/webui/", "/documents/pipeline_status"] + self.filtered_paths = [ + "/documents", + "/health", + "/webui/", + "/documents/pipeline_status", + ] # self.filtered_paths = ["/health", "/webui/"] def filter(self, record):