From 11adf1b972bb9cc63489064289a0ddb3d2c7925f Mon Sep 17 00:00:00 2001 From: Luckyu_js <11670186+luckyu-js@user.noreply.gitee.com> Date: Mon, 13 Jul 2026 19:07:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(annotate):=20=E6=B4=BE=E7=94=9F=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=B1=BB=E5=9E=8B=E4=B8=8E=20annotate=20operation=20?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - createDerivedImageNode 支持可选 size - derivedImage.operation 增加 annotate - SMART_IMAGE_AUTO_TASK_OPERATIONS 加入 annotate(仅强制图片源、不进执行器) Co-Authored-By: Claude Opus 4.8 --- src/types/nodes.ts | 2 +- src/utils/derivedImageNodes.ts | 4 +++- src/utils/smartMediaMode.ts | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/types/nodes.ts b/src/types/nodes.ts index 85ec4acf..4737f0c1 100644 --- a/src/types/nodes.ts +++ b/src/types/nodes.ts @@ -102,7 +102,7 @@ export interface ImageInputNodeData extends BaseNodeData { isOptional?: boolean; derivedImage?: { sourceNodeId: string; - operation: "crop" | "multiAngle" | "splitGrid" | "highDefinition" | "outpainting" | "inpainting" | "videoFrame"; + operation: "crop" | "multiAngle" | "splitGrid" | "highDefinition" | "outpainting" | "inpainting" | "videoFrame" | "annotate"; task?: DerivedImageTask; }; } diff --git a/src/utils/derivedImageNodes.ts b/src/utils/derivedImageNodes.ts index 1cda3f28..a5c31daf 100644 --- a/src/utils/derivedImageNodes.ts +++ b/src/utils/derivedImageNodes.ts @@ -30,6 +30,7 @@ export interface CreateDerivedImageNodeOptions { dimensions?: { width: number; height: number } | null; customTitle: string; operation: DerivedImageOperation; + size?: DerivedImageNodeSize; addNode: AddSmartImageNode; onConnect: (connection: Connection) => void; selectSingleNode?: (nodeId: string) => void; @@ -59,6 +60,7 @@ export function createDerivedImageNode({ dimensions = null, customTitle, operation, + size, addNode, onConnect, selectSingleNode, @@ -75,7 +77,7 @@ export function createDerivedImageNode({ sourceNodeId, operation, }, - }); + }, size); onConnect({ source: sourceNodeId, diff --git a/src/utils/smartMediaMode.ts b/src/utils/smartMediaMode.ts index 13948db8..2828158a 100644 --- a/src/utils/smartMediaMode.ts +++ b/src/utils/smartMediaMode.ts @@ -7,8 +7,8 @@ export type SmartImageMode = "neutral" | "image" | "generate"; export type SmartVideoMode = "neutral" | "video" | "generate"; export type SmartAudioMode = "empty" | "audio" | "generate"; -export type SmartImageAutoTaskOperation = "crop" | "splitGrid" | "multiAngle" | "highDefinition" | "outpainting" | "inpainting" | "videoFrame"; -export const SMART_IMAGE_AUTO_TASK_OPERATIONS: SmartImageAutoTaskOperation[] = ["crop", "splitGrid", "multiAngle", "highDefinition", "outpainting", "inpainting", "videoFrame"]; +export type SmartImageAutoTaskOperation = "crop" | "splitGrid" | "multiAngle" | "highDefinition" | "outpainting" | "inpainting" | "videoFrame" | "annotate"; +export const SMART_IMAGE_AUTO_TASK_OPERATIONS: SmartImageAutoTaskOperation[] = ["crop", "splitGrid", "multiAngle", "highDefinition", "outpainting", "inpainting", "videoFrame", "annotate"]; export const SMART_IMAGE_LOCAL_DERIVED_TASK_OPERATIONS: SmartImageAutoTaskOperation[] = ["crop", "splitGrid", "videoFrame"]; export const SMART_IMAGE_AI_DERIVED_TASK_OPERATIONS: SmartImageAutoTaskOperation[] = ["multiAngle", "highDefinition", "outpainting", "inpainting"]; export const SMART_IMAGE_AI_STATIC_DERIVED_TASK_OPERATIONS: SmartImageAutoTaskOperation[] = ["multiAngle", "outpainting", "inpainting"];