Merge pull request #1197 from danielaskdd/main

Hotfix: Resolved the Tooltip positioning issue
This commit is contained in:
Daniel.y
2025-03-26 23:55:11 +08:00
committed by GitHub
3 changed files with 15 additions and 7 deletions

View File

@@ -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,13 +16,16 @@ 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
@@ -34,6 +36,7 @@ def check_env_file():
return False
return True
# Load environment variables
load_dotenv()

View File

@@ -75,7 +75,12 @@ 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):

View File

@@ -284,7 +284,7 @@ export default function DocumentManager() {
<div className="truncate">
{getDisplayFileName(doc, 35)}
</div>
<div className="invisible group-hover:visible fixed z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
<div className="invisible group-hover:visible absolute z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
{doc.file_path}
</div>
</div>
@@ -295,7 +295,7 @@ export default function DocumentManager() {
<div className="truncate">
{doc.id}
</div>
<div className="invisible group-hover:visible fixed z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
<div className="invisible group-hover:visible absolute z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
{doc.file_path}
</div>
</div>
@@ -306,7 +306,7 @@ export default function DocumentManager() {
<div className="truncate">
{doc.content_summary}
</div>
<div className="invisible group-hover:visible fixed z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
<div className="invisible group-hover:visible absolute z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
{doc.content_summary}
</div>
</div>