@trustgraph/react-state 1.4.4 → 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 +4 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +4 -36
- 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/row-embeddings-query.d.ts.map +1 -1
- package/dist/state/rows-query.d.ts.map +1 -1
- package/dist/state/structured-query.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2119,16 +2119,7 @@ const useStructuredQuery = () => {
|
|
|
2119
2119
|
: err?.toString() || "Unknown error";
|
|
2120
2120
|
notify.error(`Structured query failed: ${errorMessage}`);
|
|
2121
2121
|
},
|
|
2122
|
-
onSuccess: (
|
|
2123
|
-
if (data.data) {
|
|
2124
|
-
notify.success("Structured query executed successfully");
|
|
2125
|
-
}
|
|
2126
|
-
else if (data.errors && data.errors.length > 0) {
|
|
2127
|
-
notify.warning("Query executed with errors");
|
|
2128
|
-
}
|
|
2129
|
-
else {
|
|
2130
|
-
notify.warning("Query processed but returned no data");
|
|
2131
|
-
}
|
|
2122
|
+
onSuccess: () => {
|
|
2132
2123
|
},
|
|
2133
2124
|
});
|
|
2134
2125
|
// Show loading indicator for structured query operations
|
|
@@ -2179,14 +2170,7 @@ const useRowEmbeddingsQuery = ({ flow } = {}) => {
|
|
|
2179
2170
|
const message = err instanceof Error ? err.message : String(err);
|
|
2180
2171
|
notify.error(`Row embeddings query failed: ${message}`);
|
|
2181
2172
|
},
|
|
2182
|
-
onSuccess: (
|
|
2183
|
-
const count = data?.length ?? 0;
|
|
2184
|
-
if (count > 0) {
|
|
2185
|
-
notify.success(`Found ${count} matching record${count !== 1 ? "s" : ""}`);
|
|
2186
|
-
}
|
|
2187
|
-
else {
|
|
2188
|
-
notify.info("No matching records found");
|
|
2189
|
-
}
|
|
2173
|
+
onSuccess: () => {
|
|
2190
2174
|
},
|
|
2191
2175
|
});
|
|
2192
2176
|
useActivity(mutation.isPending, "Querying row embeddings");
|
|
@@ -2227,14 +2211,7 @@ const useDocumentEmbeddingsQuery = ({ flow } = {}) => {
|
|
|
2227
2211
|
const message = err instanceof Error ? err.message : String(err);
|
|
2228
2212
|
notify.error(`Document embeddings query failed: ${message}`);
|
|
2229
2213
|
},
|
|
2230
|
-
onSuccess: (
|
|
2231
|
-
const count = Array.isArray(data) ? data.length : 0;
|
|
2232
|
-
if (count > 0) {
|
|
2233
|
-
notify.success(`Found ${count} matching chunk${count !== 1 ? "s" : ""}`);
|
|
2234
|
-
}
|
|
2235
|
-
else {
|
|
2236
|
-
notify.info("No matching document chunks found");
|
|
2237
|
-
}
|
|
2214
|
+
onSuccess: () => {
|
|
2238
2215
|
},
|
|
2239
2216
|
});
|
|
2240
2217
|
useActivity(mutation.isPending, "Searching document chunks");
|
|
@@ -2286,7 +2263,6 @@ const useRowsQuery = ({ flow } = {}) => {
|
|
|
2286
2263
|
notify.error(`GraphQL query failed: ${errorMessage}`);
|
|
2287
2264
|
},
|
|
2288
2265
|
onSuccess: () => {
|
|
2289
|
-
notify.success("GraphQL query executed successfully");
|
|
2290
2266
|
},
|
|
2291
2267
|
});
|
|
2292
2268
|
// Show loading indicator for query operations
|
|
@@ -2500,13 +2476,7 @@ const useNlpQuery = ({ flow } = {}) => {
|
|
|
2500
2476
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
2501
2477
|
notify.error(`NLP query conversion failed: ${errorMessage}`);
|
|
2502
2478
|
},
|
|
2503
|
-
onSuccess: (
|
|
2504
|
-
if (data.graphql_query) {
|
|
2505
|
-
notify.success("Natural language converted to GraphQL successfully");
|
|
2506
|
-
}
|
|
2507
|
-
else {
|
|
2508
|
-
notify.warning("Query processed but no GraphQL generated");
|
|
2509
|
-
}
|
|
2479
|
+
onSuccess: () => {
|
|
2510
2480
|
},
|
|
2511
2481
|
});
|
|
2512
2482
|
// Show loading indicator for conversion operations
|
|
@@ -3504,8 +3474,6 @@ const useKnowledgeCores = () => {
|
|
|
3504
3474
|
notify.error(err.toString());
|
|
3505
3475
|
},
|
|
3506
3476
|
onSuccess: () => {
|
|
3507
|
-
// Show success notification
|
|
3508
|
-
notify.success("Knowledge cores loaded successfully");
|
|
3509
3477
|
},
|
|
3510
3478
|
});
|
|
3511
3479
|
// Show loading indicators for long-running operations
|