@if(session('message'))
{{ session('message') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

{{ __('AI Configuration') }}

{{ __('Configure how your AI assistant generates replies.') }}

{{-- Provider & Model --}}

{{ __('AI Provider & Model') }}

{{-- Provider Cards --}}
@php $providerCards = [ ['id' => 'openai', 'name' => 'OpenAI', 'desc' => 'GPT-4o, o1, GPT-3.5', 'bg' => 'bg-success/15', 'text' => 'text-success'], ['id' => 'anthropic', 'name' => 'Anthropic', 'desc' => 'Claude Opus 4, Sonnet 4', 'bg' => 'bg-orange-100', 'text' => 'text-orange-600'], ['id' => 'gemini', 'name' => 'Google Gemini', 'desc' => 'Gemini 2.0 Flash, 1.5 Pro', 'bg' => 'bg-info/15', 'text' => 'text-blue-600'], ['id' => 'mistral', 'name' => 'Mistral', 'desc' => 'Large, Small, Codestral', 'bg' => 'bg-brand/15', 'text' => 'text-brand'], ]; @endphp @foreach($providerCards as $p) @endforeach
{{-- Model Selection --}}
@forelse($models as $modelId => $modelLabel) @empty

{{ __('No models available for this provider.') }}

@endforelse

{{ __('Controls how creative the AI\'s responses are. Lower = more predictable and safe, higher = more varied.') }}

{{ __('How sure the AI must be before suggesting a reply. Higher = fewer but more accurate replies.') }}

{{-- ════════════════════════════════════════════════════════════════ AI AUTO-ESCALATION When AI confidence falls below the configured threshold, the conversation is auto-assigned to a human, tagged for review, and the assignee gets an in-app notification. The reply stays as a draft so the human can review/edit before sending. ════════════════════════════════════════════════════════════════ --}}

{{ __('Auto-Escalation to Humans') }}

{{ __("When AI is unsure, automatically hand the conversation to a human teammate — they get notified instantly and the AI's draft reply waits for their review.") }}

@if($escalation_enabled)
{{-- Confidence threshold slider --}}
0% (never) 50% (balanced) 100% (always)

{{ __('Recommended: 50% — escalates when the AI is unsure but lets it handle confident replies on its own.') }}

{{-- Assignee picker --}}

{{ __('Round-robin picks a random member who has "Available for assignment" enabled. Choose a specific agent to always send escalations to them.') }}

{{-- Tag name --}}

{{ __('A workspace tag with this name is created (or reused) and attached to the conversation, so you can filter your inbox by it later.') }}

{{-- Live preview / what happens --}}

{{ __('When this fires, MailTrixy will:') }}

  • {{ __('Assign the conversation to the chosen agent (or round-robin)') }}
  • {{ __('Bump the conversation priority to "high"') }}
  • {{ __('Tag it with') }} {{ $escalation_tag ?: 'needs_human' }}
  • {{ __('Send an in-app notification (bell icon) to the assignee with a deep link') }}
  • {{ __("Keep the AI's reply as a draft — the human reviews and sends it") }}
@endif
{{-- Personality --}}

{{ __('Personality & Tone') }}

@foreach(['professional' => 'Professional', 'friendly' => 'Friendly', 'casual' => 'Casual', 'sales' => 'Sales', 'support' => 'Support', 'custom' => 'Custom'] as $key => $label) @endforeach
@if($personality_preset === 'custom')

@endif
{{-- Behavior --}}

{{ __('Reply Behavior') }}

@if($send_mode === 'autonomous') {{ __('AI will send replies automatically when confidence is above your threshold. Best for high-volume support.') }} @elseif($send_mode === 'approval') {{ __('AI will draft replies for you to review and approve before sending. Recommended for most teams.') }} @else {{ __('AI will only show suggestions — you write and send the final reply yourself.') }} @endif

{{-- Test AI --}}

{{ __('Test AI Reply') }}

{{ __('Send a test message to see how your AI would respond with the current configuration.') }}

@if($testResponse)
{{ __('AI Response') }}
{{ $testResponse }}
@endif