| 818 | } |
| 819 | |
| 820 | export const getInputVariables = (input) => { |
| 821 | // This regex will match single curly-braced substrings |
| 822 | const pattern = /\{([^{}]+)\}/g |
| 823 | const results = [] |
| 824 | |
| 825 | let match |
| 826 | |
| 827 | while ((match = pattern.exec(input)) !== null) { |
| 828 | const inside = match[1].trim() |
| 829 | |
| 830 | // Check if there's a colon |
| 831 | if (!inside.includes(':')) { |
| 832 | // If there's no colon, add to results |
| 833 | results.push(inside) |
| 834 | } |
| 835 | } |
| 836 | |
| 837 | return results |
| 838 | } |
| 839 | |
| 840 | export const removeDuplicateURL = (message) => { |
| 841 | const visitedURLs = [] |