
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
@tanstack/ai-svelte
Advanced tools
Svelte bindings for TanStack AI.
npm install @tanstack/ai-svelte
# or
pnpm add @tanstack/ai-svelte
# or
yarn add @tanstack/ai-svelte
<script>
import { createChat, fetchServerSentEvents } from '@tanstack/ai-svelte'
const chat = createChat({
connection: fetchServerSentEvents('/api/chat'),
})
</script>
<div>
{#each chat.messages as message}
<div>{message.role}: {message.parts[0].content}</div>
{/each}
{#if chat.isLoading}
<button onclick={chat.stop}>Stop</button>
{/if}
<button onclick={() => chat.sendMessage('Hello!')}> Send </button>
</div>
createChat(options)Creates a reactive chat instance. Returns an object with reactive getters and methods:
Reactive Properties (no $ prefix needed):
messages - Array of messages in the conversationisLoading - Boolean indicating if a response is being generatederror - Current error, if anyMethods:
sendMessage(content) - Send a messageappend(message) - Append a messagereload() - Reload the last assistant messagestop() - Stop the current response generationclear() - Clear all messagessetMessages(messages) - Set messages manuallyaddToolResult(result) - Add a tool resultaddToolApprovalResponse(response) - Respond to a tool approval requestThis library uses Svelte 5 runes ($state) internally, providing a clean API where you don't need to use the $ prefix to access reactive state:
<script>
const chat = createChat({ ... })
// No $ needed - these are reactive getters!
console.log(chat.messages)
console.log(chat.isLoading)
</script>
<!-- Reactivity works automatically in templates -->
{#each chat.messages as message}
...
{/each}
MIT
FAQs
Svelte bindings for TanStack AI
The npm package @tanstack/ai-svelte receives a total of 114 weekly downloads. As such, @tanstack/ai-svelte popularity was classified as not popular.
We found that @tanstack/ai-svelte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.