Post-F: укрепить VAT, даты остатков и SVK follow-up

This commit is contained in:
2026-05-05 17:09:26 +03:00
parent 2ec2f81dd8
commit 98afdd39c4
15 changed files with 815 additions and 22 deletions
@@ -189,7 +189,15 @@ const FOLLOWUP_LOW_QUALITY_COUNTERPARTY_TOKENS = new Set([
"сводную",
"сводном",
"сводного",
"сводному"
"сводному",
"видно",
"документам",
"документами",
"движение",
"движения",
"движениям",
"проверить",
"проверь"
]);
const FOLLOWUP_LOW_QUALITY_CONTRACT_TOKENS = new Set([
"за",
@@ -661,6 +669,10 @@ function mergeFollowupFilters(current, intent, userMessage, followupContext) {
const hasFollowupSignal = hasAddressFollowupContextSignal(userMessage);
const hasExplicitPeriodInMessage = hasExplicitPeriodLiteral(userMessage);
const hasExplicitCurrentDateInMessage = hasExplicitCurrentDateHint(userMessage);
const currentHasExplicitTemporalScope = hasExplicitPeriodWindow(merged) ||
Boolean(toNonEmptyString(merged.as_of_date)) ||
hasExplicitPeriodInMessage ||
hasExplicitCurrentDateInMessage;
const explicitQuotedItem = extractSelectedObjectItemFromFollowupText(userMessage);
if (!toNonEmptyString(merged.organization) && previousOrganization) {
merged.organization = previousOrganization;
@@ -945,6 +957,7 @@ function mergeFollowupFilters(current, intent, userMessage, followupContext) {
}
if (!sameDateRequested &&
(intent === "inventory_on_hand_as_of_date" || intent === "inventory_supplier_stock_overlap_as_of_date") &&
!currentHasExplicitTemporalScope &&
hasOpenItemsHint(userMessage)) {
const inheritedAsOfDate = previousAsOfDate ?? previousPeriodTo ?? previousPeriodFrom;
if (inheritedAsOfDate && merged.as_of_date !== inheritedAsOfDate) {