(input: string)
| 14 | * Checks if input matches keep going/continuation patterns |
| 15 | */ |
| 16 | export 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 | } |
| 28 |