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

Function isShutdownRejected

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

Source from the content-addressed store, hash-verified

917 * Checks if a message text contains a shutdown rejected message
918 */
919export function isShutdownRejected(
920 messageText: string,
921): ShutdownRejectedMessage | null {
922 try {
923 const result = ShutdownRejectedMessageSchema().safeParse(
924 jsonParse(messageText),
925 )
926 if (result.success) return result.data
927 } catch {
928 // Not JSON
929 }
930 return null
931}
932
933/**
934 * Checks if a message text contains a plan approval response

Callers 2

tryRenderShutdownMessageFunction · 0.85

Calls 1

jsonParseFunction · 0.85

Tested by

no test coverage detected