@antipopp/agno-react 0.5.0 → 0.5.1
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.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,6 +70,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
70
70
|
var AgnoContext = (0, import_react.createContext)(null);
|
|
71
71
|
function AgnoProvider({ config, children }) {
|
|
72
72
|
const client = (0, import_react.useMemo)(() => new import_agno_client.AgnoClient(config), []);
|
|
73
|
+
(0, import_react.useEffect)(() => {
|
|
74
|
+
client.updateConfig(config);
|
|
75
|
+
}, [client, config]);
|
|
73
76
|
(0, import_react.useEffect)(() => {
|
|
74
77
|
return () => {
|
|
75
78
|
client.removeAllListeners();
|
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
var AgnoContext = createContext(null);
|
|
6
6
|
function AgnoProvider({ config, children }) {
|
|
7
7
|
const client = useMemo(() => new AgnoClient(config), []);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
client.updateConfig(config);
|
|
10
|
+
}, [client, config]);
|
|
8
11
|
useEffect(() => {
|
|
9
12
|
return () => {
|
|
10
13
|
client.removeAllListeners();
|