You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e66c7d6
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cutline): send a clip, moment, marker or media reference to the chat (#99)
* feat(cutline): send a clip, moment, marker or media reference to the chat
Right-click a clip, an empty spot on a track, the ruler, a marker or a file
in the Project bin and choose "Send to chat". The Host shows its own
confirmation and appends a plain-text reference to the chat draft: clip,
track and media ids, timeline seconds and frame, the open sequence and
composition, and the project revision, so the Agent can act on "here"
without guessing.
- chat-context.js builds the reference from pure functions; labels follow
the interface language, ids, seconds and user text stay as stored, user
text is reduced to one bounded line and the whole text stays under 8,000
characters.
- Right-clicking a marker now opens "Edit marker..." / "Send marker to chat";
double-click still opens the editor.
- The items stay visible and disabled when the client has no message.append.
- Unit tests for the text and frame snapping at seven frame rates; a Chromium
test drives every menu with the Host bridge stubbed.
- Checked on MiniMax Code 3.1.9 for Windows. Version 0.2.0.
* fix(cutline): list referenced clips top to bottom and label the media id as "id"
"Clips here" and multi-clip references now follow the timeline's lane order
(V3, V2, V1, A1, A2...) instead of the order the clips were added. The editor
passes its live track order; without one, video lanes run from the highest
number down and audio lanes from A1 up. A clip's source line reads
"id m_..." instead of an untranslated "media m_...".
* test(cutline): retry an MCP request once when its reused socket was reset
fetch keeps an idle socket for 4 s and the server closes it after 5 s. When a
synchronous test step blocks the process long enough, both timers fire
together and the reused socket is reset before the request is read, which
made "the tool answers prepare, status and cancel" fail under full-suite
load. Only ECONNRESET / UND_ERR_SOCKET is retried, once.
Copy file name to clipboardExpand all lines: plugins/klarkxy/cutline/PATCHES.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Patches to the vendored FableCut source
2
2
3
+
## Send to chat
4
+
5
+
Right-click menus can hand the conversation a plain-text reference to what the user points at. The clip menu ends with **Send to chat** (the selection plus the right-clicked moment); an empty spot on a track and the ruler offer **Send this moment to chat**; the media menu offers **Send to chat** after Open in Source. A right-click on a marker now opens a two-item menu, **Edit marker…** and **Send marker to chat**; double-click still opens the editor directly. The new `miniapp/client/chat-context.js` (global `FableCutChat`, loaded before `app.js`) builds the text from pure functions: ids, track ids and timeline seconds as the MCP tools address them, timecode in the editor's own `MM:SS:FF`, frame numbers, the open sequence, the composition path and the project revision. User text is reduced to one bounded line, lists are capped and the whole reference stays under 8,000 characters. Labels go through `T()`; ids, seconds and user text do not. The page calls `window.mcode.miniapp.message.append`, which needs no manifest declaration and shows the Host's own confirmation; the items stay visible and disabled with a tooltip when the bridge is missing, and each rejection code gets its own toast. Thirty dictionary keys were added to both languages. `tests/chat-context.test.mjs` covers the text, frame snapping at seven frame rates, hostile names and the size budget; `tests/send-to-chat.test.mjs` drives every menu in Chromium with the bridge stubbed, a cancelled confirmation, Chinese labels and a client without the bridge.
6
+
3
7
## Compact monitor and localized menus
4
8
5
9
The monitor header keeps one row of tabs and icon controls. Canvas aspect, frame rate, export framing and resolution move into a keyboard-accessible popover; the original controls and stored values remain unchanged. Snap targets and sequence actions follow the selected language while user sequence names stay untouched and escaped. Playback controls wrap when the monitor is narrow, avoiding overlap with timecodes. Six browser tests cover menu localization, raw values, escaped names, popover operation and layout at five viewport widths.
Copy file name to clipboardExpand all lines: plugins/klarkxy/cutline/README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,10 @@ You can also ask in chat:
33
33
34
34
Manual and Agent-driven edits operate on the same project, so you can take over at any point.
35
35
36
+
### Point the Agent at a spot
37
+
38
+
Right-click a clip, an empty spot on a track, the ruler, a marker or a file in the Project bin and choose **Send to chat**. MiniMax Code asks you to confirm, then adds a short reference to the chat input: clip and media ids, tracks, timeline seconds and frame, the open sequence and composition, and the project revision. Type what you want changed after it and press Send. A clip reference also carries the moment you right-clicked, so "split here" or "the caption at this point" lands where you meant. The text stays in the draft until you send it, and you can edit it first.
39
+
36
40
## Choose an export method
37
41
38
42

@@ -54,6 +58,7 @@ Standalone export needs a local Chrome or Edge installation and uses the project
54
58
## Tested environment
55
59
56
60
- Target: MiniMax Code 3.1.2 or later. Installation, media import, timeline editing and standalone export were exercised on Windows 11 with Google Chrome, including a 180-second render.
61
+
-**Send to chat** was checked on MiniMax Code 3.1.9 for Windows: all five right-click entries appear, the Host shows its confirmation, and the confirmed reference lands in the chat draft with correct ids, times and frames at 24 fps. A Chromium browser test with the Host bridge stubbed covers the text for each menu, a cancelled confirmation, both interface languages and a client without the API.
57
62
- macOS, every effect combination and sustained long-form or high-resolution workloads remain on the validation roadmap. Current records cover the tested scenarios.
58
63
59
64
Run `npm test --prefix plugins/klarkxy/cutline` from the repository root for plugin tests, and `npm run check` for repository validation.
@@ -65,6 +70,7 @@ Run `npm test --prefix plugins/klarkxy/cutline` from the repository root for plu
65
70
-**Network:** the editor and MCP endpoint use the Host-assigned local address. HTTPS imports contact the supplied URL; optional font loading contacts `fonts.googleapis.com` and `fonts.gstatic.com`, and optional background removal contacts `cdn.jsdelivr.net`. Standalone export is isolated from the external network.
66
71
-**Processes:** media operations invoke `ffmpeg` and `ffprobe`; the Agent starts and manages Node plus Chrome or Edge for standalone export.
67
72
-**Agent turns and conversations:** Agent turns start from your chat. The plugin exposes MCP tools, leaves `agentAccess` undeclared and does not read conversation content or other sessions. All conversations use the same open project.
73
+
-**Chat input:****Send to chat** calls the page API `message.append`, which needs no declaration. Each use shows the Host's confirmation with the exact text; after you confirm, the text joins the unsent draft of the conversation the Mini App is open in. The reference holds ids, times, track names, media file names, clip names, the first line of a title, marker labels and the project name. The page sends nothing on its own and reads no chat history. On a client without the API the menu items stay visible and disabled.
68
74
-**Host data and devices:** Host configuration, credentials, private logs, session databases and the microphone sit outside the plugin's access.
-**对话输入框:****发送到对话** 调用页面 API `message.append`,该 API 无需声明。每次使用都会弹出 Host 自己的确认框并显示完整文字;确认后文字追加到 Mini App 所在对话的未发送草稿。引用内容包括 id、时间、轨道名、素材文件名、片段名、字幕首行、标记名和工程名。页面不会自行发送消息,也不读取聊天记录。客户端不支持该 API 时,菜单项保持可见并置灰。
0 commit comments