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:
@@ -786,6 +786,9 @@ func generatorTaskInputArgsForNodeAction(target design.Node, req design.NodeActi
|
||||
Prompt: generatorTaskPromptForNodeAction(req),
|
||||
Resolution: resolutionLabel(imageSize),
|
||||
}
|
||||
if normalizeNodeAction(req.Action) == "visual-annotation" && strings.TrimSpace(req.AnnotationImage) != "" {
|
||||
input.Image = append(input.Image, strings.TrimSpace(req.AnnotationImage))
|
||||
}
|
||||
if normalizeNodeAction(req.Action) == "move-object" {
|
||||
input.SrcBox, input.DstBox = moveObjectBoxesFromSelection(req.Selection)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user