Skip to content

MCP 新增命令:跨轨道移动、复制片段、保存/切换工程、导出剪映草稿 - #82

Open
devin-ai-integration[bot] wants to merge 4 commits into
devin/1796488006-timeline-markersfrom
devin/1796488522-mcp-commands
Open

devin-ai-integration[bot] wants to merge 4 commits into
devin/1796488006-timeline-markersfrom
devin/1796488522-mcp-commands

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

补全 MCP 命令,AI 可以重排片段、管理工程、导出剪映草稿。叠在 #81 上。

命令 说明
move_clip({ clipId, line | newLine, start? }) 移到另一条同类型、未锁定、放得下的轨道,或新建一条轨道(画面放在原轨道上面,音频放在下面)。原轨道空了就删掉(主轨保留)
copy_clips({ clipIds, start? }) 复用 trackState.insertCopies(新导出),和界面上的复制/粘贴一样,保持片段之间的相对时间和上下层次;默认接在最后一个源片段后面
list_projects / save_project({ name? }) save_project 调用新增的 projectState.save(),也就是自动保存用的那个 flush
create_project / open_project 会刷新页面,所以 switchTo(id, { deferReload: true }) 先返回结果,300ms 后再刷新;刷新前后续命令直接报错,编辑器重连后再调用
export_jianying({ draftRoot? }) 和菜单里的导出共用新的 buildCurrentJianyingDraft()(src/utils/jianyingExport.ts),zip 在浏览器里下载;draftRoot 默认用上次填的草稿位置

export_video 和 export_jianying 都改用 downloadBlob() 下载。

测试:新增 MCP e2e,覆盖复制、移到新轨道和已有轨道(重叠和类型不符时报错)、导出剪映草稿、保存/新建/切换工程,以及重连后时间轴恢复。

Link to Devin session: https://app.devin.ai/sessions/a882af08b80c444280600c6cdc988c2e
Open in Devin Desktop: https://app.devin.ai/desktop/session/a882af08b80c444280600c6cdc988c2e?variant=devin
Requested by: @x007xyz


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

@vercel

vercel Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fly-cut Ready Ready Preview Dec 5, 2026 4:52pm UTC

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 findings. Devin automatically fixed all 3 findings.

Fixed by Devin (3)
  • Redo drops clips moved to new tracks — move_clip re-reads the inserted track from the reactive trackList before pushing, so history sees the insertion.
  • Queued edits reach the outgoing project — switchingProject is now checked when the queued command's turn comes.
  • Failed project saves report success — Autosave records projectState.saveError and clears the saved snapshot on failure; save() throws when the write failed, and the next save retries.

View findings in Devin Review · Follow Devin's work

Devin Review

devin-ai-integration Bot and others added 4 commits December 5, 2026 16:50
…ianYing drafts

Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>

This branch was successfully deployed

1 active deployment
Preview — 300e4640 Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant