@extends("layouts.app") @section("title", __("Insights")) @section("header")

{{ __("My Insights") }}

@endsection @section("content")
@if(session("success"))
{{ session("success") }}
@endif @if(session("error"))
{{ session("error") }}
@endif

{{ __("Total Input Tokens") }}

{{ number_format($totalInputTokens) }}

{{ __("Total Output Tokens") }}

{{ number_format($totalOutputTokens) }}

{{ __("Total Tokens Used") }}

{{ number_format($totalTokens) }}

{{ __("Generate AI Message") }}

@csrf

{{ __("Messages History") }}

@forelse($insights as $insight)
{{ $insight->subject->name }} {{ $insight->type->label() }} @if($insight->input_tokens > 0 || $insight->output_tokens > 0) 🔤 {{ number_format($insight->input_tokens + $insight->output_tokens) }} tokens @endif
{!! \App\Services\MarkdownService::parse($insight->content) !!}

{{ $insight->created_at->format('d/m/Y H:i') }}

@csrf
@csrf @method("DELETE")
@empty

{{ __("No messages yet. Generate your first message above!") }}

@endforelse @if(method_exists($insights, 'links'))
{{ $insights->links() }}
@endif
@endsection @push('scripts') @endpush