@tanstack/ai-svelte 0.1.1 → 0.2.0

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.
@@ -59,6 +59,10 @@ export function createChat(options) {
59
59
  error = newError;
60
60
  },
61
61
  });
62
+ // Note: Cleanup is handled by calling stop() directly when needed.
63
+ // Unlike React/Vue/Solid, Svelte 5 runes like $effect can only be used
64
+ // during component initialization, so we don't add automatic cleanup here.
65
+ // Users should call chat.stop() in their component's cleanup if needed.
62
66
  // Define methods
63
67
  const sendMessage = async (content) => {
64
68
  await client.sendMessage(content);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/ai-svelte",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Svelte bindings for TanStack AI",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -34,8 +34,7 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "svelte": "^5.20.0",
37
- "@tanstack/ai": "0.0.3",
38
- "@tanstack/ai-client": "0.0.3"
37
+ "@tanstack/ai-client": "0.2.0"
39
38
  },
40
39
  "devDependencies": {
41
40
  "@sveltejs/package": "^2.3.10",
@@ -46,13 +45,11 @@
46
45
  "svelte": "^5.20.0",
47
46
  "svelte-check": "^4.2.0",
48
47
  "typescript": "5.9.3",
49
- "vite": "^7.2.4",
50
- "zod": "^4.1.13"
48
+ "vite": "^7.2.7"
51
49
  },
52
50
  "peerDependencies": {
53
51
  "svelte": "^5.0.0",
54
- "@tanstack/ai": "0.0.3",
55
- "@tanstack/ai-client": "0.0.3"
52
+ "@tanstack/ai": "^0.2.0"
56
53
  },
57
54
  "scripts": {
58
55
  "clean": "rm -rf ./dist",
@@ -68,6 +68,11 @@ export function createChat<TTools extends ReadonlyArray<AnyClientTool> = any>(
68
68
  },
69
69
  })
70
70
 
71
+ // Note: Cleanup is handled by calling stop() directly when needed.
72
+ // Unlike React/Vue/Solid, Svelte 5 runes like $effect can only be used
73
+ // during component initialization, so we don't add automatic cleanup here.
74
+ // Users should call chat.stop() in their component's cleanup if needed.
75
+
71
76
  // Define methods
72
77
  const sendMessage = async (content: string) => {
73
78
  await client.sendMessage(content)