@ai-matrx/associations 0.13.64 → 0.13.66
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/CHANGELOG.md +12 -0
- package/dist/react/index.cjs +13 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +13 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +4 -4
package/dist/react/index.js
CHANGED
|
@@ -1753,6 +1753,7 @@ function useContainerLinks(args) {
|
|
|
1753
1753
|
edges,
|
|
1754
1754
|
status: genericStatus,
|
|
1755
1755
|
error: genericError,
|
|
1756
|
+
fetchedAt: genericFetchedAt,
|
|
1756
1757
|
reload: reloadGeneric
|
|
1757
1758
|
} = useAssociations({
|
|
1758
1759
|
type: containerType,
|
|
@@ -1812,6 +1813,18 @@ function useContainerLinks(args) {
|
|
|
1812
1813
|
}, 0);
|
|
1813
1814
|
return () => clearTimeout(timeout);
|
|
1814
1815
|
}, [loadConversationFiles]);
|
|
1816
|
+
const lastGenericFetch = useRef3({
|
|
1817
|
+
key: conversationKey,
|
|
1818
|
+
at: null
|
|
1819
|
+
});
|
|
1820
|
+
useEffect2(() => {
|
|
1821
|
+
const previous = lastGenericFetch.current;
|
|
1822
|
+
lastGenericFetch.current = { key: conversationKey, at: genericFetchedAt };
|
|
1823
|
+
if (!conversationKey || genericFetchedAt == null) return;
|
|
1824
|
+
if (previous.key !== conversationKey || previous.at == null) return;
|
|
1825
|
+
if (previous.at === genericFetchedAt) return;
|
|
1826
|
+
void loadConversationFiles();
|
|
1827
|
+
}, [conversationKey, genericFetchedAt, loadConversationFiles]);
|
|
1815
1828
|
const conversationFiles = conversationResult?.key === conversationKey ? conversationResult.files : [];
|
|
1816
1829
|
const conversationFileError = conversationResult?.key === conversationKey ? conversationResult.error : null;
|
|
1817
1830
|
const conversationFileStatus = outgoing || containerType !== "conversation" ? "idle" : conversationResult?.key !== conversationKey ? "loading" : conversationResult.loading ? "loading" : conversationFileError ? "error" : "ready";
|