Add wechat reminder LLM toggle
This commit is contained in:
@@ -10,12 +10,46 @@ test('parses daily 7am todo digest request', () => {
|
||||
assert.equal(intent.minute, 0);
|
||||
});
|
||||
|
||||
test('parses daily digest request for today todos in direct wording', () => {
|
||||
const intent = parseScheduleIntent('每天早上7点把当天待办发给我');
|
||||
assert.equal(intent.action, 'create_daily_todo_digest');
|
||||
assert.equal(intent.hour, 7);
|
||||
assert.equal(intent.minute, 0);
|
||||
});
|
||||
|
||||
test('parses daily digest request with concise today wording', () => {
|
||||
const intent = parseScheduleIntent('每天7点发我今天待办');
|
||||
assert.equal(intent.action, 'create_daily_todo_digest');
|
||||
assert.equal(intent.hour, 7);
|
||||
assert.equal(intent.minute, 0);
|
||||
});
|
||||
|
||||
test('parses daily digest request with chinese numeral time', () => {
|
||||
const intent = parseScheduleIntent('以后每天早上七点把当天任务发送给我');
|
||||
assert.equal(intent.action, 'create_daily_todo_digest');
|
||||
assert.equal(intent.hour, 7);
|
||||
assert.equal(intent.minute, 0);
|
||||
});
|
||||
|
||||
test('parses daily digest request with half hour', () => {
|
||||
const intent = parseScheduleIntent('每天早上7点半把今天待办推送给我');
|
||||
assert.equal(intent.action, 'create_daily_todo_digest');
|
||||
assert.equal(intent.hour, 7);
|
||||
assert.equal(intent.minute, 30);
|
||||
});
|
||||
|
||||
test('daily todo digest asks for time when missing', () => {
|
||||
const intent = parseScheduleIntent('每天给我发一天的待办记录');
|
||||
assert.equal(intent.action, 'create_daily_todo_digest');
|
||||
assert.deepEqual(intent.needsClarification, ['digest_time']);
|
||||
});
|
||||
|
||||
test('daily digest asks for time when only says send today todos', () => {
|
||||
const intent = parseScheduleIntent('每天把当天待办发给我');
|
||||
assert.equal(intent.action, 'create_daily_todo_digest');
|
||||
assert.deepEqual(intent.needsClarification, ['digest_time']);
|
||||
});
|
||||
|
||||
test('parses balance low reminder request', () => {
|
||||
const intent = parseScheduleIntent('余额低于 20 元提醒我');
|
||||
assert.equal(intent.action, 'create_balance_alert');
|
||||
@@ -67,6 +101,17 @@ test('reminder todo request routes to schedule assistant instead of plain todo s
|
||||
assert.equal(intent.action, 'schedule_agent');
|
||||
});
|
||||
|
||||
test('specific dated reminder still routes to schedule assistant', () => {
|
||||
const intent = parseScheduleIntent('明天下午三点提醒我开会');
|
||||
assert.equal(intent.action, 'none');
|
||||
assert.equal(shouldUseScheduleAssistant('明天下午三点提醒我开会'), true);
|
||||
});
|
||||
|
||||
test('simple schedule query still works', () => {
|
||||
const intent = parseScheduleIntent('看看我的待办');
|
||||
assert.equal(intent.action, 'query_schedule');
|
||||
});
|
||||
|
||||
test('nextDailyRunAt rolls to tomorrow when today time has passed', () => {
|
||||
const now = Date.UTC(2026, 5, 17, 23, 30, 0); // 2026-06-18 07:30 Asia/Shanghai
|
||||
const next = nextDailyRunAt({ hour: 7, minute: 0, timezone: 'Asia/Shanghai', now });
|
||||
|
||||
Reference in New Issue
Block a user