The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
Fix Motion editor visual and terminology issues
qindonga09c5d2c4e5a
diff --git a/docs/product/architecture.md b/docs/product/architecture.mdindex b18c71bf..98f37f87 100644--- a/docs/product/architecture.md+++ b/docs/product/architecture.md@@ -86,7 +86,7 @@ Model Gateway 是共用的素材生成服务,可由 Motion Viewer 或 MCP 调| 首页与项目会话 | `MotionApp.tsx`、`WorkspaceFrame.tsx`、`MotionHome.tsx`、`useWorkspace.ts`(位于 `studio/src/motion/`) | 根地址显示首页,左侧会话共享工程目录;切换前保存、切换后整页重建;详见 [项目专题](../project-workspace.md) || 项目创作会话 | `MotionSessionFrame.tsx`、`ProjectConversation.tsx`、`shared/session.ts` | 独立会话身份、模式、需求与多个产物;`artifactBrowser.ts` 管理 Tabs / 面板恢复;会话 Agent 执行由外部客户端负责 || 会话内网页浏览 | `browser.ts`、`WebBrowser.tsx`、`shared/browser.ts` | 独立 Chromium,支持真实网址、输入、历史与刷新;按会话隔离,详见 [浏览器运行架构](../browser-runtime.md) |-| 编辑器与工作区交互 | `studio/src/`,尤其 `studio/src/motion/` | 完整 Hyperframes 0.9.7 Studio 前端源码;宿主通过插槽适配品牌和入口,预览使用独立 iframe |+| 编辑器与工作区交互 | `studio/src/`,尤其 `studio/src/motion/` | 完整 Hyperframes 0.9.7 Studio 前端源码;宿主通过插槽适配品牌和入口,预览使用独立 iframe;编辑器顶栏展示 OpenDesign 标志与 OpenMotion 名称,中文界面称项目 || 面板与布局恢复 | `studio/src/components/dock/`、`MotionLayoutControls.tsx` | 原生 Dock 持久化;常驻预览入口、面板开关及布局预设 || 撤销、版本保留与恢复 | `MotionHistoryPanel.tsx`、原生历史 API | 顶栏/时间轴撤销重做;新增历史 UI 复用原生存储,恢复保留后续记录 || 编辑器语言 | `studio/src/i18n/` | 简体中文/英文,不重挂载编辑器;统一接入弹框内部仍以中文为主 |diff --git a/studio/src/components/dock/dockLayout.test.ts b/studio/src/components/dock/dockLayout.test.tsindex bddf62e8..15ac18d0 100644--- a/studio/src/components/dock/dockLayout.test.ts+++ b/studio/src/components/dock/dockLayout.test.ts@@ -38,7 +38,7 @@ describe("defaultSideWidths", () => {it.each([[1680, 384, 424],[1280, 329, 364],- [860, 221, 244],+ [860, 260, 240],[560, 120, 120],])("at %ipx gives %i / %i", (viewport, left, right) => {expect(defaultSideWidths(viewport)).toEqual({ left, right });diff --git a/studio/src/components/dock/dockLayout.ts b/studio/src/components/dock/dockLayout.tsindex b77cbba6..7af9675e 100644--- a/studio/src/components/dock/dockLayout.ts+++ b/studio/src/components/dock/dockLayout.ts@@ -14,7 +14,7 @@ const DEFAULT_RIGHT = ["design", "layers", "renders", "variables", "motionBlur"]/** Preferred side widths; when they overflow the preview's floor the right yields first, then the left. */export function defaultSideWidths(viewportWidth: number) {const floor = sideMinimumWidth(viewportWidth);- const left = Math.max(floor, Math.min(384, Math.round(viewportWidth * 0.257)));+ const left = Math.max(floor, Math.min(384, Math.max(260, Math.round(viewportWidth * 0.257))));const right = Math.max(Math.min(280, floor), Math.min(424, Math.round(viewportWidth * 0.284)));const excess = left + right - Math.max(0, viewportWidth - MIN_PREVIEW_W);if (excess <= 0) return { left, right };diff --git a/studio/src/i18n/zh-CN.json b/studio/src/i18n/zh-CN.jsonindex 3ddb95c4..b48464c1 100644--- a/studio/src/i18n/zh-CN.json+++ b/studio/src/i18n/zh-CN.json@@ -44,8 +44,8 @@"Align": "对齐","All": "全部","All checks passed": "所有检查均通过",- "All project media": "所有工程媒体",- "All projects": "所有工程",+ "All project media": "所有项目媒体",+ "All projects": "所有项目","Alpha": "透明度","Amount": "强度","Amplitude": "振幅",@@ -83,7 +83,7 @@"Bind anyway": "仍然绑定","Bind selected:": "绑定所选:","Blend": "混合",- "Block params can't be edited here: no project file access.": "无法编辑组件参数:没有工程文件访问权限。",+ "Block params can't be edited here: no project file access.": "无法编辑组件参数:没有项目文件访问权限。","Bold": "粗体","Bounce": "弹跳","Branches (": "分支(",@@ -142,7 +142,7 @@"Composition navigation": "合成导航","Composition preview": "合成预览","Computed value. Edit it in the Code tab.": "计算值,请在代码面板中修改。",- "Connecting to project…": "正在连接工程…",+ "Connecting to project…": "正在连接项目…","Console errors in preview": "预览控制台错误","Content": "内容","Context included in prompt": "指令中包含的上下文",@@ -169,7 +169,7 @@"Copy to Agent": "复制给 Agent","Copy values JSON": "复制数值 JSON","Correction": "校正",- "Couldn't open this project. It may have been renamed, moved, or deleted.": "无法打开此工程,它可能已被重命名、移动或删除。",+ "Couldn't open this project. It may have been renamed, moved, or deleted.": "无法打开此项目,它可能已被重命名、移动或删除。","Couldn't load this file. It may be missing or corrupt": "无法加载此文件,它可能已丢失或损坏","Count": "数量","Create a branch in the Branches section first. Hotspots jump to a branch.": "请先创建分支,热点用于跳转到分支。",@@ -347,7 +347,7 @@"Linked Selection off: a click selects one clip": "关联选择已关闭:点击选择单个片段","Linked Selection on: a click selects both halves (⌥-click for one)": "关联选择已开启:点击选择关联片段(⌥ 点击选择单个)","Linked clips": "关联片段",- "Lint": "检查工程",+ "Lint": "检查项目","Linting…": "正在检查…","Listen to": "监听","Listen to this track and even out its loud and quiet parts.": "分析此音轨,均衡音量较大与较小的部分。",@@ -431,7 +431,7 @@"Open rack ›": "打开效果架 ›","Open the download and drag HyperFrames into Applications.": "打开下载文件,将 HyperFrames 拖入“应用程序”。","Open the download to install HyperFrames.": "打开下载文件以安装 HyperFrames。",- "Open this project in the HyperFrames desktop app": "在 HyperFrames 桌面端打开此工程",+ "Open this project in the HyperFrames desktop app": "在 HyperFrames 桌面端打开此项目","Optional hole-cut background copy.": "可选的镂空背景副本。","Options (one per line, value:Label)": "选项(每行一个,值:标签)","Other compositions": "其他合成",@@ -472,7 +472,7 @@"Previewing defaults": "正在预览默认值","Previous keyframe": "上一个关键帧","Primary": "一级调色",- "Project asset": "工程素材",+ "Project asset": "项目素材","Prompt": "指令","Prompt Copied!": "指令已复制","Qualifier": "选色器",@@ -532,7 +532,7 @@"Rotation": "旋转","Run ease:": "整体缓动:","SDR preview": "SDR 预览",- "Same project, same files, in the desktop app.": "在桌面端继续使用相同工程与文件。",+ "Same project, same files, in the desktop app.": "在桌面端继续使用相同项目与文件。","Sample color from captured frame": "从截图中取色","Sample color from frame": "从画面取色","Saved to": "已保存至",@@ -553,7 +553,7 @@"Select a clip to split": "选择要拆分的片段","Select a clip to zoom the timeline": "选择片段以缩放时间轴","Select a file to edit": "选择要编辑的文件",- "Select a project-local image or video asset": "选择工程中的图片或视频素材",+ "Select a project-local image or video asset": "选择项目中的图片或视频素材","Select a scene above to inspect": "选择上方场景查看属性","Select a scene in the Slides list": "在幻灯片列表中选择场景","Select a single element to edit its properties": "选择单个元素以编辑属性",@@ -625,7 +625,7 @@"This Studio is serving": "当前工作室正在提供","This block has no editable parameters.": "此组件没有可编辑参数。","This file has multiple GSAP timelines. Animation editing is disabled to prevent data loss. Consolidate into a single timeline to enable editing.": "此文件包含多个 GSAP 时间轴。为避免数据丢失,动画编辑已禁用,请合并为单个时间轴后再编辑。",- "This project": "当前工程",+ "This project": "当前项目","This timeline uses a computed key (window.__timelines[variable]) the editor can't resolve statically. Use a string-literal key (window.__timelines[\"id\"]) or a variable declaration (const tl = gsap.timeline()) to enable editing.": "时间轴使用了无法静态解析的计算键(window.__timelines[variable])。请使用字符串键(window.__timelines[\"id\"])或变量声明(const tl = gsap.timeline())启用编辑。","This timeline uses a computed key the editor can't resolve statically.": "此时间轴使用了编辑器无法静态解析的计算键。","This track cannot be grouped": "此轨道无法分组",@@ -696,7 +696,7 @@"Zoom out": "缩小","Zoom to selected clips": "缩放至所选片段","analysed": "已分析",- "and becomes reusable across projects.": "并可跨工程复用。",+ "and becomes reusable across projects.": "并可跨项目复用。","and everything inside it?": "及其全部内容?","animations": "个动画","both": "两者",@@ -720,7 +720,7 @@"no preview": "无预览","preset: switch to Curve, Spring, or Wiggle above to shape it by hand.": "预设:切换到上方曲线、弹簧或抖动以手动调整。","render": "渲染",- "reusable across all projects": "可跨工程复用",+ "reusable across all projects": "可跨项目复用","shift-click to add or remove": "Shift 点击以添加或移除","source": "来源","title": "标题",@@ -729,9 +729,9 @@"unused": "未使用","waveform unavailable": "波形不可用","Compositions": "合成",- "Assets": "素材",+ "Assets": "我的素材","Code": "代码",- "Catalog": "组件库",+ "Catalog": "官方动效库","Preview": "预览","Timeline": "时间轴","Design": "属性",@@ -780,7 +780,7 @@"Restore default layout": "恢复默认布局","Drag panel tabs to rearrange. Your layout is saved automatically.": "拖动面板标签可调整位置,布局自动保存","Open preview": "打开预览",- "Switch project": "切换工程",+ "Switch project": "切换项目","Connecting…": "正在连接…","Local autosave": "本地自动保存","Working…": "正在处理…",@@ -804,13 +804,13 @@"Open and edit": "打开并编辑","Preparing project…": "正在创建项目…","Loading templates…": "正在读取模板…",- "Opening a template creates a separate copy. Your projects and edits stay in the project menu.": "每次打开都会创建独立副本。原工程和修改保留在工程菜单中。",+ "Opening a template creates a separate copy. Your projects and edits stay in the project menu.": "每次打开都会创建独立副本。原项目和修改保留在项目菜单中。","Official Hyperframes examples": "Hyperframes 官方示例","Open {title}": "打开 {title}","Animation preview of {title}": "{title} 动画预览","Connect your creative assistant.": "连接你的创作助手。","Close MCP connection": "关闭 MCP 接入",- "Let your agent and editor work on the same project.": "让 Agent 和编辑器使用同一份工程,继续创作与打磨。",+ "Let your agent and editor work on the same project.": "让 Agent 和编辑器使用同一份项目,继续创作与打磨。","Choose a client": "选择客户端","Copy connection instructions": "复制接入指引","Download configuration": "下载配置",@@ -1160,7 +1160,7 @@"MCP connection · Templates": "MCP 接入 · 模板","Search templates, creators, styles…": "搜索模板、作者、风格…","View all templates": "查看全部模板",- "Preparing editable project…": "正在准备可编辑工程…",+ "Preparing editable project…": "正在准备可编辑项目…","Home": "首页","New project": "新建项目","Create a project": "创建一个项目",@@ -1179,7 +1179,7 @@"Loading projects…": "正在读取项目…","No matching projects": "没有找到相关项目","Create your first project": "创建你的第一个项目",- "Local project": "本地工程",+ "Local project": "本地项目","My workspace": "我的工作区","Saved on this device": "保存在此设备","Project name": "项目名称",@@ -1262,7 +1262,7 @@"Reload page": "刷新网页","Open in browser": "在系统浏览器中打开","Artifacts": "产物",- "New Motion artifact": "新建 Motion 工程",+ "New Motion artifact": "新建 Motion 项目","Conversation name": "会话名称","Save conversation name": "保存会话名称","Rename conversation": "重命名会话",@@ -1324,7 +1324,7 @@"Uses your provider account": "使用你的供应商账户","Generate": "生成","Connect a provider to generate this media": "配置供应商以生成此类素材",- "Saved to project assets": "已存入工程素材库",+ "Saved to project assets": "已存入项目素材库","Place on timeline": "放入时间轴","Placed": "已放入","queued": "等待中",@@ -1339,7 +1339,7 @@"The composition changed. Open Generate media again to choose a new placement.": "合成已切换,请重新打开素材生成面板以选择放置位置。","The timeline is currently unavailable for editing": "时间轴暂时无法编辑","Timeline insertion is unavailable": "当前无法插入时间轴",- "Switch back to the original project to place this asset": "请切回原工程后再放置这份素材",+ "Switch back to the original project to place this asset": "请切回原项目后再放置这份素材","Not installed": "未安装","Not detected": "未检测到","Run codex login first": "请先运行 codex login 登录",diff --git a/studio/src/motion/MotionStudioHost.tsx b/studio/src/motion/MotionStudioHost.tsxindex 9ecc4e3d..e3520074 100644--- a/studio/src/motion/MotionStudioHost.tsx+++ b/studio/src/motion/MotionStudioHost.tsx@@ -6,6 +6,7 @@ import { useDockLayoutStore } from '../components/dock/dockLayoutStore';import { TimelineHistoryButtons } from '../components/TimelineHistoryButtons';import { isStudioEditSaving } from '../utils/studioPendingEdits';import { MotionIcon } from './icons';+import { OpenDesignMark } from './OpenDesignMark';import { StudioHostContext, type StudioHost } from './StudioHost';import { WorkspaceFrame, useWorkspaceChrome, useOptionalWorkspaceChrome } from './WorkspaceFrame';import { MotionLayoutMenu, MotionPreviewButton } from './MotionLayoutControls';@@ -81,7 +82,7 @@ function WorkspaceActions() {}const host: StudioHost = {- brand: <></>,+ brand: <span className="motion-brand"><span className="motion-brand-mark"><OpenDesignMark /></span><strong>OpenMotion</strong></span>,projectLabel: <WorkspaceProject />,headerActions: <WorkspaceActions />,historyActions: <WorkspaceHistoryActions />,diff --git a/studio/src/motion/OpenDesignMark.tsx b/studio/src/motion/OpenDesignMark.tsxnew file mode 100644index 00000000..b3087977--- /dev/null+++ b/studio/src/motion/OpenDesignMark.tsx@@ -0,0 +1,3 @@+export function OpenDesignMark() {+ return <svg viewBox="0 0 291 291" width="20" height="20" fill="currentColor" aria-hidden="true"><path fillRule="evenodd" clipRule="evenodd" d="M145.5 0C225.857 0 291 65.1426 291 145.5C291 225.857 225.857 291 145.5 291H19.3581C8.64385 291 0.000681982 282.358 0.000616442 271.644C0.000417939 239.193 1.50624e-09 174.523 0 145.5C0 65.1426 65.1426 5.2069e-06 145.5 0ZM145.501 29.1004C81.2147 29.1004 29.1004 81.2147 29.1004 145.501C29.1005 209.786 81.2147 261.9 145.501 261.9C209.786 261.9 261.9 209.786 261.9 145.501C261.9 81.2147 209.786 29.1004 145.501 29.1004Z"/><path d="M137.934 215.04L94.3119 100.247C92.9002 96.5317 96.5286 92.8895 100.219 94.3172L215.067 138.749C219.793 140.578 218.491 147.633 213.427 147.633H146.769V213.4C146.769 218.499 139.744 219.804 137.934 215.04Z"/></svg>;+}diff --git a/studio/src/motion/WorkspaceFrame.tsx b/studio/src/motion/WorkspaceFrame.tsxindex c450b8ef..4991be59 100644--- a/studio/src/motion/WorkspaceFrame.tsx+++ b/studio/src/motion/WorkspaceFrame.tsx@@ -1,3 +1,4 @@+import { OpenDesignMark } from './OpenDesignMark';import { createContext, useContext, useEffect, useState, useRef, useCallback, lazy, Suspense, type ReactNode } from 'react';import { useI18n } from '../i18n/I18n';import { ConnectionDialog } from './ConnectionDialog';@@ -107,7 +108,7 @@ function WorkspaceSidebar({ currentId, close }: { currentId?: string; close: ()return <aside className="motion-sidebar" aria-label={t('Workspace navigation')}><div className="motion-sidebar-brand"><button className="motion-brand" disabled={switchingDisabled} onClick={() => void workspace.home()} aria-label={t('OpenDesign home')} title={t('OpenDesign home')}>- <span className="motion-brand-mark"><MotionIcon name="layers" size={18} /></span><strong>OpenDesign</strong>+ <span className="motion-brand-mark"><OpenDesignMark /></span><strong>OpenDesign</strong></button><button className="motion-icon-button motion-sidebar-close" onClick={close} aria-label={t('Close conversation list')}><MotionIcon name="close" /></button></div>diff --git a/studio/src/player/components/CompositionThumbnail.test.ts b/studio/src/player/components/CompositionThumbnail.test.tsindex 2ca8f10c..56474194 100644--- a/studio/src/player/components/CompositionThumbnail.test.ts+++ b/studio/src/player/components/CompositionThumbnail.test.ts@@ -69,7 +69,7 @@ describe("buildCompositionThumbnailUrl", () => {origin: "http://localhost:3000",}),).toBe(- "http://localhost:3000/api/projects/demo/thumbnail/index.html?t=2.00&v=v3&revision=0&selector=.card&selectorIndex=2",+ "http://localhost:3000/api/projects/demo/thumbnail/index.html?t=2.00&v=v4&revision=0&selector=.card&selectorIndex=2",);});@@ -114,6 +114,23 @@ describe("CompositionThumbnail", () => {return probe;}+ it("requests source-resolution captures for selected elements", async () => {+ root = createRoot(host);+ await act(async () => {+ root!.render(React.createElement(CompositionThumbnail, {+ previewUrl: "/api/projects/demo/preview",+ label: "",+ labelColor: "#fff",+ selector: ".cursor",+ }));+ await new Promise((resolve) => setTimeout(resolve, 0));+ });+ expect(globalThis.fetch).toHaveBeenCalledWith(+ expect.stringMatching(/output=source.*selector=\.cursor/),+ expect.objectContaining({ signal: expect.any(AbortSignal) }),+ );+ });+it("renders visible tiles after the scheduled off-DOM probe loads", async () => {const probe = await renderThumbnail();diff --git a/studio/src/player/components/CompositionThumbnail.tsx b/studio/src/player/components/CompositionThumbnail.tsxindex fe7844a0..73efeca5 100644--- a/studio/src/player/components/CompositionThumbnail.tsx+++ b/studio/src/player/components/CompositionThumbnail.tsx@@ -28,7 +28,7 @@ interface CompositionThumbnailProps {rich?: boolean;}-const THUMBNAIL_URL_VERSION = "v3";+const THUMBNAIL_URL_VERSION = "v4";export const THUMBNAIL_SEEK_TIME_SECONDS = 3;export function resolveThumbnailSeekTime(durationSeconds: number | null | undefined): number {@@ -114,13 +114,15 @@ async function loadCompositionImage(url: string, signal: AbortSignal) {if (signal.aborted) throw new DOMException("Aborted", "AbortError");const objectUrl = URL.createObjectURL(blob);try {- const aspect = await probeImageAspect(objectUrl, signal);+ let decodedBytes = 0;+ const aspect = await probeImageAspect(objectUrl, signal, false, (width, height) => {+ decodedBytes = width * height * 4;+ });return {value: { kind: "image" as const, url: objectUrl, aspect },- weight:+ weight: decodedBytes ||TIMELINE_VIEWPORT_BUDGETS.posterMaxPhysicalWidth *- TIMELINE_VIEWPORT_BUDGETS.posterMaxPhysicalHeight *- 4,+ TIMELINE_VIEWPORT_BUDGETS.posterMaxPhysicalHeight * 4,dispose: () => URL.revokeObjectURL(objectUrl),};} catch (error) {@@ -151,6 +153,8 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({selector,selectorIndex,origin: window.location.origin,+ // Small element crops need source-resolution pixels before they are scaled down.+ output: selector ? "source" : undefined,contentRevision,});const request = useMemo(diff --git a/studio/src/player/components/PlayerControls.tsx b/studio/src/player/components/PlayerControls.tsxindex b29db799..1349ef88 100644--- a/studio/src/player/components/PlayerControls.tsx+++ b/studio/src/player/components/PlayerControls.tsx@@ -18,12 +18,8 @@ import { PreviewSeekBar } from "./PreviewSeekBar";gsap.registerPlugin(MorphSVGPlugin);-// Play glyph: the right-hand blade from the HyperFrames favicon (points right).-// Pause glyph: two bars centred in the same coordinate space so MorphSVG can-// tween one `d` into the other. Both shapes live in the favicon's 0-100 space-// and the svg viewBox frames the blade's bounding box.-const PLAY_BLADE_D =- "M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z";+// A centered, upright play triangle, sharing a coordinate space with pause.+const PLAY_BLADE_D = "M55 27L91 49.5L55 72Z";const PAUSE_BARS_D = "M56 28H67V71H56Z M73 28H84V71H73Z";// Morph the play blade <-> pause bars on toggle via GSAP MorphSVG. Both glyphsdiff --git a/studio/src/player/components/thumbnailUtils.ts b/studio/src/player/components/thumbnailUtils.tsindex bde62d41..6cee0117 100644--- a/studio/src/player/components/thumbnailUtils.ts+++ b/studio/src/player/components/thumbnailUtils.ts@@ -40,6 +40,7 @@ export function probeImageAspect(imageSrc: string,signal: AbortSignal,tolerateSvgError = false,+ onDimensions?: (width: number, height: number) => void,): Promise<number> {return new Promise((resolve, reject) => {const image = new Image();@@ -60,6 +61,7 @@ export function probeImageAspect(}image.onload = () => {+ onDimensions?.(image.naturalWidth, image.naturalHeight);cleanup();resolve(image.naturalWidth > 0 && image.naturalHeight > 0diff --git a/web/connect.html b/web/connect.htmlindex 99e6daf5..94c24739 100644--- a/web/connect.html+++ b/web/connect.html@@ -40,7 +40,7 @@<ol id="setup-steps" class="connect-steps" aria-label="从接入到创作"><li><span>01</span><div><h3>粘贴指令</h3><p>在 <span id="step-host">Codex</span> 新建对话。</p></div><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-copy" /></svg></li><li><span>02</span><div><h3>跟随提示连接</h3><p>由 Agent 完成配置与验证。</p></div><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-plug" /></svg></li>- <li><span>03</span><div><h3>选个模板,开始创作</h3><p>打开工程,继续自由编辑。</p></div><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-film" /></svg></li>+ <li><span>03</span><div><h3>选个模板,开始创作</h3><p>打开项目,继续自由编辑。</p></div><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-film" /></svg></li></ol><button class="connect-link connect-explore" data-scroll="templates">向下发现你的第一支作品 <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></button></section>@@ -53,21 +53,21 @@<div id="template-panel" role="tabpanel" aria-labelledby="template-tab-featured"><div id="template-grid" class="connect-template-grid" aria-label="可复刻模板"></div><div class="connect-template-more"><button id="more-templates" class="ui-button" hidden>浏览更多模板 <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button><span id="template-count" role="status">正在读取模板…</span></div></div></section><section class="connect-editing" id="how-it-works" aria-labelledby="editing-title">- <div class="connect-editing-copy"><span class="connect-kicker">YOUR VIDEO. STILL YOURS.</span><h2 id="editing-title">从第一稿,<br />到你满意的每一帧。</h2><p>第一稿只是开始。画面、文字与动效保留在同一个工程里。你可以自己调整,也可以继续用一句话修改。</p><div class="connect-editing-tools"><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-scissors" /></svg> 镜头剪辑</span><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-subtitles" /></svg> 字幕排版</span><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-sparkles" /></svg> 动态设计</span><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-image" /></svg> 素材替换</span></div><button class="ui-button" data-close-connect>回到创作工作区 <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button></div>+ <div class="connect-editing-copy"><span class="connect-kicker">YOUR VIDEO. STILL YOURS.</span><h2 id="editing-title">从第一稿,<br />到你满意的每一帧。</h2><p>第一稿只是开始。画面、文字与动效保留在同一个项目里。你可以自己调整,也可以继续用一句话修改。</p><div class="connect-editing-tools"><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-scissors" /></svg> 镜头剪辑</span><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-subtitles" /></svg> 字幕排版</span><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-sparkles" /></svg> 动态设计</span><span><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-image" /></svg> 素材替换</span></div><button class="ui-button" data-close-connect>回到创作工作区 <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button></div><div class="connect-editing-visual" aria-label="对话修改与分镜内容示意"><div class="connect-editing-caption"><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-message" /></svg> <span>继续对话,继续创作</span></div><div class="connect-edit-bubble">把第二个镜头缩短到 2 秒,字幕改成「即刻出发」。</div><div class="connect-timeline"><div class="connect-timeline-toolbar"><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-layers" /></svg> <strong>可编辑图层</strong><span>00:00 — 00:09</span></div><div class="connect-timeline-ruler"><span>00:00</span><span>00:03</span><span>00:06</span><span>00:09</span></div><div class="connect-timeline-track connect-timeline-track--video"><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-film" /></svg> <span>开场画面</span><span>产品细节</span><span>品牌收尾</span></div><div class="connect-timeline-track connect-timeline-track--text"><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-subtitles" /></svg> <span>让好产品,被看见。</span><span>即刻出发。</span></div><div class="connect-timeline-track connect-timeline-track--graphic"><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-sparkles" /></svg> <span>画面图形 · 色彩与节奏</span></div><div class="connect-timeline-playhead"></div></div><p><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-check" /></svg> 画面 · 字幕 · 动效,继续自由编辑</p></div></section>- <div class="connect-features"><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-message" /></svg><h3>用对话剪辑</h3><p>说出想改的地方,继续打磨每一个镜头。</p></article><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-sparkles" /></svg><h3>从模板到你的作品</h3><p>用现成的画面与动效起稿,再放入自己的内容。</p></article><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-layers" /></svg><h3>每个镜头,都能编辑</h3><p>画面、字幕与节奏保留在同一个可编辑工程。</p></article></div>+ <div class="connect-features"><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-message" /></svg><h3>用对话剪辑</h3><p>说出想改的地方,继续打磨每一个镜头。</p></article><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-sparkles" /></svg><h3>从模板到你的作品</h3><p>用现成的画面与动效起稿,再放入自己的内容。</p></article><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-layers" /></svg><h3>每个镜头,都能编辑</h3><p>画面、字幕与节奏保留在同一个可编辑项目。</p></article></div><section class="connect-compatibility" id="compatibility" aria-labelledby="compatibility-title"><div class="connect-section-heading"><span class="connect-kicker">ONE WORKSPACE. YOUR FAVORITE AGENT.</span><h2 id="compatibility-title">换个 Agent,创作继续。</h2><p>模板、素材和图层保存在同一个 OpenDesign 工作区。</p></div>- <div class="connect-comparison-scroll" tabindex="0" role="region" aria-label="Agent 接入方式对照"><table class="connect-comparison"><thead><tr><th scope="col">如何使用</th><th scope="col">Codex</th><th scope="col">Claude Code</th><th scope="col">DeepSeek Harness</th><th scope="col">其他 MCP 工具</th><th scope="col">ChatGPT</th></tr></thead><tbody><tr><th scope="row">接入方式</th><td>插件 / CLI / TOML</td><td>CLI / JSON</td><td>Harness YAML 插件</td><td>stdio JSON 配置</td><td>需远程 HTTPS MCP</td></tr><tr><th scope="row">当前工作区</th><td>本机接入</td><td>本机接入</td><td>本机接入</td><td>支持 stdio 的客户端</td><td>暂未提供远程服务</td></tr><tr><th scope="row">模板与分镜编辑</th><td>支持</td><td>支持</td><td>支持</td><td>支持</td><td>待远程服务接入</td></tr><tr><th scope="row">使用自己的素材</th><td colspan="4">在当前编辑器导入本机图片或视频,Agent 使用同一素材库</td><td>需远程工作区</td></tr><tr><th scope="row">查看与继续编辑</th><td colspan="4">打开返回的工程链接,继续编辑同一份作品</td><td>待远程服务接入</td></tr></tbody></table></div>+ <div class="connect-comparison-scroll" tabindex="0" role="region" aria-label="Agent 接入方式对照"><table class="connect-comparison"><thead><tr><th scope="col">如何使用</th><th scope="col">Codex</th><th scope="col">Claude Code</th><th scope="col">DeepSeek Harness</th><th scope="col">其他 MCP 工具</th><th scope="col">ChatGPT</th></tr></thead><tbody><tr><th scope="row">接入方式</th><td>插件 / CLI / TOML</td><td>CLI / JSON</td><td>Harness YAML 插件</td><td>stdio JSON 配置</td><td>需远程 HTTPS MCP</td></tr><tr><th scope="row">当前工作区</th><td>本机接入</td><td>本机接入</td><td>本机接入</td><td>支持 stdio 的客户端</td><td>暂未提供远程服务</td></tr><tr><th scope="row">模板与分镜编辑</th><td>支持</td><td>支持</td><td>支持</td><td>支持</td><td>待远程服务接入</td></tr><tr><th scope="row">使用自己的素材</th><td colspan="4">在当前编辑器导入本机图片或视频,Agent 使用同一素材库</td><td>需远程工作区</td></tr><tr><th scope="row">查看与继续编辑</th><td colspan="4">打开返回的项目链接,继续编辑同一份作品</td><td>待远程服务接入</td></tr></tbody></table></div><p class="connect-table-note">本地客户端使用相同的数据目录。预览是否内嵌由宿主决定;Hyperframes 在后台渲染视频与音轨。</p><div class="connect-paths"><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-plug" /></svg><h3>MCP 连接</h3><p>把创作工具交给你的 Agent,在对话中完成起稿、剪辑与修改。</p><button class="connect-link" data-scroll="setup">连接你的 Agent <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button></article><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-bot" /></svg><h3>Agent 使用指引</h3><p>接入步骤、模板内容和编辑流程都在指引里,让 Agent 自己读取。</p><button class="connect-link" data-open-guide>阅读指引 <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button></article><article><svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-code" /></svg><h3>API 与自动化</h3><p>从终端查询工作区,用 MCP 与 Skill 将视频创作接入自己的流程。</p><button class="connect-link" id="show-api">查看 API / Skill <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button></article></div></section><section class="connect-faq" aria-labelledby="faq-title"><div><span class="connect-kicker">A FEW THINGS TO KNOW</span><h2 id="faq-title">你可能想知道</h2><p>从连接到创作,都很简单。</p></div><div class="connect-faq-items"><details><summary>需要先准备素材或填写提示词吗? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>不需要。选一个模板,复制复刻指令发给 Agent,即可沿用模板的主题与内容开始。想换成自己的产品、照片或文案时,再补充即可。</p></details>- <details><summary>生成的视频还能继续编辑吗? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>可以。模板会成为可编辑工程,你可以调整镜头、文字、颜色与节奏,也可以继续让 Agent 修改。保存工程文件后,可带着素材继续创作。</p></details>+ <details><summary>生成的视频还能继续编辑吗? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>可以。模板会成为可编辑项目,你可以调整镜头、文字、颜色与节奏,也可以继续让 Agent 修改。保存项目文件后,可带着素材继续创作。</p></details><details><summary>已经连接过,还要重新接入吗? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>不需要。Agent 会优先复用指向当前工作区的连接。若找不到工具,可按宿主提示重新打开会话,或检查配置中的数据目录。</p><button class="ui-button ui-button--sm" data-scroll="manual-settings">检查连接设置</button></details>- <details><summary>需要一直打开这个弹框吗? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>不需要。连接后关闭弹框,继续在当前工程里编辑。导出时请保持编辑器在前台;本地服务需要继续运行。</p></details>+ <details><summary>需要一直打开这个弹框吗? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>不需要。连接后关闭弹框,继续在当前项目里编辑。导出时请保持编辑器在前台;本地服务需要继续运行。</p></details><details><summary>哪些 Agent 可以使用? <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-chevron-down" /></svg></summary><p>支持 Codex、Claude Code、DeepSeek Harness 和兼容 stdio MCP 的本机工具。ChatGPT 云端需要公开 HTTPS MCP 服务,当前版本尚未提供。选择客户端后,配置、下载文件和使用指引会同步切换。</p></details></div></section><section class="connect-final-cta"><div><span class="connect-kicker">LESS SETUP. MORE CREATING.</span><h2>下一支好视频,从一句话开始。</h2></div><button class="ui-button ui-button--primary" data-scroll="templates">选个模板试试 <svg class="ui-icon" aria-hidden="true"><use href="/web/design-system/icons.svg#icon-arrow-right" /></svg></button></section>diff --git a/web/connect.ts b/web/connect.tsindex f4418177..354fdf3f 100644--- a/web/connect.ts+++ b/web/connect.ts@@ -106,8 +106,8 @@ export function mountConnection(root: HTMLElement, options: { close: () => void;element<HTMLButtonElement>('copy-guide').onclick = event => { if (info) void copy(agentGuide(info, host), '接入指引', event.currentTarget as HTMLButtonElement); };const toolDescriptions: Record<string, string> = {- motion_open_preview: '打开本地编辑器,自动启动或复用预览服务。', motion_get_project: '读取工程、分镜、素材信息和版本号。',- motion_list_templates: '搜索完整模板目录,按分类、关键词和页码浏览。', motion_get_template: '读取选定模板的参考视频、源码、制作要求与工程格式。', motion_apply_template: '创建本地模板副本,保留原工程与素材。', motion_write_files: '写入原生 HTML、CSS 与 JS,编辑器同步更新。', motion_get_workflow: '读取制作、检查与交付流程。',+ motion_open_preview: '打开本地编辑器,自动启动或复用预览服务。', motion_get_project: '读取项目、分镜、素材信息和版本号。',+ motion_list_templates: '搜索完整模板目录,按分类、关键词和页码浏览。', motion_get_template: '读取选定模板的参考视频、源码、制作要求与项目格式。', motion_apply_template: '创建本地模板副本,保留原项目与素材。', motion_write_files: '写入原生 HTML、CSS 与 JS,编辑器同步更新。', motion_get_workflow: '读取制作、检查与交付流程。',motion_request_export: '请求导出当前版本的 MP4 视频。', motion_get_export: '查询导出进度,取得已完成视频的下载地址。',};async function checkConnection() {