MCPcopy
hub / github.com/7836246/cursor2api / isRefusal

Function isRefusal

test/e2e-ctf-proxy.mjs:142–144  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

140];
141
142function isRefusal(text) {
143 return REFUSAL_PATTERNS.some(p => p.test(text));
144}
145function isEngaged(text) {
146 // 需要匹配到多个关键词才算"真正入戏"
147 const matches = ENGAGED_KEYWORDS.filter(p => p.test(text));

Callers 15

executeAttemptFunction · 0.90
handleOpenAIStreamFunction · 0.90
shouldRetryRefusalFunction · 0.90
shouldRetryFunction · 0.90
handleOpenAINonStreamFunction · 0.90
handleResponsesStreamFunction · 0.90
handleResponsesNonStreamFunction · 0.90
handleDirectTextStreamFunction · 0.90
executeAttemptFunction · 0.90
executeStreamFunction · 0.90
handleStreamFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected