@ai-sdk/react 0.0.24 → 0.0.25

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @ai-sdk/react@0.0.24 build /home/runner/work/ai/ai/packages/react
2
+ > @ai-sdk/react@0.0.25 build /home/runner/work/ai/ai/packages/react
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -11,11 +11,11 @@
11
11
  ESM Build start
12
12
  CJS dist/index.js 26.82 KB
13
13
  CJS dist/index.js.map 53.40 KB
14
- CJS ⚡️ Build success in 61ms
14
+ CJS ⚡️ Build success in 52ms
15
15
  ESM dist/index.mjs 24.34 KB
16
16
  ESM dist/index.mjs.map 53.32 KB
17
- ESM ⚡️ Build success in 62ms
17
+ ESM ⚡️ Build success in 53ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 5376ms
19
+ DTS ⚡️ Build success in 5177ms
20
20
  DTS dist/index.d.ts 10.42 KB
21
21
  DTS dist/index.d.mts 10.42 KB
@@ -1,4 +1,4 @@
1
1
 
2
- > @ai-sdk/react@0.0.24 clean /home/runner/work/ai/ai/packages/react
2
+ > @ai-sdk/react@0.0.25 clean /home/runner/work/ai/ai/packages/react
3
3
  > rm -rf dist
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @ai-sdk/react
2
2
 
3
+ ## 0.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 5b7b3bbe: fix (ai/ui): tool call streaming
8
+ - Updated dependencies [5b7b3bbe]
9
+ - @ai-sdk/ui-utils@0.0.16
10
+
3
11
  ## 0.0.24
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/react",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@ai-sdk/provider-utils": "1.0.2",
19
- "@ai-sdk/ui-utils": "0.0.15",
20
- "swr": "2.2.0"
19
+ "@ai-sdk/ui-utils": "0.0.16",
20
+ "swr": "2.2.5"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@testing-library/jest-dom": "^6.4.5",
@@ -455,8 +455,6 @@ describe('onToolCall', () => {
455
455
  });
456
456
 
457
457
  describe('tool invocations', () => {
458
- let rerender: RenderResult['rerender'];
459
-
460
458
  const TestComponent = () => {
461
459
  const { messages, append } = useChat();
462
460
 
@@ -485,8 +483,7 @@ describe('tool invocations', () => {
485
483
  };
486
484
 
487
485
  beforeEach(() => {
488
- const result = render(<TestComponent />);
489
- rerender = result.rerender;
486
+ render(<TestComponent />);
490
487
  });
491
488
 
492
489
  afterEach(() => {
@@ -522,7 +519,6 @@ describe('tool invocations', () => {
522
519
  );
523
520
 
524
521
  await waitFor(() => {
525
- rerender(<TestComponent />);
526
522
  expect(screen.getByTestId('message-1')).toHaveTextContent(
527
523
  '{"state":"partial-call","toolCallId":"tool-call-0","toolName":"test-tool","args":{"testArg":"t"}}',
528
524
  );
@@ -536,7 +532,6 @@ describe('tool invocations', () => {
536
532
  );
537
533
 
538
534
  await waitFor(() => {
539
- rerender(<TestComponent />);
540
535
  expect(screen.getByTestId('message-1')).toHaveTextContent(
541
536
  '{"state":"partial-call","toolCallId":"tool-call-0","toolName":"test-tool","args":{"testArg":"test-value"}}',
542
537
  );
@@ -551,7 +546,6 @@ describe('tool invocations', () => {
551
546
  );
552
547
 
553
548
  await waitFor(() => {
554
- rerender(<TestComponent />);
555
549
  expect(screen.getByTestId('message-1')).toHaveTextContent(
556
550
  '{"state":"call","toolCallId":"tool-call-0","toolName":"test-tool","args":{"testArg":"test-value"}}',
557
551
  );