* 添加任务备注
(id: string, note: string)
| 443 | * 添加任务备注 |
| 444 | */ |
| 445 | public addTaskNote(id: string, note: string): WorkflowTask { |
| 446 | const task = this.getTask(id); |
| 447 | if (!task) { |
| 448 | throw new Error(`任务不存在: ${id}`); |
| 449 | } |
| 450 | |
| 451 | const updatedNotes = [...task.notes, `[${new Date().toISOString()}] ${note}`]; |
| 452 | return this.updateTask(id, { notes: updatedNotes }); |
| 453 | } |
| 454 | |
| 455 | /** |
| 456 | * 保存todo.md文件 |
no test coverage detected