MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getVerifyPlanReminderTurnCount

Function getVerifyPlanReminderTurnCount

src/utils/attachments.ts:3872–3889  ·  view source on GitHub ↗
(messages: Message[])

Source from the content-addressed store, hash-verified

3870 * interval fires every ~10 tool calls instead of ~10 human turns.
3871 */
3872export function getVerifyPlanReminderTurnCount(messages: Message[]): number {
3873 let turnCount = 0
3874 for (let i = messages.length - 1; i >= 0; i--) {
3875 const message = messages[i]
3876 if (message && isHumanTurn(message)) {
3877 turnCount++
3878 }
3879 // Stop counting at plan_mode_exit attachment (marks when implementation started)
3880 if (
3881 message?.type === 'attachment' &&
3882 message.attachment.type === 'plan_mode_exit'
3883 ) {
3884 return turnCount
3885 }
3886 }
3887 // No plan_mode_exit found
3888 return 0
3889}
3890
3891/**
3892 * Get verify plan reminder attachment if the model hasn't called VerifyPlanExecution yet.

Callers 1

Calls 1

isHumanTurnFunction · 0.85

Tested by

no test coverage detected