From 34b5c1c66a4c193fd691014337e77f32c6e16015 Mon Sep 17 00:00:00 2001 From: tsingliu <410869548@qq.com> Date: Sun, 8 Feb 2026 14:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=82=E6=95=B0=E5=BA=94?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 4 ++++ src/tools/image.ts | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 410d97a..ea66772 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,6 +39,10 @@ interface AppConfig { imageApiKey?: string; imageBaseUrl?: string; imageModel?: string; + imageSize?: string; + imageQuality?: string; + imageStyle?: string; + imageN?: number; autoConfirm?: boolean; feishuWebhook?: string; feishuKeyword?: string; diff --git a/src/tools/image.ts b/src/tools/image.ts index ed89c82..a31e2b1 100644 --- a/src/tools/image.ts +++ b/src/tools/image.ts @@ -90,13 +90,14 @@ const handler = async (args: any, config: any): Promise => { prompt, image_path, mask_path, - n = 1, - size = "1024x1024", - quality = "standard", - style = "vivid", output_dir = "." } = args; + const n = args.n || config.imageN || 1; + const size = args.size || config.imageSize || "1024x1024"; + const quality = args.quality || config.imageQuality || "standard"; + const style = args.style || config.imageStyle || "vivid"; + let mode = args.mode; let model = args.model || config.imageModel || "dall-e-3";