|
19 | 19 |
|
20 | 20 | def parse_search_output( |
21 | 21 | output: str, |
22 | | - base_path: str, |
23 | | - max_line_length: Optional[int] = None |
| 22 | + base_path: str |
24 | 23 | ) -> Dict[str, List[Tuple[int, str]]]: |
25 | 24 | """ |
26 | 25 | Parse the output of command-line search tools (grep, ag, rg). |
27 | 26 |
|
28 | 27 | Args: |
29 | 28 | output: The raw output from the command-line tool. |
30 | 29 | base_path: The base path of the project to make file paths relative. |
31 | | - max_line_length: Optional maximum line length to truncate long lines. |
32 | 30 |
|
33 | 31 | Returns: |
34 | 32 | A dictionary where keys are file paths and values are lists of (line_number, line_content) tuples. |
@@ -84,10 +82,6 @@ def parse_search_output( |
84 | 82 | # Normalize path separators for consistency |
85 | 83 | relative_path = normalize_file_path(relative_path) |
86 | 84 |
|
87 | | - # Truncate content if it exceeds max_line_length |
88 | | - if max_line_length and len(content) > max_line_length: |
89 | | - content = content[:max_line_length] + '... (truncated)' |
90 | | - |
91 | 85 | if relative_path not in results: |
92 | 86 | results[relative_path] = [] |
93 | 87 | results[relative_path].append((line_number, content)) |
@@ -220,8 +214,7 @@ def search( |
220 | 214 | context_lines: int = 0, |
221 | 215 | file_pattern: Optional[str] = None, |
222 | 216 | fuzzy: bool = False, |
223 | | - regex: bool = False, |
224 | | - max_line_length: Optional[int] = None |
| 217 | + regex: bool = False |
225 | 218 | ) -> Dict[str, List[Tuple[int, str]]]: |
226 | 219 | """ |
227 | 220 | Execute a search using the specific strategy. |
|
0 commit comments