Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ai-sdk/svelte

Package Overview
Dependencies
Maintainers
2
Versions
62
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 0.0.51 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

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