ARCH: замкнуть all-time continuity после metadata retrieval
This commit is contained in:
@@ -200,11 +200,23 @@ function explicitOrganizationScope(pilot: AssistantMcpDiscoveryPilotExecutionCon
|
||||
return normalized.length > 0 ? normalized : null;
|
||||
}
|
||||
|
||||
function hasAllTimeScope(pilot: AssistantMcpDiscoveryPilotExecutionContract): boolean {
|
||||
return (
|
||||
dryRunHasAxis(pilot, "all_time_scope") ||
|
||||
pilot.reason_codes.includes("mcp_discovery_all_time_scope_signal_detected") ||
|
||||
pilot.dry_run.reason_codes.includes("mcp_discovery_all_time_scope_signal_detected")
|
||||
);
|
||||
}
|
||||
|
||||
function documentOrMovementScopeRu(pilot: AssistantMcpDiscoveryPilotExecutionContract): string {
|
||||
const entity = firstEntityCandidate(pilot);
|
||||
const period = explicitDateScope(pilot);
|
||||
const entityPart = entity ? ` по контрагенту ${entity}` : "";
|
||||
const periodPart = period ? ` за ${period}` : " в проверенном окне";
|
||||
const periodPart = period
|
||||
? ` за ${period}`
|
||||
: hasAllTimeScope(pilot)
|
||||
? " за все доступное время"
|
||||
: " в проверенном окне";
|
||||
return `${entityPart}${periodPart}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user