MCPcopy
hub / github.com/cft0808/edict / update_task_todos

Function update_task_todos

dashboard/server.py:275–285  ·  view source on GitHub ↗

Update the todos list for a task.

(task_id, todos)

Source from the content-addressed store, hash-verified

273
274
275def 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
288def read_skill_content(agent_id, skill_name):

Callers 1

do_POSTMethod · 0.85

Calls 3

now_isoFunction · 0.90
load_tasksFunction · 0.85
save_tasksFunction · 0.85

Tested by

no test coverage detected