Post-F: укрепить VAT, даты остатков и SVK follow-up
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user