@@ -180,7 +180,7 @@ def _clean_and_wrap_snippet(self, snippet: str, width: int = 75) -> List[str]:
180180
181181
182182class TableDebugFormatter (SearchResultFormatter ):
183- """Legacy debug formatter for backwards compatibility ."""
183+ """Table view debug formatter."""
184184
185185 def format_results (self , results : List [DocumentResult ], query : str ) -> None :
186186 if not results :
@@ -222,34 +222,6 @@ def format_results(self, results: List[DocumentResult], query: str) -> None:
222222 )
223223
224224
225- class LegacyCompactFormatter (SearchResultFormatter ):
226- """Legacy compact formatter for backwards compatibility."""
227-
228- def format_results (self , results : List [DocumentResult ], query : str ) -> None :
229- if not results :
230- typer .echo ("No documents found matching the query." )
231- return
232-
233- typer .echo (f"Found { len (results )} documents:" )
234-
235- # Clean simple table for normal view
236- typer .echo (f"{ '#' :<3} { 'Preview' :<60} { 'URI' :<40} " )
237- typer .echo ("─" * 105 )
238-
239- for idx , doc in enumerate (results , 1 ):
240- # Clean snippet display
241- snippet = doc .snippet .replace ("\n " , " " ).replace ("\r " , "" )
242- if len (snippet ) > 57 :
243- snippet = snippet [:54 ] + "..."
244-
245- # Clean URI display
246- uri = doc .document .uri or "N/A"
247- if len (uri ) > 37 :
248- uri = "..." + uri [- 34 :]
249-
250- typer .echo (f"{ idx :<3} { snippet :<60} { uri :<40} " )
251-
252-
253225def get_formatter (
254226 debug : bool = False , table_view : bool = False
255227) -> SearchResultFormatter :
0 commit comments