feat(server): wire quality/count params and layered document generator
Map imageQuality/imageCount and output_format across the HTTP and WebSocket handlers, pass them into the design service calls, and register the layered document generator in the service context. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,25 +33,27 @@ func toGeneratorTaskResponse(task design.GeneratorTask) *types.GeneratorTaskResp
|
||||
|
||||
func toAPIGeneratorTaskInputArgs(input design.GeneratorTaskInputArgs) types.GeneratorTaskInputArgs {
|
||||
return types.GeneratorTaskInputArgs{
|
||||
AspectRatio: input.AspectRatio,
|
||||
Image: append([]string(nil), input.Image...),
|
||||
ImageUrl: input.ImageURL,
|
||||
Prompt: input.Prompt,
|
||||
Resolution: input.Resolution,
|
||||
SrcBox: toAPINormalizedBoxPtr(input.SrcBox),
|
||||
DstBox: toAPINormalizedBoxPtr(input.DstBox),
|
||||
AspectRatio: input.AspectRatio,
|
||||
Image: append([]string(nil), input.Image...),
|
||||
ImageUrl: input.ImageURL,
|
||||
OutputFormat: input.OutputFormat,
|
||||
Prompt: input.Prompt,
|
||||
Resolution: input.Resolution,
|
||||
SrcBox: toAPINormalizedBoxPtr(input.SrcBox),
|
||||
DstBox: toAPINormalizedBoxPtr(input.DstBox),
|
||||
}
|
||||
}
|
||||
|
||||
func toDomainGeneratorTaskInputArgs(input types.GeneratorTaskInputArgs) design.GeneratorTaskInputArgs {
|
||||
return design.GeneratorTaskInputArgs{
|
||||
AspectRatio: input.AspectRatio,
|
||||
Image: append([]string(nil), input.Image...),
|
||||
ImageURL: input.ImageUrl,
|
||||
Prompt: input.Prompt,
|
||||
Resolution: input.Resolution,
|
||||
SrcBox: toDomainNormalizedBoxPtr(input.SrcBox),
|
||||
DstBox: toDomainNormalizedBoxPtr(input.DstBox),
|
||||
AspectRatio: input.AspectRatio,
|
||||
Image: append([]string(nil), input.Image...),
|
||||
ImageURL: input.ImageUrl,
|
||||
OutputFormat: input.OutputFormat,
|
||||
Prompt: input.Prompt,
|
||||
Resolution: input.Resolution,
|
||||
SrcBox: toDomainNormalizedBoxPtr(input.SrcBox),
|
||||
DstBox: toDomainNormalizedBoxPtr(input.DstBox),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -546,6 +548,8 @@ func toDomainAgentChat(req *types.AgentChatRequest) design.AgentChatRequest {
|
||||
EnableWebSearch: req.EnableWebSearch || hasPreferredToolCategory(req.ToolConfig.PreferToolCategories.Search),
|
||||
ImageModel: req.ImageModel,
|
||||
ImageSize: req.ImageSize,
|
||||
ImageQuality: req.ImageQuality,
|
||||
ImageCount: int(req.ImageCount),
|
||||
Mode: req.Mode,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user