Skip to content

Commit da8dafb

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Brian Horakh <35611074+elasticdotventures@users.noreply.github.com>
1 parent 512f8e1 commit da8dafb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

functions/lib/comic-generator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ function sanitizeExpression(input: unknown, speaker: string, pose?: string, robo
343343
if ((COMIC_EXPRESSIONS as string[]).includes(raw)) return raw as ComicExpression;
344344

345345
const hint = `${pose || ''} ${robotThought || ''} ${dialogue || ''}`.toLowerCase();
346-
if (/\bpanic|fail|outage|sev|fire|rollback|broken\b/.test(hint)) return allowed.includes('panicked') ? 'panicked' : allowed[0];
347-
if (/\bthink|parse|trace|debug|why|how\b/.test(hint)) return allowed.includes('thinking') ? 'thinking' : allowed[0];
348-
if (/\bconfus|uncertain|maybe|what\b/.test(hint)) return allowed.includes('confused') ? 'confused' : allowed[0];
349-
if (/\bsmug|yes|success|autonomous\b/.test(hint)) return allowed.includes('smug') ? 'smug' : allowed[0];
346+
if (/\b(?:panic|fail|outage|sev|fire|rollback|broken)\b/.test(hint)) return allowed.includes('panicked') ? 'panicked' : allowed[0];
347+
if (/\b(?:think|parse|trace|debug|why|how)\b/.test(hint)) return allowed.includes('thinking') ? 'thinking' : allowed[0];
348+
if (/\b(?:confus|uncertain|maybe|what)\b/.test(hint)) return allowed.includes('confused') ? 'confused' : allowed[0];
349+
if (/\b(?:smug|yes|success|autonomous)\b/.test(hint)) return allowed.includes('smug') ? 'smug' : allowed[0];
350350
if (speaker === 'simon') return 'deadpan';
351351
if (speaker === 'boss') return 'smug';
352352
if (speaker === 'robot') return 'thinking';

0 commit comments

Comments
 (0)