@athenaintel/react 0.10.6 → 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 CHANGED
@@ -66627,9 +66627,12 @@ function ThreadListItem() {
66627
66627
  }
66628
66628
  function useAthenaThreadManager() {
66629
66629
  const runtime = useAssistantRuntime({ optional: true });
66630
- const threadId = useThread({ optional: true, selector: (s) => s.threadId });
66631
- const threadIds = useThreadList({ optional: true, selector: (s) => s.threadIds });
66632
- const isLoading = useThreadList({ optional: true, selector: (s) => s.isLoading });
66630
+ const remoteId = useThread({ optional: true, selector: (s) => {
66631
+ var _a2;
66632
+ return (_a2 = s.metadata) == null ? void 0 : _a2.remoteId;
66633
+ } });
66634
+ const isThreadLoading = useThread({ optional: true, selector: (s) => s.isLoading }) ?? false;
66635
+ const isListLoading = useThreadList({ optional: true, selector: (s) => s.isLoading });
66633
66636
  const runtimeRef = React.useRef(runtime);
66634
66637
  runtimeRef.current = runtime;
66635
66638
  const switchToThread = React.useCallback(
@@ -66640,19 +66643,19 @@ function useAthenaThreadManager() {
66640
66643
  () => runtimeRef.current.threads.switchToNewThread(),
66641
66644
  []
66642
66645
  );
66643
- const activeThreadId = threadId ?? null;
66646
+ const activeThreadId = remoteId ?? null;
66644
66647
  return React.useMemo(() => {
66645
- if (!runtime || threadIds == null || isLoading == null) {
66648
+ if (!runtime || isListLoading == null) {
66646
66649
  return null;
66647
66650
  }
66648
66651
  return {
66649
66652
  activeThreadId,
66650
- threadIds,
66651
- isLoading,
66653
+ isListLoading,
66654
+ isThreadLoading,
66652
66655
  switchToThread,
66653
66656
  switchToNewThread
66654
66657
  };
66655
- }, [runtime, activeThreadId, threadIds, isLoading, switchToThread, switchToNewThread]);
66658
+ }, [runtime, activeThreadId, isListLoading, isThreadLoading, switchToThread, switchToNewThread]);
66656
66659
  }
66657
66660
  function useAppendToComposer() {
66658
66661
  const aui = useAui();