MCPcopy Create free account
hub / github.com/WJX20/claude-code / handleShutdownRejection

Function handleShutdownRejection

src/tools/SendMessageTool/SendMessageTool.ts:401–432  ·  view source on GitHub ↗
(
  requestId: string,
  reason: string,
)

Source from the content-addressed store, hash-verified

399}
400
401async function handleShutdownRejection(
402 requestId: string,
403 reason: string,
404): Promise<{ data: ResponseOutput }> {
405 const teamName = getTeamName()
406 const agentName = getAgentName() || 'teammate'
407
408 const rejectedMessage = createShutdownRejectedMessage({
409 requestId,
410 from: agentName,
411 reason,
412 })
413
414 await writeToMailbox(
415 TEAM_LEAD_NAME,
416 {
417 from: agentName,
418 text: jsonStringify(rejectedMessage),
419 timestamp: new Date().toISOString(),
420 color: getTeammateColor(),
421 },
422 teamName,
423 )
424
425 return {
426 data: {
427 success: true,
428 message: `Shutdown rejected. Reason: "${reason}". Continuing to work.`,
429 request_id: requestId,
430 },
431 }
432}
433
434async function handlePlanApproval(
435 recipientName: string,

Callers 1

callFunction · 0.85

Calls 6

getTeamNameFunction · 0.85
getAgentNameFunction · 0.85
writeToMailboxFunction · 0.85
jsonStringifyFunction · 0.85
getTeammateColorFunction · 0.50

Tested by

no test coverage detected