dsh-metaontic-video 4.0.10 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/MetaOnticVideo/344/275/277/347/224/250/350/257/264/346/230/216/344/271/246.md +14 -4
- package/MetaOnticVideo/344/275/277/347/224/250/350/257/264/346/230/216/344/271/246.pdf +0 -0
- package/README.en.md +9 -1
- package/client.js +186 -48
- package/index.js +2807 -2445
- package/locale/zh.json +1 -1
- package/package.json +12 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
按版本倒序记录更新。较新版本沿用包内更新说明,早期版本依据 Git 标签与提交记录整理;日期为版本提交日期。标签存在不代表 npm 已发布。
|
|
4
4
|
|
|
5
|
+
## v4.1.0
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
|
|
9
|
+
- 逐章创作与断点恢复、独立文本复审和六维内容审核。
|
|
10
|
+
|
|
11
|
+
### 优化
|
|
12
|
+
|
|
13
|
+
- 剧本与分镜一致性、局部改稿与上下文效率;优先检测中国镜像更新并兼顾仓库新版。
|
|
14
|
+
|
|
15
|
+
## v4.0.11
|
|
16
|
+
|
|
17
|
+
### 新增
|
|
18
|
+
|
|
19
|
+
- 侧栏视频创作助手显示开关,默认开启。
|
|
20
|
+
|
|
21
|
+
### 优化
|
|
22
|
+
|
|
23
|
+
- 设置分组与间距,统一滑动开关,画面与声音移入更多设置。
|
|
24
|
+
|
|
5
25
|
## v4.0.10
|
|
6
26
|
|
|
7
27
|
### 优化
|
|
@@ -191,7 +191,7 @@ API密钥只填写在插件密钥输入框内,不要放进脚本或发到聊
|
|
|
191
191
|
- **开始创作**:「新建视频创作会话」等同于新建会话后切到「视频创作助手」模式,直接开始;「打开插件设置」跳到设置页改接入方式与 API密钥;「使用说明」打开在线说明页。
|
|
192
192
|
- **使用流程**:说清创意 → 脚本分镜 → 逐段生成 → 本机合并。四步会依次点亮,只是操作顺序的演示,不需要在这里操作。
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
在插件设置的「界面显示」中,可开启或关闭「显示左侧视频创作助手」,默认开启,保存后立即生效。关闭后仍可从宿主插件管理打开设置并重新开启,已有会话和视频任务不受影响。入口开启却未出现时,先确认插件已启用;仅宿主明确提示时才重启。
|
|
195
195
|
|
|
196
196
|
### 第一次生成视频
|
|
197
197
|
|
|
@@ -267,7 +267,7 @@ Windows 与 Mac 的更新入口相同。`.tgz` 成品安装或仓库安装可使
|
|
|
267
267
|
|
|
268
268
|
插件查到更高的正式版本时,左侧栏「视频创作助手」最后一个字的右上角会亮起一个小红点(侧栏收起时,红点落在图标角上)。点这一行打开面板,面板顶部就是同一个更新入口,同样是「立即更新」→「确认更新到 vX.Y.Z」两步,确认后才安装;点「稍后再说」只压住这一版,出下一版还会提示。
|
|
269
269
|
|
|
270
|
-
|
|
270
|
+
检查更新优先查询中国镜像源,同时检测 Gitee 和 GitHub 的正式版本;镜像同步延迟不会遮蔽仓库上的新版。确认更新后优先使用已核对目标版本的中国镜像包,镜像尚未同步或不可用时使用仓库成品包。在线更新需要能访问相应下载地址,使用对应版本 `.tgz` 成品包,不依赖 Git 拉取。下载失败时先保留现有插件和配置,核对网络后再处理,不要通过重置来解决下载问题。
|
|
271
271
|
|
|
272
272
|
插件详情底部的版本卡片提供“检查更新”。发现更高的正式版本后,点击更新并再次确认才安装。请等正在生成的视频结束后再更新,配置及已生成文件会保留,不需要先卸载。当前不提供版本选择或降级;在线安装使用对应版本成品包,当前版本不需要授权 esbuild 等构建工具的安装脚本。
|
|
273
273
|
|
|
@@ -307,9 +307,9 @@ Windows 与 Mac 的更新入口相同。`.tgz` 成品安装或仓库安装可使
|
|
|
307
307
|
|
|
308
308
|
排查处理缓慢时,可查看 `~/.dsh/logs/metaontic-video/日期/requests.jsonl` 中的阶段耗时;设置了 `DSH_HOME` 时日志位于该目录下。插件会记录调用、生成等待、下载、合并和费用查询耗时;脚本设计、示意图与等待用户确认由助手标记开始和结束,其中脚本保存为 `script.md` 时插件会自动结束脚本设计这一段,并另记一条 `script_saved`(文件名、新建或改写、字数与脚本版本)。这些是流程耗时,并非模型纯推理时间;只有开始记录时表示该阶段未完整结束。写脚本、画分镜本身是助手和模型在做事,不属于插件耗时。日志不包含密钥或完整提示词。日志按天保存,保留30天,历史日志总量达到50MB时清理最旧记录;单日达到5MB后停止追加。日志仅保留文件名,不保留完整用户路径。可请助手读取 `video_config`,查看 `logging` 中的写入失败、丢弃计数和最近写入时间;日志异常不会重新提交生成任务。Windows 默认目录为 `%USERPROFILE%\.dsh\logs\metaontic-video`。
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
设置页按生成参数、更多设置、界面显示分组。生成参数集中配置接入与密钥、模型;画面比例和声音开关移至更多设置,在宽窗口并排显示,窄窗口上下排列。API密钥在模型配置中填写,重置入口位于设置页底部。
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
所有布尔设置使用滑动开关,点击后保存生效。“更多设置”展开后分为画面与声音、画面、视频合并、查询与等待、本地工具、使用统计六组;本地工具路径单独占一行,便于查看和填写完整路径。
|
|
313
313
|
|
|
314
314
|

