feat(design): thread image quality, count and layered output through domain

Add ImageQuality/ImageCount to AgentRequest, AgentChatRequest and Job,
add OutputFormat to GeneratorTaskInputArgs, and introduce the
LayeredDocument types and LayeredDocumentGenerator port for PSD output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 20:42:26 +08:00
parent db41dac5e9
commit 00b70298f2
2 changed files with 41 additions and 15 deletions
+39 -15
View File
@@ -3,14 +3,16 @@ package design
import "context" import "context"
type AgentRequest struct { type AgentRequest struct {
Project Project Project Project
Prompt string Prompt string
Mode string Mode string
ImageModel string ImageModel string
ImageSize string ImageSize string
Messages []AgentChatMessage ImageQuality string
Memory AgentMemory ImageCount int
TaskPlan AgentTaskPlan Messages []AgentChatMessage
Memory AgentMemory
TaskPlan AgentTaskPlan
} }
type AgentContent struct { type AgentContent struct {
@@ -41,6 +43,8 @@ type AgentChatRequest struct {
EnableWebSearch bool EnableWebSearch bool
ImageModel string ImageModel string
ImageSize string ImageSize string
ImageQuality string
ImageCount int
Mode string Mode string
} }
@@ -60,13 +64,33 @@ type AgentThreadSummary struct {
} }
type GeneratorTaskInputArgs struct { type GeneratorTaskInputArgs struct {
AspectRatio string AspectRatio string
Image []string Image []string
ImageURL string ImageURL string
Prompt string OutputFormat string
Resolution string Prompt string
SrcBox *NormalizedBox Resolution string
DstBox *NormalizedBox SrcBox *NormalizedBox
DstBox *NormalizedBox
}
type LayeredDocumentRequest struct {
ImageURL string
Prompt string
Model string
Size string
OutputFormat string
IdempotencyKey string
}
type LayeredDocument struct {
Content string
ContentType string
Data []byte
}
type LayeredDocumentGenerator interface {
GenerateLayeredDocument(ctx context.Context, req LayeredDocumentRequest) (LayeredDocument, error)
} }
type GeneratorTaskSubmitRequest struct { type GeneratorTaskSubmitRequest struct {
+2
View File
@@ -24,6 +24,8 @@ type Job struct {
Mode string Mode string
ImageModel string ImageModel string
ImageSize string ImageSize string
ImageQuality string
ImageCount int
TaskPlan AgentTaskPlan TaskPlan AgentTaskPlan
EnableWebSearch bool EnableWebSearch bool
Isolated bool Isolated bool