ai 4.2.3 → 4.2.4
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 +6 -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 +1 -1
- package/rsc/dist/rsc-server.mjs +6 -0
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/package.json
CHANGED
package/rsc/dist/rsc-server.mjs
CHANGED
@@ -1532,6 +1532,12 @@ function standardizePrompt({
|
|
1532
1532
|
const messages = promptType === "ui-messages" ? convertToCoreMessages(prompt.messages, {
|
1533
1533
|
tools
|
1534
1534
|
}) : prompt.messages;
|
1535
|
+
if (messages.length === 0) {
|
1536
|
+
throw new InvalidPromptError({
|
1537
|
+
prompt,
|
1538
|
+
message: "messages must not be empty"
|
1539
|
+
});
|
1540
|
+
}
|
1535
1541
|
const validationResult = safeValidateTypes({
|
1536
1542
|
value: messages,
|
1537
1543
|
schema: z7.array(coreMessageSchema)
|