This commit is contained in:
runny committed 2026-05-12 14:33:48 +08:00
1 parent 08a19ebe96
commit dea3b39048
6 files changed
+240 -33

No files matched your search

+4 -1
View File
@@ -571,7 +571,10 @@ const getLeaveIntentNormalized = (content: string) => (content || '').replace(/\
const isLeaveIntent = (content: string) => {
const normalized = getLeaveIntentNormalized(content);
return /(我要请假|申请请假|发起请假|请假申请|我要休假|申请休假|我要请个假|想请假|我要走请假流程|请假流程)/.test(normalized);
// 弱意图(咨询流程/步骤)应走正常问答,不触发表单分流。
const weakConsultationIntent = /(请假流程|请假怎么走|请假步骤|请假如何申请|请假如何走流程|请假怎么办|请假需要什么|请假规定)/;
if (weakConsultationIntent.test(normalized)) return false;
return /(我要请假|申请请假|发起请假|请假申请|我要休假|申请休假|我要请个假|想请假|帮我请假|代我请假|提交请假)/.test(normalized);
};
const getLeaveFormPayload = (msg: any): LeaveFormPayload | null => (