mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-14 23:21:04 +00:00
16 lines
573 B
Python
16 lines
573 B
Python
"""Clear the file store before reusing the standard init change producer."""
|
|
|
|
from ..base_step import BaseStep
|
|
from ...components import R
|
|
|
|
|
|
@R.register("clear_store_step")
|
|
class ClearStoreStep(BaseStep):
|
|
"""Wipe ``file_store`` so ``init_changes_step(store=file_store)`` sees all files as added."""
|
|
|
|
async def execute(self):
|
|
assert self.context is not None
|
|
await self.file_store.clear()
|
|
self.context.response.metadata["cleared_store"] = True
|
|
self.logger.info(f"[{self.name}] cleared file_store")
|
|
return self.context.response
|