Socket
Socket
Sign inDemoInstall

@ai-sdk/ui-utils

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/ui-utils - npm Package Compare versions

Comparing version 0.0.42 to 0.0.43

16

./dist/index.js

@@ -605,9 +605,9 @@ "use strict";

};
var finishRoundtripStreamPart = {
var finishStepStreamPart = {
code: "e",
name: "finish_roundtrip",
name: "finish_step",
parse: (value) => {
if (value == null || typeof value !== "object" || !("finishReason" in value) || typeof value.finishReason !== "string") {
throw new Error(
'"finish_roundtrip" parts expect an object with a "finishReason" property.'
'"finish_step" parts expect an object with a "finishReason" property.'
);

@@ -625,3 +625,3 @@ }

return {
type: "finish_roundtrip",
type: "finish_step",
value: result

@@ -646,3 +646,3 @@ };

finishMessageStreamPart,
finishRoundtripStreamPart
finishStepStreamPart
];

@@ -664,3 +664,3 @@ var streamPartsByCode = {

[finishMessageStreamPart.code]: finishMessageStreamPart,
[finishRoundtripStreamPart.code]: finishRoundtripStreamPart
[finishStepStreamPart.code]: finishStepStreamPart
};

@@ -682,3 +682,3 @@ var StreamStringPrefixes = {

[finishMessageStreamPart.name]: finishMessageStreamPart.code,
[finishRoundtripStreamPart.name]: finishRoundtripStreamPart.code
[finishStepStreamPart.name]: finishStepStreamPart.code
};

@@ -787,3 +787,3 @@ var validCodes = streamParts.map((part) => part.code);

}
if (type === "finish_roundtrip") {
if (type === "finish_step") {
nextPrefixMap = {};

@@ -790,0 +790,0 @@ continue;

# @ai-sdk/ui-utils
## 0.0.43
### Patch Changes
- 1f590ef: chore (ai): rename roundtrips to steps
## 0.0.42

@@ -4,0 +10,0 @@

@@ -703,3 +703,3 @@ import { LanguageModelV1FinishReason, JSONValue as JSONValue$1 } from '@ai-sdk/provider';

}>;
declare const finishRoundtripStreamPart: StreamPart<'e', 'finish_roundtrip', {
declare const finishStepStreamPart: StreamPart<'e', 'finish_step', {
finishReason: LanguageModelV1FinishReason;

@@ -711,3 +711,3 @@ usage?: {

}>;
type StreamParts = typeof textStreamPart | typeof functionCallStreamPart | typeof dataStreamPart | typeof errorStreamPart | typeof assistantMessageStreamPart | typeof assistantControlDataStreamPart | typeof dataMessageStreamPart | typeof toolCallsStreamPart | typeof messageAnnotationsStreamPart | typeof toolCallStreamPart | typeof toolResultStreamPart | typeof toolCallStreamingStartStreamPart | typeof toolCallDeltaStreamPart | typeof finishMessageStreamPart | typeof finishRoundtripStreamPart;
type StreamParts = typeof textStreamPart | typeof functionCallStreamPart | typeof dataStreamPart | typeof errorStreamPart | typeof assistantMessageStreamPart | typeof assistantControlDataStreamPart | typeof dataMessageStreamPart | typeof toolCallsStreamPart | typeof messageAnnotationsStreamPart | typeof toolCallStreamPart | typeof toolResultStreamPart | typeof toolCallStreamingStartStreamPart | typeof toolCallDeltaStreamPart | typeof finishMessageStreamPart | typeof finishStepStreamPart;
/**

@@ -719,3 +719,3 @@ * Maps the type of a stream part to its value type.

};
type StreamPartType = ReturnType<typeof textStreamPart.parse> | ReturnType<typeof functionCallStreamPart.parse> | ReturnType<typeof dataStreamPart.parse> | ReturnType<typeof errorStreamPart.parse> | ReturnType<typeof assistantMessageStreamPart.parse> | ReturnType<typeof assistantControlDataStreamPart.parse> | ReturnType<typeof dataMessageStreamPart.parse> | ReturnType<typeof toolCallsStreamPart.parse> | ReturnType<typeof messageAnnotationsStreamPart.parse> | ReturnType<typeof toolCallStreamPart.parse> | ReturnType<typeof toolResultStreamPart.parse> | ReturnType<typeof toolCallStreamingStartStreamPart.parse> | ReturnType<typeof toolCallDeltaStreamPart.parse> | ReturnType<typeof finishMessageStreamPart.parse> | ReturnType<typeof finishRoundtripStreamPart.parse>;
type StreamPartType = ReturnType<typeof textStreamPart.parse> | ReturnType<typeof functionCallStreamPart.parse> | ReturnType<typeof dataStreamPart.parse> | ReturnType<typeof errorStreamPart.parse> | ReturnType<typeof assistantMessageStreamPart.parse> | ReturnType<typeof assistantControlDataStreamPart.parse> | ReturnType<typeof dataMessageStreamPart.parse> | ReturnType<typeof toolCallsStreamPart.parse> | ReturnType<typeof messageAnnotationsStreamPart.parse> | ReturnType<typeof toolCallStreamPart.parse> | ReturnType<typeof toolResultStreamPart.parse> | ReturnType<typeof toolCallStreamingStartStreamPart.parse> | ReturnType<typeof toolCallDeltaStreamPart.parse> | ReturnType<typeof finishMessageStreamPart.parse> | ReturnType<typeof finishStepStreamPart.parse>;
/**

@@ -758,3 +758,3 @@ * The map of prefixes for data in the stream

readonly finish_message: "d";
readonly finish_roundtrip: "e";
readonly finish_step: "e";
};

@@ -761,0 +761,0 @@ /**

@@ -605,9 +605,9 @@ "use strict";

};
var finishRoundtripStreamPart = {
var finishStepStreamPart = {
code: "e",
name: "finish_roundtrip",
name: "finish_step",
parse: (value) => {
if (value == null || typeof value !== "object" || !("finishReason" in value) || typeof value.finishReason !== "string") {
throw new Error(
'"finish_roundtrip" parts expect an object with a "finishReason" property.'
'"finish_step" parts expect an object with a "finishReason" property.'
);

@@ -625,3 +625,3 @@ }

return {
type: "finish_roundtrip",
type: "finish_step",
value: result

@@ -646,3 +646,3 @@ };

finishMessageStreamPart,
finishRoundtripStreamPart
finishStepStreamPart
];

@@ -664,3 +664,3 @@ var streamPartsByCode = {

[finishMessageStreamPart.code]: finishMessageStreamPart,
[finishRoundtripStreamPart.code]: finishRoundtripStreamPart
[finishStepStreamPart.code]: finishStepStreamPart
};

@@ -682,3 +682,3 @@ var StreamStringPrefixes = {

[finishMessageStreamPart.name]: finishMessageStreamPart.code,
[finishRoundtripStreamPart.name]: finishRoundtripStreamPart.code
[finishStepStreamPart.name]: finishStepStreamPart.code
};

@@ -787,3 +787,3 @@ var validCodes = streamParts.map((part) => part.code);

}
if (type === "finish_roundtrip") {
if (type === "finish_step") {
nextPrefixMap = {};

@@ -790,0 +790,0 @@ continue;

{
"name": "@ai-sdk/ui-utils",
"version": "0.0.42",
"version": "0.0.43",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc