66from rich .table import Table
77
88
9- def render_product_results (results : list [dict [str , Any ]], title : str , show_reranker : bool = False ) -> None :
9+ def render_product_results (results : list [dict [str , Any ]], title : str = "" , show_reranker : bool = False ) -> None :
1010 """Render product search results as a rich table.
1111
1212 Args:
@@ -21,10 +21,9 @@ def render_product_results(results: list[dict[str, Any]], title: str, show_reran
2121 if show_reranker :
2222 table .add_column ("Reranker" , justify = "right" , style = "red" , width = 8 )
2323 table .add_column ("Name" , style = "magenta" , width = 25 )
24- table .add_column ("Description" , style = "white " , width = 50 )
24+ table .add_column ("Description" , style = "black " , width = 50 )
2525 table .add_column ("Categories" , style = "blue" , width = 20 )
2626 table .add_column ("Price" , justify = "right" , style = "yellow" , width = 8 )
27- table .add_column ("SKU" , style = "green" , width = 12 )
2827
2928 for doc in list (results ):
3029 row = [
@@ -38,7 +37,6 @@ def render_product_results(results: list[dict[str, Any]], title: str, show_reran
3837 doc ["description" ][:80 ] + "..." if len (doc ["description" ]) > 80 else doc ["description" ],
3938 ", " .join (doc ["categories" ]),
4039 f"${ doc ['price' ]:.2f} " ,
41- doc ["sku" ],
4240 ]
4341 )
4442 table .add_row (* row )
0 commit comments