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

Function hasFrictionSignal

src/hooks/useIssueFlagBanner.ts:74–87  ·  view source on GitHub ↗
(messages: Message[])

Source from the content-addressed store, hash-verified

72}
73
74export function hasFrictionSignal(messages: Message[]): boolean {
75 for (let i = messages.length - 1; i >= 0; i--) {
76 const msg = messages[i]!
77 if (msg.type !== 'user') {
78 continue
79 }
80 const text = getUserMessageText(msg)
81 if (!text) {
82 continue
83 }
84 return FRICTION_PATTERNS.some(p => p.test(text))
85 }
86 return false
87}
88
89const MIN_SUBMIT_COUNT = 3
90const COOLDOWN_MS = 30 * 60 * 1000

Callers 1

useIssueFlagBannerFunction · 0.85

Calls 1

getUserMessageTextFunction · 0.85

Tested by

no test coverage detected