File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
examples/ai/web/react/next/src/app/ai Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ export const dependencyVersionMap = {
113113 "@ai-sdk/vue" : "^2.0.39" ,
114114 "@ai-sdk/svelte" : "^3.0.39" ,
115115 "@ai-sdk/react" : "^2.0.39" ,
116- streamdown : "^1.2.0" ,
116+ streamdown : "^1.3.0" ,
117+ shiki : "^3.12.2" ,
117118
118119 "@orpc/server" : "^1.8.6" ,
119120 "@orpc/client" : "^1.8.6" ,
@@ -151,7 +152,7 @@ export const dependencyVersionMap = {
151152 "@sveltejs/adapter-cloudflare" : "^7.2.1" ,
152153 "@cloudflare/workers-types" : "^4.20250822.0" ,
153154
154- alchemy : "^0.65.1 " ,
155+ alchemy : "^0.67.0 " ,
155156 // temporary workaround for alchemy + tanstack start
156157 nitropack : "^2.12.4" ,
157158
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export async function setupExamples(config: ProjectConfig) {
3232 frontend . includes ( "tanstack-router" ) ||
3333 frontend . includes ( "next" ) ||
3434 frontend . includes ( "tanstack-start" ) ;
35+ const hasNext = frontend . includes ( "next" ) ;
3536 const hasReactNative =
3637 frontend . includes ( "native-nativewind" ) ||
3738 frontend . includes ( "native-unistyles" ) ;
@@ -45,6 +46,11 @@ export async function setupExamples(config: ProjectConfig) {
4546 } else if ( hasReactWeb ) {
4647 dependencies . push ( "@ai-sdk/react" , "streamdown" ) ;
4748 }
49+
50+ if ( hasNext ) {
51+ dependencies . push ( "shiki" ) ;
52+ }
53+
4854 await addPackageDependency ( {
4955 dependencies,
5056 projectDir : webClientDir ,
Original file line number Diff line number Diff line change 33import { useChat } from "@ai-sdk/react";
44import { DefaultChatTransport } from "ai";
55import { Send } from "lucide-react";
6+ {{ #if (or (eq webDeploy " wrangler" ) (eq webDeploy " alchemy" ))}}
67import dynamic from "next/dynamic";
8+ {{ else }}
9+ import { Response } from "@/components/response";
10+ {{ /if }}
711import { useEffect, useRef, useState } from "react";
812import { Button } from "@/components/ui/button";
913import { Input } from "@/components/ui/input";
1014
15+ {{ #if (or (eq webDeploy " wrangler" ) (eq webDeploy " alchemy" ))}}
1116const Response = dynamic(
1217 () =>
1318 import("@/components/response").then((mod) => ({ default: mod.Response })),
@@ -20,6 +25,7 @@ const Response = dynamic(
2025 ssr: false,
2126 }
2227);
28+ {{ /if }}
2329
2430export default function AIPage() {
2531 const [input, setInput] = useState("");
@@ -94,4 +100,4 @@ export default function AIPage() {
94100 </form >
95101 </div >
96102 );
97- }
103+ }
Original file line number Diff line number Diff line change @@ -5,10 +5,13 @@ import type { NextConfig } from "next";
55
66const nextConfig: NextConfig = {
77 typedRoutes: true,
8+ {{ #if (includes examples " ai" )}}
9+ transpilePackages: ["shiki"],
10+ {{ /if }}
811};
912
1013export default nextConfig;
1114
1215{{ #if (or (eq webDeploy " alchemy" ) (eq webDeploy " wrangler" ))}}
1316initOpenNextCloudflareForDev();
14- {{ /if }}
17+ {{ /if }}
You can’t perform that action at this time.
0 commit comments