Add an image batch-script popup that splits a pasted shot list onto the start still.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-31 00:00:34 -05:00
co-authored by Cursor
parent 177f7b6e96
commit 1bdb96cbb7
3 changed files with 247 additions and 11 deletions
+9 -2
View File
@@ -4,9 +4,8 @@ export interface ParsedShot {
role: 'initial' | 'extension'
}
export function parseShotScript(text: string): ParsedShot[] {
function parseMarkedBlocks(text: string, marker: RegExp): ParsedShot[] {
const src = String(text || '').replace(/\r\n/g, '\n')
const marker = /^[ \t]*shot\s+(\d+)\b/gim
const markers: { n: number; start: number; end: number }[] = []
for (const match of src.matchAll(marker)) {
markers.push({
@@ -41,3 +40,11 @@ export function parseShotScript(text: string): ParsedShot[] {
role: index === 0 ? 'initial' : 'extension'
}))
}
export function parseShotScript(text: string): ParsedShot[] {
return parseMarkedBlocks(text, /^[ \t]*shot\s+(\d+)\b/gim)
}
export function parseImageBatchScript(text: string): ParsedShot[] {
return parseMarkedBlocks(text, /^[ \t]*(?:shot|image|prompt)\s+(\d+)\b/gim)
}