Show it a video you love. Get a new video in the same style. An AI crew (Claude Code or Codex) plans, builds and reviews it with you.
JavaScript 2d-animationai-agentsai-videoanimationclaude-codecodexmulti-agentstyle-transfervideo-generation
Foreground segmented renders rule; timeline shows real rounds; UI offers refresh after a rebuild
許元豪5a3b203139ae
diff --git a/.claude/skills/video-clone/scripts/timeline.py b/.claude/skills/video-clone/scripts/timeline.pyindex 13eee3a..606097d 100644--- a/.claude/skills/video-clone/scripts/timeline.py+++ b/.claude/skills/video-clone/scripts/timeline.py@@ -64,7 +64,8 @@ if chunks:print('\nper segment (build / review / fix minutes, rounds):')for c in sorted(chunks, key=lambda x: int(x[1:])):L = chunks[c]; f = lambda p: sum(m for ph, m in L if ph == p)- print(f" {c}: build {f('build_chunk'):.0f}, review {f('shot_qa'):.0f} ×{sum(1 for ph, _ in L if ph == 'shot_qa')}, fix {f('fix_chunk'):.0f} ×{sum(1 for ph, _ in L if ph == 'fix_chunk')} → {sum(m for _, m in L):.0f} min")+ rounds = (j.get('pipeline') or {}).get('chunks', {}).get(c, {}).get('round')+ print(f" {c}: build {f('build_chunk'):.0f}, review {f('shot_qa'):.0f} ({sum(1 for ph, _ in L if ph == 'shot_qa')} shot reviews), fix {f('fix_chunk'):.0f} ({sum(1 for ph, _ in L if ph == 'fix_chunk')} fix turns), rounds {rounds or '?'} → {sum(m for _, m in L):.0f} min")# what agents spend time on (gap to their next event)cat = collections.Counter(); byw = collections.defaultdict(list)diff --git a/app/server/prompts.mjs b/app/server/prompts.mjsindex 56fc7bf..de1603c 100644--- a/app/server/prompts.mjs+++ b/app/server/prompts.mjs@@ -16,6 +16,9 @@ const SPEED = `效率規則(不能省略任何檢查,只是不浪費時間- HyperFrames 專案截圖一律用 python ${SKILL}/scripts/hf_frames.py <build 資料夾> --at t1,t2,… [--crop x,y,w,h --tag 名稱] [--range 起:迄:間隔] --out <資料夾> [--sheet 檔名]:一次呼叫就把這一輪要看的所有時間點(所有鏡頭)一起算出來;裁切是從全解析度影格直接切,不要另外用 --zoom 重新渲染;畫面沒改的時間點會直接用快取。- 需要等的指令(渲染、截圖)用 Bash 前景執行並把 timeout 設成 600000;**不要丟到背景再 sleep 猜時間**。+- **回合一結束,你開的所有程序都會被關掉**,背景任務完成時也不會有人通知你。所以可能超過 9 分鐘的渲染要切段,每段都前景跑完:+ 可續跑的引擎(例如 render.mjs --frames)就重複執行同一個指令或用 --range 分段,直到影格數到齊,再 encode;+ 絕不可以留著背景渲染就結束回合,必須寫的輸出檔(例如 out/video.mp4)在回合結束前一定要已經存在。- 先把要看的時間點想好再一次截,不要一張一張截;改完一批問題再一次重截驗證。`;const LANG_NAME = { 'zh-TW': '繁體中文', en: 'English', 'zh-CN': '简体中文' };diff --git a/app/web/src/i18n.js b/app/web/src/i18n.jsindex 0a19a92..cac9cbf 100644--- a/app/web/src/i18n.js+++ b/app/web/src/i18n.js@@ -89,7 +89,7 @@ const EN = {'對企劃提意見,例如:S3 的轉場想更誇張…': 'Comment on the plan, e.g. make the S3 transition bigger…','對成片提意見,例如:12 秒那裡太快看不懂…': 'Comment on the film, e.g. too fast to follow at 12 s…','告訴導演怎麼處理,或補充說明…': 'Tell the director what to do, or add details…', '說明要怎麼處理這個問題…': 'Explain how to handle this…',- '企劃還在寫,可以先補充想法,導演會一併放進企劃…': 'The plan is still being written — add ideas now and the director will fold them in…', 'AI 工作中,這一輪完成後就可以說話': 'The AI is working — you can talk once this turn finishes',+ '企劃還在寫,可以先補充想法,導演會一併放進企劃…': 'The plan is still being written — add ideas now and the director will fold them in…', '網站已更新,點這裡重新整理': 'ReelMimic was updated — click to refresh', 'AI 工作中,這一輪完成後就可以說話': 'The AI is working — you can talk once this turn finishes','Enter 送出 · Shift+Enter 換行 · 圖片可以直接貼上或拖進來': 'Enter to send · Shift+Enter for a new line · paste or drop images','附加檔案': 'Attach files', '附加圖片或檔案(也可以直接貼上或拖進來)': 'Attach images or files (you can also paste or drop them)', '送出': 'Send','全部 agent': 'All agents', '搜尋紀錄': 'Search log', '下載紀錄': 'Download log', '沒有紀錄': 'No log entries', '完整紀錄在': 'full log in',diff --git a/app/web/src/main.jsx b/app/web/src/main.jsxindex 1ede64f..6dae989 100644--- a/app/web/src/main.jsx+++ b/app/web/src/main.jsx@@ -5,3 +5,19 @@ import './styles.css';import { startI18n } from './i18n.js';createRoot(document.getElementById('root')).render(<App />);startI18n();++// A tab left open across a rebuild keeps running the old bundle: check once a minute and offer a refresh.+// (Built pages only — the dev server's index.html has no hashed bundle, so this never fires there.)+const bundle = () => document.querySelector('script[src*="/assets/index-"]')?.getAttribute('src');+if (bundle()) setInterval(async () => {+ if (document.querySelector('.update-pill')) return;+ try {+ const html = await fetch('/', { cache: 'no-store' }).then((r) => r.text());+ const next = html.match(/\/assets\/index-[\w-]+\.js/)?.[0];+ if (!next || bundle()?.endsWith(next)) return;+ const b = document.createElement('button');+ b.className = 'update-pill'; b.textContent = '網站已更新,點這裡重新整理';+ b.onclick = () => location.reload();+ document.body.appendChild(b);+ } catch {}+}, 60000);diff --git a/app/web/src/styles.css b/app/web/src/styles.cssindex 2619ff9..2ffb244 100644--- a/app/web/src/styles.css+++ b/app/web/src/styles.css@@ -604,3 +604,9 @@ h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.022e.lang-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--label); text-align: left; }.lang-menu button:hover { background: var(--fill-2); }.lang-menu button.on { color: var(--accent-ink); font-weight: 600; }++/* shown when the site was rebuilt while this tab stayed open */+.update-pill { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100;+ border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;+ background: var(--accent); color: #fff; box-shadow: var(--shadow-3); animation: fade .3s var(--ease) both; }+.update-pill:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }