feat: delete all bot log images at startup (#1650)

This commit is contained in:
Junyan Qin
2025-11-06 20:02:07 +08:00
parent cb48221ed3
commit 17070471f7
4 changed files with 22 additions and 1 deletions

View File

@@ -157,6 +157,9 @@ class PlatformManager:
self.adapter_dict = {}
async def initialize(self):
# delete all bot log images
await self.ap.storage_mgr.storage_provider.delete_dir_recursive('bot_log_images')
self.adapter_components = self.ap.discover.get_components_by_kind('MessagePlatformAdapter')
adapter_dict: dict[str, type[abstract_platform_adapter.AbstractMessagePlatformAdapter]] = {}
for component in self.adapter_components: