@@ -375,15 +375,6 @@ async def edit_file_contents(
375375 target_content = "" .join (target_lines )
376376 actual_range_hash = self .calculate_hash (target_content )
377377
378- # Debug output for hash comparison
379- print (
380- f"Debug - Range hash comparison:"
381- f"\n Expected: { expected_range_hash } "
382- f"\n Actual: { actual_range_hash } "
383- f"\n Content: { target_content !r} "
384- f"\n Range: { line_start_zero } :{ line_end_zero + 1 } "
385- )
386-
387378 # Compare hashes
388379 # Empty range_hash means explicit insertion
389380 is_insertion = (
@@ -419,11 +410,6 @@ async def edit_file_contents(
419410 # Replace the specified range
420411 lines [line_start_zero : line_end_zero + 1 ] = new_lines
421412
422- # Debug output - shows the operation type
423- print (
424- f"Applied patch: line_start={ line_start } line_end={ line_end } is_insertion={ is_insertion } contents={ patch .contents !r} "
425- )
426-
427413 # Write the final content back to file
428414 final_content = "" .join (lines )
429415 with open (file_path , "w" , encoding = encoding ) as f :
@@ -453,13 +439,9 @@ async def edit_file_contents(
453439 "content" : None ,
454440 }
455441 except Exception as e :
456- import traceback
457-
458- print (f"Error: { str (e )} " )
459- print (f"Traceback:\n { traceback .format_exc ()} " )
460442 return {
461443 "result" : "error" ,
462- "reason" : "Unexpected error occurred " ,
444+ "reason" : f "Unexpected error: { str ( e ) } " ,
463445 "file_hash" : None ,
464446 "content" : None ,
465447 }
0 commit comments