Skip to content

Commit 034e715

Browse files
committed
fix(sessions): compile RGI emoji validation
1 parent d667530 commit 034e715

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/sessions/session-agent-status.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export const SESSION_AGENT_STATUS_MAX_TTL_MINUTES = 120;
1212

1313
const ATTENTION_ICON_IDS = new Set<string>(SESSION_AGENT_ATTENTION_ICON_IDS);
1414
// Anchored RGI_Emoji admits exactly one recommended-for-interchange emoji
15-
// sequence (ZWJ families, flags, keycaps included) and nothing else, keeping
16-
// letters like "漢" out of the emoji-only icon contract.
17-
const SESSION_ICON_RE = /^\p{RGI_Emoji}$/v;
15+
// sequence (ZWJ families, flags, keycaps included) and nothing else. Construct
16+
// it dynamically because the repository TypeScript target rejects literal `v` flags.
17+
const SESSION_ICON_RE = new RegExp("^\\p{RGI_Emoji}$", "v");
1818

1919
export function normalizeSessionIconValue(value: string): string | null {
2020
const normalized = value.trim();

0 commit comments

Comments
 (0)