From bbc3c10cbbddce75987d14e158bf061797b8153a Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Wed, 27 Aug 2025 21:57:13 +0100 Subject: [PATCH 1/2] updated AgentTideUi --- codetide/agents/tide/ui/agent_tide_ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codetide/agents/tide/ui/agent_tide_ui.py b/codetide/agents/tide/ui/agent_tide_ui.py index 1d1ee70..f2e24f8 100644 --- a/codetide/agents/tide/ui/agent_tide_ui.py +++ b/codetide/agents/tide/ui/agent_tide_ui.py @@ -59,7 +59,8 @@ async def load(self): llm=llm, tide=await initCodeTide(workspace=self.project_path), history=self.history, - session_id=self.session_id + session_id=self.session_id, + request_human_confirmation=True ) self.agent_tide.llm.session_id = self.agent_tide.session_id From f52131a200568d366be0f258763653256256c839 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Wed, 27 Aug 2025 21:58:03 +0100 Subject: [PATCH 2/2] added delete_file --- codetide/agents/tide/utils.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/codetide/agents/tide/utils.py b/codetide/agents/tide/utils.py index 73a7172..496a8e3 100644 --- a/codetide/agents/tide/utils.py +++ b/codetide/agents/tide/utils.py @@ -1,6 +1,7 @@ from codetide.core.defaults import DEFAULT_ENCODING from typing import List, Union +import aiofiles.os import aiofiles import os import re @@ -114,3 +115,30 @@ def parse_steps_markdown(md: str): }) return steps + +async def delete_file(file_path: str) -> bool: + """ + Safely delete a file asynchronously. + + Args: + file_path: Path to the file to delete + + Returns: + bool: True if file was deleted, False if it didn't exist + + Raises: + PermissionError: If lacking permissions to delete + OSError: For other OS-related errors + """ + try: + await aiofiles.os.remove(file_path) + return True + except FileNotFoundError: + # File doesn't exist - consider this "success" + return False + except PermissionError: + # Handle permission issues + raise + except OSError: + # Handle other OS errors (disk full, etc.) + raise