13 lines
623 B
TypeScript
13 lines
623 B
TypeScript
export function normalizeCompactTaskBoundaryText(text: string) {
|
|
return String(text || "").toLowerCase().replace(/\s+/g, "").trim();
|
|
}
|
|
|
|
export function isCapabilityQuestionTurnRequest(text: string): boolean {
|
|
const normalized = normalizeCompactTaskBoundaryText(text);
|
|
if (!normalized) return false;
|
|
|
|
return /你.*(?:能|会|可以|可|嫩)?.*(?:为我做什么|帮我做什么|帮我什么|做什么|干什么)|你.*(?:有哪些|有什么).*(?:功能|能力)|(?:介绍|说说).*(?:功能|能力|你自己|自己)|怎么用|怎么玩|如何使用|帮助说明|帮助手册|功能介绍/.test(
|
|
normalized,
|
|
);
|
|
}
|