Skip to content

Open source CapCut alternative.

TypeScript

test(site): restore inline fixture audio in the Cut chat eval and add eval:cut-chat

David Le0ed285727dc5
diff --git a/site/package.json b/site/package.json
index fc945b01..7baf176d 100644
--- a/site/package.json
+++ b/site/package.json
@@ -15,7 +15,8 @@
"prisma:dev": "dotenv -e .env.development -- npx prisma migrate dev",
"prisma:prod": "dotenv -e .env -- prisma db push",
"engine:dev": "bun run src/cut/engine/main.ts",
- "engine:build": "bash scripts/build-cut-engine.sh"
+ "engine:build": "bash scripts/build-cut-engine.sh",
+ "eval:cut-chat": "bun run scripts/eval-cut-chat.ts"
},
"dependencies": {
"@ai-sdk/react": "^4.0.15",
diff --git a/site/scripts/eval-cut-chat.ts b/site/scripts/eval-cut-chat.ts
index 85ee7704..9e236e4f 100644
--- a/site/scripts/eval-cut-chat.ts
+++ b/site/scripts/eval-cut-chat.ts
@@ -159,7 +159,8 @@ function userTurn(text: string, opts?: { attachAudio?: { dataBase64: string; mim
const extra: Item[] = [];
if (opts?.attachAudio) {
full += `\n\n<attached_assets>\nThe user attached these assets to this message; their text may cite one by @handle or @name. Assets with scope "project" are in the open project (ids usable with the editor tools); "library" and "stock" assets live outside it until imported; "file" assets came straight from the user's computer and exist only on this message:\n${JSON.stringify([VOICE_REF])}\n</attached_assets>`;
- extra.push({ text: `Attached audio "${VOICE_REF.name}" (audio content not included).` });
+ extra.push({ text: `Attached audio "${VOICE_REF.name}":` });
+ extra.push({ type: "input_audio", ...opts.attachAudio });
}
full += `\n\n<editor_state>\n${JSON.stringify(EDITOR_STATE)}\n</editor_state>`;
return { role: "user", content: [{ text: full }, ...extra] };