Add a Director section to save and reload multi-shot video scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-29 17:25:57 -05:00
co-authored by Cursor
parent 334bbba8af
commit 852b07bb97
11 changed files with 779 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
export type DirectorScript = {
id: string
name: string
text: string
createdAt: number
updatedAt: number
}
export const DIRECTOR_SCRIPT_NAME_MAX = 80
export const DIRECTOR_SCRIPT_TEXT_MAX = 200_000
export function normalizeDirectorScriptName(raw: unknown) {
return String(raw || '').trim().replace(/\s+/g, ' ').slice(0, DIRECTOR_SCRIPT_NAME_MAX)
}
export function normalizeDirectorScriptText(raw: unknown) {
return String(raw || '').replace(/\r\n/g, '\n').slice(0, DIRECTOR_SCRIPT_TEXT_MAX)
}