mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-14 16:42:47 +00:00
refactor: total_failed_tasks -> total_ongoing_tasks
This commit is contained in:
parent
b9a7b4c69e
commit
3b18bb64ff
5 changed files with 7 additions and 10 deletions
|
|
@ -189,12 +189,12 @@ export default function ProjectDialog({
|
|||
|
||||
<div className="flex flex-col gap-xs">
|
||||
<span className="text-text-label text-label-sm font-normal">
|
||||
{t("layout.failed")}
|
||||
{t("layout.ongoing")}
|
||||
</span>
|
||||
<div className="flex flex-row items-center gap-sm">
|
||||
<CircleSlash className="w-4 h-4 text-icon-cuation" />
|
||||
<CircleSlash className="w-4 h-4 text-icon-information" />
|
||||
<span className="text-text-heading text-body-lg font-bold">
|
||||
{project.total_failed_tasks}
|
||||
{project.total_ongoing_tasks}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -110,10 +110,9 @@ export default function ProjectGroup({
|
|||
return date.toLocaleDateString();
|
||||
};
|
||||
|
||||
// Calculate if project has issues (failed tasks or tasks requiring human in the loop)
|
||||
const hasFailedTasks = project.total_failed_tasks > 0;
|
||||
// Calculate if project has issues (requiring human in the loop)
|
||||
const hasHumanInLoop = project.ongoing_tasks?.some(task => task.status === 'pending') || false;
|
||||
const hasIssue = hasFailedTasks || hasHumanInLoop;
|
||||
const hasIssue = hasHumanInLoop;
|
||||
|
||||
// Calculate agent count (placeholder - count unique agents from tasks if available)
|
||||
const agentCount = project.tasks?.length > 0
|
||||
|
|
|
|||
|
|
@ -207,7 +207,6 @@ export default function GroupedHistoryView({
|
|||
tasks: [],
|
||||
ongoing_tasks: [],
|
||||
total_completed_tasks: 0,
|
||||
total_failed_tasks: 0,
|
||||
total_ongoing_tasks: 0,
|
||||
average_tokens_per_task: 0
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const groupTasksByProject = (tasks: HistoryTask[]): ProjectGroup[] => {
|
|||
latest_task_date: task.created_at || new Date().toISOString(),
|
||||
tasks: [],
|
||||
total_completed_tasks: 0,
|
||||
total_failed_tasks: 0,
|
||||
total_ongoing_tasks: 0,
|
||||
average_tokens_per_task: 0,
|
||||
last_prompt: task.question || "",
|
||||
});
|
||||
|
|
|
|||
3
src/types/history.d.ts
vendored
3
src/types/history.d.ts
vendored
|
|
@ -45,8 +45,7 @@ export interface ProjectGroup {
|
|||
ongoing_tasks?: OngoingTask[]; // Add ongoing tasks to the project group
|
||||
// Additional project-level metadata
|
||||
total_completed_tasks: number;
|
||||
total_failed_tasks: number;
|
||||
total_ongoing_tasks?: number;
|
||||
total_ongoing_tasks: number;
|
||||
average_tokens_per_task: number;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue