This commit is contained in:
2025-04-26 03:15:11 +08:00
parent 9eb4d06939
commit bcc12209e0
28 changed files with 1708 additions and 126 deletions

View File

@@ -1,3 +1,4 @@
import fs from 'node:fs';
import path from 'node:path';
import { checkFileExists, AssistantConfig } from '@/module/assistant/index.ts';
import { chalk } from '@/module/chalk.ts';
@@ -40,5 +41,10 @@ export class AssistantInit extends AssistantConfig {
});
console.log(chalk.green('助手配置文件创建成功'));
}
const env = this.configPath?.envConfigPath;
if (!checkFileExists(env, true)) {
fs.writeFileSync(env, '# 环境配置文件\n');
console.log(chalk.green('助手环境配置文件创建成功'));
}
}
}