feat: show whisper-own in ai-logs filter and badge

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-05 20:16:18 -05:00
co-authored by Claude Sonnet 4.6
parent fc54ec992b
commit 816c6d27c8
+6 -5
View File
@@ -5756,7 +5756,7 @@ HTML;
} }
$providerOptions = ''; $providerOptions = '';
foreach (['', 'openai', 'gemini', 'claude'] as $p) { foreach (['', 'openai', 'gemini', 'claude', 'whisper-own'] as $p) {
$label = $p === '' ? 'Todos' : ucfirst($p); $label = $p === '' ? 'Todos' : ucfirst($p);
$sel = $provider === $p ? ' selected' : ''; $sel = $provider === $p ? ' selected' : '';
$providerOptions .= "<option value=\"{$p}\"{$sel}>{$label}</option>"; $providerOptions .= "<option value=\"{$p}\"{$sel}>{$label}</option>";
@@ -5767,10 +5767,11 @@ HTML;
$cid = (int)($r['company_id'] ?? 0); $cid = (int)($r['company_id'] ?? 0);
$cname = $companyMap[$cid] ?? '<span style="color:#aaa">—</span>'; $cname = $companyMap[$cid] ?? '<span style="color:#aaa">—</span>';
$badge = match($r['provider'] ?? '') { $badge = match($r['provider'] ?? '') {
'openai' => 'background:#10a37f;color:#fff', 'openai' => 'background:#10a37f;color:#fff',
'gemini' => 'background:#4285f4;color:#fff', 'gemini' => 'background:#4285f4;color:#fff',
'claude' => 'background:#d97706;color:#fff', 'claude' => 'background:#d97706;color:#fff',
default => 'background:#6b7280;color:#fff', 'whisper-own' => 'background:#7c3aed;color:#fff',
default => 'background:#6b7280;color:#fff',
}; };
$tok = ($r['tokens_in'] ?? null) !== null $tok = ($r['tokens_in'] ?? null) !== null
? self::h($r['tokens_in']) . '+' . self::h($r['tokens_out']) ? self::h($r['tokens_in']) . '+' . self::h($r['tokens_out'])