From b063cac6024fd0236893b95b52e370127319b316 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 23 May 2024 12:43:37 +0700 Subject: [PATCH] chore: remove parameter for run command --- .../commanders/shortcuts/run.command.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cortex-js/src/infrastructure/commanders/shortcuts/run.command.ts b/cortex-js/src/infrastructure/commanders/shortcuts/run.command.ts index 42b68631a..678a4e510 100644 --- a/cortex-js/src/infrastructure/commanders/shortcuts/run.command.ts +++ b/cortex-js/src/infrastructure/commanders/shortcuts/run.command.ts @@ -5,10 +5,6 @@ import { exit } from 'node:process'; import { ChatCliUsecases } from '../usecases/chat.cli.usecases'; import { defaultCortexCppHost, defaultCortexCppPort } from 'constant'; -type RunOptions = { - model?: string; -}; - @SubCommand({ name: 'run', description: 'EXPERIMENTAL: Shortcut to start a model and chat', @@ -22,12 +18,12 @@ export class RunCommand extends CommandRunner { super(); } - async run(_input: string[], option: RunOptions): Promise { - const modelId = option.model; - if (!modelId) { - console.error('Model ID is required'); + async run(input: string[]): Promise { + if (input.length === 0) { + console.error('Model Id is required'); exit(1); } + const modelId = input[0]; await this.cortexUsecases.startCortex( defaultCortexCppHost,