From 9af2d75f1537d327b148405e8db94f0f610c4c02 Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Thu, 19 Sep 2024 08:09:54 +0800 Subject: [PATCH] refactor: following LogLevelMap --- src/ai-command.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ai-command.ts b/src/ai-command.ts index 7c40580..1bb49d6 100644 --- a/src/ai-command.ts +++ b/src/ai-command.ts @@ -2,6 +2,7 @@ import path from 'path' import { defaultsDeep } from 'lodash-es' import {Command, Flags} from '@oclif/core' import { parseJsJson, parseObjectArgumentInfos } from '@isdk/ai-tool' +import { LogLevelMap } from '@isdk/ai-tool-agent' import { DEFAULT_CONFIG_NAME, loadAIConfig, loadConfigFile } from './load-config' // const CONFIG_BASE_NAME = '.ai' @@ -139,7 +140,7 @@ export const AICommonFlags = { logLevel: Flags.string({ char: 'l', description: 'the log level', aliases: ['loglevel', 'log-level'], - options: ['silence', 'fatal', 'error', 'warn', 'info', 'verbose', 'debug', 'trace'], + options: Object.keys(LogLevelMap), }), interactive: Flags.boolean({char: 'i', description: 'interactive mode', allowNo: true}), histories: Flags.directory({description: 'the chat histories folder to record', exists: true}),