Compare commits

..
Author SHA1 Message Date
Chris Tate 55cab0d8bf better ignore 2026-04-08 10:02:21 -05:00
vzt7 a123f56fe3 fix: resolve image demo /api/image 500 on Vercel (#253)
Add outputFileTracingIncludes so the Geist font TTF is bundled at the
symlink path the code reads from. In a pnpm monorepo the file was only
traced at the .pnpm store path, which Vercel does not map back to the
node_modules/geist/ symlink.
2026-04-07 01:43:04 -05:00
Rayan Salhab 753c1d1109 fix(remotion): include props in generatePrompt output (#249)
The Remotion schema defines props on composition entries, but generatePrompt
did not include those props in its output. As a result, the model had no
knowledge of the expected prop shape when generating JSON, causing runtime
failures when prop names didn't match the component's expected interface.

Changes:
- Import zod type for TypeScript support
- Extract formatZodType from PromptContext
- Add props field to component type definition
- Include formatted props string in component description

Fixes #224
2026-04-07 01:39:32 -05:00
18 changed files with 22 additions and 73 deletions
+2
View File
@@ -29,6 +29,8 @@ build
dist
*.tsbuildinfo
.svelte-kit/
tsup.config.bundled_*.mjs
next-env.d.ts
# Debug
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+5
View File
@@ -2,6 +2,11 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
serverExternalPackages: ["@resvg/resvg-js", "satori"],
outputFileTracingIncludes: {
"/api/image": [
"./node_modules/geist/dist/fonts/geist-sans/Geist-Regular.ttf",
],
},
};
export default nextConfig;
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+1 -1
View File
@@ -13,7 +13,7 @@
"scripts": {
"build": "turbo run build",
"predev": "command -v portless >/dev/null 2>&1 || (echo '\\nportless is required but not installed. Run: npm i -g portless\\nSee: https://github.com/vercel-labs/portless\\n' && exit 1)",
"dev": "turbo run dev --concurrency 20",
"dev": "turbo run dev --concurrency 50",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"type-check": "turbo run check-types",
+1 -1
View File
@@ -48,7 +48,7 @@
"dist"
],
"scripts": {
"build": "tsup",
"build": "rm -rf dist && tsup",
"dev": "tsup --watch",
"check-types": "tsc --noEmit",
"typecheck": "tsc --noEmit"
-1
View File
@@ -20,7 +20,6 @@ export default defineConfig([
dts: true,
sourcemap: true,
splitting: true,
clean: true,
banner: { js: '"use client";' },
external: sharedExternal,
},
+5 -3
View File
@@ -1,4 +1,5 @@
import { defineSchema, type PromptContext } from "@json-render/core";
import type { z } from "zod";
/**
* Prompt template for Remotion timeline generation
@@ -6,7 +7,7 @@ import { defineSchema, type PromptContext } from "@json-render/core";
* Uses JSONL patch format (same as React) but builds up a timeline spec structure.
*/
function remotionPromptTemplate(context: PromptContext): string {
const { catalog, options } = context;
const { catalog, options, formatZodType } = context;
const { system = "You are a video timeline generator.", customRules = [] } =
options;
@@ -37,7 +38,7 @@ function remotionPromptTemplate(context: PromptContext): string {
const catalogData = catalog as {
components?: Record<
string,
{ description?: string; defaultDuration?: number }
{ description?: string; defaultDuration?: number; props?: z.ZodType }
>;
transitions?: Record<string, { description?: string }>;
effects?: Record<string, { description?: string }>;
@@ -52,8 +53,9 @@ function remotionPromptTemplate(context: PromptContext): string {
const duration = def.defaultDuration
? ` [default: ${def.defaultDuration} frames]`
: "";
const propsStr = def.props ? ` ${formatZodType(def.props)}` : "";
lines.push(
`- ${name}: ${def.description || "No description"}${duration}`,
`- ${name}:${propsStr} ${def.description || "No description"}${duration}`,
);
}
lines.push("");
+8 -1
View File
@@ -6,7 +6,13 @@
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
"outputs": [".next/**", "!.next/cache/**", "dist/**", ".svelte-kit/**"]
},
"svelte-chat#build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".svelte-kit/**"],
"cache": false
},
"lint": {
"dependsOn": ["^lint"]
@@ -15,6 +21,7 @@
"dependsOn": ["^build"]
},
"dev": {
"dependsOn": ["^build"],
"cache": false,
"persistent": true
}