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:
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user