Merge branch 'runny&xinxin' into dev

This commit is contained in:
super committed 2026-05-14 10:58:26 +08:00
commit 8d73343bd8
77 files changed
+17955 -274

No files matched your search

+4 -20
View File
@@ -628,26 +628,10 @@ const getLeaveIntentNormalized = (content: string) => (content || '').replace(/\
const isStrongLeaveIntent = (content: string) => {
const normalized = getLeaveIntentNormalized(content);
return /(我要请假|申请请假|发起请假|请假申请|我要休假|申请休假|我要请个假|想请假|我要走请假流程)/.test(normalized);
};
const startLocalLeaveFlow = (content: string) => {
const formId = newLocalMessageId('leave-form');
const payload: LeaveFormPayload = {
formId,
form: createLeaveFormData(),
submitting: false,
confirmationGenerated: false,
};
messages.value.push({ role: 'user', content, type: 'text' });
messages.value.push({
role: 'assistant',
type: 'leave-form',
content: '已为你生成请假申请表,请直接在下方填写并提交。或登录OA系统直接申请',
payload,
local_id: formId,
local_only: true,
});
// 弱意图(咨询流程/步骤)应走正常问答,不触发表单分流。
const weakConsultationIntent = /(请假流程|请假怎么走|请假步骤|请假如何申请|请假如何走流程|请假怎么办|请假需要什么|请假规定)/;
if (weakConsultationIntent.test(normalized)) return false;
return /(我要请假|申请请假|发起请假|请假申请|我要休假|申请休假|我要请个假|想请假|帮我请假|代我请假|提交请假)/.test(normalized);
};
const getLeaveFormPayload = (msg: any): LeaveFormPayload | null => (