@@ -20,7 +20,7 @@ import quotaShow from './commands/quota/show';
2020import configShow from './commands/config/show' ;
2121import configSet from './commands/config/set' ;
2222import configExportSchema from './commands/config/export-schema' ;
23- // ❄️ 暂时雪藏 File API (等待接口权限开放 )
23+ // File API temporarily disabled (pending permission grant )
2424// import fileUpload from './commands/file/upload';
2525// import fileList from './commands/file/list';
2626// import fileDelete from './commands/file/delete';
@@ -205,13 +205,18 @@ Getting Help:
205205 }
206206
207207 private printChildren ( node : CommandNode , prefix : string , out : NodeJS . WriteStream ) : void {
208- for ( const [ name , child ] of node . children ) {
209- if ( child . command ) {
210- out . write ( ` ${ prefix } ${ name . padEnd ( 12 ) } ${ child . command . description } \n` ) ;
211- }
212- if ( child . children . size > 0 ) {
213- this . printChildren ( child , `${ prefix } ${ name } ` , out ) ;
208+ // Collect all leaf entries first so we can align the description column.
209+ const entries : Array < { fullName : string ; description : string } > = [ ] ;
210+ const collect = ( n : CommandNode , p : string ) => {
211+ for ( const [ name , child ] of n . children ) {
212+ if ( child . command ) entries . push ( { fullName : ` ${ p } ${ name } ` , description : child . command . description } ) ;
213+ if ( child . children . size > 0 ) collect ( child , `${ p } ${ name } ` ) ;
214214 }
215+ } ;
216+ collect ( node , prefix ) ;
217+ const maxLen = Math . max ( ...entries . map ( e => e . fullName . length ) ) ;
218+ for ( const { fullName, description } of entries ) {
219+ out . write ( ` ${ fullName . padEnd ( maxLen ) } ${ description } \n` ) ;
215220 }
216221 }
217222}
@@ -236,7 +241,7 @@ export const registry = new CommandRegistry({
236241 'config set' : configSet ,
237242 'config export-schema' : configExportSchema ,
238243
239- // ❄️ 暂时雪藏 File API
244+ // File API temporarily disabled (pending permission grant)
240245 // 'file upload': fileUpload,
241246 // 'file list': fileList,
242247 // 'file delete': fileDelete,
0 commit comments