mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
chat@4.37.0
5 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6714efc3a1 |
feat: support AI SDK v7 (ai@7) as a peer dependency (#691)
Closes #690 ## What Widens the AI SDK peer dependency ranges so the Chat SDK installs cleanly next to `ai@7`: - `chat`: `ai@^6.0.182 || ^7.0.0` - `@chat-adapter/web`: `ai@^6 || ^7`, `@ai-sdk/react@^3 || ^4`, `@ai-sdk/svelte@^4 || ^5`, `@ai-sdk/vue@^3 || ^4` This also unbreaks `create-chat-sdk` scaffolds, which install `ai@latest` (now v7) next to `chat` and currently hit a peer conflict out of the box. ## The one real v6 → v7 break In v7, `tool()` with an `execute` function returns `ExecutableTool<Tool<...>>` — an internal type from `@ai-sdk/provider-utils` that `ai` does not re-export. The `chat/ai` tool factories relied on inference, so declaration emit failed with TS2742 (17 errors). The factories now declare explicit `Tool<Input, Output>` return types, which is exactly the shape the previously published `.d.ts` already had — the public type surface is unchanged, and the emitted declarations only reference types from `ai` (portable for consumers on either major). Everything else checked out compatible: - v7 stream parts keep `text-delta` / `finish-step` shapes, so `fromFullStream` duck-typing works unchanged; `fullStream` remains as a deprecated alias - tool-level `needsApproval` is deprecated in v7 but still typed and honored - `createUIMessageStream`, `createUIMessageStreamResponse`, `isTextUIPart`, `UIMessage`, `UIMessageStreamWriter`, `ChatInit`, `DefaultChatTransport` all still exported — `@chat-adapter/web` needed zero source changes ## Other changes - devDependencies move to v7 so the workspace develops/tests against the latest major - `examples/nextjs-chat` and `examples/nuxt-chat` move to `ai@^7` (required — mixing majors across the workspace fails typecheck, since `chat`'s d.ts resolves `ai` types from its own devDependency) - Test-only: the `ToolExecutionOptions` stub type is now derived from `Tool["execute"]` because v7 made the generic parameter required - Changeset included (minor for `chat` and `@chat-adapter/web`) ## Verification The same source was verified against **both majors** (`ai@6.0.182` and `ai@7.0.17`): `tsc --noEmit` and the full test suites (`chat`: 1035 tests, `@chat-adapter/web`: 21 tests) pass on each. `pnpm validate` (knip + check + typecheck + test + build, including both examples) is green on v7. Note for adopters: `ai@7` itself requires Node.js ≥ 22 and is ESM-only; `chat` keeps `engines.node >= 20` since `ai` is an optional peer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: chentsulin <chentsulin@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: dancer <josh@afterima.ge> |
||
|
|
2548043136 |
chore(examples): switch demo AI model to anthropic/claude-sonnet-5 (#688)
## Summary - Update Next.js and Nuxt example bots from `xai/grok-4.5` to `anthropic/claude-sonnet-5` (6 model string sites total). ## Test plan - [x] Confirm example bots still start - [x] Trigger AI mode in an example and verify requests go to Claude Sonnet 5 Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com> Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com> |
||
|
|
b3123815fa |
docs: use xai/grok-4.5 across docs, guides, and examples (#687)
## summary - swap chat model strings to `xai/grok-4.5` across the docs site, the shipped guides, and the example bots, so the docs lead with the latest model - apps/docs: ai overview, ai-sdk-tools, and streaming pages, the two landing-page code samples, and the live chat demo route (`app/api/chat/route.ts`, previously `openai/gpt-4.1-mini`) - packages/chat/resources/guides: the seven guides that use a chat model (slack connect, slack + ai sdk, liveblocks, vercel blob, github code review, daily digest, ai gateway) - examples: nextjs-chat and nuxt-chat bots - deliberately left non-chat model strings as they were, since grok-4.5 cannot fill those roles: the `openai/text-embedding-3-small` embedding model and the `openai/gpt-4o-mini` reranker - in the ai gateway guide, grok-4.5 is now the primary model but the fallback list stays cross-provider (`anthropic/claude-opus-4.8`, `google/gemini-3.1-pro-preview`) so the failover example still demonstrates real cross-provider fallback - also fixed a pre-existing prose/code mismatch in that guide, the fallback prose said `claude-opus-4.7` while the code listed `4.8`, now aligned to `4.8` --------- Signed-off-by: dancer <josh@afterima.ge> |
||
|
|
5267669563 |
build(deps): bump nuxt from 4.3.1 to 4.4.7 (#680)
Bumps [nuxt](https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt) from 4.3.1 to 4.4.7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/nuxt/nuxt/releases">nuxt's releases</a>.</em></p> <blockquote> <h2>v4.4.7</h2> <blockquote> <p>4.4.7 is a security hotfix release.</p> </blockquote> <p>👉 make sure to check <a href="https://github.com/nuxt/nuxt/security/advisories">https://github.com/nuxt/nuxt/security/advisories</a> to view open advisories resolved by this release.</p> <h2>👉 Changelog</h2> <p><a href="https://github.com/nuxt/nuxt/compare/v4.4.6...v4.4.7">compare changes</a></p> <h3>🩹 Fixes</h3> <ul> <li><strong>nitro:</strong> Assign <code>noSSR</code> before deciding payload extraction (<a href="https://redirect.github.com/nuxt/nuxt/pull/35108">#35108</a>)</li> <li><strong>vite:</strong> Avoid filtering out dirs with shared prefix from <code>allowDirs</code> (<a href="https://redirect.github.com/nuxt/nuxt/pull/35112">#35112</a>)</li> <li><strong>nuxt:</strong> Use resolve from <code>pathe</code> for buildCache path boundary check (<a href="https://redirect.github.com/nuxt/nuxt/pull/35111">#35111</a>)</li> <li><strong>nuxt:</strong> Prevent sibling-directory traversal in test component wrapper (<a href="https://redirect.github.com/nuxt/nuxt/pull/35110">#35110</a>)</li> <li><strong>nitro:</strong> Pass event data to <code>isValid</code> in dev clipboard-copy listener (<a href="https://redirect.github.com/nuxt/nuxt/pull/35109">#35109</a>)</li> <li><strong>nuxt:</strong> Validate protocols in <code>reloadNuxtApp</code> path before reload (<a href="https://redirect.github.com/nuxt/nuxt/pull/35115">#35115</a>)</li> <li><strong>vite:</strong> Prefix public asset virtuals with null byte (<a href="https://github.com/nuxt/nuxt/commit/9e303b438">9e303b438</a>)</li> <li><strong>nuxt:</strong> Re-run <code>getCachedData</code> after initial fetch (<a href="https://redirect.github.com/nuxt/nuxt/pull/35122">#35122</a>)</li> <li><strong>nuxt:</strong> Propagate <code>useFetch</code>/<code>useAsyncData</code> factory types (<a href="https://redirect.github.com/nuxt/nuxt/pull/35133">#35133</a>)</li> <li><strong>vite:</strong> Close vite dev server on nuxt close (<a href="https://github.com/nuxt/nuxt/commit/a10a68abc">a10a68abc</a>)</li> <li><strong>kit,nuxt:</strong> Handle cancelling prompts to install packages (<a href="https://github.com/nuxt/nuxt/commit/e84813229">e84813229</a>)</li> <li><strong>kit:</strong> Avoid excluding node-context files in legacy tsconfig (<a href="https://redirect.github.com/nuxt/nuxt/pull/35152">#35152</a>)</li> <li><strong>nuxt:</strong> Handle missing payload in chunkError listener (<a href="https://redirect.github.com/nuxt/nuxt/pull/35155">#35155</a>)</li> <li><strong>nuxt:</strong> Await in-lifght template generation when closing nuxt (<a href="https://redirect.github.com/nuxt/nuxt/pull/35181">#35181</a>)</li> <li><strong>nuxt:</strong> Clarify page and layout usage warnings (<a href="https://redirect.github.com/nuxt/nuxt/pull/35184">#35184</a>)</li> <li><strong>webpack:</strong> Surface compilation errors when stats.toString is empty (<a href="https://github.com/nuxt/nuxt/commit/073b07851">073b07851</a>)</li> <li><strong>nuxt:</strong> Reject prototype-chain keys in the island registry (<a href="https://redirect.github.com/nuxt/nuxt/pull/35205">#35205</a>)</li> <li><strong>nuxt:</strong> Apply <code>isScriptProtocol</code> guard to <code>navigateTo</code> open option (<a href="https://redirect.github.com/nuxt/nuxt/pull/35206">#35206</a>)</li> <li><strong>nuxt:</strong> Prevent server-only page island from recursing via <code><NuxtPage></code> (<a href="https://redirect.github.com/nuxt/nuxt/pull/35198">#35198</a>)</li> <li><strong>rspack,webpack:</strong> Require loopback host when missing same-origin signals (<a href="https://redirect.github.com/nuxt/nuxt/pull/35200">#35200</a>)</li> <li><strong>nitro:</strong> Gate chrome devtools workspace endpoint to local requests (<a href="https://redirect.github.com/nuxt/nuxt/pull/35201">#35201</a>)</li> <li><strong>nuxt:</strong> Escape props in <code><NuxtClientFallback></code> ssr output (<a href="https://redirect.github.com/nuxt/nuxt/pull/35199">#35199</a>)</li> <li><strong>kit:</strong> Improve TS extension stripping/substitutions (<a href="https://redirect.github.com/nuxt/nuxt/pull/35233">#35233</a>)</li> <li><strong>nuxt:</strong> Preserve <code>.d.mts</code>/<code>.d.cts</code> in <code>resolveTypePaths</code> (<a href="https://redirect.github.com/nuxt/nuxt/pull/35235">#35235</a>)</li> <li><strong>nuxt:</strong> Escape <code><NoScript></code> slot content (<a href="https://github.com/nuxt/nuxt/commit/4b054e9d9">4b054e9d9</a>)</li> <li><strong>nuxt:</strong> Match route rules case-insensitively to mirror <code>vue-router</code> (<a href="https://github.com/nuxt/nuxt/commit/07e39cd6f">07e39cd6f</a>)</li> <li><strong>nuxt:</strong> Reject script-capable protocols in <code><NuxtLink></code> href (<a href="https://github.com/nuxt/nuxt/commit/0103ce06f">0103ce06f</a>)</li> <li><strong>nuxt:</strong> Block path-normalization open redirect in <code>navigateTo</code> (<a href="https://github.com/nuxt/nuxt/commit/2cce6fb02">2cce6fb02</a>)</li> <li><strong>nuxt:</strong> Reject cross-origin paths in <code>reloadNuxtApp</code> (<a href="https://github.com/nuxt/nuxt/commit/e447a793c">e447a793c</a>)</li> <li><strong>vite:</strong> Bind vite-node IPC to a permissioned filesystem socket (<a href="https://github.com/nuxt/nuxt/commit/1f9f4767a">1f9f4767a</a>)</li> </ul> <h3>💅 Refactors</h3> <ul> <li><strong>kit,nuxt,vite:</strong> Use <code>es2023</code> array methods (<a href="https://redirect.github.com/nuxt/nuxt/pull/34980">#34980</a>)</li> <li><strong>nuxt:</strong> Replace <code>runInNewContext</code> with AST walker (<a href="https://github.com/nuxt/nuxt/commit/d72a89ef4">d72a89ef4</a>)</li> </ul> <h3>📖 Documentation</h3> <ul> <li>Document vite client and server options (<a href="https://redirect.github.com/nuxt/nuxt/pull/35090">#35090</a>)</li> <li>Add dedicated module dependencies page (<a href="https://redirect.github.com/nuxt/nuxt/pull/35171">#35171</a>)</li> <li>Add nodeTsConfig and sharedTsConfig options (<a href="https://redirect.github.com/nuxt/nuxt/pull/35231">#35231</a>)</li> <li>Edit for clarity and grammar (<a href="https://redirect.github.com/nuxt/nuxt/pull/35214">#35214</a>)</li> </ul> <h3>🏡 Chore</h3> <ul> <li>Use <code>execFileSync</code> for safety in release scripts (<a href="https://github.com/nuxt/nuxt/commit/1d7baaf01">1d7baaf01</a>)</li> <li>Assert there is always a tag (<a href="https://github.com/nuxt/nuxt/commit/e98c47c3c">e98c47c3c</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/nuxt/nuxt/commit/b7d57903b947e788fadfcfdf88be7951943731bf"><code>b7d5790</code></a> v4.4.7</li> <li><a href="https://github.com/nuxt/nuxt/commit/dbc58965ca7ffa21d7cc4207a4c40a62e0762f4a"><code>dbc5896</code></a> chore: lint</li> <li><a href="https://github.com/nuxt/nuxt/commit/e447a793c47766834f7497f8412a76cd56fd8ee1"><code>e447a79</code></a> fix(nuxt): reject cross-origin paths in <code>reloadNuxtApp</code></li> <li><a href="https://github.com/nuxt/nuxt/commit/d72a89ef451965a8a1abb58d3bd6eab4865631a0"><code>d72a89e</code></a> refactor(nuxt): replace <code>runInNewContext</code> with AST walker</li> <li><a href="https://github.com/nuxt/nuxt/commit/2cce6fb02e621196d56df92e05594e07469b5a6d"><code>2cce6fb</code></a> fix(nuxt): block path-normalization open redirect in <code>navigateTo</code></li> <li><a href="https://github.com/nuxt/nuxt/commit/0103ce06fbbbdfa079a7f020ef8ce00121eac4a3"><code>0103ce0</code></a> fix(nuxt): reject script-capable protocols in <code>\<NuxtLink></code> href</li> <li><a href="https://github.com/nuxt/nuxt/commit/07e39cd6f26e407b4192b7865bd17bc44536b9bb"><code>07e39cd</code></a> fix(nuxt): match route rules case-insensitively to mirror <code>vue-router</code></li> <li><a href="https://github.com/nuxt/nuxt/commit/4b054e9d95f8daf366cb144b52782047c511a66e"><code>4b054e9</code></a> fix(nuxt): escape <code>\<NoScript></code> slot content</li> <li><a href="https://github.com/nuxt/nuxt/commit/03d83bfab531b27fbc1dac7cdea9227b3707476e"><code>03d83bf</code></a> fix(nuxt): preserve <code>.d.mts</code>/<code>.d.cts</code> in <code>resolveTypePaths</code> (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/35235">#35235</a>)</li> <li><a href="https://github.com/nuxt/nuxt/commit/46960b2b18e79d64f212b2b77d879b3f88ab72cb"><code>46960b2</code></a> fix(nuxt): escape props in <code>\<NuxtClientFallback></code> ssr output (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/35199">#35199</a>)</li> <li>Additional commits viewable in <a href="https://github.com/nuxt/nuxt/commits/v4.4.7/packages/nuxt">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/vercel/chat/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
03d274283f |
feat(examples): add nuxt-chat example app (#609)
Adds `examples/nuxt-chat`, a Nuxt 4 reference app for Chat SDK scoped to
the Slack and web adapters.
The Nitro server exposes `/api/webhooks/{platform}` for Slack events and
`/api/chat` for the browser UI, with H3-to-Fetch conversion that
preserves the raw request body for signature verification. Bot handlers
are ported from `nextjs-chat` — interactive cards, modals, slash
commands, transcripts, reactions, and AI streaming — without the
workflow demos.
The `/chat` page is a client-only Vue UI using `@chat-adapter/web/vue`
and the AI SDK. A Slack app manifest ships with the scopes and events
needed for pins, reactions, channel joins, and interactivity.
Monorepo plumbing covers changeset ignore, CI build exclusion,
`AGENTS.md`, knip entry paths for the Nuxt 4 `app/` directory, and biome
globals for Nitro auto-imports.
---------
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
|