Why: Codex stop-time review #4 — the previous regex covered ~17 nouns but design-type.md documents 25 (button / label / row / item / selector / panel / chart were missing) and the CJK 卡片 alias was also listed. JS `\b` is ASCII-only and never fires between two CJK chars, so `\b卡片\b` matched nothing in "design a 卡片". What: split into COMPONENT_TRIGGER_LATIN_RE (full noun list with `\b` boundaries) + COMPONENT_TRIGGER_CJK_RE (kana-free subset of the most common Chinese aliases — 卡片 / 徽章 / 标签 / 按钮 / 开关 / 对话框 / 提示 / 气泡 / 图表). Either match is enough to classify Type 0. Disqualifier regex also gains 屏幕 (screen in zh-Hans). Tests: 23 it.each cases pin one Latin trigger each plus the CJK 卡片; 6 negative cases prove the disqualifier still wins for "X screen / page / app / onboarding / flow" prompts. 1055 / 1055 AI tests pass (was 1027; +28 new). |
||
|---|---|---|
| .. | ||
| public | ||
| server | ||
| src | ||
| CLAUDE.md | ||
| components.json | ||
| dev.ts | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||