@@ -18,16 +18,17 @@ mod private
1818 use client:: Client ;
1919 use debug:: RunObjectWrap ;
2020 use actions:: openai:: Result ;
21+ use commands:: TableConfig ;
2122
2223 /// Report for `openai runs list`.
2324 #[ derive( Debug ) ]
2425 pub struct ListReport
2526 {
26- /// Show records as separate tables .
27- pub show_records_as_tables : bool ,
27+ /// Configure table formatting .
28+ pub table_config : TableConfig ,
2829
2930 /// Current OpenAI runs.
30- pub runs : Vec < RunObjectWrap >
31+ pub runs : Vec < RunObjectWrap > ,
3132 }
3233
3334 impl fmt:: Display for ListReport
@@ -38,7 +39,7 @@ mod private
3839 f : & mut fmt:: Formatter < ' _ >
3940 ) -> fmt:: Result
4041 {
41- if self . show_records_as_tables
42+ if self . table_config . as_records
4243 {
4344 writeln ! ( f, "{}" , AsTable :: new( & self . runs ) . table_to_string_with_format( & output_format:: Records :: default ( ) ) )
4445 }
@@ -54,12 +55,12 @@ mod private
5455 (
5556 client : & Client ,
5657 thread_id : String ,
57- show_records_as_tables : bool ,
58+ table_config : TableConfig ,
5859 ) -> Result < ListReport >
5960 {
6061 let response = client. list_run ( thread_id, None , None , None , None ) . await ?;
6162 let runs = response. data . into_iter ( ) . map ( RunObjectWrap ) . collect ( ) ;
62- Ok ( ListReport { show_records_as_tables , runs } )
63+ Ok ( ListReport { table_config , runs } )
6364 }
6465
6566}
0 commit comments