Merge branch 'dev' into hugo-shipping-notice

This commit is contained in:
hugo committed 2026-08-11 14:33:56 +08:00
commit 472b530be3
397 files changed
+46450 -34171

No files matched your search

@@ -26,6 +26,13 @@ export const DEFAULT_TRAINING_HR_CHAT_QUESTIONS = [
'我想查看本月培训成绩统计',
];
/** 返回指定培训角色的默认问题,供管理表单初始化使用。 */
export const getDefaultTrainingChatQuestions = (role: TrainingChatQuestionRole): string[] => (
role === 'hr'
? cloneQuestions(DEFAULT_TRAINING_HR_CHAT_QUESTIONS)
: cloneQuestions(DEFAULT_TRAINING_EMPLOYEE_CHAT_QUESTIONS)
);
const asRecord = (value: unknown): Record<string, unknown> => (
value && typeof value === 'object' && !Array.isArray(value)
? value as Record<string, unknown>
@@ -49,11 +56,7 @@ const normalizeTrainingChatQuestionList = (value: unknown): string[] => {
.filter(Boolean);
};
const getDefaultQuestions = (role: TrainingChatQuestionRole) => (
role === 'hr'
? cloneQuestions(DEFAULT_TRAINING_HR_CHAT_QUESTIONS)
: cloneQuestions(DEFAULT_TRAINING_EMPLOYEE_CHAT_QUESTIONS)
);
const getDefaultQuestions = getDefaultTrainingChatQuestions;
/**
* 读取培训配置中的角色化聊天常见问题。