@@ -469,17 +469,6 @@ def __init__(
469469 self .pretty = self .io .pretty
470470
471471 self .main_model = main_model
472- # Clean up todo list file on startup unless preserve_todo_list is True
473- if not getattr (self , "preserve_todo_list" , False ):
474- todo_file_path = ".aider.todo.txt"
475- abs_path = self .abs_root_path (todo_file_path )
476- if os .path .isfile (abs_path ):
477- try :
478- os .remove (abs_path )
479- if self .verbose :
480- self .io .tool_output (f"Removed existing todo list file: { todo_file_path } " )
481- except Exception as e :
482- self .io .tool_warning (f"Could not remove todo list file { todo_file_path } : { e } " )
483472
484473 # Set the reasoning tag name based on model settings or default
485474 self .reasoning_tag_name = (
@@ -611,6 +600,18 @@ def __init__(
611600 self .auto_test = auto_test
612601 self .test_cmd = test_cmd
613602
603+ # Clean up todo list file on startup unless preserve_todo_list is True
604+ if not getattr (self , "preserve_todo_list" , False ):
605+ todo_file_path = ".aider.todo.txt"
606+ abs_path = self .abs_root_path (todo_file_path )
607+ if os .path .isfile (abs_path ):
608+ try :
609+ os .remove (abs_path )
610+ if self .verbose :
611+ self .io .tool_output (f"Removed existing todo list file: { todo_file_path } " )
612+ except Exception as e :
613+ self .io .tool_warning (f"Could not remove todo list file { todo_file_path } : { e } " )
614+
614615 # Instantiate MCP tools
615616 if self .mcp_servers :
616617 pass
@@ -1279,7 +1280,7 @@ async def check_for_urls(self, inp: str) -> List[str]:
12791280 "Add URL to the chat?" , subject = url , group = group , allow_never = True
12801281 ):
12811282 inp += "\n \n "
1282- inp += self .commands .cmd_web (url , return_content = True )
1283+ inp += await self .commands .cmd_web (url , return_content = True )
12831284 else :
12841285 self .rejected_urls .add (url )
12851286
0 commit comments