mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-05 15:30:48 +00:00
fix: sync Chat status
This commit is contained in:
parent
28025ea8d4
commit
b9a7b4c69e
2 changed files with 4 additions and 2 deletions
|
|
@ -93,7 +93,7 @@ def list_grouped_chat_history(
|
|||
'last_prompt': None,
|
||||
'tasks': [],
|
||||
'total_completed_tasks': 0,
|
||||
'total_failed_tasks': 0,
|
||||
'total_ongoing_tasks': 0,
|
||||
'average_tokens_per_task': 0
|
||||
})
|
||||
|
||||
|
|
@ -122,6 +122,8 @@ def list_grouped_chat_history(
|
|||
|
||||
if history.status == 2: # ChatStatus.done (completed)
|
||||
project_data['total_completed_tasks'] += 1
|
||||
elif history.status == 1: # ChatStatus.in_progress (ongoing)
|
||||
project_data['total_ongoing_tasks'] += 1
|
||||
|
||||
# Update latest task date and last prompt
|
||||
if history.created_at:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue