feat(canvas): add visual annotation edit action

Add a VisualAnnotationPanel letting users mark regions on an image (brush,
circle, rectangle, cross) with per-mark edit instructions, composited into
an annotation guide image. The new "visual-annotation" node action sends
the unmarked source plus the annotated guide to the image model, editing
only numbered regions. Server validates the annotation image/instructions
and threads them through the generator task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-11 10:03:59 +08:00
parent 114198f1d9
commit bb8946b79b
17 changed files with 1271 additions and 46 deletions
+14
View File
@@ -504,6 +504,18 @@
"quickEdit": "Quick edit",
"quickEditTab": "Quick edit Tab",
"quickEditPlaceholder": "Describe the edit for this image",
"visualAnnotation": "Annotated edit",
"visualAnnotationTools": "Annotation tools",
"visualAnnotationBrush": "Brush mark",
"visualAnnotationCircle": "Circle mark",
"visualAnnotationRectangle": "Rectangle mark",
"visualAnnotationCross": "Cross mark",
"visualAnnotationList": "Mark list",
"visualAnnotationEmpty": "No marks yet",
"visualAnnotationInstructionPlaceholder": "Tell AI how to change this area",
"visualAnnotationInstructionLabel": "Edit instruction for mark {index}",
"visualAnnotationDelete": "Delete mark {index}",
"visualAnnotationPrompt": "Use the unmarked source image as the base and edit only the numbered marked regions. The marks, numbers, and annotated guide are location cues only and must not appear in the final image. Keep every unmarked area unchanged.\n{instructions}",
"upscale": "Upscale",
"upscalePrompt": "Upscale this image to {scale} level with the model. Preserve composition and subject while improving detail, edges, and texture clarity.",
"removeBackground": "Remove background",
@@ -619,6 +631,8 @@
"cropPromptPlaceholder": "Describe the cropped composition",
"apply": "Apply",
"cancel": "Cancel",
"undo": "Undo",
"delete": "Delete",
"clipboardCopied": "Copied to system clipboard",
"clipboardCopyFailed": "Could not write to system clipboard",
"contextCopy": "Copy",