diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-06-27 11:03:44 -0700 |
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-06-27 11:03:44 -0700 |
| commit | d45ce41f6476a96cd0e4d375f7cd00393865d9cf (patch) | |
| tree | 5ab1963dd0836a1dc86980c16f1c98b4afe40815 /continuedev/src/continuedev/core | |
| parent | 96483ac8c7603c594766c3a6f6abd279c7f85da4 (diff) | |
| download | sncontinue-d45ce41f6476a96cd0e4d375f7cd00393865d9cf.tar.gz sncontinue-d45ce41f6476a96cd0e4d375f7cd00393865d9cf.tar.bz2 sncontinue-d45ce41f6476a96cd0e4d375f7cd00393865d9cf.zip | |
stop completion early, accept all improvements
Diffstat (limited to 'continuedev/src/continuedev/core')
| -rw-r--r-- | continuedev/src/continuedev/core/autopilot.py | 2 | ||||
| -rw-r--r-- | continuedev/src/continuedev/core/sdk.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py index a6e688ae..17eb70b3 100644 --- a/continuedev/src/continuedev/core/autopilot.py +++ b/continuedev/src/continuedev/core/autopilot.py @@ -121,7 +121,7 @@ class Autopilot(ContinueBaseModel): # If a parent step is deleted/cancelled, don't run this step last_depth = self._step_depth i = self.history.current_index - while i >= 0 and self.history.timeline[i].depth == last_depth + 1: + while i >= 0 and self.history.timeline[i].depth == last_depth - 1: if self.history.timeline[i].deleted: return None last_depth = self.history.timeline[i].depth diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py index d6acc404..8b82aee0 100644 --- a/continuedev/src/continuedev/core/sdk.py +++ b/continuedev/src/continuedev/core/sdk.py @@ -207,3 +207,6 @@ class ContinueSDK(AbstractContinueSDK): async def clear_history(self): await self.__autopilot.clear_history() + + def current_step_was_deleted(self): + return self.history.timeline[self.history.current_index].deleted |
