Skip to content

Commit ce1a2fe

Browse files
committed
feat: localize doctor report
1 parent fd6d957 commit ce1a2fe

4 files changed

Lines changed: 298 additions & 57 deletions

File tree

cli.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6418,6 +6418,7 @@ function cmdStatus() {
64186418
function parseDoctorCommandArgs(argv = []) {
64196419
const options = {
64206420
format: 'json',
6421+
lang: '',
64216422
range: '7d',
64226423
targetApp: 'codex',
64236424
remote: true,
@@ -6453,6 +6454,15 @@ function parseDoctorCommandArgs(argv = []) {
64536454
cursor += 2;
64546455
continue;
64556456
}
6457+
if (token === '--lang') {
6458+
const value = String(argv[cursor + 1] || '').trim().toLowerCase();
6459+
if (!value || value.startsWith('--')) {
6460+
throw new Error('错误: --lang 需要一个值(zh/en)');
6461+
}
6462+
options.lang = value === 'en' ? 'en' : 'zh';
6463+
cursor += 2;
6464+
continue;
6465+
}
64566466
if (token === '--range') {
64576467
const value = String(argv[cursor + 1] || '').trim().toLowerCase();
64586468
if (!value || value.startsWith('--')) {
@@ -13161,7 +13171,7 @@ async function main() {
1316113171
console.log('\nCodex Mate - Codex 提供商管理工具');
1316213172
console.log('\n用法:');
1316313173
console.log(' codexmate status 显示当前状态');
13164-
console.log(' codexmate doctor [--format json|md] [--output <PATH>] 输出诊断报告');
13174+
console.log(' codexmate doctor [--format json|md] [--lang zh|en] [--output <PATH>] 输出诊断报告');
1316513175
console.log(' codexmate setup 交互式配置向导');
1316613176
console.log(' codexmate list 列出所有提供商');
1316713177
console.log(' codexmate models 列出所有模型');

0 commit comments

Comments
 (0)