6
6
7
7
from codegen .git .models .pr_options import PROptions
8
8
from codegen .runner .diff .get_raw_diff import get_raw_diff
9
- from codegen .runner .diff .syntax_highlight import syntax_highlight_modified_files
10
9
from codegen .runner .models .codemod import BranchConfig , Codemod , CodemodRunResult , CreatedBranch , GroupingConfig
11
- from codegen .runner .models .configs import get_runner_feature_flags
12
10
from codegen .runner .sandbox .repo import SandboxRepo
13
11
from codegen .runner .utils .branch_name import get_head_branch_name
14
12
from codegen .runner .utils .exception_utils import update_observation_meta
@@ -29,12 +27,10 @@ class SandboxExecutor:
29
27
30
28
codebase : CodebaseType
31
29
remote_repo : SandboxRepo
32
- _is_syntax_highlight_enabled : bool
33
30
34
31
def __init__ (self , codebase : CodebaseType ):
35
32
self .codebase = codebase
36
33
self .remote_repo = SandboxRepo (self .codebase )
37
- self ._is_syntax_highlight_enabled = get_runner_feature_flags ().syntax_highlight
38
34
39
35
async def find_flags (self , execute_func : Callable ) -> list [CodeFlag ]:
40
36
"""Runs the execute_func in find_mode to find flags"""
@@ -172,16 +168,6 @@ async def _get_structured_run_output(self, result: CodemodRunResult) -> CodemodR
172
168
result .observation = raw_diff
173
169
result .base_commit = self .codebase .current_commit .hexsha if self .codebase .current_commit else "HEAD"
174
170
175
- if self ._is_syntax_highlight_enabled :
176
- logger .info ("> Syntax highlighting modified files" )
177
- try :
178
- result .highlighted_diff = syntax_highlight_modified_files (self .codebase , raw_diff , flags )
179
- except Exception as e :
180
- # TODO: this doesn't work during webhooks. Maybe due to installation dependencies?
181
- logger .exception (f"Error! Failed to syntax highlight modified files: { e } " )
182
- else :
183
- logger .info ("> Skipping syntax highlighting, because feature flag is not enabled" )
184
-
185
171
# =====[ Finalize CodemodRun state ]=====
186
172
# Include logs etc.
187
173
logger .info ("> Extracting/formatting logs" )
0 commit comments