Skip to main content
/g, '>'); escaped = escaped.replace(/\*\*(.*?)\*\*/g, '$1'); escaped = escaped.replace(/^\s*[\*\-]\s+(.*)$/gm, '
  • $1
  • '); escaped = escaped.replace(/(
  • .*<\/li>\n?)+/g, '
      $&
    '); escaped = escaped.replace(/^\s*(\d+)\.\s+(.*)$/gm, '
  • $2
  • '); escaped = escaped.replace(/\n/g, '
    '); return escaped; }, copyText(index, text) { navigator.clipboard.writeText(text); this.copiedIndex = index; setTimeout(() => { this.copiedIndex = null; }, 2000); }, async sendMessage(text = null) { const content = text || this.inputMessage.trim(); if (!content || this.loading) return; this.showWelcome = false; this.messages.push({ role: 'user', content: content }); if (!text) this.inputMessage = ''; this.loading = true; this.scrollToBottom(); try { const payload = { messages: this.messages.map(m => ({ role: m.role, content: m.content })), context: this.contextTrek ? { trek: this.contextTrek } : {} }; const res = await fetch('https://yetihikes.com/ai/chat', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-CSRF-TOKEN': 'ARh9dztcZH2vrxLvrakhG81BcI9j1W1DytiFM877' }, body: JSON.stringify(payload) }); const data = await res.json(); if (res.ok && data.reply) { this.messages.push({ role: 'assistant', content: data.reply }); } else { this.messages.push({ role: 'assistant', content: 'I am temporarily unable to respond. Please contact our human Yeti Hikes guides at [email protected] or call +977-9851316676.' }); } } catch (err) { this.messages.push({ role: 'assistant', content: 'Network connectivity error. Please check your connection and try again.' }); } finally { this.loading = false; this.scrollToBottom(); } }, async submitLead() { if(!this.leadForm.email && !this.leadForm.phone) return; try { const res = await fetch('https://yetihikes.com/ai/lead', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': 'ARh9dztcZH2vrxLvrakhG81BcI9j1W1DytiFM877' }, body: JSON.stringify({ name: this.leadForm.name, email: this.leadForm.email, phone: this.leadForm.phone, trek_interest: this.contextTrek ? this.contextTrek.title : 'General AI Pathfinder Chat', conversation_summary: this.messages.map(m => m.role + ': ' + m.content).join('\n') }) }); if (res.ok) { this.leadCaptured = true; this.leadModalOpen = false; } } catch (err) {} }, scrollToBottom() { this.$nextTick(() => { const container = document.getElementById('chat-scroll'); if (container) container.scrollTop = container.scrollHeight; }); } }" class="min-h-screen bg-theme-bg pt-28 pb-12 flex flex-col">
    AI Pathfinder → AI Chat Assistant

    Sherpa Dai AI

    Online

    Interactive Himalayan Trekking Assistant

    Hello! I'm Sherpa Dai AI

    Your Nepal trekking assistant — ask me anything about treks, pricing, permits, or let me plan your perfect trip.

    Online · Ready to help