@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 +24 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24194,6 +24194,9 @@ function createThreadListStore(config2) {
|
|
|
24194
24194
|
}
|
|
24195
24195
|
},
|
|
24196
24196
|
switchThread: (threadId) => {
|
|
24197
|
+
if (process.env.NODE_ENV !== "production") {
|
|
24198
|
+
console.log("[AthenaThreads] switchThread called", { threadId, prev: get2().activeThreadId });
|
|
24199
|
+
}
|
|
24197
24200
|
set2({ activeThreadId: threadId });
|
|
24198
24201
|
},
|
|
24199
24202
|
newThread: async () => {
|
|
@@ -24286,6 +24289,17 @@ function AthenaProvider({
|
|
|
24286
24289
|
const parentAuthToken = useParentAuth();
|
|
24287
24290
|
const effectiveToken = tokenProp ?? parentAuthToken;
|
|
24288
24291
|
const effectiveBackendUrl = backendUrl ?? DEFAULT_BACKEND_URL;
|
|
24292
|
+
useEffect(() => {
|
|
24293
|
+
if (process.env.NODE_ENV !== "production") {
|
|
24294
|
+
console.log("[AthenaAuth] AthenaProvider auth state", {
|
|
24295
|
+
hasTokenProp: !!tokenProp,
|
|
24296
|
+
hasParentAuthToken: !!parentAuthToken,
|
|
24297
|
+
hasEffectiveToken: !!effectiveToken,
|
|
24298
|
+
hasApiKey: !!apiKey,
|
|
24299
|
+
authMethod: effectiveToken ? "Bearer token (PropelAuth)" : apiKey ? "X-API-KEY" : "NONE"
|
|
24300
|
+
});
|
|
24301
|
+
}
|
|
24302
|
+
}, [tokenProp, parentAuthToken, effectiveToken, apiKey]);
|
|
24289
24303
|
const threadListStoreRef = useRef(null);
|
|
24290
24304
|
if (enableThreadList && !threadListStoreRef.current) {
|
|
24291
24305
|
threadListStoreRef.current = createThreadListStore({
|
|
@@ -24298,6 +24312,16 @@ function AthenaProvider({
|
|
|
24298
24312
|
enableThreadList ? threadListStoreRef.current : null
|
|
24299
24313
|
);
|
|
24300
24314
|
const resolvedThreadId = threadIdProp ?? activeThreadId ?? void 0;
|
|
24315
|
+
useEffect(() => {
|
|
24316
|
+
if (process.env.NODE_ENV !== "production") {
|
|
24317
|
+
console.log("[AthenaThreads] AthenaProvider render", {
|
|
24318
|
+
activeThreadId,
|
|
24319
|
+
resolvedThreadId,
|
|
24320
|
+
enableThreadList,
|
|
24321
|
+
hasStore: !!threadListStoreRef.current
|
|
24322
|
+
});
|
|
24323
|
+
}
|
|
24324
|
+
}, [activeThreadId, resolvedThreadId, enableThreadList]);
|
|
24301
24325
|
const inner = /* @__PURE__ */ jsx(
|
|
24302
24326
|
AthenaRuntimeInner,
|
|
24303
24327
|
{
|