MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isPlanApprovalRequest

Function isPlanApprovalRequest

src/utils/teammateMailbox.ts:885–897  ·  view source on GitHub ↗
(
  messageText: string,
)

Source from the content-addressed store, hash-verified

883 * Checks if a message text contains a plan approval request
884 */
885export function isPlanApprovalRequest(
886 messageText: string,
887): PlanApprovalRequestMessage | null {
888 try {
889 const result = PlanApprovalRequestMessageSchema().safeParse(
890 jsonParse(messageText),
891 )
892 if (result.success) return result.data
893 } catch {
894 // Not JSON
895 }
896 return null
897}
898
899/**
900 * Checks if a message text contains a shutdown approved message

Callers 3

getPlanApprovalSummaryFunction · 0.85
useInboxPollerFunction · 0.85

Calls 1

jsonParseFunction · 0.85

Tested by

no test coverage detected