Skip to content

Devika is the first open-source implementation of an Agentic Software Engineer. Initially started as an open-source alternative to Devin.

Python

fix: delete all states of project

[email protected]30e982866b20
diff --git a/src/state.py b/src/state.py
index e870893..44677fc 100644
--- a/src/state.py
+++ b/src/state.py
@@ -57,7 +57,8 @@ class AgentState:
with Session(self.engine) as session:
agent_state = session.query(AgentStateModel).filter(AgentStateModel.project == project).all()
if agent_state:
- session.delete(agent_state)
+ for state in agent_state:
+ session.delete(state)
session.commit()
def add_to_current_state(self, project: str, state: dict):