66
77from  codegen .git .models .pr_options  import  PROptions 
88from  codegen .runner .diff .get_raw_diff  import  get_raw_diff 
9- from  codegen .runner .diff .syntax_highlight  import  syntax_highlight_modified_files 
109from  codegen .runner .models .codemod  import  BranchConfig , Codemod , CodemodRunResult , CreatedBranch , GroupingConfig 
11- from  codegen .runner .models .configs  import  get_runner_feature_flags 
1210from  codegen .runner .sandbox .repo  import  SandboxRepo 
1311from  codegen .runner .utils .branch_name  import  get_head_branch_name 
1412from  codegen .runner .utils .exception_utils  import  update_observation_meta 
@@ -29,12 +27,10 @@ class SandboxExecutor:
2927
3028    codebase : CodebaseType 
3129    remote_repo : SandboxRepo 
32-     _is_syntax_highlight_enabled : bool 
3330
3431    def  __init__ (self , codebase : CodebaseType ):
3532        self .codebase  =  codebase 
3633        self .remote_repo  =  SandboxRepo (self .codebase )
37-         self ._is_syntax_highlight_enabled  =  get_runner_feature_flags ().syntax_highlight 
3834
3935    async  def  find_flags (self , execute_func : Callable ) ->  list [CodeFlag ]:
4036        """Runs the execute_func in find_mode to find flags""" 
@@ -172,16 +168,6 @@ async def _get_structured_run_output(self, result: CodemodRunResult) -> CodemodR
172168        result .observation  =  raw_diff 
173169        result .base_commit  =  self .codebase .current_commit .hexsha  if  self .codebase .current_commit  else  "HEAD" 
174170
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- 
185171        # =====[ Finalize CodemodRun state ]===== 
186172        # Include logs etc. 
187173        logger .info ("> Extracting/formatting logs" )
0 commit comments