MCPcopy Index your code
hub / github.com/liuup/claude-code-analysis / call

Function call

src/tools/TaskCreateTool/TaskCreateTool.ts:80–129  ·  view source on GitHub ↗
({ subject, description, activeForm, metadata }, context)

Source from the content-addressed store, hash-verified

78 return null
79 },
80 async call({ subject, description, activeForm, metadata }, context) {
81 const taskId = await createTask(getTaskListId(), {
82 subject,
83 description,
84 activeForm,
85 status: 'pending',
86 owner: undefined,
87 blocks: [],
88 blockedBy: [],
89 metadata,
90 })
91
92 const blockingErrors: string[] = []
93 const generator = executeTaskCreatedHooks(
94 taskId,
95 subject,
96 description,
97 getAgentName(),
98 getTeamName(),
99 undefined,
100 context?.abortController?.signal,
101 undefined,
102 context,
103 )
104 for await (const result of generator) {
105 if (result.blockingError) {
106 blockingErrors.push(getTaskCreatedHookMessage(result.blockingError))
107 }
108 }
109
110 if (blockingErrors.length > 0) {
111 await deleteTask(getTaskListId(), taskId)
112 throw new Error(blockingErrors.join('\n'))
113 }
114
115 // Auto-expand task list when creating tasks
116 context.setAppState(prev => {
117 if (prev.expandedView === 'tasks') return prev
118 return { ...prev, expandedView: 'tasks' as const }
119 })
120
121 return {
122 data: {
123 task: {
124 id: taskId,
125 subject,
126 },
127 },
128 }
129 },
130 mapToolResultToToolResultBlockParam(content, toolUseID) {
131 const { task } = content as Output
132 return {

Callers

nothing calls this directly

Calls 7

createTaskFunction · 0.85
getTaskListIdFunction · 0.85
executeTaskCreatedHooksFunction · 0.85
getAgentNameFunction · 0.85
getTeamNameFunction · 0.85
deleteTaskFunction · 0.85

Tested by

no test coverage detected