ai 4.2.3 → 4.2.5
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 +13 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/react/dist/index.d.mts +1 -1
- package/react/dist/index.d.ts +1 -1
- package/rsc/dist/rsc-server.mjs +6 -0
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/dist/index.mjs
CHANGED
@@ -2101,6 +2101,12 @@ function standardizePrompt({
|
|
2101
2101
|
const messages = promptType === "ui-messages" ? convertToCoreMessages(prompt.messages, {
|
2102
2102
|
tools
|
2103
2103
|
}) : prompt.messages;
|
2104
|
+
if (messages.length === 0) {
|
2105
|
+
throw new InvalidPromptError({
|
2106
|
+
prompt,
|
2107
|
+
message: "messages must not be empty"
|
2108
|
+
});
|
2109
|
+
}
|
2104
2110
|
const validationResult = safeValidateTypes({
|
2105
2111
|
value: messages,
|
2106
2112
|
schema: z7.array(coreMessageSchema)
|