Add guidance message for non-customers before onboarding redirect

Non-customers attempting to use customer-only features (troubleshoot,
billing, asset) now see a friendly explanation before being handed off
to the onboarding agent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-02-12 10:02:48 +09:00
parent ae8e72119e
commit 7dc43bd331
3 changed files with 6 additions and 0 deletions

View File

@@ -103,6 +103,10 @@ export async function handleMessage(
const isCustomer = await checkIsCustomer(env.DB, telegramUserId);
if (!isCustomer) {
logger.info('비고객 → 온보딩 전환', { intent, telegramUserId });
await sendMessage(
env.BOT_TOKEN, chatId,
getMessage(lang, 'error_customer_only')
);
const response = await onboardingAgent.processConsultation(env.DB, telegramUserId, text, env, meta);
const { cleanText, sessionEnded } = cleanSessionMarkers(response);
await storeConversation(env.DB, user.id, text, cleanText, requestId);