|
|
315
315
|
|
|
@@ -406,6 +406,16 @@ its lockfile entry has no "integrity" field, so pnpm cannot verify the downloade
|
|
|
406
406
|
|
|
407
407
|
专业创作审核完成后,可要求助手编译制作计划。60分钟以内的项目会按当前视频模型分段并关联制作项目;仍需选择角色图路线、审核制作材料和确认调用费用。创作改稿后须重新编译,不沿用旧版制作计划。全片时长上限为60分钟,每段仍遵守模型上限并逐段确认。
|
|
408
408
|
|
|
409
|
+
### 剧本、长片与独立复审
|
|
410
|
+
|
|
411
|
+
新专业项目的可读剧本根据场次、动作顺序和对白统一生成。要求修改一句对白或一场戏时,只调整相关内容,再确认修改后的剧本;不会另维护一份容易与分镜矛盾的正文。
|
|
412
|
+
|
|
413
|
+
10分钟以上作品先安排章节时长,再逐章写剧本、设计镜头和提示词。可以中断后继续未完成章节;修改前章时,受影响的后章需要更新。各章汇总后再确认完整剧本,部分完成不会显示为全片完成。
|
|
414
|
+
|
|
415
|
+
提示词完成后,助手会请求执行独立文本审核:它读取当前版本材料,不带创作聊天或作者自评,按主题、因果、人物、对白、画面细节和结尾核查依据。使用当前文本模型,调用按渠道计费,确认框会说明预计请求次数;不确认就保留材料,不发起文本请求。大型项目可能分章审核,已保存的审核结果可复用。文本审核通过不代表实际视频已经验收,视频费用与生成结果仍单独确认。
|
|
416
|
+
|
|
417
|
+
更换接入地址或目标模型后,助手会重新核对人物场景、分镜和提示词的适配。显示“适配器声明”不代表渠道已实测;真实成功样本只说明对应任务,不保证其他规格或最终效果。
|
|
418
|
+
|
|
409
419
|
### 指定局部修改
|
|
410
420
|
|
|
411
421
|
可以直接提出“只改这句对白”“调整第三个镜头的运镜”“给这个角色换装”“核查这段旁白的事实”或“适配另一模型”。助手会按请求选择编剧、分镜、人物、审核或提示词职责,保留未要求修改的内容;对象不明确时先请你确认。修改仍遵守当前项目审核流程,专业建议不代表已生成视频。
|
|
Binary file
|
package/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img src="
|
|
1
|
+
<img src="https://video.mybfs.cn/promo/share-logo.png" width="160" alt="MetaOnticVideo" />
|
|
2
2
|
|
|
3
3
|
# dsh-metaontic-video · AI Video Creation Plugin
|
|
4
4
|
|
|
@@ -13,6 +13,14 @@ MetaOnticVideo is a DeepSeek Harness (DSH) AI video generation plugin for **begi
|
|
|
13
13
|
|
|
14
14
|
Image and video generation is billed by your provider, with cost confirmation before generation.
|
|
15
15
|
|
|
16
|
+
## China mirror installation
|
|
17
|
+
|
|
18
|
+
In Harness → Plugins → Add plugin, select the China mirror and enter the package name:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
dsh-metaontic-video
|
|
22
|
+
```
|
|
23
|
+
|
|
16
24
|
## Online installation
|
|
17
25
|
|
|
18
26
|
Paste a link into Harness → Plugins → Add plugin. Windows and macOS use the same package.
|
package/client.js
CHANGED
|
@@ -37,6 +37,57 @@
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// src/ui/components/configured-entries.ts
|
|
41
|
+
function followConfiguredEntries(form, key, registrations, defaultEnabled = !0) {
|
|
42
|
+
let active = !1, disposed = !1, known = defaultEnabled, cleanups = [], close = () => {
|
|
43
|
+
let pending = cleanups;
|
|
44
|
+
cleanups = [], active = !1;
|
|
45
|
+
for (let off of pending.reverse())
|
|
46
|
+
try {
|
|
47
|
+
off();
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
}, sync = () => {
|
|
51
|
+
if (!disposed) {
|
|
52
|
+
try {
|
|
53
|
+
let value = form?.getSnapshot?.()?.value?.[key];
|
|
54
|
+
known = value === void 0 ? defaultEnabled : value === !0;
|
|
55
|
+
} catch {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (known !== active) {
|
|
59
|
+
if (!known) {
|
|
60
|
+
close();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
for (let register of registrations) {
|
|
65
|
+
let off = register();
|
|
66
|
+
typeof off == "function" && cleanups.push(off);
|
|
67
|
+
}
|
|
68
|
+
active = !0;
|
|
69
|
+
} catch (error) {
|
|
70
|
+
throw close(), error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
sync();
|
|
76
|
+
let unsubscribe;
|
|
77
|
+
try {
|
|
78
|
+
unsubscribe = form?.subscribe?.(sync);
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
return () => {
|
|
82
|
+
disposed = !0;
|
|
83
|
+
try {
|
|
84
|
+
typeof unsubscribe == "function" && unsubscribe();
|
|
85
|
+
} finally {
|
|
86
|
+
close();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
40
91
|
// src/shared/constants/plugin.ts
|
|
41
92
|
var PLUGIN_ID = "metaontic-video", PLUGIN_PACKAGE = "dsh-metaontic-video", PLUGIN_NAMESPACE = PLUGIN_ID;
|
|
42
93
|
var PANEL_ID = PLUGIN_ID, FLOW_CANVAS_AVAILABLE = !1, CANVAS_PANEL_ID = `${PLUGIN_ID}-canvas`, GUIDE_URL = "https://ai.mybfs.cn";
|
|
@@ -344,6 +395,8 @@
|
|
|
344
395
|
.mov-page { display: flex; flex-direction: column; gap: 16px; padding: 0; color: ${TOKENS.text}; }
|
|
345
396
|
/* 分组卡片:16 个字段摊在一格里太糊,按用途各装一张卡 */
|
|
346
397
|
.mov-section { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 16px; border-radius: 12px; border: 1px solid ${TOKENS.border}; background: ${TOKENS.cardFill}; }
|
|
398
|
+
.mov-interface .mov-grid { grid-template-columns: minmax(0, 1fr); }
|
|
399
|
+
.mov-model-card { background: ${TOKENS.cardFill}; }
|
|
347
400
|
.mov-advanced { display: block; }
|
|
348
401
|
.mov-advanced-toggle { cursor: pointer; font-size: 13px; font-weight: 600; color: ${TOKENS.text}; }
|
|
349
402
|
.mov-advanced-toggle .mov-hint { display: block; margin: 5px 0 0 16px; font-weight: 400; }
|
|
@@ -357,7 +410,6 @@
|
|
|
357
410
|
.mov-advanced-tools .mov-grid { grid-template-columns: minmax(0, 1fr); }
|
|
358
411
|
.mov-advanced-tools .mov-label { min-height: 0; }
|
|
359
412
|
.mov-advanced-group[data-group="advancedPicture"] .mov-grid { grid-template-columns: minmax(0, 1fr); }
|
|
360
|
-
.mov-advanced-group[data-group="advancedPicture"] .mov-switch { justify-content: space-between; flex-direction: row-reverse; }
|
|
361
413
|
|
|
362
414
|
@container (max-width: 480px) { .mov-advanced-body .mov-grid { grid-template-columns: minmax(0, 1fr); } .mov-advanced-group .mov-label { min-height: 0; } }
|
|
363
415
|
.mov-advanced { container-type: inline-size; }
|
|
@@ -366,8 +418,8 @@
|
|
|
366
418
|
.mov-section-title::before { content: ""; flex: 0 0 auto; width: 3px; height: 13px; border-radius: 2px; background: ${TOKENS.primaryFill}; }
|
|
367
419
|
.mov-section-title::after { content: ""; flex: 1 1 auto; height: 1px; background: ${TOKENS.border}; }
|
|
368
420
|
/* 两列自适应:单列至少 240px,窄面板自动落成一列 */
|
|
369
|
-
.mov-parameter-group { container-type: inline-size; display: flex; flex-direction: column; gap:
|
|
370
|
-
.mov-parameter-group + .mov-parameter-group { border-top: 1px solid ${TOKENS.border}; padding-top:
|
|
421
|
+
.mov-parameter-group { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
422
|
+
.mov-parameter-group + .mov-parameter-group { border-top: 1px solid ${TOKENS.border}; padding-top: 12px; }
|
|
371
423
|
.mov-parameter-heading { font-size: 12px; font-weight: 600; color: ${TOKENS.muted}; }
|
|
372
424
|
.mov-parameter-group .mov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
|
|
373
425
|
@container (max-width: 480px) { .mov-parameter-group .mov-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
@@ -384,15 +436,15 @@
|
|
|
384
436
|
.mov-av-card { display: flex; flex-direction: column; min-width: 0; padding: 12px; gap: 8px; border: 1px solid ${TOKENS.border}; border-radius: 10px; background: ${TOKENS.cardFill}; }
|
|
385
437
|
.mov-av-card > .mov-label { margin-bottom: -2px; }
|
|
386
438
|
.mov-av-card .mov-hint { margin-top: auto; }
|
|
387
|
-
.mov-
|
|
388
|
-
.mov-
|
|
389
|
-
.mov-
|
|
390
|
-
.mov-
|
|
391
|
-
.mov-
|
|
392
|
-
.mov-
|
|
393
|
-
.mov-
|
|
439
|
+
.mov-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 0; border: 0; background: transparent; font-size: 13px; color: ${TOKENS.text}; cursor: pointer; }
|
|
440
|
+
.mov-switch span { order: 0; }
|
|
441
|
+
.mov-switch input { appearance: none; cursor: pointer; order: 1; flex: 0 0 36px; width: 36px; height: 20px; box-sizing: border-box; padding: 2px; margin: 0; border: 0; border-radius: 999px; background: var(--dsw-alias-border-l3, #8884); position: relative; }
|
|
442
|
+
.mov-switch input::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--dsw-alias-switch-thumb, #fff); transition: transform .12s ease; }
|
|
443
|
+
.mov-switch input:checked { background: var(--dsw-alias-brand-primary, #247bbf); }
|
|
444
|
+
.mov-switch input:checked::after { transform: translateX(16px); background: var(--dsw-alias-label-primary-foreground, #fff); }
|
|
445
|
+
.mov-switch input:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #247bbf)); outline-offset: 2px; }
|
|
394
446
|
@container (max-width: 480px) { .mov-av-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
395
|
-
@media (prefers-reduced-motion: reduce) { .mov-
|
|
447
|
+
@media (prefers-reduced-motion: reduce) { .mov-switch input, .mov-switch input::after { transition: none; } }
|
|
396
448
|
|
|
397
449
|
/* 开关没有标签行,靠底对齐才能跟旁边输入框的控制线齐平 */
|
|
398
450
|
.mov-field-switch { justify-content: flex-end; }
|
|
@@ -408,10 +460,6 @@
|
|
|
408
460
|
.mov-input:focus, .mov-input:focus-visible { outline: none; border-color: ${TOKENS.primaryFill}; box-shadow: 0 0 0 3px rgba(36, 123, 191, .18); }
|
|
409
461
|
/* 模型 ID 与可执行文件路径很长:等宽字体 + 省略,不把整行撑变形 */
|
|
410
462
|
.mov-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
|
|
411
|
-
/* 开关做成跟输入框同高的小方块,和周围控件一条线 */
|
|
412
|
-
.mov-switch { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 36px; box-sizing: border-box; border: 1px solid ${TOKENS.border}; border-radius: 8px; background: ${TOKENS.controlFill}; font-size: 13px; color: ${TOKENS.text}; cursor: pointer; }
|
|
413
|
-
.mov-switch:hover { border-color: ${TOKENS.primaryFill}; }
|
|
414
|
-
.mov-switch input { width: 15px; height: 15px; accent-color: ${TOKENS.primaryFill}; cursor: pointer; }
|
|
415
463
|
.mov-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid ${TOKENS.border}; background: ${TOKENS.cardFill}; }
|
|
416
464
|
.mov-current-version { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 120px; }
|
|
417
465
|
.mov-update-bell { display: inline-flex; flex: 0 0 auto; color: ${TOKENS.primaryFill}; transform-origin: 50% 10%; animation: mov-bell-swing 1.6s ease-in-out infinite; }
|
|
@@ -629,9 +677,11 @@
|
|
|
629
677
|
}, SECTIONS = [
|
|
630
678
|
{ key: "sectionConnection", fields: ["connectionMode"] },
|
|
631
679
|
{ key: "sectionModels", fields: ["imageUseVideoKey", "model", "metaonticApiKey", "volcengineApiKey", "imageModel", "imageApiKey", "textModel", "textApiKey"] },
|
|
680
|
+
{ key: "sectionInterface", fields: ["sidebarAssistantEnabled"] },
|
|
632
681
|
{ key: "sectionVideo", fields: ["ratio", "generateAudio"] },
|
|
633
682
|
...FLOW_CANVAS_AVAILABLE ? [{ key: "sectionCanvas", fields: ["canvasEnabled", "autoCreateCanvas"] }] : []
|
|
634
683
|
], FIELD_BY_KEY = Object.fromEntries([
|
|
684
|
+
{ key: "sidebarAssistantEnabled", kind: "switch", wide: !0 },
|
|
635
685
|
{ key: "connectionMode", kind: "select", wide: !0 },
|
|
636
686
|
{ key: "metaonticApiKey", kind: "text", secret: !0, wide: !0 },
|
|
637
687
|
{ key: "volcengineApiKey", kind: "text", secret: !0, wide: !0 },
|
|
@@ -657,6 +707,7 @@
|
|
|
657
707
|
{ key: "ffmpegBinary", kind: "text", mono: !0 },
|
|
658
708
|
{ key: "ffprobeBinary", kind: "text", mono: !0 }
|
|
659
709
|
].map((field) => [field.key, field])), PLUGIN_OWNED_KEYS = [
|
|
710
|
+
"sidebarAssistantEnabled",
|
|
660
711
|
"canvasEnabled",
|
|
661
712
|
"autoCreateCanvas",
|
|
662
713
|
"usageStatsEnabled",
|
|
@@ -843,6 +894,9 @@
|
|
|
843
894
|
sectionGeneration: "生成参数",
|
|
844
895
|
sectionConnection: "接入与 API密钥",
|
|
845
896
|
sectionVideo: "画面与声音",
|
|
897
|
+
sectionInterface: "界面显示",
|
|
898
|
+
sidebarAssistantEnabled: "显示左侧视频创作助手",
|
|
899
|
+
sidebarAssistantEnabledHint: "默认开启。保存后立即显示或隐藏左侧入口;已有会话、视频任务和插件设置入口保留。",
|
|
846
900
|
sectionCanvas: "流程画布",
|
|
847
901
|
canvasPanelLabel: "MetaOnticVideo流程画布",
|
|
848
902
|
canvasEnabled: "流程画布",
|
|
@@ -1026,6 +1080,9 @@
|
|
|
1026
1080
|
sectionGeneration: "Generation",
|
|
1027
1081
|
sectionConnection: "Connection & credentials",
|
|
1028
1082
|
sectionVideo: "Picture & audio",
|
|
1083
|
+
sectionInterface: "Interface",
|
|
1084
|
+
sidebarAssistantEnabled: "Show video assistant in sidebar",
|
|
1085
|
+
sidebarAssistantEnabledHint: "On by default. Saving shows or hides the sidebar entry immediately. Existing conversations, video tasks and plugin settings remain available.",
|
|
1029
1086
|
sectionCanvas: "Workflow canvas",
|
|
1030
1087
|
canvasPanelLabel: "MetaOnticVideo workflow canvas",
|
|
1031
1088
|
canvasEnabled: "Workflow canvas",
|
|
@@ -1174,7 +1231,7 @@
|
|
|
1174
1231
|
|
|
1175
1232
|
// src/ui/updates/update.service.ts
|
|
1176
1233
|
function createUpdates({ h, fetchSource }) {
|
|
1177
|
-
let PLUGIN_VERSION = "4.0
|
|
1234
|
+
let PLUGIN_VERSION = "4.1.0".trim().replace(/^v/i, "");
|
|
1178
1235
|
function isNewerVersion(remote, local) {
|
|
1179
1236
|
let parse = (text) => {
|
|
1180
1237
|
let m = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.exec(String(text || ""));
|
|
@@ -1218,22 +1275,31 @@
|
|
|
1218
1275
|
timer && window.clearTimeout(timer);
|
|
1219
1276
|
}
|
|
1220
1277
|
}
|
|
1278
|
+
async function fetchMirrorRelease(version) {
|
|
1279
|
+
let target = version || "latest";
|
|
1280
|
+
if (version && !/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(version)) throw new Error("invalid stable version");
|
|
1281
|
+
let data = await (await (fetchSource || fetchUpdateSource)(`https://registry.npmmirror.com/${PLUGIN_PACKAGE}/${target}`, 6e3)).json(), actual = String(data?.version || "");
|
|
1282
|
+
if (data?.name !== PLUGIN_PACKAGE || !/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(actual) || version && actual !== version || data.stub || !data.dsh?.bundle?.patch || data.releaseNotes?.prerelease === !0) throw new Error("invalid mirror release");
|
|
1283
|
+
let expected = `https://registry.npmmirror.com/${PLUGIN_PACKAGE}/-/${PLUGIN_PACKAGE}-${actual}.tgz`;
|
|
1284
|
+
if (data.dist?.tarball !== expected || !/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(data.dist?.integrity || "")) throw new Error("invalid mirror archive");
|
|
1285
|
+
return { version: actual, url: expected };
|
|
1286
|
+
}
|
|
1221
1287
|
async function fetchRecentVersions() {
|
|
1222
1288
|
let urls = [
|
|
1223
1289
|
`${GITEE.api}/releases?per_page=100`,
|
|
1224
1290
|
`${GITHUB.api}/releases?per_page=100`
|
|
1225
|
-
], results = await Promise.allSettled(urls.map(async (url) => {
|
|
1291
|
+
], results = await Promise.allSettled([fetchMirrorRelease().then((release) => [release.version]), ...urls.map(async (url) => {
|
|
1226
1292
|
let body = await (await (fetchSource || fetchUpdateSource)(url, 6e3)).json();
|
|
1227
1293
|
if (!Array.isArray(body)) throw new Error("invalid releases");
|
|
1228
1294
|
return body.filter((r) => !r.draft && !r.prerelease).map((r) => String(r.tag_name || "").replace(/^v/, "")).filter((version) => /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(version));
|
|
1229
|
-
})), versions = [...new Set(results.flatMap((r) => r.status === "fulfilled" ? r.value : []))].sort((a, b) => isNewerVersion(a, b) ? -1 : isNewerVersion(b, a) ? 1 : 0).slice(0, 3);
|
|
1295
|
+
})]), versions = [...new Set(results.flatMap((r) => r.status === "fulfilled" ? r.value : []))].sort((a, b) => isNewerVersion(a, b) ? -1 : isNewerVersion(b, a) ? 1 : 0).slice(0, 3);
|
|
1230
1296
|
if (!versions.length) throw new Error("no published stable releases available");
|
|
1231
1297
|
return versions;
|
|
1232
1298
|
}
|
|
1233
1299
|
async function fetchLatestVersion() {
|
|
1234
1300
|
return (await fetchRecentVersions())[0];
|
|
1235
1301
|
}
|
|
1236
|
-
return { PLUGIN_VERSION, UPDATE_CACHE_KEY, UPDATE_MAX_AGE_MS, fetchLatestVersion, fetchRecentVersions, PLUGIN_PACKAGE, UPDATE_SPEC, UPDATE_ATTEMPTS, isNewerVersion, updateBell };
|
|
1302
|
+
return { PLUGIN_VERSION, UPDATE_CACHE_KEY, UPDATE_MAX_AGE_MS, fetchLatestVersion, fetchRecentVersions, fetchMirrorRelease, PLUGIN_PACKAGE, UPDATE_SPEC, UPDATE_ATTEMPTS, isNewerVersion, updateBell };
|
|
1237
1303
|
}
|
|
1238
1304
|
function createUpdateActions(context) {
|
|
1239
1305
|
function readUpdateCache() {
|
|
@@ -1318,7 +1384,13 @@
|
|
|
1318
1384
|
context.setUpdateStatus("failed"), context.setUpdateMessage(context.t("versionCheckFirst"));
|
|
1319
1385
|
return;
|
|
1320
1386
|
}
|
|
1387
|
+
let mirror = null;
|
|
1388
|
+
try {
|
|
1389
|
+
mirror = await context.fetchMirrorRelease?.(context.updateLatest);
|
|
1390
|
+
} catch {
|
|
1391
|
+
}
|
|
1321
1392
|
let candidates = [
|
|
1393
|
+
...mirror ? [mirror.url] : [],
|
|
1322
1394
|
releaseDownloadUrl(context.updateLatest, "gitee"),
|
|
1323
1395
|
releaseDownloadUrl(context.updateLatest, "github")
|
|
1324
1396
|
], specUnresolvable = (text) => /Could not resolve|No matching version|ERR_PNPM_NO_MATCHING_VERSION|ERR_PNPM_FETCH_40[34]|HTTP[ :]+40[34]|404 Not Found|403 Forbidden/i.test(text), trySpec = async (spec) => {
|
|
@@ -1341,7 +1413,7 @@
|
|
|
1341
1413
|
context.setUpdateMessage(context.t("versionUpdateRetry", { attempt: round + 1, total: context.UPDATE_ATTEMPTS })), await new Promise((resolve) => window.setTimeout(resolve, round * 1200));
|
|
1342
1414
|
continue;
|
|
1343
1415
|
}
|
|
1344
|
-
return { failure: text, next: !transient && specUnresolvable(text) };
|
|
1416
|
+
return { failure: text, next: mirror?.url === spec && transient || !transient && specUnresolvable(text) };
|
|
1345
1417
|
}
|
|
1346
1418
|
return { failure: "unknown" };
|
|
1347
1419
|
}, outcome = null, failure = "";
|
|
@@ -1477,12 +1549,13 @@
|
|
|
1477
1549
|
}
|
|
1478
1550
|
}
|
|
1479
1551
|
function control(field) {
|
|
1480
|
-
let { draft, value, h, SELECTS, inputStyle, t, snapshot, visibleKey, setVisibleKey, edit, optionLabel } = context, current = field.key === "textModel" && !String(draft[field.key] ?? value[field.key] ?? "").trim() ? (SELECTS.textModel || [])[0] : draft[field.key] !== void 0 ? draft[field.key] : value[field.key] ?? (["imageUseVideoKey", "usageStatsEnabled", "autoCreateCanvas"].includes(field.key) ? !0 : field.key === "canvasEnabled" ? !1 : field.key === "pollIntervalMs" ? 5e3 : field.key === "maxWaitMs" ? 6e5 : void 0), secondsField = field.key === "pollIntervalMs" || field.key === "maxWaitMs", displayed = secondsField && current !== void 0 && current !== "" ? Number(current) / 1e3 : current, id = `metaontic-video-${field.key}`;
|
|
1552
|
+
let { draft, value, h, SELECTS, inputStyle, t, snapshot, visibleKey, setVisibleKey, edit, optionLabel } = context, current = field.key === "textModel" && !String(draft[field.key] ?? value[field.key] ?? "").trim() ? (SELECTS.textModel || [])[0] : draft[field.key] !== void 0 ? draft[field.key] : value[field.key] ?? (["sidebarAssistantEnabled", "imageUseVideoKey", "usageStatsEnabled", "autoCreateCanvas"].includes(field.key) ? !0 : field.key === "canvasEnabled" ? !1 : field.key === "pollIntervalMs" ? 5e3 : field.key === "maxWaitMs" ? 6e5 : void 0), secondsField = field.key === "pollIntervalMs" || field.key === "maxWaitMs", displayed = secondsField && current !== void 0 && current !== "" ? Number(current) / 1e3 : current, id = `metaontic-video-${field.key}`;
|
|
1481
1553
|
if (field.kind === "switch")
|
|
1482
1554
|
return h("label", { key: "control", htmlFor: id, className: "mov-switch" }, h("input", {
|
|
1483
1555
|
id,
|
|
1484
1556
|
"data-field": field.key,
|
|
1485
1557
|
type: "checkbox",
|
|
1558
|
+
role: "switch",
|
|
1486
1559
|
checked: !!current,
|
|
1487
1560
|
onChange: (event) => edit(field.key, event.target.checked)
|
|
1488
1561
|
}), h("span", null, t(field.key)));
|
|
@@ -1544,8 +1617,8 @@
|
|
|
1544
1617
|
// package.json
|
|
1545
1618
|
var package_default = {
|
|
1546
1619
|
name: "dsh-metaontic-video",
|
|
1547
|
-
version: "4.0
|
|
1548
|
-
description: "
|
|
1620
|
+
version: "4.1.0",
|
|
1621
|
+
description: "DeepSeek Harness AI 视频创作插件:新手通过对话完善创意、审核脚本并生成视频;长视频采用分段续拍与本地合并,按实际调用确认费用。",
|
|
1549
1622
|
license: "SEE LICENSE IN LICENSE",
|
|
1550
1623
|
type: "module",
|
|
1551
1624
|
keywords: [
|
|
@@ -1651,7 +1724,7 @@
|
|
|
1651
1724
|
"@deepseek-ai/schemastery": "~3.18.5"
|
|
1652
1725
|
},
|
|
1653
1726
|
scripts: {
|
|
1654
|
-
typecheck: "tsc -p tsconfig.json",
|
|
1727
|
+
typecheck: "tsc -p tsconfig.json && tsc -p tsconfig.contracts.json",
|
|
1655
1728
|
"build:locale": "node scripts/build.mjs locale",
|
|
1656
1729
|
"build:host": "node scripts/build.mjs host",
|
|
1657
1730
|
"build:client": "node scripts/build.mjs client",
|
|
@@ -1662,17 +1735,71 @@
|
|
|
1662
1735
|
"pack:test": "node scripts/pack-test.mjs",
|
|
1663
1736
|
"market:index": "node scripts/market-index.mjs",
|
|
1664
1737
|
"npm:publish": "node scripts/publish-npm.mjs",
|
|
1665
|
-
"npm:token": "node scripts/npm-token.mjs"
|
|
1738
|
+
"npm:token": "node scripts/npm-token.mjs",
|
|
1739
|
+
"release:all": "node scripts/release.mjs --interactive --all",
|
|
1740
|
+
"eval:film": "node scripts/evaluate-film.mjs"
|
|
1666
1741
|
},
|
|
1667
1742
|
dependencies: {},
|
|
1668
1743
|
releaseNotes: {
|
|
1669
|
-
version: "4.0
|
|
1744
|
+
version: "4.1.0",
|
|
1670
1745
|
prerelease: !1,
|
|
1671
|
-
publishedAt: "2026-11-
|
|
1746
|
+
publishedAt: "2026-11-21T01:51:57.688Z",
|
|
1672
1747
|
items: [
|
|
1673
|
-
"
|
|
1748
|
+
"新增:逐章创作与断点恢复、独立文本复审和六维内容审核。",
|
|
1749
|
+
"优化:剧本与分镜一致性、局部改稿与上下文效率;优先检测中国镜像更新并兼顾仓库新版。"
|
|
1674
1750
|
]
|
|
1675
|
-
}
|
|
1751
|
+
},
|
|
1752
|
+
readme: `<img src="https://video.mybfs.cn/promo/share-logo.png" width="160" alt="MetaOnticVideo" />
|
|
1753
|
+
|
|
1754
|
+
# dsh-metaontic-video · AI 视频创作插件
|
|
1755
|
+
|
|
1756
|
+
[English](https://github.com/wxsimon2022/metaontic-video/blob/master/README.en.md)
|
|
1757
|
+
|
|
1758
|
+
DeepSeek Harness(DSH)AI 视频生成插件 MetaOnticVideo:**新手快速上手,低成本制作长视频。**
|
|
1759
|
+
|
|
1760
|
+
## 能做什么
|
|
1761
|
+
|
|
1762
|
+
- **快速创作**:说出想法,助手整理脚本,确认后生成并预览视频。
|
|
1763
|
+
- **分段制作长视频**:逐段生成与续拍,保留进度,最后在本机合并。
|
|
1764
|
+
|
|
1765
|
+
图片与视频按接入渠道用量计费,生成前需确认费用。
|
|
1766
|
+
|
|
1767
|
+
## 中国镜像源安装
|
|
1768
|
+
|
|
1769
|
+
在 Harness「插件 → 添加插件」中选择中国镜像源,输入包名并安装:
|
|
1770
|
+
|
|
1771
|
+
\`\`\`text
|
|
1772
|
+
dsh-metaontic-video
|
|
1773
|
+
\`\`\`
|
|
1774
|
+
|
|
1775
|
+
## 在线安装
|
|
1776
|
+
|
|
1777
|
+
在 Harness「插件 → 添加插件」中粘贴链接,Windows 与 macOS 使用同一个安装包。
|
|
1778
|
+
|
|
1779
|
+
Gitee:
|
|
1780
|
+
|
|
1781
|
+
\`\`\`text
|
|
1782
|
+
https://gitee.com/hackloop/metaontic-video/releases/download/latest/metaontic-video.tgz
|
|
1783
|
+
\`\`\`
|
|
1784
|
+
|
|
1785
|
+
GitHub 备用:
|
|
1786
|
+
|
|
1787
|
+
\`\`\`text
|
|
1788
|
+
https://github.com/wxsimon2022/metaontic-video/releases/latest/download/metaontic-video.tgz
|
|
1789
|
+
\`\`\`
|
|
1790
|
+
|
|
1791
|
+
## 开始使用
|
|
1792
|
+
|
|
1793
|
+
1. 打开插件设置,选择 **MetaOntic AI**,填写 API密钥并保存。
|
|
1794
|
+
2. 在会话中选择 **视频创作助手**;宣传内容可选择 **宣传视频助手**。
|
|
1795
|
+
3. 描述需求,审核脚本并确认费用,再逐段预览制作结果。
|
|
1796
|
+
|
|
1797
|
+
例如:“制作一条30秒竖屏720P的视频,表现清晨湖面的宁静。”
|
|
1798
|
+
|
|
1799
|
+
## 相关链接
|
|
1800
|
+
|
|
1801
|
+
[使用说明](https://ai.mybfs.cn) · [问题反馈](https://github.com/wxsimon2022/metaontic-video/issues) · [更新记录](https://github.com/wxsimon2022/metaontic-video/blob/master/CHANGELOG.md) · [开发文档](https://github.com/wxsimon2022/metaontic-video/blob/master/docs/engineering/development.md) · [许可](https://github.com/wxsimon2022/metaontic-video/blob/master/LICENSE)
|
|
1802
|
+
`
|
|
1676
1803
|
};
|
|
1677
1804
|
|
|
1678
1805
|
// src/businesses/video-generation/client/settings.ts
|
|
@@ -1691,6 +1818,7 @@
|
|
|
1691
1818
|
UPDATE_CACHE_KEY: UPDATE_CACHE_KEY2,
|
|
1692
1819
|
UPDATE_MAX_AGE_MS: UPDATE_MAX_AGE_MS2,
|
|
1693
1820
|
fetchLatestVersion,
|
|
1821
|
+
fetchMirrorRelease,
|
|
1694
1822
|
SELECTS,
|
|
1695
1823
|
inputStyle,
|
|
1696
1824
|
optionLabel,
|
|
@@ -1718,6 +1846,7 @@
|
|
|
1718
1846
|
return "";
|
|
1719
1847
|
}
|
|
1720
1848
|
}), { readUpdateCache, checkForUpdate, runOnlineUpdate, deferUpdate } = createUpdateActions({
|
|
1849
|
+
fetchMirrorRelease,
|
|
1721
1850
|
get UPDATE_CACHE_KEY() {
|
|
1722
1851
|
return UPDATE_CACHE_KEY2;
|
|
1723
1852
|
},
|
|
@@ -1838,6 +1967,7 @@
|
|
|
1838
1967
|
renderKeyAction: (field) => showsSharedValidation(field) ? connectionButton() : null,
|
|
1839
1968
|
confirm: (message) => window.confirm(message)
|
|
1840
1969
|
}), hints = {
|
|
1970
|
+
sidebarAssistantEnabled: t("sidebarAssistantEnabledHint"),
|
|
1841
1971
|
connectionMode: selectedMode === "metaontic" ? [t("connectionMetaonticHint"), " ", h("a", { key: "metaontic-register", href: RELAY.signupUrl, target: "_blank", rel: "noopener noreferrer", style: { textDecoration: "underline" } }, t("connectionMetaonticRegister"))] : t(directMode && !VOLCENGINE_MODE_AVAILABLE ? "connectionVolcengineUnavailable" : "connectionModeHint"),
|
|
1842
1972
|
metaonticApiKey: t("metaonticKeyHint"),
|
|
1843
1973
|
volcengineApiKey: t("volcengineKeyHint"),
|
|
@@ -1913,7 +2043,7 @@
|
|
|
1913
2043
|
let settingsRows = () => [
|
|
1914
2044
|
h("div", { key: "generation", className: "mov-section" }, [
|
|
1915
2045
|
h("div", { key: "title", className: "mov-section-title" }, t("sectionGeneration")),
|
|
1916
|
-
...SECTIONS.map((section) => h("div", { key: section.key, className: "mov-parameter-group" }, [
|
|
2046
|
+
...SECTIONS.filter((section) => !["sectionInterface", "sectionVideo"].includes(section.key)).map((section) => h("div", { key: section.key, className: "mov-parameter-group" }, [
|
|
1917
2047
|
h("div", { key: "heading", className: "mov-parameter-heading" }, t(section.key)),
|
|
1918
2048
|
renderGrid(section)
|
|
1919
2049
|
]))
|
|
@@ -1924,6 +2054,10 @@
|
|
|
1924
2054
|
h("span", { key: "hint", className: "mov-hint" }, t("sectionCombinedHint"))
|
|
1925
2055
|
]),
|
|
1926
2056
|
h("div", { key: "body", className: "mov-advanced-body" }, [
|
|
2057
|
+
h("div", { key: "sectionVideo", className: "mov-advanced-group", "data-group": "sectionVideo" }, [
|
|
2058
|
+
h("div", { key: "title", className: "mov-parameter-heading" }, t("sectionVideo")),
|
|
2059
|
+
renderGrid(SECTIONS.find((section) => section.key === "sectionVideo"))
|
|
2060
|
+
]),
|
|
1927
2061
|
...[
|
|
1928
2062
|
{ key: "advancedPicture", fields: ["watermark"] },
|
|
1929
2063
|
{ key: "advancedMerge", fields: ["mergeMode", "seamTrimSeconds"], hint: "segmentsRetained" },
|
|
@@ -1936,6 +2070,10 @@
|
|
|
1936
2070
|
group.hint ? h("p", { key: "hint", className: "mov-hint", style: { margin: 0 } }, t(group.hint)) : null
|
|
1937
2071
|
]))
|
|
1938
2072
|
])
|
|
2073
|
+
]),
|
|
2074
|
+
h("div", { key: "interface", className: "mov-section mov-interface", "data-group": "interface" }, [
|
|
2075
|
+
h("div", { key: "title", className: "mov-section-title" }, t("sectionInterface")),
|
|
2076
|
+
renderGrid(SECTIONS.find((section) => section.key === "sectionInterface"))
|
|
1939
2077
|
])
|
|
1940
2078
|
], overrides = Object.keys(snapshot.user || {}), footerMessage = status === "saved" ? t("saved") : status === "reset" ? t("resetDone") : status === "failed" ? saveError || t("saveFailed") : pending.length ? t("dirty") : "", footer = pending.length || status !== "idle" ? h("div", { key: "footer", className: "mov-footer" }, [
|
|
1941
2079
|
footerMessage ? h("span", {
|
|
@@ -2758,7 +2896,7 @@
|
|
|
2758
2896
|
|
|
2759
2897
|
// src/businesses/video-generation/client.ts
|
|
2760
2898
|
function createVideoClient(require2) {
|
|
2761
|
-
let React = require2("react"), h = React.createElement, { TOKENS, inputStyle, PAGE_CSS } = createTheme(), { MediaPreview } = createMediaPreview({ React, h }), { videoExecutionSource: videoExecutionSource2, VideoTaskProgress, VideoProgressDock } = createVideoProgress({ React, h, TOKENS }), { ToolResultView } = createToolResultView({ h, MediaPreview, VideoTaskProgress }), { PLUGIN_OWNED_KEYS, SELECTS, optionLabel, FIELD_BY_KEY, SECTIONS, formatMoney, NS, NAMESPACE } = createClientConfig(), { zh, en } = createDictionaries(), { useSnapshot, same, validateSettings, persistConnection, persistBatch } = createSettingsState({ React }), { PLUGIN_VERSION, UPDATE_CACHE_KEY: UPDATE_CACHE_KEY2, UPDATE_MAX_AGE_MS: UPDATE_MAX_AGE_MS2, fetchLatestVersion, fetchRecentVersions, PLUGIN_PACKAGE: PLUGIN_PACKAGE2, UPDATE_SPEC: UPDATE_SPEC2, UPDATE_ATTEMPTS: UPDATE_ATTEMPTS2, isNewerVersion, updateBell } = createUpdates({ h }), { makePage } = createSettingsPage({ useSnapshot, React, h, TOKENS, same, validateSettings, persistConnection, PLUGIN_OWNED_KEYS, persistBatch, PLUGIN_VERSION, UPDATE_CACHE_KEY: UPDATE_CACHE_KEY2, UPDATE_MAX_AGE_MS: UPDATE_MAX_AGE_MS2, fetchLatestVersion, SELECTS, inputStyle, optionLabel, FIELD_BY_KEY, SECTIONS, formatMoney, PLUGIN_PACKAGE: PLUGIN_PACKAGE2, UPDATE_SPEC: UPDATE_SPEC2, UPDATE_ATTEMPTS: UPDATE_ATTEMPTS2, isNewerVersion, updateBell, PAGE_CSS });
|
|
2899
|
+
let React = require2("react"), h = React.createElement, { TOKENS, inputStyle, PAGE_CSS } = createTheme(), { MediaPreview } = createMediaPreview({ React, h }), { videoExecutionSource: videoExecutionSource2, VideoTaskProgress, VideoProgressDock } = createVideoProgress({ React, h, TOKENS }), { ToolResultView } = createToolResultView({ h, MediaPreview, VideoTaskProgress }), { PLUGIN_OWNED_KEYS, SELECTS, optionLabel, FIELD_BY_KEY, SECTIONS, formatMoney, NS, NAMESPACE } = createClientConfig(), { zh, en } = createDictionaries(), { useSnapshot, same, validateSettings, persistConnection, persistBatch } = createSettingsState({ React }), { PLUGIN_VERSION, UPDATE_CACHE_KEY: UPDATE_CACHE_KEY2, UPDATE_MAX_AGE_MS: UPDATE_MAX_AGE_MS2, fetchLatestVersion, fetchRecentVersions, fetchMirrorRelease, PLUGIN_PACKAGE: PLUGIN_PACKAGE2, UPDATE_SPEC: UPDATE_SPEC2, UPDATE_ATTEMPTS: UPDATE_ATTEMPTS2, isNewerVersion, updateBell } = createUpdates({ h }), { makePage } = createSettingsPage({ useSnapshot, React, h, TOKENS, same, validateSettings, persistConnection, PLUGIN_OWNED_KEYS, persistBatch, PLUGIN_VERSION, UPDATE_CACHE_KEY: UPDATE_CACHE_KEY2, UPDATE_MAX_AGE_MS: UPDATE_MAX_AGE_MS2, fetchLatestVersion, fetchMirrorRelease, SELECTS, inputStyle, optionLabel, FIELD_BY_KEY, SECTIONS, formatMoney, PLUGIN_PACKAGE: PLUGIN_PACKAGE2, UPDATE_SPEC: UPDATE_SPEC2, UPDATE_ATTEMPTS: UPDATE_ATTEMPTS2, isNewerVersion, updateBell, PAGE_CSS });
|
|
2762
2900
|
return {
|
|
2763
2901
|
inject: ["slots", "locale", "configForms", "uiSession"],
|
|
2764
2902
|
apply(ctx, { settings }) {
|
|
@@ -2823,29 +2961,29 @@
|
|
|
2823
2961
|
{ className: "mov-rail-hint" },
|
|
2824
2962
|
[h(PanelIcon, props), h(UpdateHintDot, { key: "dot" })]
|
|
2825
2963
|
);
|
|
2826
|
-
ctx.effect(() =>
|
|
2827
|
-
|
|
2964
|
+
ctx.effect(() => followConfiguredEntries(form, "sidebarAssistantEnabled", [
|
|
2965
|
+
() => ctx.slots.inject("sidebar.panellist", () => ctx.slots.register({
|
|
2828
2966
|
name: "sidebar.panellist",
|
|
2829
2967
|
id: PANEL_ID,
|
|
2830
2968
|
order: 30,
|
|
2831
2969
|
locale: NS,
|
|
2832
2970
|
// 左侧那一行显示的名字,比面板标题更完整,方便在图标列表里认出来;有更新只加红点,不改文字。
|
|
2833
2971
|
label: () => t("panelSidebarLabel")
|
|
2834
|
-
}, railIcon))
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
})
|
|
2848
|
-
|
|
2972
|
+
}, railIcon)),
|
|
2973
|
+
() => ctx.slots.inject("main", () => ctx.slots.register({
|
|
2974
|
+
name: "main",
|
|
2975
|
+
key: PANEL_ID,
|
|
2976
|
+
locale: NS,
|
|
2977
|
+
// 面板要的两个动作都按需取服务:老宿主没有这些服务时按钮自然失效,不报错。
|
|
2978
|
+
inject: () => ({
|
|
2979
|
+
startSession: () => ctx.get("uiWorkspace")?.startSession(void 0, { agentPreset: "video-director" }),
|
|
2980
|
+
openSettings: () => ctx.get("pluginNavigation")?.openBundle(PLUGIN_PACKAGE2),
|
|
2981
|
+
manager: pluginManager,
|
|
2982
|
+
// 面板顶部的更新入口:与设置页同一套两步确认,点左侧栏的「有更新」进来就能更新。
|
|
2983
|
+
updateBanner: () => h(UpdateHintBanner, { key: "update-hint" })
|
|
2984
|
+
})
|
|
2985
|
+
}, VideoPanel))
|
|
2986
|
+
]), "metaontic-video: sidebar entry and panel follow saved preference"), updateHint.refresh(!1);
|
|
2849
2987
|
let canvasSwitchOn = () => {
|
|
2850
2988
|
try {
|
|
2851
2989
|
return FLOW_CANVAS_AVAILABLE && form?.getSnapshot?.()?.value?.canvasEnabled === !0;
|