Ticket #{{ $ticket->id }}

Status: {{ $ticket->status }}
@if (session('success'))
{{ session('success') }}
@endif @if ($ticket->needs_article_draft)
Kennisbank-gat gedetecteerd

Er is geen geschikt artikel in de kennisbank gevonden voor deze vraag.

@php($suggestion = $ticket->result_payload['draft_article_suggestion'] ?? null) @if (is_array($suggestion))

Voorgestelde titel

{{ $suggestion['title'] ?? '-' }}

Voorgestelde inhoud

{{ $suggestion['content'] ?? '-' }}
@endif
@endif @if ($ticket->support_reply && !$ticket->needs_article_draft)
Concept reactie voor klant
@if (is_array($ticket->result_payload['quick_reply'] ?? null))
Snelantwoord gebruikt: #{{ $ticket->result_payload['quick_reply']['id'] ?? '-' }} {{ $ticket->result_payload['quick_reply']['title'] ?? '' }}
@endif
{{ $ticket->support_reply }}
@endif

Origineel: {{ $ticket->message }}

@if ($ticket->normalized_message)

Genormaliseerd: {{ $ticket->normalized_message }}

@endif @if ($ticket->redaction_report)
{{ json_encode($ticket->redaction_report, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif @if (is_array($ticket->api_credentials) && !empty($ticket->api_credentials['apiuser']))
API credentials aanwezig voor deze ticket-run. Waarden worden niet getoond.
@endif @if ($ticket->error_message)
{{ $ticket->error_message }}
@endif @if ($ticket->bestArticle)
Beste artikel: #{{ $ticket->bestArticle->id }} - {{ $ticket->bestArticle->title }} @if ($ticket->confidence !== null) (confidence {{ number_format($ticket->confidence, 2) }}) @endif
@endif

Toolcalls

@if ($ticket->toolCalls->isEmpty())

Geen toolcalls uitgevoerd of voorgesteld.

@else
@foreach ($ticket->toolCalls as $toolCall)
{{ $toolCall->action }} ({{ $toolCall->status }}) @if ($toolCall->article) via artikel #{{ $toolCall->article->id }} @endif
{{ $toolCall->executed_at ?? $toolCall->created_at }}
@if ($toolCall->parameters)
Parameters
{{ json_encode($toolCall->parameters, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif @if ($toolCall->response)
Response
{{ json_encode($toolCall->response, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) }}
@endif @if ($toolCall->error)
{{ $toolCall->error }}
@endif
@endforeach
@endif

Verwerkingsstappen

@php($orderedLogs = $ticket->logs->sortBy([['created_at', 'desc'], ['id', 'desc']])) @php($latestLog = $orderedLogs->first()) @if ($ticket->status === 'processing' && $latestLog)
Huidige stap: {{ $latestLog->step }} Bezig
@endif
@foreach ($orderedLogs as $log)
{{ $log->step }} ({{ $log->status }}) {{ $log->created_at }}
@if ($log->message)
{{ $log->message }}
@endif @if ($log->context)
{{ json_encode($log->context, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif
@endforeach