ready for user test 1.01
This commit is contained in:
parent
237d9b5752
commit
0e034e253d
2 changed files with 8 additions and 19 deletions
|
|
@ -1153,23 +1153,11 @@ Please provide a comprehensive summary of this conversation."""
|
|||
return {'currentRound': 0, 'currentTask': 0, 'currentAction': 0}
|
||||
|
||||
def incrementWorkflowContext(self, context_type: str):
|
||||
"""Increment workflow context counters"""
|
||||
"""Increment workflow context counters (task and action only - rounds handled in interface layer)"""
|
||||
try:
|
||||
update_data = {}
|
||||
|
||||
if context_type == 'round':
|
||||
current_round = self.workflow.currentRound if hasattr(self.workflow, 'currentRound') else 0
|
||||
self.workflow.currentRound = current_round + 1
|
||||
# Reset task and action when round changes
|
||||
self.workflow.currentTask = 0
|
||||
self.workflow.currentAction = 0
|
||||
update_data = {
|
||||
"currentRound": self.workflow.currentRound,
|
||||
"currentTask": 0,
|
||||
"currentAction": 0
|
||||
}
|
||||
logger.info(f"Incremented workflow round to {self.workflow.currentRound}")
|
||||
elif context_type == 'task':
|
||||
if context_type == 'task':
|
||||
current_task = self.workflow.currentTask if hasattr(self.workflow, 'currentTask') else 0
|
||||
self.workflow.currentTask = current_task + 1
|
||||
# Reset action when task changes
|
||||
|
|
|
|||
|
|
@ -872,7 +872,7 @@ class ChatObjects:
|
|||
# Wait a moment for any running processes to detect the stop
|
||||
await asyncio.sleep(0.1)
|
||||
|
||||
# Update workflow - set status back to running for resumed workflows
|
||||
# Update workflow - increment round for existing workflows
|
||||
newRound = workflow.currentRound + 1
|
||||
self.updateWorkflow(workflowId, {
|
||||
"status": "running", # Set status back to running for resumed workflows
|
||||
|
|
@ -880,14 +880,15 @@ class ChatObjects:
|
|||
"currentRound": newRound
|
||||
})
|
||||
|
||||
# Update the workflow object status and round number as well
|
||||
workflow.status = "running"
|
||||
workflow.currentRound = newRound
|
||||
# Reload workflow object to get updated currentRound from database
|
||||
workflow = self.loadWorkflowState(workflowId)
|
||||
if not workflow:
|
||||
raise ValueError(f"Failed to reload workflow {workflowId} after update")
|
||||
|
||||
# Add log entry for workflow resumption
|
||||
self.createWorkflowLog({
|
||||
"workflowId": workflowId,
|
||||
"message": f"Workflow resumed (round {workflow.currentRound + 1})",
|
||||
"message": f"Workflow resumed (round {workflow.currentRound})",
|
||||
"type": "info",
|
||||
"status": "running",
|
||||
"progress": 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue