mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
🐛 fix(cli): fix type errors in generate image/video commands (#12828)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ export function registerImageCommand(parent: Command) {
|
||||
// Create a generation topic first
|
||||
const topicId = await client.generationTopic.createTopic.mutate({ type: 'image' });
|
||||
|
||||
const params: Record<string, any> = { prompt };
|
||||
const params: { prompt: string } & Record<string, any> = { prompt };
|
||||
if (options.width) params.width = Number.parseInt(options.width, 10);
|
||||
if (options.height) params.height = Number.parseInt(options.height, 10);
|
||||
if (options.steps) params.steps = Number.parseInt(options.steps, 10);
|
||||
|
||||
@@ -30,7 +30,7 @@ export function registerVideoCommand(parent: Command) {
|
||||
const client = await getTrpcClient();
|
||||
const topicId = await client.generationTopic.createTopic.mutate({ type: 'video' });
|
||||
|
||||
const params: Record<string, any> = { prompt };
|
||||
const params: { prompt: string } & Record<string, any> = { prompt };
|
||||
if (options.aspectRatio) params.aspectRatio = options.aspectRatio;
|
||||
if (options.duration) params.duration = Number.parseInt(options.duration, 10);
|
||||
if (options.resolution) params.resolution = options.resolution;
|
||||
|
||||
Reference in New Issue
Block a user