@tanstack/ai-svelte 0.12.1 → 0.13.1
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.
|
@@ -62,6 +62,9 @@ export function createChat(options) {
|
|
|
62
62
|
...(options.initialMessages !== undefined && {
|
|
63
63
|
initialMessages: options.initialMessages,
|
|
64
64
|
}),
|
|
65
|
+
...(options.persistence !== undefined && {
|
|
66
|
+
persistence: options.persistence,
|
|
67
|
+
}),
|
|
65
68
|
...(options.body !== undefined && { body: options.body }),
|
|
66
69
|
...(options.forwardedProps !== undefined && {
|
|
67
70
|
forwardedProps: options.forwardedProps,
|
|
@@ -112,6 +115,7 @@ export function createChat(options) {
|
|
|
112
115
|
sessionGenerating = isGenerating;
|
|
113
116
|
},
|
|
114
117
|
});
|
|
118
|
+
messages = client.getMessages();
|
|
115
119
|
if (options.live) {
|
|
116
120
|
client.subscribe();
|
|
117
121
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/ai-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Svelte 5 bindings for TanStack AI streaming chat, structured outputs, and media generation.",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"media-generation"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@tanstack/ai-client": "0.
|
|
41
|
+
"@tanstack/ai-client": "0.16.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"svelte": "^5.0.0",
|
|
45
|
-
"@tanstack/ai": "^0.
|
|
45
|
+
"@tanstack/ai": "^0.26.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@standard-schema/spec": "^1.1.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"svelte-check": "^4.2.0",
|
|
56
56
|
"typescript": "5.9.3",
|
|
57
57
|
"vite": "^7.3.3",
|
|
58
|
-
"@tanstack/ai": "0.
|
|
58
|
+
"@tanstack/ai": "0.26.1"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"clean": "rm -rf ./dist",
|
|
@@ -100,6 +100,9 @@ export function createChat<
|
|
|
100
100
|
...(options.initialMessages !== undefined && {
|
|
101
101
|
initialMessages: options.initialMessages,
|
|
102
102
|
}),
|
|
103
|
+
...(options.persistence !== undefined && {
|
|
104
|
+
persistence: options.persistence,
|
|
105
|
+
}),
|
|
103
106
|
...(options.body !== undefined && { body: options.body }),
|
|
104
107
|
...(options.forwardedProps !== undefined && {
|
|
105
108
|
forwardedProps: options.forwardedProps,
|
|
@@ -151,6 +154,8 @@ export function createChat<
|
|
|
151
154
|
},
|
|
152
155
|
})
|
|
153
156
|
|
|
157
|
+
messages = client.getMessages()
|
|
158
|
+
|
|
154
159
|
if (options.live) {
|
|
155
160
|
client.subscribe()
|
|
156
161
|
}
|