mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-21 20:16:18 +00:00
* feat(scheduled-tasks): search task titles and prompts Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com> * docs(scheduled-tasks): separate search from time validation notes Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com> * fix(frontend): order scheduled-task imports --------- Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
26 lines
584 B
TypeScript
26 lines
584 B
TypeScript
import { expect, test } from "@rstest/core";
|
|
|
|
import { matchesScheduledTaskQuery } from "@/core/scheduled-tasks/search";
|
|
|
|
const task = {
|
|
title: "Weekly REPORT [draft]",
|
|
prompt: "汇总项目进度 and revenue",
|
|
};
|
|
|
|
test.each([
|
|
["", true],
|
|
[" ", true],
|
|
[" report ", true],
|
|
["REVENUE", true],
|
|
["项目进度", true],
|
|
["[draft]", true],
|
|
[".*", false],
|
|
["missing", false],
|
|
["draft] 汇总", false],
|
|
])(
|
|
"matches query %s as a literal title or prompt substring",
|
|
(query, expected) => {
|
|
expect(matchesScheduledTaskQuery(task, query)).toBe(expected);
|
|
},
|
|
);
|