@economic/agents-react 1.4.1 → 1.4.3

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -4
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -139,21 +139,22 @@ function useAssistant(options) {
139
139
  }
140
140
  });
141
141
  const refreshChats = useCallback(async () => {
142
- setChats((await assistant.call("getChats")).map((chat) => {
142
+ const fetched = (await assistant.call("getChats")).map((chat) => {
143
143
  const c = {
144
144
  ...chat,
145
145
  name: chat.durable_object_name
146
146
  };
147
147
  delete c.durable_object_name;
148
148
  return c;
149
- }));
149
+ });
150
+ setChats(fetched);
151
+ return fetched;
150
152
  }, [assistant]);
151
153
  useEffect(() => {
152
154
  if (assistantStatus === "connected") refreshChats().catch(console.error);
153
155
  }, [assistantStatus, refreshChats]);
154
156
  const getChats = async () => {
155
- await refreshChats();
156
- return chats;
157
+ return refreshChats();
157
158
  };
158
159
  const createChat = async () => {
159
160
  const newChatId = await assistant.call("createChat");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/agents-react",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@ai-sdk/react": "^3.0.182",
24
- "@cloudflare/ai-chat": "^0.8.5",
25
- "agents": "^0.16.0",
24
+ "@cloudflare/ai-chat": "^0.9.3",
25
+ "agents": "^0.17.3",
26
26
  "ai": "^6.0.180",
27
27
  "zod": "^4.4.3"
28
28
  },
29
29
  "devDependencies": {
30
- "@cloudflare/workers-types": "^4.20260616.1",
30
+ "@cloudflare/workers-types": "^4.20260701.1",
31
31
  "@types/node": "^25.6.0",
32
32
  "@typescript/native-preview": "7.0.0-dev.20260412.1",
33
33
  "tsdown": "^0.22.0",