refactor(scenario): only 2 scenarios (social / face-to-face); 're-contact' becomes a persona trait

- Scenario picker now has only social + f2f_call (removed recontact) in backend
  _scenarios, start_session validation, and Chat.vue picker.
- 'ลูกค้ากลับมาติดต่อ' is no longer a scenario: it's now a PERSONA trait. Persona prompt
  generates ~1-in-4 personas with recontact=true (asked before, now returns warmer/ready);
  store shape gets recontact field; simulator injects a re-contact note into the persona's
  system prompt so it plays as a returning customer naturally.
- test_scenario updated: unknown scenario defaults to social; recontact shown as a
  generated persona trait.
All 9 backend suites pass. Rebuilt dist.
This commit is contained in:
Macky
2026-08-09 11:21:34 +07:00
parent cb2642a659
commit fd2cae9e62
35 changed files with 54 additions and 48 deletions

View File

@@ -109,7 +109,6 @@ const scenarios = computed(() => {
return [
{ id: 'social', emoji: '💬', init: 'customer', label: en ? 'Social Media (chat)' : 'Social Media (แชท)', desc: en ? 'The customer messages you first — short, chat-style replies' : 'ลูกค้าทักมาหาคุณก่อน — โทนสั้น ทักๆ ตามสไตล์แชท' },
{ id: 'f2f_call', emoji: '📞', init: 'seller', label: en ? 'Face-to-face / Phone' : 'พบหน้า / โทรศัพท์', desc: en ? 'You must proactively open the conversation (seller starts)' : 'คุณต้องเป็นฝ่ายเปิดการสนทนาเชิงรุกกับลีด (ผู้ฝึกทักก่อน)' },
{ id: 'recontact', emoji: '⏳', init: 'customer', label: en ? 'Re-contact (1-3 months)' : 'ลูกค้ากลับมาติดต่อ (1-3 เดือน)', desc: en ? 'Customer contacted you before, now returns more ready to decide' : 'เคยได้รับข้อมูลไปแล้ว ตอนนี้กลับมาติดต่อ พร้อมตัดสินใจมากขึ้น' },
]
})

View File

@@ -10,7 +10,7 @@
<ol style="margin:8px 0 0;padding-left:20px;line-height:1.8">
<li>เลอกลกคาจำลอง (คคลตนแบบ) คนหนงทอยากฝกดวย</li>
<li>ระด A ายส ระด C ยากส (จากดาว ความยาก)</li>
<li>กด <strong>แชท</strong> เลอกสถานการณ (โซเชยล / พบหน-โทร / กลบมาตดต) เรมคยกบลกค</li>
<li>กด <strong>แชท</strong> เลอกสถานการณ (โซเชยล / พบหน-โทร) เรมคยกบลกค</li>
<li>กคาจะตดสนใจเองวาซอหรอไม (กไดคนละครงเทาน)</li>
</ol>
</div>