@athenaintel/react 0.10.7 → 0.10.9

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.d.ts CHANGED
@@ -498,7 +498,9 @@ export declare interface AthenaThreadManagerState {
498
498
  /** The backend thread ID of the currently active thread, or null if not yet synced. */
499
499
  activeThreadId: string | null;
500
500
  /** Whether the thread list is still loading from the backend. */
501
- isLoading: boolean;
501
+ isListLoading: boolean;
502
+ /** Whether the current thread is loading its message history (e.g. after a thread switch). */
503
+ isThreadLoading: boolean;
502
504
  /** Switch the chat to a different thread by its backend thread ID. */
503
505
  switchToThread: (threadId: string) => Promise<void>;
504
506
  /** Create and switch to a new empty thread. */
package/dist/index.js CHANGED
@@ -58666,6 +58666,7 @@ const MENTION_TYPES = {
58666
58666
  }
58667
58667
  };
58668
58668
  function getMentionConfig(type) {
58669
+ if (!type) return null;
58669
58670
  const exact = MENTION_TYPES[type];
58670
58671
  if (exact) return exact;
58671
58672
  const lower = type.toLowerCase();
@@ -66592,7 +66593,8 @@ function useAthenaThreadManager() {
66592
66593
  var _a2;
66593
66594
  return (_a2 = s.metadata) == null ? void 0 : _a2.remoteId;
66594
66595
  } });
66595
- const isLoading = useThreadList({ optional: true, selector: (s) => s.isLoading });
66596
+ const isThreadLoading = useThread({ optional: true, selector: (s) => s.isLoading }) ?? false;
66597
+ const isListLoading = useThreadList({ optional: true, selector: (s) => s.isLoading });
66596
66598
  const runtimeRef = useRef(runtime);
66597
66599
  runtimeRef.current = runtime;
66598
66600
  const switchToThread = useCallback(
@@ -66605,16 +66607,17 @@ function useAthenaThreadManager() {
66605
66607
  );
66606
66608
  const activeThreadId = remoteId ?? null;
66607
66609
  return useMemo(() => {
66608
- if (!runtime || isLoading == null) {
66610
+ if (!runtime || isListLoading == null) {
66609
66611
  return null;
66610
66612
  }
66611
66613
  return {
66612
66614
  activeThreadId,
66613
- isLoading,
66615
+ isListLoading,
66616
+ isThreadLoading,
66614
66617
  switchToThread,
66615
66618
  switchToNewThread
66616
66619
  };
66617
- }, [runtime, activeThreadId, isLoading, switchToThread, switchToNewThread]);
66620
+ }, [runtime, activeThreadId, isListLoading, isThreadLoading, switchToThread, switchToNewThread]);
66618
66621
  }
66619
66622
  function useAppendToComposer() {
66620
66623
  const aui = useAui();