MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / taskUpdateHandler

Function taskUpdateHandler

src/cli/handlers/ant.ts:74–101  ·  view source on GitHub ↗
(
  id: string,
  opts: {
    list?: string
    status?: string
    subject?: string
    description?: string
    owner?: string
    clearOwner?: boolean
  },
)

Source from the content-addressed store, hash-verified

72}
73
74export async function taskUpdateHandler(
75 id: string,
76 opts: {
77 list?: string
78 status?: string
79 subject?: string
80 description?: string
81 owner?: string
82 clearOwner?: boolean
83 },
84): Promise<void> {
85 const listId = opts.list || DEFAULT_LIST
86 const updates: Record<string, unknown> = {}
87
88 if (opts.status) updates.status = opts.status
89 if (opts.subject) updates.subject = opts.subject
90 if (opts.description) updates.description = opts.description
91 if (opts.owner) updates.owner = opts.owner
92 if (opts.clearOwner) updates.owner = undefined
93
94 const task = await updateTask(listId, id, updates)
95 if (!task) {
96 console.error(`Task not found: ${id}`)
97 process.exitCode = 1
98 return
99 }
100 console.log(`Updated task ${id}: [${task.status}] ${task.subject}`)
101}
102
103export async function taskDirHandler(opts: { list?: string }): Promise<void> {
104 const listId = opts.list || DEFAULT_LIST

Callers 1

runFunction · 0.85

Calls 2

updateTaskFunction · 0.85
errorMethod · 0.65

Tested by

no test coverage detected