@trustgraph/react-state 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +3 -27
- package/dist/index.esm.js.map +1 -1
- package/dist/state/document-embeddings-query.d.ts.map +1 -1
- package/dist/state/knowledge-cores.d.ts.map +1 -1
- package/dist/state/nlp-query.d.ts.map +1 -1
- package/dist/state/structured-query.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2120,16 +2120,7 @@ const useStructuredQuery = () => {
|
|
|
2120
2120
|
: err?.toString() || "Unknown error";
|
|
2121
2121
|
notify.error(`Structured query failed: ${errorMessage}`);
|
|
2122
2122
|
},
|
|
2123
|
-
onSuccess: (
|
|
2124
|
-
if (data.data) {
|
|
2125
|
-
notify.success("Structured query executed successfully");
|
|
2126
|
-
}
|
|
2127
|
-
else if (data.errors && data.errors.length > 0) {
|
|
2128
|
-
notify.warning("Query executed with errors");
|
|
2129
|
-
}
|
|
2130
|
-
else {
|
|
2131
|
-
notify.warning("Query processed but returned no data");
|
|
2132
|
-
}
|
|
2123
|
+
onSuccess: () => {
|
|
2133
2124
|
},
|
|
2134
2125
|
});
|
|
2135
2126
|
// Show loading indicator for structured query operations
|
|
@@ -2221,14 +2212,7 @@ const useDocumentEmbeddingsQuery = ({ flow } = {}) => {
|
|
|
2221
2212
|
const message = err instanceof Error ? err.message : String(err);
|
|
2222
2213
|
notify.error(`Document embeddings query failed: ${message}`);
|
|
2223
2214
|
},
|
|
2224
|
-
onSuccess: (
|
|
2225
|
-
const count = Array.isArray(data) ? data.length : 0;
|
|
2226
|
-
if (count > 0) {
|
|
2227
|
-
notify.success(`Found ${count} matching chunk${count !== 1 ? "s" : ""}`);
|
|
2228
|
-
}
|
|
2229
|
-
else {
|
|
2230
|
-
notify.info("No matching document chunks found");
|
|
2231
|
-
}
|
|
2215
|
+
onSuccess: () => {
|
|
2232
2216
|
},
|
|
2233
2217
|
});
|
|
2234
2218
|
useActivity(mutation.isPending, "Searching document chunks");
|
|
@@ -2493,13 +2477,7 @@ const useNlpQuery = ({ flow } = {}) => {
|
|
|
2493
2477
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
2494
2478
|
notify.error(`NLP query conversion failed: ${errorMessage}`);
|
|
2495
2479
|
},
|
|
2496
|
-
onSuccess: (
|
|
2497
|
-
if (data.graphql_query) {
|
|
2498
|
-
notify.success("Natural language converted to GraphQL successfully");
|
|
2499
|
-
}
|
|
2500
|
-
else {
|
|
2501
|
-
notify.warning("Query processed but no GraphQL generated");
|
|
2502
|
-
}
|
|
2480
|
+
onSuccess: () => {
|
|
2503
2481
|
},
|
|
2504
2482
|
});
|
|
2505
2483
|
// Show loading indicator for conversion operations
|
|
@@ -3497,8 +3475,6 @@ const useKnowledgeCores = () => {
|
|
|
3497
3475
|
notify.error(err.toString());
|
|
3498
3476
|
},
|
|
3499
3477
|
onSuccess: () => {
|
|
3500
|
-
// Show success notification
|
|
3501
|
-
notify.success("Knowledge cores loaded successfully");
|
|
3502
3478
|
},
|
|
3503
3479
|
});
|
|
3504
3480
|
// Show loading indicators for long-running operations
|