@athenaintel/react 0.10.7 → 0.10.8
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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -66631,7 +66631,8 @@ function useAthenaThreadManager() {
|
|
|
66631
66631
|
var _a2;
|
|
66632
66632
|
return (_a2 = s.metadata) == null ? void 0 : _a2.remoteId;
|
|
66633
66633
|
} });
|
|
66634
|
-
const
|
|
66634
|
+
const isThreadLoading = useThread({ optional: true, selector: (s) => s.isLoading }) ?? false;
|
|
66635
|
+
const isListLoading = useThreadList({ optional: true, selector: (s) => s.isLoading });
|
|
66635
66636
|
const runtimeRef = React.useRef(runtime);
|
|
66636
66637
|
runtimeRef.current = runtime;
|
|
66637
66638
|
const switchToThread = React.useCallback(
|
|
@@ -66644,16 +66645,17 @@ function useAthenaThreadManager() {
|
|
|
66644
66645
|
);
|
|
66645
66646
|
const activeThreadId = remoteId ?? null;
|
|
66646
66647
|
return React.useMemo(() => {
|
|
66647
|
-
if (!runtime ||
|
|
66648
|
+
if (!runtime || isListLoading == null) {
|
|
66648
66649
|
return null;
|
|
66649
66650
|
}
|
|
66650
66651
|
return {
|
|
66651
66652
|
activeThreadId,
|
|
66652
|
-
|
|
66653
|
+
isListLoading,
|
|
66654
|
+
isThreadLoading,
|
|
66653
66655
|
switchToThread,
|
|
66654
66656
|
switchToNewThread
|
|
66655
66657
|
};
|
|
66656
|
-
}, [runtime, activeThreadId,
|
|
66658
|
+
}, [runtime, activeThreadId, isListLoading, isThreadLoading, switchToThread, switchToNewThread]);
|
|
66657
66659
|
}
|
|
66658
66660
|
function useAppendToComposer() {
|
|
66659
66661
|
const aui = useAui();
|