fix: improve config loading flow and table column width
This commit is contained in:
parent
decfd2bde0
commit
7f0498fc84
3 changed files with 18 additions and 11 deletions
8
index.ts
8
index.ts
|
|
@ -30,15 +30,15 @@ async function main() {
|
|||
const modelFlag = args.model ?? args.m;
|
||||
const configFlag = args.config ?? args.c;
|
||||
|
||||
const config = await loadConfig();
|
||||
const config = await loadConfig(configFlag);
|
||||
|
||||
const model = modelFlag ?? config.model;
|
||||
|
||||
if (configFlag) {
|
||||
if (configFlag || !config) {
|
||||
await initConfig(config);
|
||||
return;
|
||||
}
|
||||
|
||||
const model = modelFlag ?? config.model;
|
||||
|
||||
const renderer = new Renderer(plainOut, plainErr);
|
||||
|
||||
const provider = createOpenAICompatible({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue