20260204
This commit is contained in:
@@ -162,6 +162,12 @@ function shouldSkipRouter(text, state, quickDomain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// En estado SHIPPING, si quickDomain ya detectó "shipping" (dirección), confiar en eso
|
||||
// Esto evita que el router LLM clasifique direcciones como productos
|
||||
if (state === "SHIPPING" && quickDomain === "shipping") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,6 @@ export async function handlePaymentState({ tenantId, text, nlu, order, audit })
|
||||
currentOrder = { ...currentOrder, payment_type: paymentMethod };
|
||||
actions.push({ type: "create_order", payload: { payment: paymentMethod } });
|
||||
|
||||
if (paymentMethod === "link") {
|
||||
actions.push({ type: "send_payment_link", payload: {} });
|
||||
}
|
||||
|
||||
const { next_state } = safeNextState(ConversationState.PAYMENT, currentOrder, { payment_selected: true });
|
||||
|
||||
const paymentLabel = paymentMethod === "cash" ? "efectivo" : "link de pago";
|
||||
@@ -43,7 +39,7 @@ export async function handlePaymentState({ tenantId, text, nlu, order, audit })
|
||||
: "Retiro en sucursal.";
|
||||
|
||||
const paymentInfo = paymentMethod === "link"
|
||||
? "Te paso el link de pago en un momento."
|
||||
? "Te contactamos para coordinar el pago."
|
||||
: "Pagás en " + (currentOrder.is_delivery ? "la entrega" : "sucursal") + ".";
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user