Merge pull request #1197 from danielaskdd/main
Hotfix: Resolved the Tooltip positioning issue
This commit is contained in:
@@ -8,7 +8,6 @@ from typing import Optional, List, Tuple
|
|||||||
import sys
|
import sys
|
||||||
from ascii_colors import ASCIIColors
|
from ascii_colors import ASCIIColors
|
||||||
import logging
|
import logging
|
||||||
from ascii_colors import ASCIIColors
|
|
||||||
from lightrag.api import __api_version__
|
from lightrag.api import __api_version__
|
||||||
from fastapi import HTTPException, Security, Request, status
|
from fastapi import HTTPException, Security, Request, status
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -17,15 +16,18 @@ from starlette.status import HTTP_403_FORBIDDEN
|
|||||||
from .auth import auth_handler
|
from .auth import auth_handler
|
||||||
from ..prompt import PROMPTS
|
from ..prompt import PROMPTS
|
||||||
|
|
||||||
|
|
||||||
def check_env_file():
|
def check_env_file():
|
||||||
"""
|
"""
|
||||||
Check if .env file exists and handle user confirmation if needed.
|
Check if .env file exists and handle user confirmation if needed.
|
||||||
Returns True if should continue, False if should exit.
|
Returns True if should continue, False if should exit.
|
||||||
"""
|
"""
|
||||||
if not os.path.exists(".env"):
|
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)
|
ASCIIColors.yellow(warning_msg)
|
||||||
|
|
||||||
# Check if running in interactive terminal
|
# Check if running in interactive terminal
|
||||||
if sys.stdin.isatty():
|
if sys.stdin.isatty():
|
||||||
response = input("Do you want to continue? (yes/no): ")
|
response = input("Do you want to continue? (yes/no): ")
|
||||||
@@ -34,6 +36,7 @@ def check_env_file():
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
# Load environment variables
|
# Load environment variables
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
@@ -75,7 +75,12 @@ class LightragPathFilter(logging.Filter):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
# Define paths to be filtered
|
# 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/"]
|
# self.filtered_paths = ["/health", "/webui/"]
|
||||||
|
|
||||||
def filter(self, record):
|
def filter(self, record):
|
||||||
|
@@ -284,7 +284,7 @@ export default function DocumentManager() {
|
|||||||
<div className="truncate">
|
<div className="truncate">
|
||||||
{getDisplayFileName(doc, 35)}
|
{getDisplayFileName(doc, 35)}
|
||||||
</div>
|
</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}
|
{doc.file_path}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -295,7 +295,7 @@ export default function DocumentManager() {
|
|||||||
<div className="truncate">
|
<div className="truncate">
|
||||||
{doc.id}
|
{doc.id}
|
||||||
</div>
|
</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}
|
{doc.file_path}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -306,7 +306,7 @@ export default function DocumentManager() {
|
|||||||
<div className="truncate">
|
<div className="truncate">
|
||||||
{doc.content_summary}
|
{doc.content_summary}
|
||||||
</div>
|
</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}
|
{doc.content_summary}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user