Merge branch 'main' into local_st

This commit is contained in:
Wendong-Fan 2025-09-03 19:48:15 +08:00 committed by GitHub
commit 54230ef2b4
3 changed files with 23 additions and 16 deletions

View file

@ -12,7 +12,7 @@ body:
id: version
attributes:
label: What version of eigent are you using?
placeholder: E.g., 0.0.63
placeholder: E.g., 0.0.65
validations:
required: true

View file

@ -1,6 +1,6 @@
{
"name": "eigent",
"version": "0.0.63",
"version": "0.0.65",
"main": "dist-electron/main/index.js",
"description": "Eigent",
"author": "Eigent.AI",

View file

@ -605,23 +605,29 @@ const chatStore = create<ChatStore>()(
// The following logic is for when the task actually starts executing (running)
if (taskAssigning && taskAssigning[assigneeAgentIndex]) {
// const exist = taskAssigning[assigneeAgentIndex].tasks.find(item => item.id === task_id);
let taskTemp = null
if (task) {
taskTemp = JSON.parse(JSON.stringify(task))
taskTemp.failure_count = 0
taskTemp.status = "running"
taskTemp.toolkits = []
taskTemp.report = ""
// Check if task already exists in the agent's task list
const existingTaskIndex = taskAssigning[assigneeAgentIndex].tasks.findIndex(item => item.id === task_id);
if (existingTaskIndex !== -1) {
// Task already exists, update its status
taskAssigning[assigneeAgentIndex].tasks[existingTaskIndex].status = "running";
} else {
// Task doesn't exist, add it
let taskTemp = null
if (task) {
taskTemp = JSON.parse(JSON.stringify(task))
taskTemp.failure_count = 0
taskTemp.status = "running"
taskTemp.toolkits = []
taskTemp.report = ""
}
taskAssigning[assigneeAgentIndex].tasks.push(taskTemp ?? { id: task_id, content, status: "running", });
}
taskAssigning[assigneeAgentIndex].tasks.push(taskTemp ?? { id: task_id, content, status: "running", });
// if (exist) {
// exist.status = "running";
// } else {
// taskAssigning[assigneeAgentIndex].tasks.push(taskTemp ?? { id: task_id, content, status: "running", });
// }
}
// Only update or add to taskRunning, never duplicate
if (taskRunningIndex === -1) {
// Task not in taskRunning, add it
taskRunning!.push(
task ?? {
id: task_id,
@ -631,6 +637,7 @@ const chatStore = create<ChatStore>()(
}
);
} else {
// Task already in taskRunning, update it
taskRunning![taskRunningIndex] = {
...taskRunning![taskRunningIndex],
content,