MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / updateTaskUnsafe

Function updateTaskUnsafe

source code/utils/tasks.ts:356–370  ·  view source on GitHub ↗
(
  taskListId: string,
  taskId: string,
  updates: Partial<Omit<Task, 'id'>>,
)

Source from the content-addressed store, hash-verified

354// Internal: no lock. Callers already holding a lock on taskPath must use this
355// to avoid deadlock (claimTask, deleteTask cascade, etc.).
356async function updateTaskUnsafe(
357 taskListId: string,
358 taskId: string,
359 updates: Partial<Omit<Task, 'id'>>,
360): Promise<Task | null> {
361 const existing = await getTask(taskListId, taskId)
362 if (!existing) {
363 return null
364 }
365 const updated: Task = { ...existing, ...updates, id: taskId }
366 const path = getTaskPath(taskListId, taskId)
367 await writeFile(path, jsonStringify(updated, null, 2))
368 notifyTasksUpdated()
369 return updated
370}
371
372export async function updateTask(
373 taskListId: string,

Callers 2

updateTaskFunction · 0.85
claimTaskFunction · 0.85

Calls 4

getTaskFunction · 0.85
getTaskPathFunction · 0.85
jsonStringifyFunction · 0.85
notifyTasksUpdatedFunction · 0.85

Tested by

no test coverage detected