fix(mira): wikilink autocomplete 5s cache + 開下拉時 refetch
leo 反饋:30s TTL 太久,wiki_synthesis 後台跑出新 entity,autocomplete 撈不到。 - TTL 30s → 5s - WikilinkAutocomplete 在 matchInfo 從 null → 有值時主動 invalidate refetch - 順手把 yaml-parser 對 FOREACH iterator relation 命名變體(「對每個 X」/「FOREACH X」)放行,graph-builder 早就支援,validate 卻擋掉 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -63,10 +63,16 @@ export function validateRelations(triplets: ParsedTriplet[]): void {
|
||||
`「PIPE」已棄用,請改用「完成後」或「ON_SUCCESS」。`
|
||||
);
|
||||
}
|
||||
// 容許 FOREACH iterator 命名變體:「對每個 paragraph」/「FOREACH item」
|
||||
// graph-builder.ts 已支援這個 regex(commit e8fca33 2026-05-07)
|
||||
const foreachMatch = t.relation.match(/^(?:對每個|FOREACH)\s+\w+$/i);
|
||||
if (foreachMatch) continue;
|
||||
|
||||
if (!VALID_RELATIONS.has(t.relation)) {
|
||||
throw new Error(
|
||||
`未知關係詞「${t.relation}」。\n` +
|
||||
`合法關係詞:${[...VALID_RELATIONS].join('、')}`
|
||||
`合法關係詞:${[...VALID_RELATIONS].join('、')}\n` +
|
||||
`(FOREACH 支援 iterator 命名:「對每個 X」/「FOREACH X」)`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user