mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add streamdown in ai example of all react web templates (#554)
This commit is contained in:
@@ -108,6 +108,7 @@ export const dependencyVersionMap = {
|
||||
"@ai-sdk/vue": "^2.0.9",
|
||||
"@ai-sdk/svelte": "^3.0.9",
|
||||
"@ai-sdk/react": "^2.0.9",
|
||||
streamdown: "^1.1.6",
|
||||
|
||||
"@orpc/server": "^1.8.4",
|
||||
"@orpc/client": "^1.8.4",
|
||||
|
||||
@@ -43,7 +43,7 @@ export async function setupExamples(config: ProjectConfig) {
|
||||
} else if (hasSvelte) {
|
||||
dependencies.push("@ai-sdk/svelte");
|
||||
} else if (hasReactWeb) {
|
||||
dependencies.push("@ai-sdk/react");
|
||||
dependencies.push("@ai-sdk/react", "streamdown");
|
||||
}
|
||||
await addPackageDependency({
|
||||
dependencies,
|
||||
|
||||
@@ -740,6 +740,19 @@ export async function setupExamplesTemplate(
|
||||
if (hasReactWeb) {
|
||||
const exampleWebSrc = path.join(exampleBaseDir, "web/react");
|
||||
if (await fs.pathExists(exampleWebSrc)) {
|
||||
if (example === "ai") {
|
||||
const exampleWebBaseSrc = path.join(exampleWebSrc, "base");
|
||||
if (await fs.pathExists(exampleWebBaseSrc)) {
|
||||
await processAndCopyFiles(
|
||||
"**/*",
|
||||
exampleWebBaseSrc,
|
||||
webAppDir,
|
||||
context,
|
||||
false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const reactFramework = context.frontend.find((f) =>
|
||||
[
|
||||
"next",
|
||||
|
||||
Reference in New Issue
Block a user