@springbrand/chat-client 0.1.3-alpha.6 → 0.1.3-alpha.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/chat-client",
3
- "version": "0.1.3-alpha.6",
3
+ "version": "0.1.3-alpha.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -13,7 +13,7 @@
13
13
  ".": "./src/index.ts"
14
14
  },
15
15
  "peerDependencies": {
16
- "agents": "^0.19.0",
16
+ "agents": "^0.20.1",
17
17
  "ai": "^7.0.0",
18
18
  "react": "^19.0.0"
19
19
  },
@@ -25,7 +25,7 @@
25
25
  "@types/react-dom": "^19.2.3",
26
26
  "react-dom": "^19.2.7",
27
27
  "typescript": "^7.0.2",
28
- "@springbrand/agent-runtime": "0.1.3-alpha.8"
28
+ "@springbrand/agent-runtime": "0.1.3-alpha.10"
29
29
  },
30
30
  "scripts": {
31
31
  "typecheck": "tsc --noEmit"
@@ -80,10 +80,8 @@ export function createSafeUIMessageAgentConnection<T extends AgentConnection>(
80
80
  frame.type === "cf_agent_use_chat_response" &&
81
81
  typeof frame.id === "string"
82
82
  ) {
83
- let chunkType = "empty";
84
83
  if (typeof frame.body === "string" && frame.body.trim()) {
85
84
  const chunk = JSON.parse(frame.body) as UIMessageChunk;
86
- chunkType = Array.isArray(chunk) ? "batch" : chunk.type;
87
85
  const state = chunk.type === "start"
88
86
  ? createStreamState()
89
87
  : states.get(frame.id) ?? createStreamState();
@@ -91,12 +89,6 @@ export function createSafeUIMessageAgentConnection<T extends AgentConnection>(
91
89
  forward = acceptsChunk(state, chunk);
92
90
  }
93
91
  if (frame.done === true) states.delete(frame.id);
94
- console.info("[DEBUG-ws-client-2b7c] response", {
95
- requestId: frame.id,
96
- done: frame.done,
97
- chunkType,
98
- forward,
99
- });
100
92
  }
101
93
  } catch {
102
94
  // Leave unrelated or malformed frames to the owning SDK listener.