ai 5.0.24 → 5.0.26
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/CHANGELOG.md +18 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# ai
|
2
2
|
|
3
|
+
## 5.0.26
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 33cf848: feat(ai): pass messages to `useChat({ onFinish })`
|
8
|
+
- Updated dependencies [980633d]
|
9
|
+
- Updated dependencies [1c5b88d]
|
10
|
+
- @ai-sdk/gateway@1.0.15
|
11
|
+
|
12
|
+
## 5.0.25
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- ca65923: fix(ai): remove use of `expect()` from production code
|
17
|
+
- Updated dependencies [886e7cd]
|
18
|
+
- @ai-sdk/provider-utils@3.0.7
|
19
|
+
- @ai-sdk/gateway@1.0.14
|
20
|
+
|
3
21
|
## 5.0.24
|
4
22
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
@@ -3999,6 +3999,7 @@ type ChatOnToolCallCallback<UI_MESSAGE extends UIMessage = UIMessage> = (options
|
|
3999
3999
|
type ChatOnDataCallback<UI_MESSAGE extends UIMessage> = (dataPart: DataUIPart<InferUIMessageData<UI_MESSAGE>>) => void;
|
4000
4000
|
type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
|
4001
4001
|
message: UI_MESSAGE;
|
4002
|
+
messages: UI_MESSAGE[];
|
4002
4003
|
}) => void;
|
4003
4004
|
interface ChatInit<UI_MESSAGE extends UIMessage> {
|
4004
4005
|
/**
|
package/dist/index.d.ts
CHANGED
@@ -3999,6 +3999,7 @@ type ChatOnToolCallCallback<UI_MESSAGE extends UIMessage = UIMessage> = (options
|
|
3999
3999
|
type ChatOnDataCallback<UI_MESSAGE extends UIMessage> = (dataPart: DataUIPart<InferUIMessageData<UI_MESSAGE>>) => void;
|
4000
4000
|
type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
|
4001
4001
|
message: UI_MESSAGE;
|
4002
|
+
messages: UI_MESSAGE[];
|
4002
4003
|
}) => void;
|
4003
4004
|
interface ChatInit<UI_MESSAGE extends UIMessage> {
|
4004
4005
|
/**
|
package/dist/index.js
CHANGED
@@ -9509,7 +9509,10 @@ var AbstractChat = class {
|
|
9509
9509
|
throw error;
|
9510
9510
|
}
|
9511
9511
|
});
|
9512
|
-
(_a17 = this.onFinish) == null ? void 0 : _a17.call(this, {
|
9512
|
+
(_a17 = this.onFinish) == null ? void 0 : _a17.call(this, {
|
9513
|
+
message: activeResponse.state.message,
|
9514
|
+
messages: this.state.messages
|
9515
|
+
});
|
9513
9516
|
this.setStatus({ status: "ready" });
|
9514
9517
|
} catch (err) {
|
9515
9518
|
if (err.name === "AbortError") {
|