Удержать контекст СВК в follow-up ассистента
This commit is contained in:
@@ -1313,6 +1313,15 @@ function mergeFollowupFilters(current, intent, userMessage, followupContext) {
|
||||
intent === "vat_payable_confirmed_as_of_date";
|
||||
const currentHasPeriod = hasExplicitPeriodWindow(merged);
|
||||
const previousHasPeriod = hasExplicitPeriodWindow(previous);
|
||||
const currentPeriodFromForCarryover = toNonEmptyString(merged.period_from);
|
||||
const currentPeriodToForCarryover = toNonEmptyString(merged.period_to);
|
||||
const todayIsoForPeriodCarryover = new Date().toISOString().slice(0, 10);
|
||||
const currentValueFlowPeriodDefaultsToToday = isValueCounterpartyIntent(intent) &&
|
||||
hasFollowupSignal &&
|
||||
!hasExplicitPeriodInMessage &&
|
||||
!hasExplicitCurrentDateInMessage &&
|
||||
!currentPeriodFromForCarryover &&
|
||||
currentPeriodToForCarryover === todayIsoForPeriodCarryover;
|
||||
const currentCounterpartyExplicit = toNonEmptyString(merged.counterparty);
|
||||
const currentContractExplicit = toNonEmptyString(merged.contract);
|
||||
const currentItemExplicit = toNonEmptyString(merged.item);
|
||||
@@ -1387,7 +1396,7 @@ function mergeFollowupFilters(current, intent, userMessage, followupContext) {
|
||||
}
|
||||
reasons.push("period_from_followup_context");
|
||||
}
|
||||
if (!currentHasPeriod &&
|
||||
if ((!currentHasPeriod || currentValueFlowPeriodDefaultsToToday) &&
|
||||
previousHasPeriod &&
|
||||
hasFollowupSignal &&
|
||||
!hasExplicitPeriodInMessage &&
|
||||
|
||||
Reference in New Issue
Block a user