yangdx
commited on
Commit
·
b79b057
1
Parent(s):
75d0b6d
Fix linting
Browse files
lightrag_webui/src/components/graph/GraphLabels.tsx
CHANGED
@@ -13,7 +13,7 @@ const GraphLabels = () => {
|
|
13 |
const label = useSettingsStore.use.queryLabel()
|
14 |
const allDatabaseLabels = useGraphStore.use.allDatabaseLabels()
|
15 |
const labelsFetchAttempted = useGraphStore.use.labelsFetchAttempted()
|
16 |
-
|
17 |
// Remove initial label fetch effect as it's now handled by fetchGraph based on lastSuccessfulQueryLabel
|
18 |
|
19 |
const getSearchEngine = useCallback(() => {
|
@@ -59,8 +59,8 @@ const GraphLabels = () => {
|
|
59 |
|
60 |
// Show queryLabel validation status
|
61 |
useEffect(() => {
|
62 |
-
|
63 |
-
if (labelsFetchAttempted) {
|
64 |
if (allDatabaseLabels.length > 1) {
|
65 |
if (label && label !== '*' && !allDatabaseLabels.includes(label)) {
|
66 |
console.log(`Label "${label}" not in available labels`);
|
|
|
13 |
const label = useSettingsStore.use.queryLabel()
|
14 |
const allDatabaseLabels = useGraphStore.use.allDatabaseLabels()
|
15 |
const labelsFetchAttempted = useGraphStore.use.labelsFetchAttempted()
|
16 |
+
|
17 |
// Remove initial label fetch effect as it's now handled by fetchGraph based on lastSuccessfulQueryLabel
|
18 |
|
19 |
const getSearchEngine = useCallback(() => {
|
|
|
59 |
|
60 |
// Show queryLabel validation status
|
61 |
useEffect(() => {
|
62 |
+
|
63 |
+
if (labelsFetchAttempted) {
|
64 |
if (allDatabaseLabels.length > 1) {
|
65 |
if (label && label !== '*' && !allDatabaseLabels.includes(label)) {
|
66 |
console.log(`Label "${label}" not in available labels`);
|
lightrag_webui/src/hooks/useLightragGraph.tsx
CHANGED
@@ -119,7 +119,7 @@ const fetchGraph = async (label: string, maxDepth: number, maxNodes: number) =>
|
|
119 |
// Continue with graph fetch even if labels fetch fails
|
120 |
}
|
121 |
}
|
122 |
-
|
123 |
// Trigger GraphLabels component to check if the label is valid
|
124 |
// console.log('Setting labelsFetchAttempted to true');
|
125 |
useGraphStore.getState().setLabelsFetchAttempted(true)
|
|
|
119 |
// Continue with graph fetch even if labels fetch fails
|
120 |
}
|
121 |
}
|
122 |
+
|
123 |
// Trigger GraphLabels component to check if the label is valid
|
124 |
// console.log('Setting labelsFetchAttempted to true');
|
125 |
useGraphStore.getState().setLabelsFetchAttempted(true)
|