ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг этапов 2.40: вынос runAddressLaneAttempt (с merge контекста и вызовом addressQueryService) в отдельный runtime-адаптер из handleMessage
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.runAssistantAddressLaneAttemptRuntime = runAssistantAddressLaneAttemptRuntime;
|
||||
async function runAssistantAddressLaneAttemptRuntime(input) {
|
||||
const followupContext = input.carryMeta?.followupContext && typeof input.carryMeta.followupContext === "object"
|
||||
? input.carryMeta.followupContext
|
||||
: null;
|
||||
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
|
||||
});
|
||||
}
|
||||
+9
-12
@@ -79,6 +79,7 @@ const assistantDeepTurnNormalizationRuntimeAdapter_1 = __importStar(require("./a
|
||||
const assistantDeepTurnResponseRuntimeAdapter_1 = __importStar(require("./assistantDeepTurnResponseRuntimeAdapter"));
|
||||
const assistantDeepTurnRetrievalRuntimeAdapter_1 = __importStar(require("./assistantDeepTurnRetrievalRuntimeAdapter"));
|
||||
const assistantAddressRuntimeAdapter_1 = __importStar(require("./assistantAddressRuntimeAdapter"));
|
||||
const assistantAddressLaneAttemptRuntimeAdapter_1 = __importStar(require("./assistantAddressLaneAttemptRuntimeAdapter"));
|
||||
const assistantLivingChatHandlerRuntimeAdapter_1 = __importStar(require("./assistantLivingChatHandlerRuntimeAdapter"));
|
||||
const assistantLivingChatLlmRuntimeAdapter_1 = __importStar(require("./assistantLivingChatLlmRuntimeAdapter"));
|
||||
const assistantUserTurnBootstrapRuntimeAdapter_1 = __importStar(require("./assistantUserTurnBootstrapRuntimeAdapter"));
|
||||
@@ -4476,18 +4477,14 @@ class AssistantService {
|
||||
});
|
||||
};
|
||||
let addressRuntimeMetaForDeep = null;
|
||||
const runAddressLaneAttempt = async (messageUsed, carryMeta, analysisDateHint) => {
|
||||
const scopedFollowupContext = mergeFollowupContextWithOrganizationScope(carryMeta?.followupContext ?? null, sessionOrganizationScope.activeOrganization);
|
||||
if (scopedFollowupContext) {
|
||||
return this.addressQueryService.tryHandle(messageUsed, {
|
||||
followupContext: scopedFollowupContext,
|
||||
analysisDateHint
|
||||
});
|
||||
}
|
||||
return this.addressQueryService.tryHandle(messageUsed, {
|
||||
analysisDateHint
|
||||
});
|
||||
};
|
||||
const runAddressLaneAttempt = async (messageUsed, carryMeta, analysisDateHint) => (0, assistantAddressLaneAttemptRuntimeAdapter_1.runAssistantAddressLaneAttemptRuntime)({
|
||||
messageUsed,
|
||||
carryMeta: carryMeta ?? null,
|
||||
analysisDateHint: analysisDateHint ?? null,
|
||||
activeOrganization: sessionOrganizationScope.activeOrganization,
|
||||
mergeFollowupContextWithOrganizationScope,
|
||||
runAddressQueryTryHandle: (laneMessageUsed, options) => this.addressQueryService.tryHandle(laneMessageUsed, options)
|
||||
});
|
||||
const addressRuntime = await (0, assistantAddressRuntimeAdapter_1.runAssistantAddressRuntime)({
|
||||
featureAssistantAddressQueryV1: config_1.FEATURE_ASSISTANT_ADDRESS_QUERY_V1,
|
||||
sessionId,
|
||||
|
||||
Reference in New Issue
Block a user