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:
@@ -29,13 +29,14 @@ func NewRunNodeActionAsyncLogic(ctx context.Context, svcCtx *svc.ServiceContext)
|
||||
|
||||
func (l *RunNodeActionAsyncLogic) RunNodeActionAsync(req *types.NodeActionRequest) (resp *types.ProjectResponse, err error) {
|
||||
project, err := l.svcCtx.DesignService.RunNodeActionAsync(l.ctx, req.Id, req.NodeId, design.NodeActionRequest{
|
||||
Action: req.Action,
|
||||
Prompt: req.Prompt,
|
||||
ImageModel: req.ImageModel,
|
||||
ImageSize: req.ImageSize,
|
||||
Mask: req.Mask,
|
||||
Selection: req.Selection,
|
||||
Options: req.Options,
|
||||
Action: req.Action,
|
||||
Prompt: req.Prompt,
|
||||
ImageModel: req.ImageModel,
|
||||
ImageSize: req.ImageSize,
|
||||
Mask: req.Mask,
|
||||
Selection: req.Selection,
|
||||
AnnotationImage: req.AnnotationImage,
|
||||
Options: req.Options,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user