Skip to content

svelte/v0.1.1

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Dec 21:08
· 31 commits to main since this release
bc070ae

This patch release fixes @copilotkit/svelte so it installs and runs correctly from npm, and makes CopilotChat share the same agent as the rest of your app.

Fixes

CopilotChat now runs on the shared agent (#8637)

Previously, CopilotChat ran on a private per-thread clone of the agent, so a separate createAgent({ agentId }) elsewhere in your app never saw the chat's conversation. The README's "Reactive agent state" example (reading isRunning, calling a custom send()) silently tracked a different conversation than the one the chat displayed.

CopilotChat now binds to the shared agent and sets its thread directly, matching React's behavior. A standalone createAgent({ agentId }) placed next to the chat now reflects the chat's messages and state. When the chat switches threads, the previous run is detached and that thread's messages and state are cleared so stale conversations don't carry over.

The public createAgent({ agentId, threadId }) per-thread clone API is unchanged.

Package now works when installed from npm (#8634)

@copilotkit/svelte@0.1.0 (now deprecated) failed in SvelteKit apps installed from npm — the dev server crashed on startup, and the precompiled output failed during SSR. The package is now built with @sveltejs/package, the standard Svelte library format:

  • .ts and .svelte.ts modules compile to .js, .svelte components ship as source for your app to compile, and types are emitted alongside.
  • All export conditions point at the built dist/ output. The package is ESM-only, as Svelte 5 libraries are.
  • Component <style> blocks now compile in the consuming app.

Verified end to end from the packed tarball on SvelteKit 2 / Vite 6 and SvelteKit 3 / Vite 8.

If you installed 0.1.0, upgrade to 0.1.1.