@axiom-lattice/react-sdk 2.1.52 → 2.1.53
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.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -23,6 +23,10 @@ var useAuth = () => {
|
|
|
23
23
|
}
|
|
24
24
|
return context;
|
|
25
25
|
};
|
|
26
|
+
var useAuthOptional = () => {
|
|
27
|
+
const context = useContext(AuthContext);
|
|
28
|
+
return context;
|
|
29
|
+
};
|
|
26
30
|
var AuthProvider = ({
|
|
27
31
|
children,
|
|
28
32
|
baseURL,
|
|
@@ -18942,7 +18946,7 @@ var Chating = ({
|
|
|
18942
18946
|
}, [messages.length, pendingMessages?.length, isEmptyState]);
|
|
18943
18947
|
const { config } = useLatticeChatShellContext();
|
|
18944
18948
|
const { baseURL } = config;
|
|
18945
|
-
const
|
|
18949
|
+
const user = useAuthOptional()?.user;
|
|
18946
18950
|
const displayUserName = user?.name || user?.email?.split("@")[0] || "there";
|
|
18947
18951
|
const workspaceContext = useContext10(WorkspaceContext);
|
|
18948
18952
|
const listPath = workspaceContext?.listPath ?? (async () => []);
|
|
@@ -28622,6 +28626,7 @@ export {
|
|
|
28622
28626
|
useApi,
|
|
28623
28627
|
useAssistantContext,
|
|
28624
28628
|
useAuth,
|
|
28629
|
+
useAuthOptional,
|
|
28625
28630
|
useAxiomLattice,
|
|
28626
28631
|
useAxiomTheme,
|
|
28627
28632
|
useChat,
|