continue-custom/server/continuedev/plugins/steps/clear_history.py
Nate Sesti 7d13f23264 🚧 settings
2023-10-30 15:01:38 -07:00

12 lines
364 B
Python

from ...core.main import SessionUpdate, SetStep, Step
from ...core.sdk import ContinueSDK
class ClearHistoryStep(Step):
name: str = "Clear History"
hide: bool = True
async def run(self, sdk: ContinueSDK):
index = len(sdk.history)
for i in range(index - 1, -1, -1):
yield SessionUpdate(index=i, update=SetStep(hide=True))