@php $a = $assistant; $defaults = [ 'id' => $a?->id ?? null, 'name' => $a?->name ?? '', 'status' => $a?->status ?? 'active', 'greeting' => $a?->greeting ?? 'Hi! How can I help today?', 'system_prompt' => $a?->system_prompt ?? "You are a helpful website assistant. Be concise, friendly, and accurate. If you don't know something, say so and offer to connect a teammate.", 'tone' => $a?->tone ?? 'helpful', 'language' => $a?->language ?? 'en', 'ai_provider' => $a?->ai_provider ?? 'openai', 'ai_model' => $a?->ai_model ?? 'gpt-4o-mini', 'reply_max_tokens' => $a?->reply_max_tokens ?? 400, 'temperature' => $a ? (float) $a->temperature : 0.7, 'fallback_message' => $a?->fallback_message ?? 'A teammate will follow up shortly — thanks for your patience.', 'handoff_enabled' => (bool) ($a?->handoff_enabled ?? true), 'handoff_keyword' => $a?->handoff_keyword ?? 'talk to human', 'handoff_message' => $a?->handoff_message ?? 'Sure — pulling in a teammate now.', ]; @endphp {{-- Sticky header — same shape as /wa-campaigns/create + /chatbot-widgets/create --}}
AI Training / {{ $mode === 'edit' ? 'Edit' : 'New' }}
{{ $mode === 'edit' ? 'Edit smart' : 'Build a smart' }} {{ __('agent') }}
{{ $mode === 'edit' ? 'Saved' : 'Draft / unsaved' }}
{{-- ============ MAIN CARD ============ --}}
{{-- ===== Stepper ===== --}}
1 {{ __('Identity') }}
2 {{ __('Persona') }}
3 {{ __('Brain') }}
4 {{ __('Safety') }}
5 {{ __('Knowledge') }}
{{-- ===== Step panes ===== --}}
{{-- STEP 1: IDENTITY --}}
01 {{ __('Agent identity') }} {{ __('required') }}
{{ __("For your records. Visitors don't see this label.") }}
{{ __("Paused agents stay in the list but can't be attached to new widgets.") }}
{{ __("ISO 639-1 code. Auto-matches visitor's language if different.") }}
{{ __('Sets writing style independent of the persona prompt.') }}
{{-- STEP 2: PERSONA --}} {{-- STEP 3: BRAIN --}} {{-- STEP 4: SAFETY --}} {{-- STEP 5: KNOWLEDGE --}}
{{-- ===== Footer nav ===== --}}
{{ __('Step') }} 1 of 5