🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@ai-sdk/svelte

Package Overview
Dependencies
Maintainers
2
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/svelte - npm Package Compare versions

Comparing version

to
0.0.52

7

./dist/index.js

@@ -313,2 +313,8 @@ "use strict";

};
const setData = (dataArg) => {
if (typeof dataArg === "function") {
dataArg = dataArg((0, import_store.get)(streamData));
}
streamData.set(dataArg);
};
const input = (0, import_store.writable)(initialInput);

@@ -380,2 +386,3 @@ const handleSubmit = (event, options = {}) => {

data: streamData,
setData,
addToolResult

@@ -382,0 +389,0 @@ };

# @ai-sdk/svelte
## 0.0.52
### Patch Changes
- caedcda: feat (ai/ui): add setData helper to useChat
## 0.0.51

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

2

dist/index.d.ts

@@ -69,2 +69,4 @@ import { UseChatOptions as UseChatOptions$1, Message, CreateMessage, ChatRequestOptions, JSONValue, RequestOptions, UseCompletionOptions, AssistantStatus, UseAssistantOptions } from '@ai-sdk/ui-utils';

data: Readable<JSONValue[] | undefined>;
/** Set the data of the chat. You can use this to transform or clear the chat data. */
setData: (data: JSONValue[] | undefined | ((data: JSONValue[] | undefined) => JSONValue[] | undefined)) => void;
};

@@ -71,0 +73,0 @@ declare function useChat({ api, id, initialMessages, initialInput, sendExtraMessageFields, experimental_onFunctionCall, experimental_onToolCall, streamMode, streamProtocol, onResponse, onFinish, onError, onToolCall, credentials, headers, body, generateId, fetch, keepLastMessageOnError, maxToolRoundtrips, maxSteps, }?: UseChatOptions): UseChatHelpers & {

@@ -313,2 +313,8 @@ "use strict";

};
const setData = (dataArg) => {
if (typeof dataArg === "function") {
dataArg = dataArg((0, import_store.get)(streamData));
}
streamData.set(dataArg);
};
const input = (0, import_store.writable)(initialInput);

@@ -380,2 +386,3 @@ const handleSubmit = (event, options = {}) => {

data: streamData,
setData,
addToolResult

@@ -382,0 +389,0 @@ };

2

package.json
{
"name": "@ai-sdk/svelte",
"version": "0.0.51",
"version": "0.0.52",
"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