ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг этапов 2.652.68 - сборка входов turn attempt в новый builder: assistantTurnAttemptInputBuilder.ts / адаптер на builder (убрал inline-сборку payload для address/deep): assistantTurnAttemptRuntimeAdapter.ts / сборку followupContext/options для address lane attempt в новый builder: assistantAddressLaneAttemptQueryOptionsBuilder.ts / адаптер на builder для query options: assistantAddressLaneAttemptRuntimeAdapter.ts

This commit is contained in:
2026-04-11 10:00:05 +03:00
parent 79b636bfe6
commit bf16309a29
11 changed files with 324 additions and 56 deletions
@@ -1,5 +1,9 @@
import type { AssistantAddressLaneLike } from "./assistantAddressLaneRuntimeAdapter";
import type { AssistantAddressCarryoverLike } from "./assistantAddressOrchestrationRuntimeAdapter";
import {
buildAssistantAddressLaneAttemptQueryOptions,
resolveAssistantAddressLaneAttemptFollowupContext
} from "./assistantAddressLaneAttemptQueryOptionsBuilder";
export interface RunAssistantAddressLaneAttemptRuntimeInput {
messageUsed: string;
@@ -22,21 +26,16 @@ export interface RunAssistantAddressLaneAttemptRuntimeInput {
export async function runAssistantAddressLaneAttemptRuntime(
input: RunAssistantAddressLaneAttemptRuntimeInput
): Promise<AssistantAddressLaneLike | null> {
const followupContext =
input.carryMeta?.followupContext && typeof input.carryMeta.followupContext === "object"
? (input.carryMeta.followupContext as Record<string, unknown>)
: null;
const followupContext = resolveAssistantAddressLaneAttemptFollowupContext(input.carryMeta);
const scopedFollowupContext = input.mergeFollowupContextWithOrganizationScope(
followupContext,
input.activeOrganization
);
if (scopedFollowupContext) {
return input.runAddressQueryTryHandle(input.messageUsed, {
followupContext: scopedFollowupContext,
analysisDateHint: input.analysisDateHint
});
}
return input.runAddressQueryTryHandle(input.messageUsed, {
analysisDateHint: input.analysisDateHint
});
return input.runAddressQueryTryHandle(
input.messageUsed,
buildAssistantAddressLaneAttemptQueryOptions({
analysisDateHint: input.analysisDateHint,
scopedFollowupContext
})
);
}