From 7dc43bd3319c5d95e70fa86777caf4cc60ce3220 Mon Sep 17 00:00:00 2001 From: kappa Date: Thu, 12 Feb 2026 10:02:48 +0900 Subject: [PATCH] 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 --- src/i18n/en.ts | 1 + src/i18n/ko.ts | 1 + src/routes/handlers/message-handler.ts | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/src/i18n/en.ts b/src/i18n/en.ts index c663e8a..6d14ec5 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -5,6 +5,7 @@ const en: Record = { error_rate_limit: 'Too many requests. Please try again later.', error_blocked: 'Your account has been restricted.', error_ai_unavailable: 'AI service is temporarily unstable. Please try again later.', + error_customer_only: 'This feature is available to active customers only. I can help you with service registration or pricing information.', feedback_prompt: 'Was this consultation helpful?', feedback_thanks: 'Thank you for your feedback!', session_end: 'The consultation has ended. Feel free to reach out anytime for further inquiries.', diff --git a/src/i18n/ko.ts b/src/i18n/ko.ts index e59a22c..5b67d44 100644 --- a/src/i18n/ko.ts +++ b/src/i18n/ko.ts @@ -5,6 +5,7 @@ const ko: Record = { error_rate_limit: '요청이 너무 많습니다. 잠시 후 다시 시도해주세요.', error_blocked: '이용이 제한된 계정입니다.', error_ai_unavailable: 'AI 서비스가 일시적으로 불안정합니다. 잠시 후 다시 시도해주세요.', + error_customer_only: '해당 기능은 서비스 이용 고객 전용입니다. 서비스 가입이나 요금 안내를 도와드리겠습니다.', feedback_prompt: '상담이 도움이 되셨나요?', feedback_thanks: '피드백 감사합니다!', session_end: '상담이 종료되었습니다. 추가 문의가 있으시면 언제든 말씀해주세요.', diff --git a/src/routes/handlers/message-handler.ts b/src/routes/handlers/message-handler.ts index dd81f2b..1664c7b 100644 --- a/src/routes/handlers/message-handler.ts +++ b/src/routes/handlers/message-handler.ts @@ -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);