MCPcopy
hub / github.com/claude-code-best/claude-code / updateTask

Function updateTask

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

Source from the content-addressed store, hash-verified

368}
369
370export async function updateTask(
371 taskListId: string,
372 taskId: string,
373 updates: Partial<Omit<Task, 'id'>>,
374): Promise<Task | null> {
375 const path = getTaskPath(taskListId, taskId)
376
377 // Check existence before locking — proper-lockfile throws if the
378 // target file doesn't exist, and we want a clean null result.
379 const taskBeforeLock = await getTask(taskListId, taskId)
380 if (!taskBeforeLock) {
381 return null
382 }
383
384 let release: (() => Promise<void>) | undefined
385 try {
386 release = await lockfile.lock(path, LOCK_OPTIONS)
387 return await updateTaskUnsafe(taskListId, taskId, updates)
388 } finally {
389 await release?.()
390 }
391}
392
393export async function deleteTask(
394 taskListId: string,

Callers 9

tasks.test.tsFile · 0.90
callFunction · 0.85
deleteTaskFunction · 0.85
blockTaskFunction · 0.85
claimTaskWithBusyCheckFunction · 0.85
unassignTeammateTasksFunction · 0.85
tryClaimNextTaskFunction · 0.85
taskUpdateHandlerFunction · 0.85
useTaskListWatcherFunction · 0.85

Calls 4

getTaskPathFunction · 0.85
getTaskFunction · 0.85
updateTaskUnsafeFunction · 0.85
releaseFunction · 0.50

Tested by

no test coverage detected