diff --git a/ai-hub/app/core/grpc/services/assistant.py b/ai-hub/app/core/grpc/services/assistant.py index dcf8e81..fa56993 100644 --- a/ai-hub/app/core/grpc/services/assistant.py +++ b/ai-hub/app/core/grpc/services/assistant.py @@ -542,7 +542,9 @@ workspace_mirror = self.mirror.get_workspace_path(session_id) dest = os.path.normpath(os.path.join(workspace_mirror, path.lstrip("/"))) try: - if os.path.isdir(dest): + if os.path.islink(dest): + os.unlink(dest) + elif os.path.isdir(dest): shutil.rmtree(dest) elif os.path.exists(dest): os.remove(dest) diff --git a/ai-hub/app/core/tools/definitions/mesh_file_explorer.py b/ai-hub/app/core/tools/definitions/mesh_file_explorer.py index 0c69d01..4d90d6b 100644 --- a/ai-hub/app/core/tools/definitions/mesh_file_explorer.py +++ b/ai-hub/app/core/tools/definitions/mesh_file_explorer.py @@ -82,7 +82,9 @@ f.write(content or "") return {"success": True} elif action == "delete": - if os.path.isdir(target): + if os.path.islink(target): + os.unlink(target) + elif os.path.isdir(target): shutil.rmtree(target) elif os.path.exists(target): os.remove(target) diff --git a/ai-hub/test.db-shm b/ai-hub/test.db-shm index a748772..07b4149 100644 --- a/ai-hub/test.db-shm +++ b/ai-hub/test.db-shm Binary files differ diff --git a/ai-hub/test.db-wal b/ai-hub/test.db-wal index bd2b173..92c4478 100644 --- a/ai-hub/test.db-wal +++ b/ai-hub/test.db-wal Binary files differ