feat(canvas): 画布媒体工作流 - 支持批量连线、失败重试与模型能力增强
合并 PR #230。保留当前主线样式与组件结构,吸收批量连线、失败批次重试、媒体模型能力和相关后端增强,并修复集成检查发现的分辨率选择器启用条件与测试稳定性问题。
This commit is contained in:
1 parent
b0c3159f8e
commit
0e251c3c8f
48 files changed
+1582
-83
No files matched your search
@@ -0,0 +1,9 @@
|
||||
const GROK_IMAGE_PROMPT_MAX_BYTES = 8000;
|
||||
|
||||
export function grokImagePromptLimitError(prompt: string, interfaceType?: string, model?: string) {
|
||||
const modelName = model?.trim().toLowerCase().replace(/^models\//, "");
|
||||
if (interfaceType !== "grok-image" || modelName !== "grok-imagine-image-quality") return null;
|
||||
const promptBytes = new TextEncoder().encode(prompt).byteLength;
|
||||
if (promptBytes <= GROK_IMAGE_PROMPT_MAX_BYTES) return null;
|
||||
return `Grok 图片完整提示词为 ${promptBytes} UTF-8 字节,超过上游 ${GROK_IMAGE_PROMPT_MAX_BYTES} 字节限制。完整提示词包含当前输入及自动展开的连线文本、角色卡、画风和模板;系统不会自动删改,请回到相应节点精简后重试。`;
|
||||
}
|
||||
Reference in new issue
Block a user