source dump of claude code
at main 27 lines 929 B view raw
1/** 2 * Checks if input matches negative keyword patterns 3 */ 4export function matchesNegativeKeyword(input: string): boolean { 5 const lowerInput = input.toLowerCase() 6 7 const negativePattern = 8 /\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/ 9 10 return negativePattern.test(lowerInput) 11} 12 13/** 14 * Checks if input matches keep going/continuation patterns 15 */ 16export function matchesKeepGoingKeyword(input: string): boolean { 17 const lowerInput = input.toLowerCase().trim() 18 19 // Match "continue" only if it's the entire prompt 20 if (lowerInput === 'continue') { 21 return true 22 } 23 24 // Match "keep going" or "go on" anywhere in the input 25 const keepGoingPattern = /\b(keep going|go on)\b/ 26 return keepGoingPattern.test(lowerInput) 27}