@ninkch/dsh-infinite-canvas 0.19.21 → 0.20.1
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/README.md +14 -0
- package/README.zh-CN.md +14 -0
- package/assets/canvas-layout/SKILL.md +19 -2
- package/assets/canvas-studio/SKILL.md +156 -392
- package/client.js +305 -63
- package/cordis.patch.yml +13 -0
- package/docs/auto-creation-design.md +68 -0
- package/docs/guide.en.md +13 -1
- package/docs/guide.zh-CN.md +14 -0
- package/index.js +867 -14
- package/package.json +2 -1
- package/production.js +427 -0
- package/skill-pack.js +16 -3
package/client.js
CHANGED
|
@@ -1210,6 +1210,23 @@ function revealCanvasInRight() {
|
|
|
1210
1210
|
'dataRootMigratedDone': '已迁移',
|
|
1211
1211
|
'dataRootMigrating': '迁移中',
|
|
1212
1212
|
'dataRootUnsupported': '当前插件后台版本较旧(不支持数据根目录):重启 Harness 后可用',
|
|
1213
|
+
'autoTitle': '自动创作(实验)',
|
|
1214
|
+
'autoOn': '已开启',
|
|
1215
|
+
'autoOff': '已关闭',
|
|
1216
|
+
'autoEnable': '开启',
|
|
1217
|
+
'autoDisable': '关闭',
|
|
1218
|
+
'autoCapsOk': '多智能体:可用',
|
|
1219
|
+
'autoCapsNo': '多智能体:宿主未暴露会话服务(暂不可用)',
|
|
1220
|
+
'autoOldHost': '宿主插件是旧版本(不支持自动创作开关):完全重启 Harness 后可用',
|
|
1221
|
+
'stageCurrent': '制作阶段',
|
|
1222
|
+
'stageReadyYes': '可交付',
|
|
1223
|
+
'stageReadyNo': '未就绪',
|
|
1224
|
+
'stageBlockers': '阻塞',
|
|
1225
|
+
'imageGenTitle': '桥接dsh-image-gen',
|
|
1226
|
+
'imageGenStatusNo': 'dsh-image-gen模型·未配置',
|
|
1227
|
+
'imageGenMissing': '未检测到 dsh-image-gen',
|
|
1228
|
+
'imageGenStatusYes': 'dsh-image-gen模型·已配置',
|
|
1229
|
+
'imageGenNoModel': '(未选择模型)',
|
|
1213
1230
|
'dataRootSaved': '数据根目录已设置',
|
|
1214
1231
|
'storageInfo': '存储',
|
|
1215
1232
|
'storageDetails': '存储详情',
|
|
@@ -2174,6 +2191,23 @@ function revealCanvasInRight() {
|
|
|
2174
2191
|
'dataRootMigratedDone': 'Migrated',
|
|
2175
2192
|
'dataRootMigrating': 'Migrating',
|
|
2176
2193
|
'dataRootUnsupported': 'The plugin backend is older and lacks data-root support — restart Harness to enable',
|
|
2194
|
+
'autoTitle': 'Auto creation (experimental)',
|
|
2195
|
+
'autoOn': 'On',
|
|
2196
|
+
'autoOff': 'Off',
|
|
2197
|
+
'autoEnable': 'Turn on',
|
|
2198
|
+
'autoDisable': 'Turn off',
|
|
2199
|
+
'autoCapsOk': 'Multi-agent: available',
|
|
2200
|
+
'autoCapsNo': 'Multi-agent: host does not expose session services (unavailable)',
|
|
2201
|
+
'autoOldHost': 'The plugin backend is older and lacks the auto-creation switch — fully restart Harness to enable',
|
|
2202
|
+
'stageCurrent': 'Stage',
|
|
2203
|
+
'stageReadyYes': 'deliverable',
|
|
2204
|
+
'stageReadyNo': 'not ready',
|
|
2205
|
+
'stageBlockers': 'blocked',
|
|
2206
|
+
'imageGenTitle': 'Bridge: dsh-image-gen',
|
|
2207
|
+
'imageGenStatusNo': 'dsh-image-gen models · not configured',
|
|
2208
|
+
'imageGenMissing': 'dsh-image-gen not detected',
|
|
2209
|
+
'imageGenStatusYes': 'dsh-image-gen models · configured',
|
|
2210
|
+
'imageGenNoModel': '(no model)',
|
|
2177
2211
|
'dataRootSaved': 'Data root set',
|
|
2178
2212
|
'storageInfo': 'Storage',
|
|
2179
2213
|
'storageDetails': 'Storage details',
|
|
@@ -3028,13 +3062,13 @@ body[data-ds-dark-theme] .dshic-inline-input{border-color:var(--dsw-alias-border
|
|
|
3028
3062
|
.dshic-menu-item:hover{background:var(--dsw-alias-interactive-bg-hover,color-mix(in srgb,var(--dsw-alias-label-primary) 8%,transparent));}
|
|
3029
3063
|
body[data-ds-dark-theme] .dshic-menu{border-color:var(--dsw-alias-border-l2);}
|
|
3030
3064
|
/* —— 会话↔画布绑定(composer 画布选择 chip):与宿主会话输入行 chip 同一视觉语言 —— */
|
|
3031
|
-
.dshic-bind{position:relative;display:inline-flex;align-items:center;gap:2px;}
|
|
3065
|
+
.dshic-bind{position:relative;display:inline-flex;align-items:center;gap:2px;flex:0 1 auto;min-width:0;max-width:180px;}
|
|
3032
3066
|
.dshic-bind-chip{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border-radius:10px;border:1px solid transparent;
|
|
3033
|
-
background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap;max-width:
|
|
3067
|
+
background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;}
|
|
3034
3068
|
.dshic-bind-chip:hover{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-3));color:var(--dsw-alias-label-primary);}
|
|
3035
3069
|
.dshic-bind-chip.is-bound{color:var(--dsw-alias-label-primary);}
|
|
3036
3070
|
.dshic-bind-ico{display:inline-flex;align-items:center;flex:none;opacity:.85;}
|
|
3037
|
-
.dshic-bind-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
3071
|
+
.dshic-bind-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
|
|
3038
3072
|
.dshic-bind-caret{font-size:10px;opacity:.75;flex:none;margin-left:2px;}
|
|
3039
3073
|
.dshic-bind-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:70;max-height:340px;overflow:auto;min-width:240px;border-radius:12px;padding:4px;}
|
|
3040
3074
|
.dshic-bind-sep{height:1px;background:var(--dsw-alias-border-l1);margin:4px 6px;}
|
|
@@ -3554,6 +3588,8 @@ body[data-ds-dark-theme] .dshic-pick-item.is-on{background:color-mix(in srgb,var
|
|
|
3554
3588
|
videoProviders: Array.isArray(s.videoProviders) ? s.videoProviders : [],
|
|
3555
3589
|
imageStar: s.imageStar || '',
|
|
3556
3590
|
videoStar: s.videoStar || '',
|
|
3591
|
+
// dsh-image-gen 桥接:启用后画布不自配图片 API,直接走它的 /studio(密钥留在它宿主侧)
|
|
3592
|
+
imageGen: { enabled: !!(s.imageGen && s.imageGen.enabled), provider: (s.imageGen && s.imageGen.provider) || '', model: (s.imageGen && s.imageGen.model) || '' },
|
|
3557
3593
|
ttsApis: Array.isArray(s.ttsApis) ? s.ttsApis : [],
|
|
3558
3594
|
ttsApiId: s.ttsApiId || '',
|
|
3559
3595
|
lang: s.lang || '',
|
|
@@ -3618,7 +3654,10 @@ body[data-ds-dark-theme] .dshic-pick-item.is-on{background:color-mix(in srgb,var
|
|
|
3618
3654
|
for (const p of settings.imageProviders || []) {
|
|
3619
3655
|
for (const m of (p.models || [])) {
|
|
3620
3656
|
if (!m || !m.id || !String(m.model || '').trim()) continue;
|
|
3621
|
-
|
|
3657
|
+
// viaImageGen/imageGenProvider 必须透传:生成侧靠它路由到 dsh-image-gen 的 /studio;
|
|
3658
|
+
// 丢字段 → useBridge 判 false → 走 apiImage → baseUrl 空 → 「未配置图片 API」(桥接必炸)
|
|
3659
|
+
const via = !!(p.viaImageGen || m.viaImageGen);
|
|
3660
|
+
out.push({ ref: p.id + '|' + m.id, providerId: p.id, providerName: p.name || p.id, modelId: m.id, model: String(m.model).trim(), baseUrl: p.baseUrl || '', apiKey: p.apiKey || '', extra: p.extra || '', size: p.size || '', responseFormat: p.responseFormat || '', mode: p.mode || 'generations', ...(via ? { viaImageGen: true, imageGenProvider: m.viaImageGen || p.imageGenProvider || '' } : {}) });
|
|
3622
3661
|
}
|
|
3623
3662
|
}
|
|
3624
3663
|
return out;
|
|
@@ -5839,6 +5878,46 @@ function queueThumb(assetId) {
|
|
|
5839
5878
|
return null;
|
|
5840
5879
|
}
|
|
5841
5880
|
|
|
5881
|
+
/** dsh-image-gen 桥接生图:走它的 /studio 路由(密钥留在它宿主侧,前端零配置)。
|
|
5882
|
+
* GET 取模型清单由探测函数负责;这里只做 POST 生成 + 取图。返回 Blob(与 apiImage 同契约)。 */
|
|
5883
|
+
async function apiGenBridge(prompt, refBlobs, g, opts) {
|
|
5884
|
+
const cfg = g || {};
|
|
5885
|
+
if (!cfg.provider || !cfg.model) throw new Error('dsh-image-gen 未选择服务商/模型(设置 → 图片模型 → 来自 dsh-image-gen)');
|
|
5886
|
+
const refs = [];
|
|
5887
|
+
for (const b of (refBlobs || []).slice(0, 4)) {
|
|
5888
|
+
try {
|
|
5889
|
+
const dataUrl = await blobToDataUrl(b);
|
|
5890
|
+
const m = /^data:([^;]+);base64,(.+)$/.exec(String(dataUrl || ''));
|
|
5891
|
+
if (m) refs.push({ mediaType: m[1], data: m[2] });
|
|
5892
|
+
} catch { /* 单张参考图转换失败不阻塞 */ }
|
|
5893
|
+
}
|
|
5894
|
+
const body = {
|
|
5895
|
+
mode: refs.length ? 'edit' : 'generate',
|
|
5896
|
+
provider: cfg.provider,
|
|
5897
|
+
model: cfg.model,
|
|
5898
|
+
prompt: String(prompt || ''),
|
|
5899
|
+
ratio: String((opts && opts.ratio) || '1:1'),
|
|
5900
|
+
quality: String((opts && opts.quality) || 'high'),
|
|
5901
|
+
};
|
|
5902
|
+
if (refs.length) body.references = refs;
|
|
5903
|
+
const res = await fetch('/plugins/dsh-image-gen/studio', {
|
|
5904
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body),
|
|
5905
|
+
});
|
|
5906
|
+
const raw = await res.text();
|
|
5907
|
+
let json = null;
|
|
5908
|
+
try { json = JSON.parse(raw); } catch { /* 非 JSON(网关页/空响应)走下面的错误 */ }
|
|
5909
|
+
if (!res.ok || !json) {
|
|
5910
|
+
throw new Error('dsh-image-gen 生成失败:' + ((json && (json.error || json.message)) || ('HTTP ' + res.status + (raw ? ' · ' + raw.slice(0, 160) : ''))));
|
|
5911
|
+
}
|
|
5912
|
+
if (json.error) throw new Error('dsh-image-gen 生成失败:' + json.error);
|
|
5913
|
+
const att = (Array.isArray(json.items) && json.items[0] && json.items[0].attachment) || json.attachment;
|
|
5914
|
+
if (!att) throw new Error('dsh-image-gen 未返回图片(响应缺少 attachment)');
|
|
5915
|
+
const img = await fetch('/plugins/dsh-image-gen/image', {
|
|
5916
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ attachment: att }),
|
|
5917
|
+
});
|
|
5918
|
+
if (!img.ok) throw new Error('读取 dsh-image-gen 生成的图片失败 HTTP ' + img.status);
|
|
5919
|
+
return await img.blob();
|
|
5920
|
+
}
|
|
5842
5921
|
async function apiImage(prompt, refBlobs, s, opts) {
|
|
5843
5922
|
if (!s.baseUrl) throw new Error('未配置图片 API');
|
|
5844
5923
|
// URL 归一化:裸域 → /v1;粘贴完整端点也不会被二次拼接
|
|
@@ -10685,15 +10764,18 @@ function queueThumb(assetId) {
|
|
|
10685
10764
|
const lock = await buildShotLockText(lockKind, { medium: 'image' });
|
|
10686
10765
|
if (lock) p = p + '\n' + lock;
|
|
10687
10766
|
} catch { /* 技能包不可用时不影响生成 */ }
|
|
10688
|
-
//
|
|
10767
|
+
// 模型解析:节点下拉里的「桥接dsh-image-gen」条目走 studio 生成(无需画布自配);其余照旧
|
|
10689
10768
|
const mcfg = resolveImageModelCfg(settings, nodeImageModelRef(n));
|
|
10769
|
+
const useBridge = !!(mcfg && mcfg.viaImageGen);
|
|
10690
10770
|
if (!mcfg) throw new Error(T('errNoImageModel'));
|
|
10691
10771
|
// 张数(1–4):同一提示词一次生成多张;历史条保留全部结果,节点显示最后一张
|
|
10692
10772
|
const want = clamp(Number(n.data.imageCount) || 1, 1, 4);
|
|
10693
10773
|
const cases = [];
|
|
10694
10774
|
for (let i = 0; i < want; i++) {
|
|
10695
10775
|
if (want > 1) update((s) => { const nd = s.graph.nodes[n.id]; if (nd) nd.data.progress = (i + 1) + '/' + want; });
|
|
10696
|
-
const blob =
|
|
10776
|
+
const blob = useBridge
|
|
10777
|
+
? await apiGenBridge(p, metas, { provider: mcfg.imageGenProvider, model: mcfg.model }, { ratio: n.data.ratio })
|
|
10778
|
+
: await apiImage(p, metas, mcfg, {
|
|
10697
10779
|
size: n.data.size, ratio: n.data.ratio, nodeExtra: n.data.imgExtra, warn: addWarn,
|
|
10698
10780
|
// 任务式厂商(三宝图片):任务 id 就是凭证——代理超时/页面关闭后仍可凭 id 回查(与视频同口径)
|
|
10699
10781
|
onTask: (tid, qurl) => {
|
|
@@ -14852,6 +14934,13 @@ function queueThumb(assetId) {
|
|
|
14852
14934
|
notify();
|
|
14853
14935
|
}
|
|
14854
14936
|
|
|
14937
|
+
/** 动作/冲突强度高的题材 → 分镜链路额外带「打斗节奏」卡(与 Host 侧 skill-pack.js 同一份清单)。 */
|
|
14938
|
+
const FIGHT_RHYTHM_GENRES = new Set([
|
|
14939
|
+
'action-mission', 'wuxia', 'gunstandoff', 'adventure', 'crime-police', 'hk-retro',
|
|
14940
|
+
'wasteland-chase', 'mo-lei-tau', 'revenge-face-slap', 'multi-thread-caper',
|
|
14941
|
+
'neon-dystopia', 'rebirth-transmigration',
|
|
14942
|
+
]);
|
|
14943
|
+
|
|
14855
14944
|
/**
|
|
14856
14945
|
* 组装某生成能力下的注入切片文本。返回 { text, bytes };任一层缺失则跳过。
|
|
14857
14946
|
* kind = script | storyboard | prompt | assets
|
|
@@ -14886,9 +14975,11 @@ function queueThumb(assetId) {
|
|
|
14886
14975
|
}
|
|
14887
14976
|
if (profile.form) await push('form', (manifest.forms || []).find((x) => x.id === profile.form));
|
|
14888
14977
|
if (profile.look) await push('look', (manifest.looks || []).find((x) => x.id === profile.look));
|
|
14889
|
-
//
|
|
14978
|
+
// 运镜词典跟着分镜与提示词走;打斗节奏只在分镜且选了动作/冲突类题材时注入(它讲的是打斗场面的镜头组织)
|
|
14890
14979
|
if (kind === 'storyboard' || kind === 'prompt') {
|
|
14891
|
-
|
|
14980
|
+
const mids = ['camera-moves'];
|
|
14981
|
+
if (kind === 'storyboard' && (profile.genres || []).some((g) => FIGHT_RHYTHM_GENRES.has(g))) mids.push('fight-rhythm');
|
|
14982
|
+
for (const mid of mids) {
|
|
14892
14983
|
const mv = (manifest.moves || []).find((x) => x.id === mid);
|
|
14893
14984
|
if (mv) await push('moves', { ...mv, oneliner: mv.oneliner || '' });
|
|
14894
14985
|
}
|
|
@@ -18164,6 +18255,28 @@ const DIRECTOR_KEY_HELP = [
|
|
|
18164
18255
|
// ============================================================
|
|
18165
18256
|
// 右侧边栏:项目 / 资产 / 设置
|
|
18166
18257
|
// ============================================================
|
|
18258
|
+
/** 制作阶段行(0.20.0):当前画布的阶段 + 可交付/阻塞概览。旧宿主(无 RPC)整行隐藏,零打扰。 */
|
|
18259
|
+
function ProductionStageRow({ projectId, canvasId }) {
|
|
18260
|
+
const [st, setSt] = useState(null);
|
|
18261
|
+
useEffect(() => {
|
|
18262
|
+
let alive = true;
|
|
18263
|
+
const load = async () => {
|
|
18264
|
+
try {
|
|
18265
|
+
const r = await hostRpc('productionStatus', { projectId, canvasId });
|
|
18266
|
+
if (alive && r && r.ok) setSt(r);
|
|
18267
|
+
} catch { if (alive) setSt(null); } // 旧宿主/项目已删 → 静默隐藏
|
|
18268
|
+
};
|
|
18269
|
+
load();
|
|
18270
|
+
const t = setInterval(load, 30000); // 阶段由工具事件推进,30s 轮询足够
|
|
18271
|
+
return () => { alive = false; clearInterval(t); };
|
|
18272
|
+
}, [projectId, canvasId]);
|
|
18273
|
+
if (!st) return null;
|
|
18274
|
+
const blockers = (st.blockers || []).length;
|
|
18275
|
+
const readyText = st.ready ? T('stageReadyYes') : (blockers ? T('stageBlockers') + ' ' + blockers : T('stageReadyNo'));
|
|
18276
|
+
return h('div', { className: 'dshic-hint', 'data-role': 'production-stage', style: { alignSelf: 'flex-start', padding: '2px 2px 0' } },
|
|
18277
|
+
T('stageCurrent') + ':' + (st.stageZh || st.stage) + ' · ' + readyText);
|
|
18278
|
+
}
|
|
18279
|
+
|
|
18167
18280
|
function ProjectsTab() {
|
|
18168
18281
|
// 新建项目统一走左上角项目名下拉(「+ 新建项目…」),右栏只管理当前项目,不再放新建项目按钮
|
|
18169
18282
|
const [delTarget, setDelTarget] = useState(null);
|
|
@@ -18320,6 +18433,8 @@ const DIRECTOR_KEY_HELP = [
|
|
|
18320
18433
|
? h('div', { key: 'emptystate', className: 'dshic-hint', style: { alignSelf: 'flex-start', padding: '6px 2px', maxWidth: 260 } },
|
|
18321
18434
|
T('emptyProjectHint'))
|
|
18322
18435
|
: null,
|
|
18436
|
+
// 制作阶段行(0.20.0 阶段机):当前画布的阶段 + 可交付/阻塞概览;旧宿主无 RPC 时整行隐藏
|
|
18437
|
+
proj ? h(ProductionStageRow, { key: 'stage', projectId: proj.id, canvasId: activeCanvasId() === DEFAULT_CANVAS_ID ? null : activeCanvasId() }) : null,
|
|
18323
18438
|
// 项目区域顶部:一行「+ 新建画布(纯图标)」+ 搜索框(放大镜内嵌在输入框右侧)
|
|
18324
18439
|
// 折叠只折叠**下方画布列表**:搜索行始终可见(折叠不能把上方工具行一起吞掉)
|
|
18325
18440
|
proj
|
|
@@ -19656,61 +19771,49 @@ const DIRECTOR_KEY_HELP = [
|
|
|
19656
19771
|
],
|
|
19657
19772
|
);
|
|
19658
19773
|
}
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
}
|
|
19774
|
+
/** 图片模型桥接卡(0.20.0):检测 dsh-image-gen 并直接选用它的服务商/模型(密钥留在它宿主侧)。 */
|
|
19775
|
+
/** 自动创作开关(实验):只留开关与状态;入口在 Harness 原生对话框(canvas_auto_* 工具)。 */
|
|
19776
|
+
function AutoModeCard() {
|
|
19777
|
+
const [st, setSt] = useState(null);
|
|
19778
|
+
const refresh = async () => {
|
|
19779
|
+
try {
|
|
19780
|
+
const r = await hostRpc('autoModeGet');
|
|
19781
|
+
setSt({ enabled: !!r.enabled, caps: r.caps || null, oldHost: false, busy: false });
|
|
19782
|
+
} catch {
|
|
19783
|
+
setSt({ enabled: false, caps: null, oldHost: true, busy: false });
|
|
19784
|
+
}
|
|
19668
19785
|
};
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
)
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19694
|
-
|
|
19695
|
-
|
|
19696
|
-
|
|
19697
|
-
),
|
|
19698
|
-
h(ModelProviderEditor, { key: 'imglist', kind: 'image' }),
|
|
19699
|
-
h(ModelProviderEditor, { key: 'vidlist', kind: 'video' }),
|
|
19700
|
-
h(ApiListEditor, { key: 'ttslist', kind: 'tts' }),
|
|
19701
|
-
// 帮助与反馈:一行入口(点开弹窗看二维码与提 Issue)
|
|
19702
|
-
h('div', {
|
|
19703
|
-
key: 'support', className: 'dshic-card', style: { cursor: 'pointer' },
|
|
19704
|
-
onClick: () => update((s) => { s.supportOpen = true; }),
|
|
19705
|
-
},
|
|
19706
|
-
h('div', { className: 'dshic-row' },
|
|
19707
|
-
Ic('help', 12),
|
|
19708
|
-
h('strong', { style: { fontSize: 12, flex: 1, minWidth: 0 } }, T('supportBtn')),
|
|
19709
|
-
h('span', { className: 'dshic-hint', style: { flex: 'none' } }, T('supportIssues') + ' / ' + T('supportWechat') + ' ›'),
|
|
19710
|
-
),
|
|
19786
|
+
useEffect(() => { refresh(); }, []);
|
|
19787
|
+
const toggle = async () => {
|
|
19788
|
+
if (!st || st.busy || st.oldHost) return;
|
|
19789
|
+
setSt({ ...st, busy: true });
|
|
19790
|
+
try {
|
|
19791
|
+
const r = await hostRpc('autoModeSet', { enabled: !st.enabled });
|
|
19792
|
+
setSt({ ...st, enabled: !!r.enabled, busy: false });
|
|
19793
|
+
} catch {
|
|
19794
|
+
setSt({ ...st, busy: false });
|
|
19795
|
+
}
|
|
19796
|
+
};
|
|
19797
|
+
const lines = [];
|
|
19798
|
+
if (!st) lines.push(T('storageLoading'));
|
|
19799
|
+
else if (st.oldHost) lines.push(T('autoOldHost'));
|
|
19800
|
+
else {
|
|
19801
|
+
lines.push(st.enabled ? T('autoOn') : T('autoOff'));
|
|
19802
|
+
lines.push(st.caps && st.caps.multiAgent ? T('autoCapsOk') : T('autoCapsNo'));
|
|
19803
|
+
}
|
|
19804
|
+
return h('div', { className: 'dshic-card' },
|
|
19805
|
+
h('div', { className: 'dshic-row' },
|
|
19806
|
+
Ic('spark', 12),
|
|
19807
|
+
h('strong', { style: { fontSize: 12, flex: 1, minWidth: 0 } }, T('autoTitle')),
|
|
19808
|
+
st && !st.oldHost
|
|
19809
|
+
? h('button', {
|
|
19810
|
+
type: 'button', className: cls('dshic-mini', st.enabled && 'is-on'),
|
|
19811
|
+
disabled: st.busy, onPointerDown: (e) => e.stopPropagation(), onClick: toggle,
|
|
19812
|
+
}, st.enabled ? T('autoOn') : T('autoEnable'))
|
|
19813
|
+
: null,
|
|
19711
19814
|
),
|
|
19712
|
-
h('div', {
|
|
19713
|
-
|
|
19815
|
+
h('div', { className: 'dshic-hint', style: { marginTop: 4 }, 'data-role': 'auto-mode-status' }, lines.join(' · ')),
|
|
19816
|
+
);
|
|
19714
19817
|
}
|
|
19715
19818
|
|
|
19716
19819
|
/** 从项目现有创作意图/剧本一键起草设定集(世界观/风格/角色/场景/道具)。 */
|
|
@@ -19773,6 +19876,142 @@ const DIRECTOR_KEY_HELP = [
|
|
|
19773
19876
|
|
|
19774
19877
|
/** 设定条目 ↔ 资产绑定对话框:从当前项目的资产库里多选图片/音频/视频。 */
|
|
19775
19878
|
/** 绑定对话框的资产行:组件化以便用 useAssetUrl 显示缩略图。 */
|
|
19879
|
+
/** 桥接卡(0.20.0):开关 + 配置状态;开启时把 dsh-image-gen 的模型同步进图片模型下拉(节点直接可选)。
|
|
19880
|
+
* 状态行只反映 image-gen 侧配置状态(与开关解耦);开关只管模型同步。同步无变化不写盘。 */
|
|
19881
|
+
function ImageGenBridgeCard() {
|
|
19882
|
+
const [st, setSt] = useState({ missing: false, configured: false });
|
|
19883
|
+
const [enabled, setEnabled] = useState(!!(loadSettings().imageGen || {}).enabled);
|
|
19884
|
+
/** 把 studio describe 的已配置服务商/模型写进 settings.imageProviders 的桥接条目;关闭/未配置时移除。
|
|
19885
|
+
* 返回 { models, changed }:changed=false 时不写盘(设置页每次挂载都探测,写盘会触发 notify 重渲染)。 */
|
|
19886
|
+
const syncBridgeModels = (desc, on) => {
|
|
19887
|
+
const s0 = loadSettings();
|
|
19888
|
+
const list = (s0.imageProviders || []).filter((p) => p.id !== 'image-gen-bridge');
|
|
19889
|
+
const conf = desc ? (desc.providers || []).filter((p) => p && p.configured) : [];
|
|
19890
|
+
const models = [];
|
|
19891
|
+
if (on) for (const p of conf) {
|
|
19892
|
+
const opts = (p.modelOptions || []).map((o) => o.value).filter(Boolean);
|
|
19893
|
+
for (const m of (opts.length ? opts : [p.model].filter(Boolean))) {
|
|
19894
|
+
models.push({ id: p.provider + '|' + m, model: m, viaImageGen: p.provider });
|
|
19895
|
+
}
|
|
19896
|
+
}
|
|
19897
|
+
if (models.length) {
|
|
19898
|
+
list.unshift({ id: 'image-gen-bridge', name: '桥接dsh-image-gen', baseUrl: '', apiKey: '', viaImageGen: true, models });
|
|
19899
|
+
}
|
|
19900
|
+
const noChange = JSON.stringify(s0.imageProviders || []) === JSON.stringify(list);
|
|
19901
|
+
if (!noChange) { s0.imageProviders = list; saveSettings(s0); }
|
|
19902
|
+
return { models: models.length, changed: !noChange };
|
|
19903
|
+
};
|
|
19904
|
+
useEffect(() => {
|
|
19905
|
+
let alive = true;
|
|
19906
|
+
(async () => {
|
|
19907
|
+
try {
|
|
19908
|
+
const r = await fetch('/plugins/dsh-image-gen/studio', { headers: { accept: 'application/json' } });
|
|
19909
|
+
if (!r.ok) throw new Error('HTTP ' + r.status);
|
|
19910
|
+
const j = await r.json();
|
|
19911
|
+
const conf = (j.providers || []).filter((p) => p && p.configured);
|
|
19912
|
+
const on = !!(loadSettings().imageGen || {}).enabled;
|
|
19913
|
+
syncBridgeModels(j, on);
|
|
19914
|
+
if (alive) setSt({ missing: false, configured: conf.length > 0 });
|
|
19915
|
+
} catch {
|
|
19916
|
+
const on = !!(loadSettings().imageGen || {}).enabled;
|
|
19917
|
+
syncBridgeModels(null, on);
|
|
19918
|
+
if (alive) setSt({ missing: true, configured: false });
|
|
19919
|
+
}
|
|
19920
|
+
})();
|
|
19921
|
+
return () => { alive = false; };
|
|
19922
|
+
}, []);
|
|
19923
|
+
const toggle = () => {
|
|
19924
|
+
const v = !enabled;
|
|
19925
|
+
setEnabled(v);
|
|
19926
|
+
const s0 = loadSettings();
|
|
19927
|
+
s0.imageGen = { ...(s0.imageGen || {}), enabled: v };
|
|
19928
|
+
saveSettings(s0);
|
|
19929
|
+
// 开/关即时生效:重跑一次探测同步(加回或移除桥接模型条目)
|
|
19930
|
+
(async () => {
|
|
19931
|
+
try {
|
|
19932
|
+
const r = await fetch('/plugins/dsh-image-gen/studio', { headers: { accept: 'application/json' } });
|
|
19933
|
+
const j = r.ok ? await r.json() : null;
|
|
19934
|
+
const conf = j ? (j.providers || []).filter((p) => p && p.configured) : [];
|
|
19935
|
+
syncBridgeModels(j, v && conf.length > 0);
|
|
19936
|
+
setSt({ missing: !r.ok, configured: conf.length > 0 });
|
|
19937
|
+
} catch { syncBridgeModels(null, false); setSt({ missing: true, configured: false }); }
|
|
19938
|
+
})();
|
|
19939
|
+
};
|
|
19940
|
+
const statusText = st.missing ? T('imageGenMissing') : (st.configured ? T('imageGenStatusYes') : T('imageGenStatusNo'));
|
|
19941
|
+
return h('div', { className: 'dshic-card', 'data-role': 'image-gen-bridge' },
|
|
19942
|
+
h('div', { className: 'dshic-row' },
|
|
19943
|
+
Ic('image', 12),
|
|
19944
|
+
h('strong', { style: { fontSize: 12, flex: 1, minWidth: 0 } }, T('imageGenTitle')),
|
|
19945
|
+
st.missing
|
|
19946
|
+
? null
|
|
19947
|
+
: h('button', {
|
|
19948
|
+
type: 'button', className: cls('dshic-mini', enabled && 'is-on'),
|
|
19949
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
19950
|
+
onClick: toggle,
|
|
19951
|
+
}, enabled ? T('autoOn') : T('autoEnable')),
|
|
19952
|
+
),
|
|
19953
|
+
h('div', { className: 'dshic-hint', style: { marginTop: 4 }, 'data-role': 'image-gen-status' }, statusText),
|
|
19954
|
+
);
|
|
19955
|
+
}
|
|
19956
|
+
function SettingsTab() {
|
|
19957
|
+
const [s, setS] = useState(loadSettings);
|
|
19958
|
+
const apply = (fn) => {
|
|
19959
|
+
setS((prev) => {
|
|
19960
|
+
const next = JSON.parse(JSON.stringify(prev));
|
|
19961
|
+
fn(next);
|
|
19962
|
+
saveSettings(next);
|
|
19963
|
+
return next;
|
|
19964
|
+
});
|
|
19965
|
+
};
|
|
19966
|
+
const field = (label, value, onChange, placeholder, password) => h(Field, { label, value, onChange, placeholder, password });
|
|
19967
|
+
return [
|
|
19968
|
+
h('div', { key: 'lang', className: 'dshic-card' },
|
|
19969
|
+
h('div', { className: 'dshic-row' }, Ic('text', 12), h('strong', { style: { fontSize: 12 } }, T('langLabel'))),
|
|
19970
|
+
h('select', {
|
|
19971
|
+
className: 'dshic-select', value: s.lang || '',
|
|
19972
|
+
onChange: (e) => {
|
|
19973
|
+
apply((d) => { d.lang = e.target.value; });
|
|
19974
|
+
LANG_OVERRIDE = e.target.value;
|
|
19975
|
+
notify();
|
|
19976
|
+
},
|
|
19977
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
19978
|
+
},
|
|
19979
|
+
h('option', { value: '' }, T('langFollow')),
|
|
19980
|
+
h('option', { value: 'zh' }, T('langZh')),
|
|
19981
|
+
h('option', { value: 'en' }, T('langEn'))),
|
|
19982
|
+
),
|
|
19983
|
+
h(DataRootCard, { key: 'dataroot' }),
|
|
19984
|
+
h(CraftCard, { key: 'craft' }),
|
|
19985
|
+
h(AutoModeCard, { key: 'automode' }),
|
|
19986
|
+
h(ImageGenBridgeCard, { key: 'imagegenbridge' }),
|
|
19987
|
+
// 「技能增强」已升级为右侧独立「技能」页(SkillsTab):四层图标瓦片 + 预览/写设定集
|
|
19988
|
+
// 文本模型卡:只选模型,参数全用 Harness 默认;紧挨图片/视频/TTS 模型卡片
|
|
19989
|
+
h('div', { key: 'llm', className: 'dshic-card' },
|
|
19990
|
+
h('div', { className: 'dshic-row' },
|
|
19991
|
+
Ic('spark', 12),
|
|
19992
|
+
h('strong', { style: { fontSize: 12, flex: 1, minWidth: 0 } }, T('llmLabel')),
|
|
19993
|
+
InfoTip(T('llmHint')),
|
|
19994
|
+
),
|
|
19995
|
+
h(LlmModelSelect),
|
|
19996
|
+
),
|
|
19997
|
+
h(ModelProviderEditor, { key: 'imglist', kind: 'image' }),
|
|
19998
|
+
h(ModelProviderEditor, { key: 'vidlist', kind: 'video' }),
|
|
19999
|
+
h(ApiListEditor, { key: 'ttslist', kind: 'tts' }),
|
|
20000
|
+
// 帮助与反馈:一行入口(点开弹窗看二维码与提 Issue)
|
|
20001
|
+
h('div', {
|
|
20002
|
+
key: 'support', className: 'dshic-card', style: { cursor: 'pointer' },
|
|
20003
|
+
onClick: () => update((s) => { s.supportOpen = true; }),
|
|
20004
|
+
},
|
|
20005
|
+
h('div', { className: 'dshic-row' },
|
|
20006
|
+
Ic('help', 12),
|
|
20007
|
+
h('strong', { style: { fontSize: 12, flex: 1, minWidth: 0 } }, T('supportBtn')),
|
|
20008
|
+
h('span', { className: 'dshic-hint', style: { flex: 'none' } }, T('supportIssues') + ' / ' + T('supportWechat') + ' ›'),
|
|
20009
|
+
),
|
|
20010
|
+
),
|
|
20011
|
+
h('div', { key: 'note', className: 'dshic-hint' }, 'DeepSeek Harness · dsh-infinite-canvas' + ((S.updateInfo && S.updateInfo.runningVersion) ? ' v' + S.updateInfo.runningVersion : '')),
|
|
20012
|
+
];
|
|
20013
|
+
}
|
|
20014
|
+
|
|
19776
20015
|
function AssetPickRow({ a, checked, onToggle }) {
|
|
19777
20016
|
const url = useAssetUrl(a.kind === 'image' ? a.id : null);
|
|
19778
20017
|
return h('label', { className: 'dshic-row', style: { gap: 6, fontSize: 11, cursor: 'pointer', alignItems: 'center' }, onPointerDown: (e) => e.stopPropagation(), onClick: () => onToggle() },
|
|
@@ -21041,9 +21280,11 @@ const DIRECTOR_KEY_HELP = [
|
|
|
21041
21280
|
const pid = String(id || '');
|
|
21042
21281
|
if (!pid) return;
|
|
21043
21282
|
if ((S.projects || []).some((p) => p.id === pid)) return;
|
|
21283
|
+
// 名字未知(旧宿主 / 竞态)→ 交给宿主下一次同步补登记;绝不把项目 id 当名字写进本地表
|
|
21284
|
+
if (!String(name || '').trim()) return;
|
|
21044
21285
|
update((s) => {
|
|
21045
21286
|
s.projects = [{
|
|
21046
|
-
id: pid, name: name
|
|
21287
|
+
id: pid, name: String(name).trim(), canvases: [], defaultCanvasName: '默认画布',
|
|
21047
21288
|
createdAt: Date.now(), updatedAt: Date.now(),
|
|
21048
21289
|
}].concat(s.projects || []);
|
|
21049
21290
|
});
|
|
@@ -21142,7 +21383,7 @@ const DIRECTOR_KEY_HELP = [
|
|
|
21142
21383
|
const r = await hostRpc('workspaceProjectCreate', { sessionId });
|
|
21143
21384
|
if (r && r.ok) {
|
|
21144
21385
|
update((s) => { s.bindingCreating = false; s.bindingMenuOpen = false; });
|
|
21145
|
-
ensureLocalProject(r.projectId,
|
|
21386
|
+
ensureLocalProject(r.projectId, r.name || '');
|
|
21146
21387
|
refreshDataRoot().catch(() => { /* 项目清单下一轮 3s 同步也会带 */ });
|
|
21147
21388
|
await refreshSessionBinding(sessionId);
|
|
21148
21389
|
const sb = S.sessionBinding;
|
|
@@ -21706,6 +21947,7 @@ const DIRECTOR_KEY_HELP = [
|
|
|
21706
21947
|
// 设置迁移的测试缝隙
|
|
21707
21948
|
window.__DSH_IC_SETTINGS__ = {
|
|
21708
21949
|
DEFAULT_SETTINGS, loadSettings, saveSettings,
|
|
21950
|
+
flattenImageModels, resolveImageModelCfg,
|
|
21709
21951
|
buildExpertContext,
|
|
21710
21952
|
};
|
|
21711
21953
|
// 创作上下文注入的测试缝隙(供 scripts/test-skill-inject.mjs 断言)
|
package/cordis.patch.yml
CHANGED
|
@@ -18,6 +18,19 @@
|
|
|
18
18
|
prefix: |
|
|
19
19
|
你是一位驻组导演兼媒体创作者({{model}} 驱动),以创作者第一视角主导每一部视频、竖屏短剧与媒体作品的完整生产。你不是"操作工具的助手"——你是这部片的导演:先有导演阐述,再有本子,然后才是生成与后期。
|
|
20
20
|
|
|
21
|
+
## 自动创作分支(最高优先级:先判后做)
|
|
22
|
+
每次开工先调 canvas_auto_status,按结果二选一:
|
|
23
|
+
- **enabled=true(自动创作已开启)→ 全自动分支,禁止逐步提问**(导演/题材/规格/影调一律不问用户):
|
|
24
|
+
1) 先 canvas_open 自动打开画布(不要等用户点面板);
|
|
25
|
+
2) 从用户消息提取 brief(拍什么/给谁看/什么情绪)。**禁止调用 ask_user_question(任何理由,不得以"只问一个"变通)**:
|
|
26
|
+
信息不足时由编剧室自行拟 3 个候选方向并选定一个,在会议记录里写明选择理由;
|
|
27
|
+
3) 同一轮内**必须**调用 canvas_auto_start 启动编剧室(调研 → 编剧A/B 独立提案 → 互评 → 监制决策 → 设定集 →
|
|
28
|
+
剧本生成 → 按场拆分 → 逐场分镜表 → G2 校验 → 预算单,全程零付费);
|
|
29
|
+
4) 运行中用 canvas_auto_status 汇报进度,不打断用户;预算单出来后汇报一次并等用户批准;
|
|
30
|
+
5) 用户批准后调 canvas_auto_generate 跑付费段(逐场建视频节点生成,失败重试,最后建成片节点)。
|
|
31
|
+
导演透镜/题材/规格/影调由监制决策自行选定并写进项目(带理由),不再问用户。
|
|
32
|
+
- **enabled=false → 保持下面的导演工作坊引导流程(一次一问)。**
|
|
33
|
+
|
|
21
34
|
## 开工前自检(每个新项目第一步,不可跳过,只报事实不猜版本)
|
|
22
35
|
按顺序各调一次 canvas_list_skills 与 artcraft_status:
|
|
23
36
|
- 两者正常返回 → 按下面的流水线开工。
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# 自动创作(0.20.0 已实现版)
|
|
2
|
+
|
|
3
|
+
> 状态:**已实现并随 0.20.0 交付**(进程内执行器)。本文描述**当前真实实现**;
|
|
4
|
+
> 「真会话多智能体」(sessionController 派生七角色)保留在文末作为后续升级路径,
|
|
5
|
+
> 需要宿主确认 `productionCapabilities.multiAgent === true` 后再启用。
|
|
6
|
+
|
|
7
|
+
## 0. 设计铁律(不变)
|
|
8
|
+
|
|
9
|
+
1. **流程规范 ≠ 内容模板**:规则只管操作顺序与花钱/毁数据前的检查,绝不规定剧情。
|
|
10
|
+
2. **用户显式指令 > 一切流程**:所有闸门都有 override(用户原话)+ 审计。
|
|
11
|
+
3. **自动模式绝不提问**:brief 不足由编剧室自拟 3 个方向并选定,理由写进会议记录。
|
|
12
|
+
4. **诚实交付**:草稿就是 blocked;"完成"必须由 `canvas_production_status.ready:true` 支撑。
|
|
13
|
+
5. **窄启动**:免费段(到分镜+预算单)零付费;一次性批准令牌后才进入付费生成。
|
|
14
|
+
|
|
15
|
+
## 1. 当前实现(进程内执行器)
|
|
16
|
+
|
|
17
|
+
**入口**(三处,同一引擎):
|
|
18
|
+
- 设置卡「自动创作(实验)」:开关 + 一句话创意 + 启动/中止 + 预算单/批准/生成;
|
|
19
|
+
- 对话工具:`canvas_auto_status` / `canvas_auto_start` / `canvas_auto_budget` / `canvas_auto_generate` / `canvas_auto_abort`;
|
|
20
|
+
- 人格分支:`canvas_auto_status.enabled=true` 时禁止提问,必须同一轮 `canvas_auto_start`。
|
|
21
|
+
|
|
22
|
+
**免费段**(`autoRoom`,五轮角色提示词 + 落盘 + 生成编排):
|
|
23
|
+
```
|
|
24
|
+
调研(离线,标注) → 编剧A/B 独立提案(互不可见) → 互评(各≤3条)
|
|
25
|
+
→ 监制决策(择一/融合+理由) → 落盘:会议节点+设定集+剧本idea
|
|
26
|
+
→ canvas_open 自动开画布 → 剧本节点生成(轮询)
|
|
27
|
+
→ 按【场N】拆分 → 场景文本+分镜表(tail→prev 串联) → 分镜生成(轮询)
|
|
28
|
+
→ G2 校验(不过自动重生成一次) → 预算单 → 停,等批准
|
|
29
|
+
```
|
|
30
|
+
- 角色分工 = 独立系统提示词的轮次(同一进程,顺序执行);讨论记录 = 「编剧室会议」文本节点。
|
|
31
|
+
- **上下文继承**:设定集按名称合并不覆盖;已有节点不重建。
|
|
32
|
+
|
|
33
|
+
**付费段**(`autoPaid`,批准后):
|
|
34
|
+
```
|
|
35
|
+
逐分镜表:建 video 节点(G2/G3 把关) → canvas_open → 触发 → 轮询(失败重试2次)
|
|
36
|
+
→ 全部完成 → 建「成片」节点
|
|
37
|
+
```
|
|
38
|
+
- 一次性批准令牌绑定预算指纹(镜头/时长一变即失效);`autoAbort` 可中止付费段(保留已完成视频)。
|
|
39
|
+
- 画布页面必须打开(节点生成由客户端执行);关闭时 runner 如实报"等待画布"。
|
|
40
|
+
|
|
41
|
+
## 2. 关键组件
|
|
42
|
+
|
|
43
|
+
| 组件 | 位置 | 职责 |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| 阶段机 + 六闸门 | `production.js` | `brief→…→delivered`、G1–G6、override 审计、`status/quote/approve` |
|
|
46
|
+
| 编剧室/付费段 | `index.js`(`autoRoom`/`autoPaid`/`AUTO_RUNS`) | 轮次编排、讨论落盘、生成编排 |
|
|
47
|
+
| RPC | `autoModeGet/Set`、`autoStart/Status/Abort`、`autoQuote/Approve/Generate` | 设置卡与工具共用 |
|
|
48
|
+
| 工具 | `canvas_auto_*` 五个 | 对话智能体的入口 |
|
|
49
|
+
| 客户端 | `AutoModeCard`(设置卡)+ `ProjectsTab` 阶段行 | 开关/创意/预算/批准/进度 |
|
|
50
|
+
|
|
51
|
+
## 3. 测试
|
|
52
|
+
|
|
53
|
+
`scripts/test-production.mjs`:注入假 LLM + 假画布执行桩,端到端覆盖——
|
|
54
|
+
免费段全流程(2 场 → 2 分镜 → 预算单)、未批准拒绝付费、批准后 2 视频 + 成片节点、
|
|
55
|
+
六闸门正反例、override 审计、阶段推进/回退、预算指纹失效。
|
|
56
|
+
|
|
57
|
+
## 4. 后续升级路径(未实现,需探针确认)
|
|
58
|
+
|
|
59
|
+
- **真会话执行器**:`productionCapabilities.multiAgent === true` 时,把"角色轮次"换成
|
|
60
|
+
`sessionController` 派生的独立会话(角色章程 = 首条 prompt,预设用 `standard`),
|
|
61
|
+
可并行、互不可见性更强;轮次协议与落盘格式不变,`autoRoom` 的步骤函数换成会话调用。
|
|
62
|
+
- **联网调研**:会话执行器下给调研角色挂 `tool-web`;进程内版本暂为离线知识(已如实标注)。
|
|
63
|
+
- **多集连续生产**:按集派生 run,复用同一批准预算上限。
|
|
64
|
+
|
|
65
|
+
## 5. 回退
|
|
66
|
+
|
|
67
|
+
- 开关关闭 → 全部 `auto*` 拒绝,UI 无入口,行为与 0.19.21 一致;
|
|
68
|
+
- 任一步失败 → run 标记 `failed` 并保留已产出内容;重试不重建已存在节点(闸门拦截)。
|
package/docs/guide.en.md
CHANGED
|
@@ -130,7 +130,11 @@ canvas: project card script node text+storyboard ×N ref image nodes
|
|
|
130
130
|
|
|
131
131
|
---
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
### 3.1 Auto creation (experimental) — one sentence to storyboards + budget
|
|
134
|
+
|
|
135
|
+
Settings → 「自动创作(实验)」→ on. Then one sentence in the chat (e.g. 拍个悬疑短剧,快递员每天送的信来自未来) starts the writers room: research → two independent pitches → cross-critique → producer decision → bible → script → per-scene storyboards → **budget sheet**. No questions are asked in this mode; the transcript lands on the canvas (编剧室会议 node). Approve the budget once (settings card, or `canvas_auto_budget` + `canvas_auto_generate` from chat) and videos are generated per storyboard, ending with a final-cut node. All gates still apply (bible-first, storyboard quality…), and the canvas must stay open during generation — the runner opens it for you and reports honestly if it cannot.
|
|
136
|
+
|
|
137
|
+
### 4. Manual fine-tuning: nodes are the workbench
|
|
134
138
|
|
|
135
139
|
After the chat batch is done, the canvas is where you polish:
|
|
136
140
|
|
|
@@ -151,6 +155,14 @@ Shortcuts and gestures:
|
|
|
151
155
|
|
|
152
156
|
## 5. Model configuration: providers + models
|
|
153
157
|
|
|
158
|
+
### 5.1 Image models via `dsh-image-gen` (zero duplicate config)
|
|
159
|
+
|
|
160
|
+
If the `dsh-image-gen` plugin is installed and configured, the settings tab shows 「图片模型(来自 dsh-image-gen)」: pick one of its configured providers and a model, flip the switch on, and canvas image generation routes through its studio bridge — the API key stays on the image-gen side and the canvas needs nothing. When the plugin is missing or unconfigured, the card says so and the ordinary provider list keeps working.
|
|
161
|
+
|
|
162
|
+
### 5.2 Precise layout tools
|
|
163
|
+
|
|
164
|
+
`canvas_layout_get` reads every node's `x/y/w/h` (plus pinned flag and bounds); `canvas_layout_node` batch-places nodes by coordinate — media nodes can resize while keeping the picture ratio, and `pinned:true` protects a node from `canvas_relayout`. Use these when you need exact placement (alignment, columns, spacing); use `canvas_relayout` only as a rough tidy-up (it packs clusters in bands and never covers pinned nodes).
|
|
165
|
+
|
|
154
166
|
Settings tab → Image models / Video models / TTS voices, organized in **two levels**:
|
|
155
167
|
|
|
156
168
|
1. **Provider** (collapsed row): configure the endpoint + API key **once** (+ optional extra params);
|