2
0

🔊 Debug radar behavior on prod-live env

This commit is contained in:
Baptiste Arnaud
2024-07-02 11:03:33 +02:00
parent 8f741ea7ae
commit 274a177c8b

View File

@ -6,6 +6,18 @@ type Params = {
export const computeRiskLevel = (typebot: any, params?: Params) => {
const stringifiedTypebot = JSON.stringify(typebot)
console.log(
'debug cumulative',
env.RADAR_CUMULATIVE_KEYWORDS?.forEach((set) =>
set.forEach((keyword) =>
keyword.forEach((k) => {
console.log(
`(?<!(https?://|@)[^\\s"]*)\\b${k}${k.includes('$') ? '' : `\\b`}`
)
})
)
)
)
if (
env.RADAR_HIGH_RISK_KEYWORDS?.some((keyword) =>
new RegExp(