@athenaintel/react 0.4.1 → 0.4.2

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
@@ -24212,6 +24212,9 @@ function createThreadListStore(config2) {
24212
24212
  }
24213
24213
  },
24214
24214
  switchThread: (threadId) => {
24215
+ if (process.env.NODE_ENV !== "production") {
24216
+ console.log("[AthenaThreads] switchThread called", { threadId, prev: get2().activeThreadId });
24217
+ }
24215
24218
  set2({ activeThreadId: threadId });
24216
24219
  },
24217
24220
  newThread: async () => {
@@ -24304,6 +24307,17 @@ function AthenaProvider({
24304
24307
  const parentAuthToken = useParentAuth();
24305
24308
  const effectiveToken = tokenProp ?? parentAuthToken;
24306
24309
  const effectiveBackendUrl = backendUrl ?? DEFAULT_BACKEND_URL;
24310
+ React.useEffect(() => {
24311
+ if (process.env.NODE_ENV !== "production") {
24312
+ console.log("[AthenaAuth] AthenaProvider auth state", {
24313
+ hasTokenProp: !!tokenProp,
24314
+ hasParentAuthToken: !!parentAuthToken,
24315
+ hasEffectiveToken: !!effectiveToken,
24316
+ hasApiKey: !!apiKey,
24317
+ authMethod: effectiveToken ? "Bearer token (PropelAuth)" : apiKey ? "X-API-KEY" : "NONE"
24318
+ });
24319
+ }
24320
+ }, [tokenProp, parentAuthToken, effectiveToken, apiKey]);
24307
24321
  const threadListStoreRef = React.useRef(null);
24308
24322
  if (enableThreadList && !threadListStoreRef.current) {
24309
24323
  threadListStoreRef.current = createThreadListStore({
@@ -24316,6 +24330,16 @@ function AthenaProvider({
24316
24330
  enableThreadList ? threadListStoreRef.current : null
24317
24331
  );
24318
24332
  const resolvedThreadId = threadIdProp ?? activeThreadId ?? void 0;
24333
+ React.useEffect(() => {
24334
+ if (process.env.NODE_ENV !== "production") {
24335
+ console.log("[AthenaThreads] AthenaProvider render", {
24336
+ activeThreadId,
24337
+ resolvedThreadId,
24338
+ enableThreadList,
24339
+ hasStore: !!threadListStoreRef.current
24340
+ });
24341
+ }
24342
+ }, [activeThreadId, resolvedThreadId, enableThreadList]);
24319
24343
  const inner = /* @__PURE__ */ jsxRuntime.jsx(
24320
24344
  AthenaRuntimeInner,
24321
24345
  {