Skip to content

Commit bdec821

Browse files
committed
fix: apiDocs path, clear aspect_ratio when width/height set
- Change apiDocs from full URL to path (fixes broken URL in --help) - Clear aspect_ratio when both --width and --height are provided
1 parent eb6d7f9 commit bdec821

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/commands/image/generate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { promptText, failIfMissing } from '../../utils/prompt';
2121
export default defineCommand({
2222
name: 'image generate',
2323
description: 'Generate images (image-01 / image-01-live)',
24-
apiDocs: 'https://platform.minimax.io/docs/api-reference/image-generation-t2i',
24+
apiDocs: '/docs/api-reference/image-generation-t2i',
2525
usage: 'mmx image generate --prompt <text> [flags]',
2626
options: [
2727
{ flag: '--prompt <text>', description: 'Image description', required: true },
@@ -91,7 +91,7 @@ export default defineCommand({
9191
const body: ImageRequest = {
9292
model: 'image-01',
9393
prompt,
94-
aspect_ratio: (flags.aspectRatio as string) || undefined,
94+
aspect_ratio: (width !== undefined && height !== undefined) ? undefined : ((flags.aspectRatio as string) || undefined),
9595
n: (flags.n as number) ?? 1,
9696
seed: flags.seed as number | undefined,
9797
width: width,

0 commit comments

Comments
 (0)