Update the todos list for a task.
(task_id, todos)
| 273 | |
| 274 | |
| 275 | def update_task_todos(task_id, todos): |
| 276 | """Update the todos list for a task.""" |
| 277 | tasks = load_tasks() |
| 278 | task = next((t for t in tasks if t.get('id') == task_id), None) |
| 279 | if not task: |
| 280 | return {'ok': False, 'error': f'任务 {task_id} 不存在'} |
| 281 | |
| 282 | task['todos'] = todos |
| 283 | task['updatedAt'] = now_iso() |
| 284 | save_tasks(tasks) |
| 285 | return {'ok': True, 'message': f'{task_id} todos 已更新'} |
| 286 | |
| 287 | |
| 288 | def read_skill_content(agent_id, skill_name): |
no test coverage detected