cc-viewer 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -482,7 +482,7 @@ CC Viewer กำลังทำงานอยู่แล้ว: http://{host}:
|
|
|
482
482
|
CC Viewer zaten çalışıyor: http://{host}:{port}
|
|
483
483
|
`,uk:`
|
|
484
484
|
CC Viewer вже працює: http://{host}:{port}
|
|
485
|
-
`},"server.portsBusy":{zh:"⚠️ 端口 {start}-{end} 均被占用,请求监控服务未启动",en:"⚠️ Ports {start}-{end} are all in use, monitoring service not started","zh-TW":"⚠️ 端口 {start}-{end} 均被佔用,請求監控服務未啟動",ko:"⚠️ 포트 {start}-{end} 모두 사용 중, 모니터링 서비스 미시작",ja:"⚠️ ポート {start}-{end} はすべて使用中、監視サービスは起動されませんでした",de:"⚠️ Ports {start}-{end} sind alle belegt, Überwachungsdienst nicht gestartet",es:"⚠️ Puertos {start}-{end} están todos en uso, servicio de monitoreo no iniciado",fr:"⚠️ Ports {start}-{end} tous occupés, service de surveillance non démarré",it:"⚠️ Porte {start}-{end} tutte in uso, servizio di monitoraggio non avviato",da:"⚠️ Porte {start}-{end} er alle i brug, overvågningstjeneste ikke startet",pl:"⚠️ Porty {start}-{end} są wszystkie zajęte, usługa monitorowania nie uruchomiona",ru:"⚠️ Порты {start}-{end} все заняты, служба мониторинга не запущена",ar:"⚠️ المنافذ {start}-{end} كلها مشغولة، لم يتم تشغيل خدمة المراقبة",no:"⚠️ Porter {start}-{end} er alle i bruk, overvåkningstjeneste ikke startet","pt-BR":"⚠️ Portas {start}-{end} estão todas em uso, serviço de monitoramento não iniciado",th:"⚠️ พอร์ต {start}-{end} ถูกใช้งานทั้งหมด บริการตรวจสอบไม่ได้เริ่มทำงาน",tr:"⚠️ {start}-{end} portları kullanımda, izleme servisi başlatılamadı",uk:"⚠️ Порти {start}-{end} всі зайняті, служба моніторингу не запущена"},"ui.requestList":{zh:"请求列表",en:"Requests","zh-TW":"請求列表",ko:"요청 목록",ja:"リクエスト一覧",de:"Anfragen",es:"Solicitudes",fr:"Requêtes",it:"Richieste",da:"Forespørgsler",pl:"Żądania",ru:"Запросы",ar:"الطلبات",no:"Forespørsler","pt-BR":"Requisições",th:"รายการคำขอ",tr:"İstekler",uk:"Запити"},"ui.totalRequests":{zh:"总请求数: {count}",en:"Total: {count}","zh-TW":"總請求數: {count}",ko:"총 요청 수: {count}",ja:"合計: {count}",de:"Gesamt: {count}",es:"Total: {count}",fr:"Total : {count}",it:"Totale: {count}",da:"Total: {count}",pl:"Łącznie: {count}",ru:"Всего: {count}",ar:"الإجمالي: {count}",no:"Totalt: {count}","pt-BR":"Total: {count}",th:"ทั้งหมด: {count}",tr:"Toplam: {count}",uk:"Всього: {count}"},"ui.waitingRequests":{zh:"等待请求...",en:"Waiting for requests...","zh-TW":"等待請求...",ko:"요청 대기 중...",ja:"リクエスト待機中...",de:"Warte auf Anfragen...",es:"Esperando solicitudes...",fr:"En attente de requêtes...",it:"In attesa di richieste...",da:"Venter på forespørgsler...",pl:"Oczekiwanie na żądania...",ru:"Ожидание запросов...",ar:"في انتظار الطلبات...",no:"Venter på forespørsler...","pt-BR":"Aguardando requisições...",th:"รอคำขอ...",tr:"İstekler bekleniyor...",uk:"Очікування запитів..."},"ui.importLocalLogs":{zh:"打开本地日志",en:"Import local logs","zh-TW":"匯入本地日誌",ko:"로컬 로그 가져오기",ja:"ローカルログをインポート",de:"Lokale Logs importieren",es:"Importar logs locales",fr:"Importer les logs locaux",it:"Importa log locali",da:"Importér lokale logs",pl:"Importuj lokalne logi",ru:"Импорт локальных логов",ar:"استيراد السجلات المحلية",no:"Importer lokale logger","pt-BR":"Importar logs locais",th:"นำเข้าบันทึกในเครื่อง",tr:"Yerel logları içe aktar",uk:"Імпорт локальних логів"},"ui.loadLocalJsonl":{zh:"直接选择加载本地jsonl文件",en:"Load local JSONL file","zh-TW":"直接選擇載入本地jsonl檔案",ko:"로컬 JSONL 파일 선택",ja:"ローカルJSONLファイルを選択",de:"Lokale JSONL-Datei auswählen",es:"Seleccionar archivo JSONL local",fr:"Sélectionner un fichier JSONL local",it:"Seleziona file JSONL locale",da:"Vælg lokal JSONL-fil",pl:"Wybierz lokalny plik JSONL",ru:"Выбрать локальный JSONL файл",ar:"اختيار ملف JSONL محلي",no:"Velg lokal JSONL-fil","pt-BR":"Selecionar arquivo JSONL local",th:"เลือกไฟล์ JSONL ในเครื่อง",tr:"Yerel JSONL dosyası seç",uk:"Вибрати локальний JSONL файл"},"ui.fileTooLarge":{zh:"文件大小不能超过 500MB",en:"File size cannot exceed 500MB","zh-TW":"檔案大小不能超過 500MB",ko:"파일 크기는 500MB를 초과할 수 없습니다",ja:"ファイルサイズは500MBを超えることはできません",de:"Dateigröße darf 500MB nicht überschreiten",es:"El tamaño del archivo no puede superar 500MB",fr:"La taille du fichier ne peut pas dépasser 500 Mo",it:"La dimensione del file non può superare 500MB",da:"Filstørrelsen må ikke overstige 500MB",pl:"Rozmiar pliku nie może przekraczać 500MB",ru:"Размер файла не может превышать 500МБ",ar:"حجم الملف لا يمكن أن يتجاوز 500 ميجابايت",no:"Filstørrelsen kan ikke overstige 500MB","pt-BR":"O tamanho do arquivo não pode exceder 500MB",th:"ขนาดไฟล์ต้องไม่เกิน 500MB",tr:"Dosya boyutu 500MB'ı aşamaz",uk:"Розмір файлу не може перевищувати 500МБ"},"ui.saveLog":{zh:"下载当前日志",en:"Download current log","zh-TW":"下載當前日誌",ko:"현재 로그 다운로드",ja:"現在のログをダウンロード",de:"Aktuelles Log herunterladen",es:"Descargar log actual",fr:"Télécharger le log actuel",it:"Scarica log corrente",da:"Download nuværende log",pl:"Pobierz bieżący log",ru:"Скачать текущий лог",ar:"تحميل السجل الحالي",no:"Last ned gjeldende logg","pt-BR":"Baixar log atual",th:"ดาวน์โหลดล็อกปัจจุบัน",tr:"Mevcut günlüğü indir",uk:"Завантажити поточний лог"},"ui.exportPrompts":{zh:"查看用户 Prompt",en:"Export user prompts","zh-TW":"匯出用戶 Prompt",ko:"사용자 Prompt 내보내기",ja:"ユーザー Prompt をエクスポート",de:"Benutzer-Prompts exportieren",es:"Exportar prompts de usuario",fr:"Exporter les prompts utilisateur",it:"Esporta prompt utente",da:"Eksportér bruger-prompts",pl:"Eksportuj prompty użytkownika",ru:"Экспорт пользовательских Prompt",ar:"تصدير Prompt المستخدم",no:"Eksporter bruker-prompts","pt-BR":"Exportar prompts do usuário",th:"ส่งออก Prompt ผู้ใช้",tr:"Kullanıcı Prompt'larını dışa aktar",uk:"Експорт Prompt користувача"},"ui.exportPromptsTxt":{zh:"导出到本地 .txt",en:"Export to local .txt","zh-TW":"匯出到本地 .txt",ko:"로컬 .txt로 내보내기",ja:"ローカル .txt にエクスポート",de:"Als lokale .txt exportieren",es:"Exportar a .txt local",fr:"Exporter en .txt local",it:"Esporta in .txt locale",da:"Eksportér til lokal .txt",pl:"Eksportuj do lokalnego .txt",ru:"Экспорт в локальный .txt",ar:"تصدير إلى ملف .txt محلي",no:"Eksporter til lokal .txt","pt-BR":"Exportar para .txt local",th:"ส่งออกเป็นไฟล์ .txt ในเครื่อง",tr:"Yerel .txt olarak dışa aktar",uk:"Експорт у локальний .txt"},"ui.tokenStats":{zh:"数据统计",en:"Data Stats","zh-TW":"數據統計",ko:"데이터 통계",ja:"データ統計",de:"Datenstatistik",es:"Estadísticas de datos",fr:"Statistiques de données",it:"Statistiche dati",da:"Datastatistik",pl:"Statystyki danych",ru:"Статистика данных",ar:"إحصائيات البيانات",no:"Datastatistikk","pt-BR":"Estatísticas de dados",th:"สถิติข้อมูล",tr:"Veri İstatistikleri",uk:"Статистика даних"},"ui.liveMonitoring":{zh:"实时监控中",en:"Live","zh-TW":"即時監控中",ko:"실시간 모니터링",ja:"リアルタイム監視中",de:"Live",es:"En vivo",fr:"En direct",it:"Live",da:"Live",pl:"Na żywo",ru:"Мониторинг",ar:"مباشر",no:"Live","pt-BR":"Ao vivo",th:"สด",tr:"Canlı",uk:"Моніторинг"},"ui.historyLog":{zh:"历史日志: {file}",en:"History: {file}","zh-TW":"歷史日誌: {file}",ko:"기록: {file}",ja:"履歴: {file}",de:"Verlauf: {file}",es:"Historial: {file}",fr:"Historique : {file}",it:"Cronologia: {file}",da:"Historik: {file}",pl:"Historia: {file}",ru:"История: {file}",ar:"السجل: {file}",no:"Historikk: {file}","pt-BR":"Histórico: {file}",th:"ประวัติ: {file}",tr:"Geçmiş: {file}",uk:"Історія: {file}"},"ui.chatMode":{zh:"对话模式",en:"Chat mode","zh-TW":"對話模式",ko:"대화 모드",ja:"チャットモード",de:"Chat-Modus",es:"Modo chat",fr:"Mode conversation",it:"Modalità chat",da:"Chat-tilstand",pl:"Tryb czatu",ru:"Режим чата",ar:"وضع المحادثة",no:"Chat-modus","pt-BR":"Modo chat",th:"โหมดแชท",tr:"Sohbet modu",uk:"Режим чату"},"ui.rawMode":{zh:"回到原文模式",en:"Back to Raw","zh-TW":"回到原文模式",ko:"원문 모드로 돌아가기",ja:"Raw モードに戻る",de:"Zurück zum Rohmodus",es:"Volver al modo raw",fr:"Retour au mode brut",it:"Torna alla modalità raw",da:"Tilbage til rå tilstand",pl:"Powrót do trybu surowego",ru:"Вернуться в режим raw",ar:"العودة للوضع الخام",no:"Tilbake til rå modus","pt-BR":"Voltar ao modo raw",th:"กลับสู่โหมด Raw",tr:"Ham moda dön",uk:"Повернутися до режиму raw"},"ui.viewRequest":{zh:"查看请求",en:"View Request","zh-TW":"查看請求",ko:"요청 보기",ja:"リクエストを表示",de:"Anfrage anzeigen",es:"Ver solicitud",fr:"Voir la requête",it:"Visualizza richiesta",da:"Vis forespørgsel",pl:"Zobacz żądanie",ru:"Просмотр запроса",ar:"عرض الطلب",no:"Vis forespørsel","pt-BR":"Ver requisição",th:"ดูคำขอ",tr:"İsteği görüntüle",uk:"Переглянути запит"},"ui.viewInChat":{zh:"在对话中查看",en:"View in chat","zh-TW":"在對話中查看",ko:"대화에서 보기",ja:"チャットで表示",de:"Im Chat anzeigen",es:"Ver en chat",fr:"Voir dans le chat",it:"Vedi nella chat",da:"Vis i chat",pl:"Zobacz w czacie",ru:"Посмотреть в чате",ar:"عرض في المحادثة",no:"Vis i chat","pt-BR":"Ver no chat",th:"ดูในแชท",tr:"Sohbette görüntüle",uk:"Переглянути в чаті"},"ui.cannotMap":{zh:"无法映射到对话",en:"Cannot map to conversation","zh-TW":"無法映射到對話",ko:"대화에 매핑할 수 없습니다",ja:"会話にマッピングできません",de:"Kann nicht zur Konversation zugeordnet werden",es:"No se puede mapear a la conversación",fr:"Impossible de mapper à la conversation",it:"Impossibile mappare alla conversazione",da:"Kan ikke mappe til samtale",pl:"Nie można zmapować do rozmowy",ru:"Невозможно сопоставить с диалогом",ar:"لا يمكن الربط بالمحادثة",no:"Kan ikke tilordne til samtale","pt-BR":"Não é possível mapear para a conversa",th:"ไม่สามารถแมปไปยังการสนทนาได้",tr:"Konuşmaya eşlenemedi",uk:"Неможливо зіставити з діалогом"},"ui.cacheExpired":{zh:"已失效",en:"Expired","zh-TW":"已失效",ko:"만료됨",ja:"期限切れ",de:"Abgelaufen",es:"Expirado",fr:"Expiré",it:"Scaduto",da:"Udløbet",pl:"Wygasło",ru:"Истёк",ar:"منتهي الصلاحية",no:"Utløpt","pt-BR":"Expirado",th:"หมดอายุ",tr:"Süresi doldu",uk:"Закінчився"},"ui.cacheCountdown":{zh:"MainAgent 缓存{type}失效倒计时:",en:"MainAgent cache{type} expires in: ","zh-TW":"MainAgent 快取{type}失效倒數:",ko:"MainAgent cache{type} 만료 카운트다운: ",ja:"MainAgent cache{type} 期限切れまで: ",de:"MainAgent Cache{type} läuft ab in: ",es:"Cache{type} de MainAgent expira en: ",fr:"Cache{type} MainAgent expire dans : ",it:"Cache{type} MainAgent scade tra: ",da:"MainAgent cache{type} udløber om: ",pl:"Cache{type} MainAgent wygasa za: ",ru:"Cache{type} MainAgent истекает через: ",ar:"ينتهي cache{type} لـ MainAgent خلال: ",no:"MainAgent cache{type} utløper om: ","pt-BR":"Cache{type} do MainAgent expira em: ",th:"Cache{type} ของ MainAgent หมดอายุใน: ",tr:"MainAgent cache{type} süresi doluyor: ",uk:"Cache{type} MainAgent закінчується через: "},"ui.minuteSecond":{zh:"{m}分{s}秒",en:"{m}m{s}s","zh-TW":"{m}分{s}秒",ko:"{m}분{s}초",ja:"{m}分{s}秒",de:"{m}m{s}s",es:"{m}m{s}s",fr:"{m}m{s}s",it:"{m}m{s}s",da:"{m}m{s}s",pl:"{m}m{s}s",ru:"{m}м{s}с",ar:"{m}د{s}ث",no:"{m}m{s}s","pt-BR":"{m}m{s}s",th:"{m}นาที{s}วินาที",tr:"{m}dk{s}sn",uk:"{m}хв{s}с"},"ui.second":{zh:"{s}秒",en:"{s}s","zh-TW":"{s}秒",ko:"{s}초",ja:"{s}秒",de:"{s}s",es:"{s}s",fr:"{s}s",it:"{s}s",da:"{s}s",pl:"{s}s",ru:"{s}с",ar:"{s}ث",no:"{s}s","pt-BR":"{s}s",th:"{s}วินาที",tr:"{s}sn",uk:"{s}с"},"ui.hitRate":{zh:"命中率",en:"Hit rate","zh-TW":"命中率",ko:"적중률",ja:"ヒット率",de:"Trefferquote",es:"Tasa de aciertos",fr:"Taux de succès",it:"Tasso di successo",da:"Hitrate",pl:"Współczynnik trafień",ru:"Процент попаданий",ar:"معدل الإصابة",no:"Treffrate","pt-BR":"Taxa de acerto",th:"อัตราการเข้าถึง",tr:"İsabet oranı",uk:"Відсоток влучень"},"ui.userPrompt":{zh:"用户 Prompt",en:"User Prompt","zh-TW":"用戶 Prompt",ko:"사용자 Prompt",ja:"ユーザー Prompt",de:"Benutzer-Prompt",es:"Prompt de usuario",fr:"Prompt utilisateur",it:"Prompt utente",da:"Bruger-Prompt",pl:"Prompt użytkownika",ru:"Prompt пользователя",ar:"Prompt المستخدم",no:"Bruker-Prompt","pt-BR":"Prompt do usuário",th:"Prompt ผู้ใช้",tr:"Kullanıcı Prompt",uk:"Prompt користувача"},"ui.noPrompt":{zh:"暂无用户 Prompt",en:"No user prompts yet","zh-TW":"暫無用戶 Prompt",ko:"사용자 Prompt 없음",ja:"ユーザー Prompt はまだありません",de:"Noch keine Benutzer-Prompts",es:"Sin prompts de usuario aún",fr:"Aucun prompt utilisateur",it:"Nessun prompt utente",da:"Ingen bruger-prompts endnu",pl:"Brak promptów użytkownika",ru:"Нет пользовательских Prompt",ar:"لا توجد Prompt للمستخدم بعد",no:"Ingen bruker-prompts ennå","pt-BR":"Nenhum prompt de usuário ainda",th:"ยังไม่มี Prompt ผู้ใช้",tr:"Henüz kullanıcı Prompt'u yok",uk:"Немає Prompt користувача"},"ui.promptCountUnit":{zh:"条",en:"","zh-TW":"條",ko:"개",ja:"件",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"ui.promptModeOriginal":{zh:"原文模式",en:"Original"},"ui.promptModeContext":{zh:"上下文模式",en:"Context"},"ui.promptModeText":{zh:"Text模式",en:"Text"},"ui.unknownTime":{zh:"未知时间",en:"Unknown time","zh-TW":"未知時間",ko:"알 수 없는 시간",ja:"不明な時刻",de:"Unbekannte Zeit",es:"Hora desconocida",fr:"Heure inconnue",it:"Ora sconosciuta",da:"Ukendt tid",pl:"Nieznany czas",ru:"Неизвестное время",ar:"وقت غير معروف",no:"Ukjent tid","pt-BR":"Hora desconhecida",th:"เวลาไม่ทราบ",tr:"Bilinmeyen zaman",uk:"Невідомий час"},"ui.logCount":{zh:"{count} 个日志",en:"{count} logs","zh-TW":"{count} 個日誌",ko:"{count}개 로그",ja:"{count} 件のログ",de:"{count} Logs",es:"{count} logs",fr:"{count} logs",it:"{count} log",da:"{count} logs",pl:"{count} logów",ru:"{count} логов",ar:"{count} سجلات",no:"{count} logger","pt-BR":"{count} logs",th:"{count} บันทึก",tr:"{count} log",uk:"{count} логів"},"ui.noLogs":{zh:"暂无日志文件",en:"No log files","zh-TW":"暫無日誌檔案",ko:"로그 파일 없음",ja:"ログファイルなし",de:"Keine Log-Dateien",es:"Sin archivos de log",fr:"Aucun fichier de log",it:"Nessun file di log",da:"Ingen logfiler",pl:"Brak plików logów",ru:"Нет файлов логов",ar:"لا توجد ملفات سجلات",no:"Ingen loggfiler","pt-BR":"Nenhum arquivo de log",th:"ไม่มีไฟล์บันทึก",tr:"Log dosyası yok",uk:"Немає файлів логів"},"ui.footer.contact":{zh:"如需帮助,请联系 @水映天辙(钉钉)",en:"Need help? Contact @水映天辙 (DingTalk)","zh-TW":"如需幫助,請聯繫 @水映天辙(釘釘)",ko:"도움이 필요하면 @水映天辙(DingTalk)에 연락하세요",ja:"ヘルプが必要な場合は @水映天辙(DingTalk) にご連絡ください",de:"Hilfe benötigt? Kontaktieren Sie @水映天辙 (DingTalk)",es:"¿Necesita ayuda? Contacte a @水映天辙 (DingTalk)",fr:"Besoin d'aide ? Contactez @水映天辙 (DingTalk)",it:"Hai bisogno di aiuto? Contatta @水映天辙 (DingTalk)",da:"Brug for hjælp? Kontakt @水映天辙 (DingTalk)",pl:"Potrzebujesz pomocy? Skontaktuj się z @水映天辙 (DingTalk)",ru:"Нужна помощь? Свяжитесь с @水映天辙 (DingTalk)",ar:"تحتاج مساعدة؟ تواصل مع @水映天辙 (DingTalk)",no:"Trenger du hjelp? Kontakt @水映天辙 (DingTalk)","pt-BR":"Precisa de ajuda? Entre em contato com @水映天辙 (DingTalk)",th:"ต้องการความช่วยเหลือ? ติดต่อ @水映天辙 (DingTalk)",tr:"Yardıma mı ihtiyacınız var? @水映天辙 (DingTalk) ile iletişime geçin",uk:"Потрібна допомога? Зв'яжіться з @水映天辙 (DingTalk)"},"ui.toolReturn":{zh:"工具返回",en:"Tool result","zh-TW":"工具返回",ko:"도구 결과",ja:"ツール結果",de:"Tool-Ergebnis",es:"Resultado de herramienta",fr:"Résultat d'outil",it:"Risultato strumento",da:"Værktøjsresultat",pl:"Wynik narzędzia",ru:"Результат инструмента",ar:"نتيجة الأداة",no:"Verktøyresultat","pt-BR":"Resultado da ferramenta",th:"ผลลัพธ์เครื่องมือ",tr:"Araç sonucu",uk:"Результат інструменту"},"ui.toolReturnNamed":{zh:"{name} 返回",en:"{name} result","zh-TW":"{name} 返回",ko:"{name} 결과",ja:"{name} 結果",de:"{name}-Ergebnis",es:"Resultado de {name}",fr:"Résultat de {name}",it:"Risultato di {name}",da:"{name}-resultat",pl:"Wynik {name}",ru:"Результат {name}",ar:"نتيجة {name}",no:"{name}-resultat","pt-BR":"Resultado de {name}",th:"ผลลัพธ์ {name}",tr:"{name} sonucu",uk:"Результат {name}"},"ui.lastResponse":{zh:"Last Response",en:"Last Response","zh-TW":"Last Response",ko:"Last Response",ja:"Last Response",de:"Last Response",es:"Last Response",fr:"Last Response",it:"Last Response",da:"Last Response",pl:"Last Response",ru:"Last Response",ar:"Last Response",no:"Last Response","pt-BR":"Last Response",th:"Last Response",tr:"Last Response",uk:"Last Response"},"ui.copySuccess":{zh:"复制成功",en:"Copied","zh-TW":"複製成功",ko:"복사됨",ja:"コピーしました",de:"Kopiert",es:"Copiado",fr:"Copié",it:"Copiato",da:"Kopieret",pl:"Skopiowano",ru:"Скопировано",ar:"تم النسخ",no:"Kopiert","pt-BR":"Copiado",th:"คัดลอกแล้ว",tr:"Kopyalandı",uk:"Скопійовано"},"ui.copy":{zh:"复制",en:"Copy","zh-TW":"複製",ko:"복사",ja:"コピー",de:"Kopieren",es:"Copiar",fr:"Copier",it:"Copia",da:"Kopiér",pl:"Kopiuj",ru:"Копировать",ar:"نسخ",no:"Kopier","pt-BR":"Copiar",th:"คัดลอก",tr:"Kopyala",uk:"Копіювати"},"ui.noHeaders":{zh:"无 Headers",en:"No Headers","zh-TW":"無 Headers",ko:"Headers 없음",ja:"Headers なし",de:"Keine Headers",es:"Sin Headers",fr:"Pas de Headers",it:"Nessun Header",da:"Ingen Headers",pl:"Brak Headers",ru:"Нет Headers",ar:"لا يوجد Headers",no:"Ingen Headers","pt-BR":"Sem Headers",th:"ไม่มี Headers",tr:"Header yok",uk:"Немає Headers"},"ui.noBody":{zh:"无 Body",en:"No Body","zh-TW":"無 Body",ko:"Body 없음",ja:"Body なし",de:"Kein Body",es:"Sin Body",fr:"Pas de Body",it:"Nessun Body",da:"Ingen Body",pl:"Brak Body",ru:"Нет Body",ar:"لا يوجد Body",no:"Ingen Body","pt-BR":"Sem Body",th:"ไม่มี Body",tr:"Body yok",uk:"Немає Body"},"ui.streamingResponse":{zh:"⚡ 流式响应 — 此请求使用了 SSE 流式传输,响应内容无法完整捕获。",en:"⚡ Streaming response — This request used SSE streaming, response content cannot be fully captured.","zh-TW":"⚡ 串流回應 — 此請求使用了 SSE 串流傳輸,回應內容無法完整擷取。",ko:"⚡ 스트리밍 응답 — 이 요청은 SSE 스트리밍을 사용하여 응답 내용을 완전히 캡처할 수 없습니다.",ja:"⚡ ストリーミングレスポンス — このリクエストは SSE ストリーミングを使用しており、レスポンス内容を完全にキャプチャできませんでした。",de:"⚡ Streaming-Antwort — Diese Anfrage nutzte SSE-Streaming, der Antwortinhalt konnte nicht vollständig erfasst werden.",es:"⚡ Respuesta en streaming — Esta solicitud usó streaming SSE, el contenido de la respuesta no se pudo capturar completamente.",fr:"⚡ Réponse en streaming — Cette requête a utilisé le streaming SSE, le contenu de la réponse n'a pas pu être entièrement capturé.",it:"⚡ Risposta in streaming — Questa richiesta ha utilizzato lo streaming SSE, il contenuto della risposta non può essere catturato completamente.",da:"⚡ Streaming-svar — Denne forespørgsel brugte SSE-streaming, svarindholdet kunne ikke fuldt indfanges.",pl:"⚡ Odpowiedź strumieniowa — To żądanie użyło strumieniowania SSE, treść odpowiedzi nie mogła zostać w pełni przechwycona.",ru:"⚡ Потоковый ответ — Этот запрос использовал SSE-потоковую передачу, содержимое ответа не может быть полностью захвачено.",ar:"⚡ استجابة متدفقة — استخدم هذا الطلب بث SSE، لا يمكن التقاط محتوى الاستجابة بالكامل.",no:"⚡ Strømmesvar — Denne forespørselen brukte SSE-strømming, svarinnholdet kunne ikke fanges fullstendig.","pt-BR":"⚡ Resposta em streaming — Esta requisição usou streaming SSE, o conteúdo da resposta não pôde ser totalmente capturado.",th:"⚡ การตอบกลับแบบสตรีม — คำขอนี้ใช้ SSE streaming เนื้อหาการตอบกลับไม่สามารถจับได้ทั้งหมด",tr:"⚡ Akış yanıtı — Bu istek SSE akışı kullandı, yanıt içeriği tam olarak yakalanamadı.",uk:"⚡ Потокова відповідь — Цей запит використовував SSE-потокову передачу, вміст відповіді не може бути повністю захоплений."},"ui.responseNotCaptured":{zh:"响应数据未捕获",en:"Response not captured","zh-TW":"回應資料未擷取",ko:"응답 데이터 미캡처",ja:"レスポンスデータ未キャプチャ",de:"Antwortdaten nicht erfasst",es:"Datos de respuesta no capturados",fr:"Données de réponse non capturées",it:"Dati di risposta non catturati",da:"Svardata ikke indfanget",pl:"Dane odpowiedzi nie przechwycone",ru:"Данные ответа не захвачены",ar:"لم يتم التقاط بيانات الاستجابة",no:"Svardata ikke fanget","pt-BR":"Dados de resposta não capturados",th:"ไม่ได้จับข้อมูลการตอบกลับ",tr:"Yanıt verileri yakalanamadı",uk:"Дані відповіді не захоплені"},"ui.expand":{zh:"▶ 展开",en:"▶ Expand","zh-TW":"▶ 展開",ko:"▶ 펼치기",ja:"▶ 展開",de:"▶ Aufklappen",es:"▶ Expandir",fr:"▶ Déplier",it:"▶ Espandi",da:"▶ Udvid",pl:"▶ Rozwiń",ru:"▶ Развернуть",ar:"▶ توسيع",no:"▶ Utvid","pt-BR":"▶ Expandir",th:"▶ ขยาย",tr:"▶ Genişlet",uk:"▶ Розгорнути"},"ui.collapse":{zh:"▼ 收起",en:"▼ Collapse","zh-TW":"▼ 收起",ko:"▼ 접기",ja:"▼ 折りたたむ",de:"▼ Zuklappen",es:"▼ Contraer",fr:"▼ Replier",it:"▼ Comprimi",da:"▼ Fold sammen",pl:"▼ Zwiń",ru:"▼ Свернуть",ar:"▼ طي",no:"▼ Skjul","pt-BR":"▼ Recolher",th:"▼ ย่อ",tr:"▼ Daralt",uk:"▼ Згорнути"},"ui.noChat":{zh:"暂无 MainAgent 对话数据",en:"No MainAgent conversation data","zh-TW":"暫無 MainAgent 對話資料",ko:"MainAgent 대화 데이터 없음",ja:"MainAgent の会話データがありません",de:"Keine MainAgent-Gesprächsdaten",es:"Sin datos de conversación de MainAgent",fr:"Aucune donnée de conversation MainAgent",it:"Nessun dato di conversazione MainAgent",da:"Ingen MainAgent samtaledata",pl:"Brak danych rozmowy MainAgent",ru:"Нет данных диалога MainAgent",ar:"لا توجد بيانات محادثة MainAgent",no:"Ingen MainAgent samtaledata","pt-BR":"Sem dados de conversa do MainAgent",th:"ไม่มีข้อมูลการสนทนา MainAgent",tr:"MainAgent konuşma verisi yok",uk:"Немає даних діалогу MainAgent"},"ui.diffWithPrev":{zh:"与上次请求的差异",en:"Diff with previous request","zh-TW":"與上次請求的差異",ko:"이전 요청과의 차이",ja:"前回リクエストとの差分",de:"Diff zur vorherigen Anfrage",es:"Diferencia con la solicitud anterior",fr:"Diff avec la requête précédente",it:"Diff con la richiesta precedente",da:"Diff med forrige anmodning",pl:"Różnica z poprzednim żądaniem",ru:"Отличия от предыдущего запроса",ar:"الفرق مع الطلب السابق",no:"Diff med forrige forespørsel","pt-BR":"Diff com a requisição anterior",th:"ความแตกต่างกับคำขอก่อนหน้า",tr:"Önceki istekle fark",uk:"Відмінності від попереднього запиту"},"ui.diffSessionChanged":{zh:"请求体大小减小,可能使用了 /clear、/compact 或 session 发生了变化",en:"Request body size decreased, possibly due to /clear, /compact, or session change","zh-TW":"請求體大小減小,可能使用了 /clear、/compact 或 session 發生了變化",ko:"요청 본문 크기가 줄었습니다. /clear, /compact 또는 세션 변경이 있었을 수 있습니다",ja:"リクエストボディのサイズが減少しました。/clear、/compact、またはセッション変更の可能性があります",de:"Anfragekörper wurde kleiner, möglicherweise durch /clear, /compact oder Sitzungswechsel",es:"El tamaño del cuerpo de la solicitud disminuyó, posiblemente debido a /clear, /compact o cambio de sesión",fr:"La taille du corps de la requête a diminué, possiblement dû à /clear, /compact ou un changement de session",it:"La dimensione del corpo della richiesta è diminuita, probabilmente a causa di /clear, /compact o cambio di sessione",da:"Anmodningens størrelse er reduceret, muligvis på grund af /clear, /compact eller sessionsændring",pl:"Rozmiar treści żądania zmniejszył się, prawdopodobnie z powodu /clear, /compact lub zmiany sesji",ru:"Размер тела запроса уменьшился, возможно из-за /clear, /compact или смены сессии",ar:"حجم نص الطلب انخفض، ربما بسبب /clear أو /compact أو تغيير الجلسة",no:"Forespørselens størrelse ble redusert, muligens på grunn av /clear, /compact eller sesjonsendring","pt-BR":"O tamanho do corpo da requisição diminuiu, possivelmente devido a /clear, /compact ou mudança de sessão",th:"ขนาดเนื้อหาคำขอลดลง อาจเกิดจาก /clear, /compact หรือการเปลี่ยนเซสชัน",tr:"İstek gövdesi boyutu küçüldü, muhtemelen /clear, /compact veya oturum değişikliği nedeniyle",uk:"Розмір тіла запиту зменшився, можливо через /clear, /compact або зміну сесії"},"ui.diffTooltip":{zh:"为了避免看冗长的全文,所以为大家简化展示了 MainAgent 的增量部分,通常只有 message 增加",en:"To avoid reading lengthy full text, only the incremental parts of MainAgent are shown — typically just new messages","zh-TW":"為了避免閱讀冗長的全文,簡化展示了 MainAgent 的增量部分,通常只有 message 增加",ko:"긴 전체 텍스트를 읽지 않도록 MainAgent의 증분 부분만 간략히 표시합니다. 일반적으로 message 추가만 있습니다",ja:"MainAgent の増分部分のみを簡略表示しています。長い全文を読む手間を省くため、通常は message の追加のみです",de:"Um das Lesen langer Volltexte zu vermeiden, werden nur die inkrementellen Teile des MainAgent angezeigt — in der Regel nur neue Nachrichten",es:"Para evitar leer textos completos extensos, solo se muestran las partes incrementales del MainAgent — normalmente solo mensajes nuevos",fr:"Pour éviter de lire de longs textes complets, seules les parties incrémentales du MainAgent sont affichées — généralement uniquement les nouveaux messages",it:"Per evitare di leggere lunghi testi completi, vengono mostrate solo le parti incrementali del MainAgent — di solito solo nuovi messaggi",da:"For at undgå at læse lange fuldtekster vises kun de inkrementelle dele af MainAgent — typisk kun nye beskeder",pl:"Aby uniknąć czytania długich pełnych tekstów, wyświetlane są tylko przyrostowe części MainAgent — zwykle tylko nowe wiadomości",ru:"Чтобы не читать длинный полный текст, отображаются только инкрементальные части MainAgent — обычно только новые сообщения",ar:"لتجنب قراءة النص الكامل الطويل، يتم عرض الأجزاء التزايدية فقط من MainAgent — عادةً فقط الرسائل الجديدة",no:"For å unngå å lese lange fulltekster vises kun de inkrementelle delene av MainAgent — vanligvis bare nye meldinger","pt-BR":"Para evitar ler textos completos longos, apenas as partes incrementais do MainAgent são exibidas — geralmente apenas novas mensagens",th:"เพื่อหลีกเลี่ยงการอ่านข้อความเต็มที่ยาว จึงแสดงเฉพาะส่วนที่เพิ่มขึ้นของ MainAgent เท่านั้น — โดยปกติจะมีเพียง message ใหม่",tr:"Uzun tam metinleri okumaktan kaçınmak için yalnızca MainAgent'ın artımlı kısımları gösterilir — genellikle yalnızca yeni mesajlar",uk:"Щоб не читати довгий повний текст, відображаються лише інкрементальні частини MainAgent — зазвичай лише нові повідомлення"},"cli.resume.prompt":{zh:"检测到1小时内的日志: {file}",en:"Recent log found (within 1 hour): {file}","zh-TW":"偵測到1小時內的日誌: {file}",ko:"1시간 이내 로그 감지: {file}",ja:"1時間以内のログを検出: {file}",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}",es:"Log reciente encontrado (dentro de 1 hora): {file}",fr:"Log récent trouvé (moins d'1 heure): {file}",it:"Log recente trovato (entro 1 ora): {file}",da:"Nylig log fundet (inden for 1 time): {file}",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}",ru:"Обнаружен недавний лог (менее 1 часа): {file}",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}",no:"Nylig logg funnet (innen 1 time): {file}","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file}",tr:"Son günlük bulundu (1 saat içinde): {file}",uk:"Знайдено нещодавній лог (менше 1 години): {file}"},"cli.resume.continue":{zh:"继续",en:"Continue","zh-TW":"繼續",ko:"계속",ja:"続行",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam",uk:"Продовжити"},"cli.resume.new":{zh:"新开",en:"New","zh-TW":"新開",ko:"새로 시작",ja:"新規",de:"Neu",es:"Nuevo",fr:"Nouveau",it:"Nuovo",da:"Ny",pl:"Nowy",ru:"Новый",ar:"جديد",no:"Ny","pt-BR":"Novo",th:"ใหม่",tr:"Yeni",uk:"Новий"},"ui.resume.title":{zh:"检测到近期日志",en:"Recent Log Detected","zh-TW":"偵測到近期日誌",ko:"최근 로그 감지됨",ja:"最近のログを検出",de:"Kürzliches Log erkannt",es:"Log reciente detectado",fr:"Log récent détecté",it:"Log recente rilevato",da:"Nylig log fundet",pl:"Wykryto ostatni log",ru:"Обнаружен недавний лог",ar:"تم اكتشاف سجل حديث",no:"Nylig logg oppdaget","pt-BR":"Log recente detectado",th:"ตรวจพบล็อกล่าสุด",tr:"Son günlük tespit edildi",uk:"Виявлено нещодавній лог"},"ui.resume.message":{zh:"检测到1小时内的日志: {file},是否继续?",en:"Recent log found (within 1 hour): {file}. Continue?","zh-TW":"偵測到1小時內的日誌: {file},是否繼續?",ko:"1시간 이내 로그 감지: {file}. 계속하시겠습니까?",ja:"1時間以内のログを検出: {file}。続行しますか?",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}. Fortsetzen?",es:"Log reciente encontrado (dentro de 1 hora): {file}. ¿Continuar?",fr:"Log récent trouvé (moins d'1 heure): {file}. Continuer ?",it:"Log recente trovato (entro 1 ora): {file}. Continuare?",da:"Nylig log fundet (inden for 1 time): {file}. Fortsæt?",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}. Kontynuować?",ru:"Обнаружен недавний лог (менее 1 часа): {file}. Продолжить?",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}. هل تريد المتابعة؟",no:"Nylig logg funnet (innen 1 time): {file}. Fortsette?","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}. Continuar?",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file} ต้องการดำเนินการต่อหรือไม่?",tr:"Son günlük bulundu (1 saat içinde): {file}. Devam edilsin mi?",uk:"Знайдено нещодавній лог (менше 1 години): {file}. Продовжити?"},"ui.resume.continue":{zh:"继续上次",en:"Continue","zh-TW":"繼續上次",ko:"이어서 계속",ja:"前回の続き",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam et",uk:"Продовжити"},"ui.resume.new":{zh:"新开日志",en:"Start New","zh-TW":"新開日誌",ko:"새 로그 시작",ja:"新規ログ",de:"Neues Log",es:"Nuevo log",fr:"Nouveau log",it:"Nuovo log",da:"Ny log",pl:"Nowy log",ru:"Новый лог",ar:"سجل جديد",no:"Ny logg","pt-BR":"Novo log",th:"ล็อกใหม่",tr:"Yeni günlük",uk:"Новий лог"},"ui.settings":{zh:"设置",en:"Settings","zh-TW":"設定",ko:"설정",ja:"設定",de:"Einstellungen",es:"Configuración",fr:"Paramètres",it:"Impostazioni",da:"Indstillinger",pl:"Ustawienia",ru:"Настройки",ar:"الإعدادات",no:"Innstillinger","pt-BR":"Configurações",th:"ตั้งค่า",tr:"Ayarlar",uk:"Налаштування"},"ui.collapseToolResults":{zh:"折叠工具返回内容",en:"Collapse tool results","zh-TW":"摺疊工具回傳內容",ko:"도구 결과 접기",ja:"ツール結果を折りたたむ",de:"Werkzeugergebnisse einklappen",es:"Contraer resultados de herramientas",fr:"Réduire les résultats des outils",it:"Comprimi risultati strumenti",da:"Skjul værktøjsresultater",pl:"Zwiń wyniki narzędzi",ru:"Свернуть результаты инструментов",ar:"طي نتائج الأدوات",no:"Skjul verktøyresultater","pt-BR":"Recolher resultados de ferramentas",th:"ย่อผลลัพธ์เครื่องมือ",tr:"Araç sonuçlarını daralt",uk:"Згорнути результати інструментів"},"ui.expandThinking":{zh:'展开"思考过程"',en:'Expand "Thinking"',"zh-TW":'展開"思考過程"',ko:'"사고 과정" 펼치기',ja:'"思考プロセス"を展開',de:'"Denkprozess" aufklappen',es:'Expandir "Proceso de pensamiento"',fr:'Développer "Processus de réflexion"',it:'Espandi "Processo di pensiero"',da:'Udvid "Tænkeproces"',pl:'Rozwiń "Proces myślenia"',ru:'Развернуть "Процесс мышления"',ar:'توسيع "عملية التفكير"',no:'Utvid "Tenkeprosess"',"pt-BR":'Expandir "Processo de pensamento"',th:'ขยาย "กระบวนการคิด"',tr:'"Düşünce süreci"ni genişlet',uk:'Розгорнути "Процес мислення"'},"ui.expandDiff":{zh:"默认展开 Body Diff JSON",en:"Expand Body Diff JSON by default","zh-TW":"預設展開 Body Diff JSON",ko:"Body Diff JSON 기본 펼치기",ja:"Body Diff JSON をデフォルトで展開",de:"Body Diff JSON standardmäßig aufklappen",es:"Expandir Body Diff JSON por defecto",fr:"Développer Body Diff JSON par défaut",it:"Espandi Body Diff JSON per impostazione predefinita",da:"Udvid Body Diff JSON som standard",pl:"Domyślnie rozwiń Body Diff JSON",ru:"Разворачивать Body Diff JSON по умолчанию",ar:"توسيع Body Diff JSON افتراضيًا",no:"Utvid Body Diff JSON som standard","pt-BR":"Expandir Body Diff JSON por padrão",th:"ขยาย Body Diff JSON เป็นค่าเริ่มต้น",tr:"Body Diff JSON'u varsayılan olarak genişlet",uk:"Розгортати Body Diff JSON за замовчуванням"},"ui.globalSettings":{zh:"全局设置",en:"Global Settings","zh-TW":"全域設定",ko:"전역 설정",ja:"グローバル設定",de:"Globale Einstellungen",es:"Configuración global",fr:"Paramètres globaux",it:"Impostazioni globali",da:"Globale indstillinger",pl:"Ustawienia globalne",ru:"Глобальные настройки",ar:"الإعدادات العامة",no:"Globale innstillinger","pt-BR":"Configurações globais",th:"ตั้งค่าทั่วไป",tr:"Genel ayarlar",uk:"Глобальні налаштування"},"ui.filterIrrelevant":{zh:"过滤无关请求",en:"Filter irrelevant requests","zh-TW":"過濾無關請求",ko:"무관한 요청 필터링",ja:"無関係なリクエストをフィルタ",de:"Irrelevante Anfragen filtern",es:"Filtrar solicitudes irrelevantes",fr:"Filtrer les requêtes non pertinentes",it:"Filtra richieste irrilevanti",da:"Filtrer irrelevante forespørgsler",pl:"Filtruj nieistotne żądania",ru:"Фильтровать нерелевантные запросы",ar:"تصفية الطلبات غير ذات الصلة",no:"Filtrer irrelevante forespørsler","pt-BR":"Filtrar solicitações irrelevantes",th:"กรองคำขอที่ไม่เกี่ยวข้อง",tr:"İlgisiz istekleri filtrele",uk:"Фільтрувати нерелевантні запити"},"ui.thinking":{zh:"思考过程",en:"Thinking","zh-TW":"思考過程",ko:"사고 과정",ja:"思考プロセス",de:"Denkprozess",es:"Proceso de pensamiento",fr:"Processus de réflexion",it:"Processo di pensiero",da:"Tænkeproces",pl:"Proces myślenia",ru:"Процесс мышления",ar:"عملية التفكير",no:"Tenkeprosess","pt-BR":"Processo de pensamento",th:"กระบวนการคิด",tr:"Düşünce süreci",uk:"Процес мислення"},"ui.translate":{zh:"翻译",en:"Translate","zh-TW":"翻譯",ko:"번역",ja:"翻訳",de:"Übersetzen",es:"Traducir",fr:"Traduire",it:"Traduci",da:"Oversæt",pl:"Tłumacz",ru:"Перевести",ar:"ترجمة",no:"Oversett","pt-BR":"Traduzir",th:"แปล",tr:"Çevir",uk:"Перекласти"},"ui.translating":{zh:"翻译中…",en:"Translating…","zh-TW":"翻譯中…",ko:"번역 중…",ja:"翻訳中…",de:"Übersetze…",es:"Traduciendo…",fr:"Traduction…",it:"Traduzione…",da:"Oversætter…",pl:"Tłumaczenie…",ru:"Перевод…",ar:"جارٍ الترجمة…",no:"Oversetter…","pt-BR":"Traduzindo…",th:"กำลังแปล…",tr:"Çevriliyor…",uk:"Переклад…"},"ui.skillLoaded":{zh:"Skill 已加载",en:"Skill Loaded","zh-TW":"Skill 已載入",ko:"Skill 로드됨",ja:"Skill 読み込み済み",de:"Skill geladen",es:"Skill cargado",fr:"Skill chargé",it:"Skill caricato",da:"Skill indlæst",pl:"Skill załadowany",ru:"Skill загружен",ar:"تم تحميل Skill",no:"Skill lastet","pt-BR":"Skill carregado",th:"โหลด Skill แล้ว",tr:"Skill yüklendi",uk:"Skill завантажено"},"ui.cacheLoss.ttl":{zh:"缓存丢失:距上次 MainAgent 请求超过 5 分钟,缓存已过期",en:"Cache miss: over 5 minutes since last MainAgent request, cache expired","zh-TW":"快取遺失:距上次 MainAgent 請求超過 5 分鐘,快取已過期",ko:"캐시 손실: 마지막 MainAgent 요청 후 5분 초과, 캐시 만료",ja:"キャッシュミス:前回の MainAgent リクエストから5分以上経過、キャッシュ期限切れ",de:"Cache-Verlust: Über 5 Minuten seit letzter MainAgent-Anfrage, Cache abgelaufen",es:"Pérdida de caché: más de 5 minutos desde la última solicitud MainAgent, caché expirada",fr:"Perte de cache : plus de 5 minutes depuis la dernière requête MainAgent, cache expiré",it:"Cache persa: oltre 5 minuti dall'ultima richiesta MainAgent, cache scaduta",da:"Cache-tab: over 5 minutter siden sidste MainAgent-forespørgsel, cache udløbet",pl:"Utrata cache: ponad 5 minut od ostatniego żądania MainAgent, cache wygasł",ru:"Потеря кэша: прошло более 5 минут с последнего запроса MainAgent, кэш истёк",ar:"فقدان التخزين المؤقت: مرور أكثر من 5 دقائق منذ آخر طلب MainAgent، انتهت صلاحية التخزين المؤقت",no:"Cache-tap: over 5 minutter siden siste MainAgent-forespørsel, cache utløpt","pt-BR":"Perda de cache: mais de 5 minutos desde a última requisição MainAgent, cache expirado",th:"แคชหาย: เกิน 5 นาทีจากคำขอ MainAgent ล่าสุด แคชหมดอายุ",tr:"Önbellek kaybı: Son MainAgent isteğinden 5 dakikadan fazla geçti, önbellek süresi doldu",uk:"Втрата кешу: минуло понад 5 хвилин з останнього запиту MainAgent, кеш закінчився"},"ui.cacheLoss.systemChange":{zh:"缓存重建:system prompt 发生变更",en:"Cache rebuild: system prompt changed","zh-TW":"快取重建:system prompt 發生變更",ko:"캐시 재생성: 시스템 프롬프트 변경",ja:"キャッシュ再構築:システムプロンプトが変更されました",de:"Cache-Neuaufbau: System-Prompt geändert",es:"Reconstrucción de caché: el prompt del sistema cambió",fr:"Reconstruction du cache : le prompt système a changé",it:"Ricostruzione cache: il prompt di sistema è cambiato",da:"Cache-genopbygning: systemprompt ændret",pl:"Odbudowa cache: prompt systemowy zmieniony",ru:"Перестройка кэша: системный промпт изменён",ar:"إعادة بناء التخزين المؤقت: تم تغيير موجه النظام",no:"Cache-gjenoppbygging: systemprompt endret","pt-BR":"Reconstrução de cache: prompt do sistema alterado",th:"สร้างแคชใหม่: system prompt เปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: sistem istemi değişti",uk:"Перебудова кешу: системний промпт змінено"},"ui.cacheLoss.toolsChange":{zh:"缓存重建:工具定义发生变更",en:"Cache rebuild: tool definitions changed","zh-TW":"快取重建:工具定義發生變更",ko:"캐시 재생성: 도구 정의 변경",ja:"キャッシュ再構築:ツール定義が変更されました",de:"Cache-Neuaufbau: Tool-Definitionen geändert",es:"Reconstrucción de caché: las definiciones de herramientas cambiaron",fr:"Reconstruction du cache : les définitions d'outils ont changé",it:"Ricostruzione cache: le definizioni degli strumenti sono cambiate",da:"Cache-genopbygning: værktøjsdefinitioner ændret",pl:"Odbudowa cache: definicje narzędzi zmienione",ru:"Перестройка кэша: определения инструментов изменены",ar:"إعادة بناء التخزين المؤقت: تم تغيير تعريفات الأدوات",no:"Cache-gjenoppbygging: verktøydefinisjoner endret","pt-BR":"Reconstrução de cache: definições de ferramentas alteradas",th:"สร้างแคชใหม่: คำจำกัดความเครื่องมือเปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: araç tanımları değişti",uk:"Перебудова кешу: визначення інструментів змінено"},"ui.cacheLoss.modelChange":{zh:"缓存重建:模型切换",en:"Cache rebuild: model switched","zh-TW":"快取重建:模型切換",ko:"캐시 재생성: 모델 전환",ja:"キャッシュ再構築:モデルが切り替わりました",de:"Cache-Neuaufbau: Modell gewechselt",es:"Reconstrucción de caché: modelo cambiado",fr:"Reconstruction du cache : modèle changé",it:"Ricostruzione cache: modello cambiato",da:"Cache-genopbygning: model skiftet",pl:"Odbudowa cache: model zmieniony",ru:"Перестройка кэша: модель переключена",ar:"إعادة بناء التخزين المؤقت: تم تبديل النموذج",no:"Cache-gjenoppbygging: modell byttet","pt-BR":"Reconstrução de cache: modelo alterado",th:"สร้างแคชใหม่: เปลี่ยนโมเดล",tr:"Önbellek yeniden oluşturma: model değiştirildi",uk:"Перебудова кешу: модель переключено"},"ui.cacheLoss.msgTruncated":{zh:"缓存重建:消息栈被截断(上下文窗口溢出)",en:"Cache rebuild: message stack truncated (context window overflow)","zh-TW":"快取重建:訊息堆疊被截斷(上下文視窗溢出)",ko:"캐시 재생성: 메시지 스택 잘림 (컨텍스트 윈도우 오버플로)",ja:"キャッシュ再構築:メッセージスタックが切り詰められました(コンテキストウィンドウオーバーフロー)",de:"Cache-Neuaufbau: Nachrichtenstapel gekürzt (Kontextfenster-Überlauf)",es:"Reconstrucción de caché: pila de mensajes truncada (desbordamiento de ventana de contexto)",fr:"Reconstruction du cache : pile de messages tronquée (dépassement de la fenêtre de contexte)",it:"Ricostruzione cache: stack messaggi troncato (overflow finestra di contesto)",da:"Cache-genopbygning: beskedstakken afkortet (kontekstvindue-overløb)",pl:"Odbudowa cache: stos wiadomości obcięty (przepełnienie okna kontekstu)",ru:"Перестройка кэша: стек сообщений усечён (переполнение контекстного окна)",ar:"إعادة بناء التخزين المؤقت: تم اقتطاع مكدس الرسائل (تجاوز نافذة السياق)",no:"Cache-gjenoppbygging: meldingsstakken avkortet (kontekstvindu-overflyt)","pt-BR":"Reconstrução de cache: pilha de mensagens truncada (estouro da janela de contexto)",th:"สร้างแคชใหม่: สแต็กข้อความถูกตัด (context window ล้น)",tr:"Önbellek yeniden oluşturma: mesaj yığını kesildi (bağlam penceresi taşması)",uk:"Перебудова кешу: стек повідомлень обрізано (переповнення контекстного вікна)"},"ui.cacheLoss.msgModified":{zh:"缓存重建:历史消息内容被修改",en:"Cache rebuild: historical message content modified","zh-TW":"快取重建:歷史訊息內容被修改",ko:"캐시 재생성: 이전 메시지 내용 수정됨",ja:"キャッシュ再構築:過去のメッセージ内容が変更されました",de:"Cache-Neuaufbau: Historische Nachrichteninhalte geändert",es:"Reconstrucción de caché: contenido de mensajes históricos modificado",fr:"Reconstruction du cache : contenu des messages historiques modifié",it:"Ricostruzione cache: contenuto dei messaggi storici modificato",da:"Cache-genopbygning: historisk beskedindhold ændret",pl:"Odbudowa cache: treść historycznych wiadomości zmodyfikowana",ru:"Перестройка кэша: содержимое исторических сообщений изменено",ar:"إعادة بناء التخزين المؤقت: تم تعديل محتوى الرسائل السابقة",no:"Cache-gjenoppbygging: historisk meldingsinnhold endret","pt-BR":"Reconstrução de cache: conteúdo de mensagens históricas modificado",th:"สร้างแคชใหม่: เนื้อหาข้อความในประวัติถูกแก้ไข",tr:"Önbellek yeniden oluşturma: geçmiş mesaj içeriği değiştirildi",uk:"Перебудова кешу: вміст історичних повідомлень змінено"},"ui.cacheLoss.keyChange":{zh:"缓存重建:缓存键变更(原因未知)",en:"Cache rebuild: cache key changed (unknown reason)","zh-TW":"快取重建:快取鍵變更(原因未知)",ko:"캐시 재생성: 캐시 키 변경 (원인 불명)",ja:"キャッシュ再構築:キャッシュキーが変更されました(原因不明)",de:"Cache-Neuaufbau: Cache-Schlüssel geändert (Grund unbekannt)",es:"Reconstrucción de caché: clave de caché cambiada (razón desconocida)",fr:"Reconstruction du cache : clé de cache modifiée (raison inconnue)",it:"Ricostruzione cache: chiave cache cambiata (motivo sconosciuto)",da:"Cache-genopbygning: cache-nøgle ændret (ukendt årsag)",pl:"Odbudowa cache: klucz cache zmieniony (nieznana przyczyna)",ru:"Перестройка кэша: ключ кэша изменён (причина неизвестна)",ar:"إعادة بناء التخزين المؤقت: تم تغيير مفتاح التخزين المؤقت (سبب غير معروف)",no:"Cache-gjenoppbygging: cache-nøkkel endret (ukjent årsak)","pt-BR":"Reconstrução de cache: chave de cache alterada (motivo desconhecido)",th:"สร้างแคชใหม่: คีย์แคชเปลี่ยนแปลง (ไม่ทราบสาเหตุ)",tr:"Önbellek yeniden oluşturma: önbellek anahtarı değişti (bilinmeyen neden)",uk:"Перебудова кешу: ключ кешу змінено (причина невідома)"},"ui.cacheRebuildStats":{zh:"缓存重建统计",en:"Cache Rebuild Stats","zh-TW":"快取重建統計",ko:"캐시 재구축 통계",ja:"キャッシュ再構築統計",de:"Cache-Neuaufbau-Statistik",es:"Estadísticas de reconstrucción de caché",fr:"Statistiques de reconstruction du cache",it:"Statistiche ricostruzione cache",da:"Cache-genopbygningsstatistik",pl:"Statystyki przebudowy cache",ru:"Статистика перестройки кеша",ar:"إحصائيات إعادة بناء ذاكرة التخزين المؤقت",no:"Cache-gjenoppbyggingsstatistikk","pt-BR":"Estatísticas de reconstrução de cache",th:"สถิติการสร้างแคชใหม่",tr:"Önbellek Yeniden Oluşturma İstatistikleri",uk:"Статистика перебудови кешу"},"ui.cacheRebuild.reason":{zh:"原因",en:"Reason","zh-TW":"原因",ko:"원인",ja:"原因",de:"Ursache",es:"Razón",fr:"Raison",it:"Motivo",da:"Årsag",pl:"Przyczyna",ru:"Причина",ar:"السبب",no:"Årsak","pt-BR":"Razão",th:"สาเหตุ",tr:"Neden",uk:"Причина"},"ui.cacheRebuild.count":{zh:"次数",en:"Count","zh-TW":"次數",ko:"횟수",ja:"回数",de:"Anzahl",es:"Veces",fr:"Nombre",it:"Volte",da:"Antal",pl:"Liczba",ru:"Кол-во",ar:"العدد",no:"Antall","pt-BR":"Vezes",th:"จำนวน",tr:"Sayı",uk:"Кількість"},"ui.cacheRebuild.cacheCreate":{zh:"重建缓存量",en:"Cache Created","zh-TW":"重建快取量",ko:"재구축 캐시량",ja:"再構築キャッシュ量",de:"Cache erstellt",es:"Caché creado",fr:"Cache créé",it:"Cache creata",da:"Cache oprettet",pl:"Utworzony cache",ru:"Создано кеша",ar:"الذاكرة المؤقتة المُنشأة",no:"Cache opprettet","pt-BR":"Cache criado",th:"แคชที่สร้าง",tr:"Oluşturulan önbellek",uk:"Створено кешу"},"ui.cacheRebuild.ttl":{zh:"缓存过期",en:"Cache Expired","zh-TW":"快取過期",ko:"캐시 만료",ja:"キャッシュ期限切れ",de:"Cache abgelaufen",es:"Caché expirado",fr:"Cache expiré",it:"Cache scaduta",da:"Cache udløbet",pl:"Cache wygasł",ru:"Кеш истёк",ar:"انتهاء صلاحية الذاكرة المؤقتة",no:"Cache utløpt","pt-BR":"Cache expirado",th:"แคชหมดอายุ",tr:"Önbellek süresi doldu",uk:"Кеш закінчився"},"ui.cacheRebuild.systemChange":{zh:"System Prompt 变更",en:"System Prompt Changed","zh-TW":"System Prompt 變更",ko:"System Prompt 변경",ja:"System Prompt 変更",de:"System Prompt geändert",es:"System Prompt cambiado",fr:"System Prompt modifié",it:"System Prompt modificato",da:"System Prompt ændret",pl:"System Prompt zmieniony",ru:"System Prompt изменён",ar:"تغيير System Prompt",no:"System Prompt endret","pt-BR":"System Prompt alterado",th:"System Prompt เปลี่ยนแปลง",tr:"System Prompt değişti",uk:"System Prompt змінено"},"ui.cacheRebuild.toolsChange":{zh:"工具定义变更",en:"Tools Changed","zh-TW":"工具定義變更",ko:"도구 정의 변경",ja:"ツール定義変更",de:"Tools geändert",es:"Herramientas cambiadas",fr:"Outils modifiés",it:"Strumenti modificati",da:"Værktøjer ændret",pl:"Narzędzia zmienione",ru:"Инструменты изменены",ar:"تغيير الأدوات",no:"Verktøy endret","pt-BR":"Ferramentas alteradas",th:"เครื่องมือเปลี่ยนแปลง",tr:"Araçlar değişti",uk:"Інструменти змінено"},"ui.cacheRebuild.modelChange":{zh:"模型切换",en:"Model Switched","zh-TW":"模型切換",ko:"모델 전환",ja:"モデル切替",de:"Modell gewechselt",es:"Modelo cambiado",fr:"Modèle changé",it:"Modello cambiato",da:"Model skiftet",pl:"Model zmieniony",ru:"Модель переключена",ar:"تبديل النموذج",no:"Modell byttet","pt-BR":"Modelo alterado",th:"เปลี่ยนโมเดล",tr:"Model değiştirildi",uk:"Модель переключено"},"ui.cacheRebuild.msgTruncated":{zh:"消息栈被截断",en:"Messages Truncated","zh-TW":"訊息堆疊被截斷",ko:"메시지 스택 잘림",ja:"メッセージスタック切り詰め",de:"Nachrichten abgeschnitten",es:"Mensajes truncados",fr:"Messages tronqués",it:"Messaggi troncati",da:"Beskeder afkortet",pl:"Wiadomości obcięte",ru:"Сообщения обрезаны",ar:"اقتطاع الرسائل",no:"Meldinger avkortet","pt-BR":"Mensagens truncadas",th:"ข้อความถูกตัด",tr:"Mesajlar kesildi",uk:"Повідомлення обрізано"},"ui.cacheRebuild.msgModified":{zh:"历史消息修改",en:"Messages Modified","zh-TW":"歷史訊息修改",ko:"기록 메시지 수정",ja:"履歴メッセージ変更",de:"Nachrichten geändert",es:"Mensajes modificados",fr:"Messages modifiés",it:"Messaggi modificati",da:"Beskeder ændret",pl:"Wiadomości zmodyfikowane",ru:"Сообщения изменены",ar:"تعديل الرسائل",no:"Meldinger endret","pt-BR":"Mensagens modificadas",th:"ข้อความถูกแก้ไข",tr:"Mesajlar değiştirildi",uk:"Повідомлення змінено"},"ui.cacheRebuild.keyChange":{zh:"未知键变更",en:"Unknown Key Change","zh-TW":"未知鍵變更",ko:"알 수 없는 키 변경",ja:"不明なキー変更",de:"Unbekannte Schlüsseländerung",es:"Cambio de clave desconocido",fr:"Changement de clé inconnu",it:"Modifica chiave sconosciuta",da:"Ukendt nøgleændring",pl:"Nieznana zmiana klucza",ru:"Неизвестное изменение ключа",ar:"تغيير مفتاح غير معروف",no:"Ukjent nøkkelendring","pt-BR":"Alteração de chave desconhecida",th:"การเปลี่ยนแปลงคีย์ที่ไม่ทราบ",tr:"Bilinmeyen anahtar değişikliği",uk:"Невідома зміна ключа"},"ui.skillUsageStats":{zh:"Skill 使用统计",en:"Skill Usage Stats","zh-TW":"Skill 使用統計",ko:"Skill 사용 통계",ja:"Skill 使用統計",de:"Skill-Nutzungsstatistik",es:"Estadísticas de uso de Skills",fr:"Statistiques d'utilisation des Skills",it:"Statistiche utilizzo Skill",da:"Skill-brugsstatistik",pl:"Statystyki użycia Skill",ru:"Статистика использования Skill",ar:"إحصائيات استخدام Skill",no:"Skill-bruksstatistikk","pt-BR":"Estatísticas de uso de Skills",th:"สถิติการใช้ Skill",tr:"Skill Kullanım İstatistikleri",uk:"Статистика використання Skill"},"ui.toolUsageStats":{zh:"工具使用统计",en:"Tool Usage Stats","zh-TW":"工具使用統計",ko:"도구 사용 통계",ja:"ツール使用統計",de:"Tool-Nutzungsstatistik",es:"Estadísticas de uso de herramientas",fr:"Statistiques d'utilisation des outils",it:"Statistiche utilizzo strumenti",da:"Værktøjsbrugsstatistik",pl:"Statystyki użycia narzędzi",ru:"Статистика использования инструментов",ar:"إحصائيات استخدام الأدوات",no:"Verktøybruksstatistikk","pt-BR":"Estatísticas de uso de ferramentas",th:"สถิติการใช้เครื่องมือ",tr:"Araç Kullanım İstatistikleri",uk:"Статистика використання інструментів"},"ui.mergeLogs":{zh:"合并日志",en:"Merge Logs","zh-TW":"合併日誌",ko:"로그 병합",ja:"ログを結合",de:"Logs zusammenführen",es:"Fusionar logs",fr:"Fusionner les logs",it:"Unisci log",da:"Flet logs",pl:"Scal logi",ru:"Объединить логи",ar:"دمج السجلات",no:"Slå sammen logger","pt-BR":"Mesclar logs",th:"รวมบันทึก",tr:"Logları birleştir",uk:"Об'єднати логи"},"ui.openLog":{zh:"打开",en:"Open","zh-TW":"開啟",ko:"열기",ja:"開く",de:"Öffnen",es:"Abrir",fr:"Ouvrir",it:"Apri",da:"Åbn",pl:"Otwórz",ru:"Открыть",ar:"فتح",no:"Åpne","pt-BR":"Abrir",th:"เปิด",tr:"Aç",uk:"Відкрити"},"ui.mergeNotConsecutive":{zh:"请选择连续的日志文件",en:"Please select consecutive log files","zh-TW":"請選擇連續的日誌檔案",ko:"연속된 로그 파일을 선택하세요",ja:"連続したログファイルを選択してください",de:"Bitte wählen Sie aufeinanderfolgende Log-Dateien",es:"Seleccione archivos de log consecutivos",fr:"Veuillez sélectionner des fichiers de log consécutifs",it:"Seleziona file di log consecutivi",da:"Vælg venligst sammenhængende logfiler",pl:"Wybierz kolejne pliki logów",ru:"Выберите последовательные файлы логов",ar:"يرجى اختيار ملفات سجلات متتالية",no:"Velg sammenhengende loggfiler","pt-BR":"Selecione arquivos de log consecutivos",th:"กรุณาเลือกไฟล์บันทึกที่ต่อเนื่องกัน",tr:"Lütfen ardışık log dosyalarını seçin",uk:"Виберіть послідовні файли логів"},"ui.mergeTooLarge":{zh:"选中的日志文件总大小超过 500MB",en:"Selected log files exceed 500MB","zh-TW":"選中的日誌檔案總大小超過 500MB",ko:"선택한 로그 파일의 총 크기가 500MB를 초과합니다",ja:"選択したログファイルの合計サイズが 500MB を超えています",de:"Ausgewählte Log-Dateien überschreiten 500MB",es:"Los archivos de log seleccionados superan los 500MB",fr:"Les fichiers de log sélectionnés dépassent 500 Mo",it:"I file di log selezionati superano i 500MB",da:"Valgte logfiler overstiger 500MB",pl:"Wybrane pliki logów przekraczają 500MB",ru:"Выбранные файлы логов превышают 500МБ",ar:"ملفات السجلات المحددة تتجاوز 500 ميجابايت",no:"Valgte loggfiler overstiger 500MB","pt-BR":"Arquivos de log selecionados excedem 500MB",th:"ไฟล์บันทึกที่เลือกมีขนาดรวมเกิน 500MB",tr:"Seçilen log dosyaları 500MB'ı aşıyor",uk:"Вибрані файли логів перевищують 500МБ"},"ui.mergeSuccess":{zh:"日志合并成功",en:"Logs merged successfully","zh-TW":"日誌合併成功",ko:"로그 병합 성공",ja:"ログの結合に成功しました",de:"Logs erfolgreich zusammengeführt",es:"Logs fusionados correctamente",fr:"Logs fusionnés avec succès",it:"Log uniti con successo",da:"Logs flettet",pl:"Logi scalone pomyślnie",ru:"Логи успешно объединены",ar:"تم دمج السجلات بنجاح",no:"Logger slått sammen","pt-BR":"Logs mesclados com sucesso",th:"รวมบันทึกสำเร็จ",tr:"Loglar başarıyla birleştirildi",uk:"Логи успішно об'єднано"},"ui.projectStats":{zh:"项目统计",en:"Project Stats","zh-TW":"專案統計",ko:"프로젝트 통계",ja:"プロジェクト統計",de:"Projektstatistik",es:"Estadísticas del proyecto",fr:"Statistiques du projet",it:"Statistiche progetto",da:"Projektstatistik",pl:"Statystyki projektu",ru:"Статистика проекта",ar:"إحصائيات المشروع",no:"Prosjektstatistikk","pt-BR":"Estatísticas do projeto",th:"สถิติโปรเจกต์",tr:"Proje İstatistikleri",uk:"Статистика проєкту"},"ui.projectStats.totalRequests":{zh:"总请求数",en:"Total Requests","zh-TW":"總請求數",ko:"총 요청 수",ja:"リクエスト総数",de:"Gesamtanfragen",es:"Total de solicitudes",fr:"Total des requêtes",it:"Richieste totali",da:"Samlede forespørgsler",pl:"Łączna liczba żądań",ru:"Всего запросов",ar:"إجمالي الطلبات",no:"Totale forespørsler","pt-BR":"Total de requisições",th:"คำขอทั้งหมด",tr:"Toplam İstekler",uk:"Всього запитів"},"ui.projectStats.totalFiles":{zh:"会话文件数",en:"Session Files","zh-TW":"會話檔案數",ko:"세션 파일 수",ja:"セッションファイル数",de:"Sitzungsdateien",es:"Archivos de sesión",fr:"Fichiers de session",it:"File di sessione",da:"Sessionsfiler",pl:"Pliki sesji",ru:"Файлов сессий",ar:"ملفات الجلسات",no:"Sesjonsfiler","pt-BR":"Arquivos de sessão",th:"ไฟล์เซสชัน",tr:"Oturum Dosyaları",uk:"Файли сесій"},"ui.projectStats.modelUsage":{zh:"模型使用统计",en:"Model Usage","zh-TW":"模型使用統計",ko:"모델 사용 통계",ja:"モデル使用統計",de:"Modellnutzung",es:"Uso de modelos",fr:"Utilisation des modèles",it:"Utilizzo modelli",da:"Modelbrug",pl:"Użycie modeli",ru:"Использование моделей",ar:"استخدام النماذج",no:"Modellbruk","pt-BR":"Uso de modelos",th:"การใช้โมเดล",tr:"Model Kullanımı",uk:"Використання моделей"},"ui.projectStats.noData":{zh:"暂无统计数据",en:"No stats available","zh-TW":"暫無統計資料",ko:"통계 데이터 없음",ja:"統計データなし",de:"Keine Statistiken verfügbar",es:"Sin estadísticas disponibles",fr:"Aucune statistique disponible",it:"Nessuna statistica disponibile",da:"Ingen statistik tilgængelig",pl:"Brak dostępnych statystyk",ru:"Статистика недоступна",ar:"لا توجد إحصائيات متاحة",no:"Ingen statistikk tilgjengelig","pt-BR":"Sem estatísticas disponíveis",th:"ไม่มีข้อมูลสถิติ",tr:"İstatistik mevcut değil",uk:"Статистика недоступна"},"ui.projectStats.updatedAt":{zh:"更新于 {time}",en:"Updated at {time}","zh-TW":"更新於 {time}",ko:"{time}에 업데이트됨",ja:"{time} に更新",de:"Aktualisiert um {time}",es:"Actualizado a las {time}",fr:"Mis à jour à {time}",it:"Aggiornato alle {time}",da:"Opdateret {time}",pl:"Zaktualizowano {time}",ru:"Обновлено в {time}",ar:"تم التحديث في {time}",no:"Oppdatert {time}","pt-BR":"Atualizado em {time}",th:"อัปเดตเมื่อ {time}",tr:"{time} tarihinde güncellendi",uk:"Оновлено о {time}"}},El={};for(const[e,t]of Object.entries(BL))for(const[n,r]of Object.entries(t))El[n]||(El[n]={}),El[n][e]=r;let ev="zh";const Tu={zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh-TW","zh-hk":"zh-TW","zh-hant":"zh-TW",en:"en",ko:"ko",de:"de",es:"es",fr:"fr",it:"it",da:"da",ja:"ja",pl:"pl",ru:"ru",ar:"ar",no:"no",nb:"no",nn:"no",pt:"pt-BR","pt-br":"pt-BR",th:"th",tr:"tr",uk:"uk"};function AL(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-");if(Tu[t])return Tu[t];const n=t.split("-")[0];return Tu[n]?Tu[n]:"en"}function DL(){return typeof navigator<"u"&&navigator.language?AL(navigator.language):"en"}function tv(e){ev=El[e]?e:"en"}function zl(){return ev}function Ie(e,t){var r;let n=((r=El[ev])==null?void 0:r[e])||El.en[e]||e;if(t)for(const[o,l]of Object.entries(t))n=n.replaceAll(`{${o}}`,l);return n}tv(DL());function nv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ki=nv();function e$(e){ki=e}var mi={exec:()=>null};function ln(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,l)=>{let s=typeof l=="string"?l:l.source;return s=s.replace(zr.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var FL=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),zr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},HL=/^(?:[ \t]*(?:\n|$))+/,VL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,WL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rv=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,t$=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,n$=ln(t$).replace(/bull/g,rv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),UL=ln(t$).replace(/bull/g,rv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ov=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GL=/^[^\n]+/,av=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,KL=ln(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",av).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XL=ln(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rv).getRegex(),sf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",iv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,QL=ln("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",iv).replace("tag",sf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),r$=ln(ov).replace("hr",yc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sf).getRegex(),YL=ln(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",r$).getRegex(),lv={blockquote:YL,code:VL,def:KL,fences:WL,heading:qL,hr:yc,html:QL,lheading:n$,list:XL,newline:HL,paragraph:r$,table:mi,text:GL},BC=ln("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sf).getRegex(),JL={...lv,lheading:UL,table:BC,paragraph:ln(ov).replace("hr",yc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",BC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sf).getRegex()},ZL={...lv,html:ln(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",iv).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ln(ov).replace("hr",yc).replace("heading",` *#{1,6} *[^
|
|
485
|
+
`},"server.portsBusy":{zh:"⚠️ 端口 {start}-{end} 均被占用,请求监控服务未启动",en:"⚠️ Ports {start}-{end} are all in use, monitoring service not started","zh-TW":"⚠️ 端口 {start}-{end} 均被佔用,請求監控服務未啟動",ko:"⚠️ 포트 {start}-{end} 모두 사용 중, 모니터링 서비스 미시작",ja:"⚠️ ポート {start}-{end} はすべて使用中、監視サービスは起動されませんでした",de:"⚠️ Ports {start}-{end} sind alle belegt, Überwachungsdienst nicht gestartet",es:"⚠️ Puertos {start}-{end} están todos en uso, servicio de monitoreo no iniciado",fr:"⚠️ Ports {start}-{end} tous occupés, service de surveillance non démarré",it:"⚠️ Porte {start}-{end} tutte in uso, servizio di monitoraggio non avviato",da:"⚠️ Porte {start}-{end} er alle i brug, overvågningstjeneste ikke startet",pl:"⚠️ Porty {start}-{end} są wszystkie zajęte, usługa monitorowania nie uruchomiona",ru:"⚠️ Порты {start}-{end} все заняты, служба мониторинга не запущена",ar:"⚠️ المنافذ {start}-{end} كلها مشغولة، لم يتم تشغيل خدمة المراقبة",no:"⚠️ Porter {start}-{end} er alle i bruk, overvåkningstjeneste ikke startet","pt-BR":"⚠️ Portas {start}-{end} estão todas em uso, serviço de monitoramento não iniciado",th:"⚠️ พอร์ต {start}-{end} ถูกใช้งานทั้งหมด บริการตรวจสอบไม่ได้เริ่มทำงาน",tr:"⚠️ {start}-{end} portları kullanımda, izleme servisi başlatılamadı",uk:"⚠️ Порти {start}-{end} всі зайняті, служба моніторингу не запущена"},"ui.requestList":{zh:"请求列表",en:"Requests","zh-TW":"請求列表",ko:"요청 목록",ja:"リクエスト一覧",de:"Anfragen",es:"Solicitudes",fr:"Requêtes",it:"Richieste",da:"Forespørgsler",pl:"Żądania",ru:"Запросы",ar:"الطلبات",no:"Forespørsler","pt-BR":"Requisições",th:"รายการคำขอ",tr:"İstekler",uk:"Запити"},"ui.totalRequests":{zh:"总请求数: {count}",en:"Total: {count}","zh-TW":"總請求數: {count}",ko:"총 요청 수: {count}",ja:"合計: {count}",de:"Gesamt: {count}",es:"Total: {count}",fr:"Total : {count}",it:"Totale: {count}",da:"Total: {count}",pl:"Łącznie: {count}",ru:"Всего: {count}",ar:"الإجمالي: {count}",no:"Totalt: {count}","pt-BR":"Total: {count}",th:"ทั้งหมด: {count}",tr:"Toplam: {count}",uk:"Всього: {count}"},"ui.waitingRequests":{zh:"等待请求...",en:"Waiting for requests...","zh-TW":"等待請求...",ko:"요청 대기 중...",ja:"リクエスト待機中...",de:"Warte auf Anfragen...",es:"Esperando solicitudes...",fr:"En attente de requêtes...",it:"In attesa di richieste...",da:"Venter på forespørgsler...",pl:"Oczekiwanie na żądania...",ru:"Ожидание запросов...",ar:"في انتظار الطلبات...",no:"Venter på forespørsler...","pt-BR":"Aguardando requisições...",th:"รอคำขอ...",tr:"İstekler bekleniyor...",uk:"Очікування запитів..."},"ui.importLocalLogs":{zh:"打开本地日志",en:"Import local logs","zh-TW":"匯入本地日誌",ko:"로컬 로그 가져오기",ja:"ローカルログをインポート",de:"Lokale Logs importieren",es:"Importar logs locales",fr:"Importer les logs locaux",it:"Importa log locali",da:"Importér lokale logs",pl:"Importuj lokalne logi",ru:"Импорт локальных логов",ar:"استيراد السجلات المحلية",no:"Importer lokale logger","pt-BR":"Importar logs locais",th:"นำเข้าบันทึกในเครื่อง",tr:"Yerel logları içe aktar",uk:"Імпорт локальних логів"},"ui.loadLocalJsonl":{zh:"直接选择加载本地jsonl文件",en:"Load local JSONL file","zh-TW":"直接選擇載入本地jsonl檔案",ko:"로컬 JSONL 파일 선택",ja:"ローカルJSONLファイルを選択",de:"Lokale JSONL-Datei auswählen",es:"Seleccionar archivo JSONL local",fr:"Sélectionner un fichier JSONL local",it:"Seleziona file JSONL locale",da:"Vælg lokal JSONL-fil",pl:"Wybierz lokalny plik JSONL",ru:"Выбрать локальный JSONL файл",ar:"اختيار ملف JSONL محلي",no:"Velg lokal JSONL-fil","pt-BR":"Selecionar arquivo JSONL local",th:"เลือกไฟล์ JSONL ในเครื่อง",tr:"Yerel JSONL dosyası seç",uk:"Вибрати локальний JSONL файл"},"ui.fileTooLarge":{zh:"文件大小不能超过 500MB",en:"File size cannot exceed 500MB","zh-TW":"檔案大小不能超過 500MB",ko:"파일 크기는 500MB를 초과할 수 없습니다",ja:"ファイルサイズは500MBを超えることはできません",de:"Dateigröße darf 500MB nicht überschreiten",es:"El tamaño del archivo no puede superar 500MB",fr:"La taille du fichier ne peut pas dépasser 500 Mo",it:"La dimensione del file non può superare 500MB",da:"Filstørrelsen må ikke overstige 500MB",pl:"Rozmiar pliku nie może przekraczać 500MB",ru:"Размер файла не может превышать 500МБ",ar:"حجم الملف لا يمكن أن يتجاوز 500 ميجابايت",no:"Filstørrelsen kan ikke overstige 500MB","pt-BR":"O tamanho do arquivo não pode exceder 500MB",th:"ขนาดไฟล์ต้องไม่เกิน 500MB",tr:"Dosya boyutu 500MB'ı aşamaz",uk:"Розмір файлу не може перевищувати 500МБ"},"ui.saveLog":{zh:"下载当前日志",en:"Download current log","zh-TW":"下載當前日誌",ko:"현재 로그 다운로드",ja:"現在のログをダウンロード",de:"Aktuelles Log herunterladen",es:"Descargar log actual",fr:"Télécharger le log actuel",it:"Scarica log corrente",da:"Download nuværende log",pl:"Pobierz bieżący log",ru:"Скачать текущий лог",ar:"تحميل السجل الحالي",no:"Last ned gjeldende logg","pt-BR":"Baixar log atual",th:"ดาวน์โหลดล็อกปัจจุบัน",tr:"Mevcut günlüğü indir",uk:"Завантажити поточний лог"},"ui.exportPrompts":{zh:"查看用户 Prompt",en:"Export user prompts","zh-TW":"匯出用戶 Prompt",ko:"사용자 Prompt 내보내기",ja:"ユーザー Prompt をエクスポート",de:"Benutzer-Prompts exportieren",es:"Exportar prompts de usuario",fr:"Exporter les prompts utilisateur",it:"Esporta prompt utente",da:"Eksportér bruger-prompts",pl:"Eksportuj prompty użytkownika",ru:"Экспорт пользовательских Prompt",ar:"تصدير Prompt المستخدم",no:"Eksporter bruker-prompts","pt-BR":"Exportar prompts do usuário",th:"ส่งออก Prompt ผู้ใช้",tr:"Kullanıcı Prompt'larını dışa aktar",uk:"Експорт Prompt користувача"},"ui.exportPromptsTxt":{zh:"导出到本地 .txt",en:"Export to local .txt","zh-TW":"匯出到本地 .txt",ko:"로컬 .txt로 내보내기",ja:"ローカル .txt にエクスポート",de:"Als lokale .txt exportieren",es:"Exportar a .txt local",fr:"Exporter en .txt local",it:"Esporta in .txt locale",da:"Eksportér til lokal .txt",pl:"Eksportuj do lokalnego .txt",ru:"Экспорт в локальный .txt",ar:"تصدير إلى ملف .txt محلي",no:"Eksporter til lokal .txt","pt-BR":"Exportar para .txt local",th:"ส่งออกเป็นไฟล์ .txt ในเครื่อง",tr:"Yerel .txt olarak dışa aktar",uk:"Експорт у локальний .txt"},"ui.tokenStats":{zh:"数据统计",en:"Data Stats","zh-TW":"數據統計",ko:"데이터 통계",ja:"データ統計",de:"Datenstatistik",es:"Estadísticas de datos",fr:"Statistiques de données",it:"Statistiche dati",da:"Datastatistik",pl:"Statystyki danych",ru:"Статистика данных",ar:"إحصائيات البيانات",no:"Datastatistikk","pt-BR":"Estatísticas de dados",th:"สถิติข้อมูล",tr:"Veri İstatistikleri",uk:"Статистика даних"},"ui.liveMonitoring":{zh:"实时监控中",en:"Live","zh-TW":"即時監控中",ko:"실시간 모니터링",ja:"リアルタイム監視中",de:"Live",es:"En vivo",fr:"En direct",it:"Live",da:"Live",pl:"Na żywo",ru:"Мониторинг",ar:"مباشر",no:"Live","pt-BR":"Ao vivo",th:"สด",tr:"Canlı",uk:"Моніторинг"},"ui.historyLog":{zh:"历史日志: {file}",en:"History: {file}","zh-TW":"歷史日誌: {file}",ko:"기록: {file}",ja:"履歴: {file}",de:"Verlauf: {file}",es:"Historial: {file}",fr:"Historique : {file}",it:"Cronologia: {file}",da:"Historik: {file}",pl:"Historia: {file}",ru:"История: {file}",ar:"السجل: {file}",no:"Historikk: {file}","pt-BR":"Histórico: {file}",th:"ประวัติ: {file}",tr:"Geçmiş: {file}",uk:"Історія: {file}"},"ui.chatMode":{zh:"对话模式",en:"Chat mode","zh-TW":"對話模式",ko:"대화 모드",ja:"チャットモード",de:"Chat-Modus",es:"Modo chat",fr:"Mode conversation",it:"Modalità chat",da:"Chat-tilstand",pl:"Tryb czatu",ru:"Режим чата",ar:"وضع المحادثة",no:"Chat-modus","pt-BR":"Modo chat",th:"โหมดแชท",tr:"Sohbet modu",uk:"Режим чату"},"ui.rawMode":{zh:"回到原文模式",en:"Back to Raw","zh-TW":"回到原文模式",ko:"원문 모드로 돌아가기",ja:"Raw モードに戻る",de:"Zurück zum Rohmodus",es:"Volver al modo raw",fr:"Retour au mode brut",it:"Torna alla modalità raw",da:"Tilbage til rå tilstand",pl:"Powrót do trybu surowego",ru:"Вернуться в режим raw",ar:"العودة للوضع الخام",no:"Tilbake til rå modus","pt-BR":"Voltar ao modo raw",th:"กลับสู่โหมด Raw",tr:"Ham moda dön",uk:"Повернутися до режиму raw"},"ui.viewRequest":{zh:"查看请求",en:"View Request","zh-TW":"查看請求",ko:"요청 보기",ja:"リクエストを表示",de:"Anfrage anzeigen",es:"Ver solicitud",fr:"Voir la requête",it:"Visualizza richiesta",da:"Vis forespørgsel",pl:"Zobacz żądanie",ru:"Просмотр запроса",ar:"عرض الطلب",no:"Vis forespørsel","pt-BR":"Ver requisição",th:"ดูคำขอ",tr:"İsteği görüntüle",uk:"Переглянути запит"},"ui.viewInChat":{zh:"在对话中查看",en:"View in chat","zh-TW":"在對話中查看",ko:"대화에서 보기",ja:"チャットで表示",de:"Im Chat anzeigen",es:"Ver en chat",fr:"Voir dans le chat",it:"Vedi nella chat",da:"Vis i chat",pl:"Zobacz w czacie",ru:"Посмотреть в чате",ar:"عرض في المحادثة",no:"Vis i chat","pt-BR":"Ver no chat",th:"ดูในแชท",tr:"Sohbette görüntüle",uk:"Переглянути в чаті"},"ui.cannotMap":{zh:"无法映射到对话",en:"Cannot map to conversation","zh-TW":"無法映射到對話",ko:"대화에 매핑할 수 없습니다",ja:"会話にマッピングできません",de:"Kann nicht zur Konversation zugeordnet werden",es:"No se puede mapear a la conversación",fr:"Impossible de mapper à la conversation",it:"Impossibile mappare alla conversazione",da:"Kan ikke mappe til samtale",pl:"Nie można zmapować do rozmowy",ru:"Невозможно сопоставить с диалогом",ar:"لا يمكن الربط بالمحادثة",no:"Kan ikke tilordne til samtale","pt-BR":"Não é possível mapear para a conversa",th:"ไม่สามารถแมปไปยังการสนทนาได้",tr:"Konuşmaya eşlenemedi",uk:"Неможливо зіставити з діалогом"},"ui.cacheExpired":{zh:"已失效",en:"Expired","zh-TW":"已失效",ko:"만료됨",ja:"期限切れ",de:"Abgelaufen",es:"Expirado",fr:"Expiré",it:"Scaduto",da:"Udløbet",pl:"Wygasło",ru:"Истёк",ar:"منتهي الصلاحية",no:"Utløpt","pt-BR":"Expirado",th:"หมดอายุ",tr:"Süresi doldu",uk:"Закінчився"},"ui.cacheCountdown":{zh:"MainAgent 缓存{type}失效倒计时:",en:"MainAgent cache{type} expires in: ","zh-TW":"MainAgent 快取{type}失效倒數:",ko:"MainAgent cache{type} 만료 카운트다운: ",ja:"MainAgent cache{type} 期限切れまで: ",de:"MainAgent Cache{type} läuft ab in: ",es:"Cache{type} de MainAgent expira en: ",fr:"Cache{type} MainAgent expire dans : ",it:"Cache{type} MainAgent scade tra: ",da:"MainAgent cache{type} udløber om: ",pl:"Cache{type} MainAgent wygasa za: ",ru:"Cache{type} MainAgent истекает через: ",ar:"ينتهي cache{type} لـ MainAgent خلال: ",no:"MainAgent cache{type} utløper om: ","pt-BR":"Cache{type} do MainAgent expira em: ",th:"Cache{type} ของ MainAgent หมดอายุใน: ",tr:"MainAgent cache{type} süresi doluyor: ",uk:"Cache{type} MainAgent закінчується через: "},"ui.minuteSecond":{zh:"{m}分{s}秒",en:"{m}m{s}s","zh-TW":"{m}分{s}秒",ko:"{m}분{s}초",ja:"{m}分{s}秒",de:"{m}m{s}s",es:"{m}m{s}s",fr:"{m}m{s}s",it:"{m}m{s}s",da:"{m}m{s}s",pl:"{m}m{s}s",ru:"{m}м{s}с",ar:"{m}د{s}ث",no:"{m}m{s}s","pt-BR":"{m}m{s}s",th:"{m}นาที{s}วินาที",tr:"{m}dk{s}sn",uk:"{m}хв{s}с"},"ui.second":{zh:"{s}秒",en:"{s}s","zh-TW":"{s}秒",ko:"{s}초",ja:"{s}秒",de:"{s}s",es:"{s}s",fr:"{s}s",it:"{s}s",da:"{s}s",pl:"{s}s",ru:"{s}с",ar:"{s}ث",no:"{s}s","pt-BR":"{s}s",th:"{s}วินาที",tr:"{s}sn",uk:"{s}с"},"ui.hitRate":{zh:"命中率",en:"Hit rate","zh-TW":"命中率",ko:"적중률",ja:"ヒット率",de:"Trefferquote",es:"Tasa de aciertos",fr:"Taux de succès",it:"Tasso di successo",da:"Hitrate",pl:"Współczynnik trafień",ru:"Процент попаданий",ar:"معدل الإصابة",no:"Treffrate","pt-BR":"Taxa de acerto",th:"อัตราการเข้าถึง",tr:"İsabet oranı",uk:"Відсоток влучень"},"ui.userPrompt":{zh:"用户 Prompt",en:"User Prompt","zh-TW":"用戶 Prompt",ko:"사용자 Prompt",ja:"ユーザー Prompt",de:"Benutzer-Prompt",es:"Prompt de usuario",fr:"Prompt utilisateur",it:"Prompt utente",da:"Bruger-Prompt",pl:"Prompt użytkownika",ru:"Prompt пользователя",ar:"Prompt المستخدم",no:"Bruker-Prompt","pt-BR":"Prompt do usuário",th:"Prompt ผู้ใช้",tr:"Kullanıcı Prompt",uk:"Prompt користувача"},"ui.noPrompt":{zh:"暂无用户 Prompt",en:"No user prompts yet","zh-TW":"暫無用戶 Prompt",ko:"사용자 Prompt 없음",ja:"ユーザー Prompt はまだありません",de:"Noch keine Benutzer-Prompts",es:"Sin prompts de usuario aún",fr:"Aucun prompt utilisateur",it:"Nessun prompt utente",da:"Ingen bruger-prompts endnu",pl:"Brak promptów użytkownika",ru:"Нет пользовательских Prompt",ar:"لا توجد Prompt للمستخدم بعد",no:"Ingen bruker-prompts ennå","pt-BR":"Nenhum prompt de usuário ainda",th:"ยังไม่มี Prompt ผู้ใช้",tr:"Henüz kullanıcı Prompt'u yok",uk:"Немає Prompt користувача"},"ui.promptCountUnit":{zh:"条",en:"","zh-TW":"條",ko:"개",ja:"件",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"ui.promptModeOriginal":{zh:"原文模式",en:"Original"},"ui.promptModeContext":{zh:"上下文模式",en:"Context"},"ui.promptModeText":{zh:"Text模式",en:"Text"},"ui.unknownTime":{zh:"未知时间",en:"Unknown time","zh-TW":"未知時間",ko:"알 수 없는 시간",ja:"不明な時刻",de:"Unbekannte Zeit",es:"Hora desconocida",fr:"Heure inconnue",it:"Ora sconosciuta",da:"Ukendt tid",pl:"Nieznany czas",ru:"Неизвестное время",ar:"وقت غير معروف",no:"Ukjent tid","pt-BR":"Hora desconhecida",th:"เวลาไม่ทราบ",tr:"Bilinmeyen zaman",uk:"Невідомий час"},"ui.logCount":{zh:"{count} 个日志",en:"{count} logs","zh-TW":"{count} 個日誌",ko:"{count}개 로그",ja:"{count} 件のログ",de:"{count} Logs",es:"{count} logs",fr:"{count} logs",it:"{count} log",da:"{count} logs",pl:"{count} logów",ru:"{count} логов",ar:"{count} سجلات",no:"{count} logger","pt-BR":"{count} logs",th:"{count} บันทึก",tr:"{count} log",uk:"{count} логів"},"ui.noLogs":{zh:"暂无日志文件",en:"No log files","zh-TW":"暫無日誌檔案",ko:"로그 파일 없음",ja:"ログファイルなし",de:"Keine Log-Dateien",es:"Sin archivos de log",fr:"Aucun fichier de log",it:"Nessun file di log",da:"Ingen logfiler",pl:"Brak plików logów",ru:"Нет файлов логов",ar:"لا توجد ملفات سجلات",no:"Ingen loggfiler","pt-BR":"Nenhum arquivo de log",th:"ไม่มีไฟล์บันทึก",tr:"Log dosyası yok",uk:"Немає файлів логів"},"ui.footer.contact":{zh:"如需帮助,请联系 @水映天辙(钉钉)",en:"Need help? Contact @水映天辙 (DingTalk)","zh-TW":"如需幫助,請聯繫 @水映天辙(釘釘)",ko:"도움이 필요하면 @水映天辙(DingTalk)에 연락하세요",ja:"ヘルプが必要な場合は @水映天辙(DingTalk) にご連絡ください",de:"Hilfe benötigt? Kontaktieren Sie @水映天辙 (DingTalk)",es:"¿Necesita ayuda? Contacte a @水映天辙 (DingTalk)",fr:"Besoin d'aide ? Contactez @水映天辙 (DingTalk)",it:"Hai bisogno di aiuto? Contatta @水映天辙 (DingTalk)",da:"Brug for hjælp? Kontakt @水映天辙 (DingTalk)",pl:"Potrzebujesz pomocy? Skontaktuj się z @水映天辙 (DingTalk)",ru:"Нужна помощь? Свяжитесь с @水映天辙 (DingTalk)",ar:"تحتاج مساعدة؟ تواصل مع @水映天辙 (DingTalk)",no:"Trenger du hjelp? Kontakt @水映天辙 (DingTalk)","pt-BR":"Precisa de ajuda? Entre em contato com @水映天辙 (DingTalk)",th:"ต้องการความช่วยเหลือ? ติดต่อ @水映天辙 (DingTalk)",tr:"Yardıma mı ihtiyacınız var? @水映天辙 (DingTalk) ile iletişime geçin",uk:"Потрібна допомога? Зв'яжіться з @水映天辙 (DingTalk)"},"ui.toolReturn":{zh:"工具返回",en:"Tool result","zh-TW":"工具返回",ko:"도구 결과",ja:"ツール結果",de:"Tool-Ergebnis",es:"Resultado de herramienta",fr:"Résultat d'outil",it:"Risultato strumento",da:"Værktøjsresultat",pl:"Wynik narzędzia",ru:"Результат инструмента",ar:"نتيجة الأداة",no:"Verktøyresultat","pt-BR":"Resultado da ferramenta",th:"ผลลัพธ์เครื่องมือ",tr:"Araç sonucu",uk:"Результат інструменту"},"ui.toolReturnNamed":{zh:"{name} 返回",en:"{name} result","zh-TW":"{name} 返回",ko:"{name} 결과",ja:"{name} 結果",de:"{name}-Ergebnis",es:"Resultado de {name}",fr:"Résultat de {name}",it:"Risultato di {name}",da:"{name}-resultat",pl:"Wynik {name}",ru:"Результат {name}",ar:"نتيجة {name}",no:"{name}-resultat","pt-BR":"Resultado de {name}",th:"ผลลัพธ์ {name}",tr:"{name} sonucu",uk:"Результат {name}"},"ui.lastResponse":{zh:"Last Response",en:"Last Response","zh-TW":"Last Response",ko:"Last Response",ja:"Last Response",de:"Last Response",es:"Last Response",fr:"Last Response",it:"Last Response",da:"Last Response",pl:"Last Response",ru:"Last Response",ar:"Last Response",no:"Last Response","pt-BR":"Last Response",th:"Last Response",tr:"Last Response",uk:"Last Response"},"ui.copySuccess":{zh:"复制成功",en:"Copied","zh-TW":"複製成功",ko:"복사됨",ja:"コピーしました",de:"Kopiert",es:"Copiado",fr:"Copié",it:"Copiato",da:"Kopieret",pl:"Skopiowano",ru:"Скопировано",ar:"تم النسخ",no:"Kopiert","pt-BR":"Copiado",th:"คัดลอกแล้ว",tr:"Kopyalandı",uk:"Скопійовано"},"ui.copy":{zh:"复制",en:"Copy","zh-TW":"複製",ko:"복사",ja:"コピー",de:"Kopieren",es:"Copiar",fr:"Copier",it:"Copia",da:"Kopiér",pl:"Kopiuj",ru:"Копировать",ar:"نسخ",no:"Kopier","pt-BR":"Copiar",th:"คัดลอก",tr:"Kopyala",uk:"Копіювати"},"ui.noHeaders":{zh:"无 Headers",en:"No Headers","zh-TW":"無 Headers",ko:"Headers 없음",ja:"Headers なし",de:"Keine Headers",es:"Sin Headers",fr:"Pas de Headers",it:"Nessun Header",da:"Ingen Headers",pl:"Brak Headers",ru:"Нет Headers",ar:"لا يوجد Headers",no:"Ingen Headers","pt-BR":"Sem Headers",th:"ไม่มี Headers",tr:"Header yok",uk:"Немає Headers"},"ui.noBody":{zh:"无 Body",en:"No Body","zh-TW":"無 Body",ko:"Body 없음",ja:"Body なし",de:"Kein Body",es:"Sin Body",fr:"Pas de Body",it:"Nessun Body",da:"Ingen Body",pl:"Brak Body",ru:"Нет Body",ar:"لا يوجد Body",no:"Ingen Body","pt-BR":"Sem Body",th:"ไม่มี Body",tr:"Body yok",uk:"Немає Body"},"ui.streamingResponse":{zh:"⚡ 流式响应 — 此请求使用了 SSE 流式传输,响应内容无法完整捕获。",en:"⚡ Streaming response — This request used SSE streaming, response content cannot be fully captured.","zh-TW":"⚡ 串流回應 — 此請求使用了 SSE 串流傳輸,回應內容無法完整擷取。",ko:"⚡ 스트리밍 응답 — 이 요청은 SSE 스트리밍을 사용하여 응답 내용을 완전히 캡처할 수 없습니다.",ja:"⚡ ストリーミングレスポンス — このリクエストは SSE ストリーミングを使用しており、レスポンス内容を完全にキャプチャできませんでした。",de:"⚡ Streaming-Antwort — Diese Anfrage nutzte SSE-Streaming, der Antwortinhalt konnte nicht vollständig erfasst werden.",es:"⚡ Respuesta en streaming — Esta solicitud usó streaming SSE, el contenido de la respuesta no se pudo capturar completamente.",fr:"⚡ Réponse en streaming — Cette requête a utilisé le streaming SSE, le contenu de la réponse n'a pas pu être entièrement capturé.",it:"⚡ Risposta in streaming — Questa richiesta ha utilizzato lo streaming SSE, il contenuto della risposta non può essere catturato completamente.",da:"⚡ Streaming-svar — Denne forespørgsel brugte SSE-streaming, svarindholdet kunne ikke fuldt indfanges.",pl:"⚡ Odpowiedź strumieniowa — To żądanie użyło strumieniowania SSE, treść odpowiedzi nie mogła zostać w pełni przechwycona.",ru:"⚡ Потоковый ответ — Этот запрос использовал SSE-потоковую передачу, содержимое ответа не может быть полностью захвачено.",ar:"⚡ استجابة متدفقة — استخدم هذا الطلب بث SSE، لا يمكن التقاط محتوى الاستجابة بالكامل.",no:"⚡ Strømmesvar — Denne forespørselen brukte SSE-strømming, svarinnholdet kunne ikke fanges fullstendig.","pt-BR":"⚡ Resposta em streaming — Esta requisição usou streaming SSE, o conteúdo da resposta não pôde ser totalmente capturado.",th:"⚡ การตอบกลับแบบสตรีม — คำขอนี้ใช้ SSE streaming เนื้อหาการตอบกลับไม่สามารถจับได้ทั้งหมด",tr:"⚡ Akış yanıtı — Bu istek SSE akışı kullandı, yanıt içeriği tam olarak yakalanamadı.",uk:"⚡ Потокова відповідь — Цей запит використовував SSE-потокову передачу, вміст відповіді не може бути повністю захоплений."},"ui.responseNotCaptured":{zh:"响应数据未捕获",en:"Response not captured","zh-TW":"回應資料未擷取",ko:"응답 데이터 미캡처",ja:"レスポンスデータ未キャプチャ",de:"Antwortdaten nicht erfasst",es:"Datos de respuesta no capturados",fr:"Données de réponse non capturées",it:"Dati di risposta non catturati",da:"Svardata ikke indfanget",pl:"Dane odpowiedzi nie przechwycone",ru:"Данные ответа не захвачены",ar:"لم يتم التقاط بيانات الاستجابة",no:"Svardata ikke fanget","pt-BR":"Dados de resposta não capturados",th:"ไม่ได้จับข้อมูลการตอบกลับ",tr:"Yanıt verileri yakalanamadı",uk:"Дані відповіді не захоплені"},"ui.expand":{zh:"▶ 展开",en:"▶ Expand","zh-TW":"▶ 展開",ko:"▶ 펼치기",ja:"▶ 展開",de:"▶ Aufklappen",es:"▶ Expandir",fr:"▶ Déplier",it:"▶ Espandi",da:"▶ Udvid",pl:"▶ Rozwiń",ru:"▶ Развернуть",ar:"▶ توسيع",no:"▶ Utvid","pt-BR":"▶ Expandir",th:"▶ ขยาย",tr:"▶ Genişlet",uk:"▶ Розгорнути"},"ui.collapse":{zh:"▼ 收起",en:"▼ Collapse","zh-TW":"▼ 收起",ko:"▼ 접기",ja:"▼ 折りたたむ",de:"▼ Zuklappen",es:"▼ Contraer",fr:"▼ Replier",it:"▼ Comprimi",da:"▼ Fold sammen",pl:"▼ Zwiń",ru:"▼ Свернуть",ar:"▼ طي",no:"▼ Skjul","pt-BR":"▼ Recolher",th:"▼ ย่อ",tr:"▼ Daralt",uk:"▼ Згорнути"},"ui.noChat":{zh:"暂无 MainAgent 对话数据",en:"No MainAgent conversation data","zh-TW":"暫無 MainAgent 對話資料",ko:"MainAgent 대화 데이터 없음",ja:"MainAgent の会話データがありません",de:"Keine MainAgent-Gesprächsdaten",es:"Sin datos de conversación de MainAgent",fr:"Aucune donnée de conversation MainAgent",it:"Nessun dato di conversazione MainAgent",da:"Ingen MainAgent samtaledata",pl:"Brak danych rozmowy MainAgent",ru:"Нет данных диалога MainAgent",ar:"لا توجد بيانات محادثة MainAgent",no:"Ingen MainAgent samtaledata","pt-BR":"Sem dados de conversa do MainAgent",th:"ไม่มีข้อมูลการสนทนา MainAgent",tr:"MainAgent konuşma verisi yok",uk:"Немає даних діалогу MainAgent"},"ui.diffWithPrev":{zh:"与上次请求的差异",en:"Diff with previous request","zh-TW":"與上次請求的差異",ko:"이전 요청과의 차이",ja:"前回リクエストとの差分",de:"Diff zur vorherigen Anfrage",es:"Diferencia con la solicitud anterior",fr:"Diff avec la requête précédente",it:"Diff con la richiesta precedente",da:"Diff med forrige anmodning",pl:"Różnica z poprzednim żądaniem",ru:"Отличия от предыдущего запроса",ar:"الفرق مع الطلب السابق",no:"Diff med forrige forespørsel","pt-BR":"Diff com a requisição anterior",th:"ความแตกต่างกับคำขอก่อนหน้า",tr:"Önceki istekle fark",uk:"Відмінності від попереднього запиту"},"ui.diffSessionChanged":{zh:"请求体大小减小,可能使用了 /clear、/compact 或 session 发生了变化",en:"Request body size decreased, possibly due to /clear, /compact, or session change","zh-TW":"請求體大小減小,可能使用了 /clear、/compact 或 session 發生了變化",ko:"요청 본문 크기가 줄었습니다. /clear, /compact 또는 세션 변경이 있었을 수 있습니다",ja:"リクエストボディのサイズが減少しました。/clear、/compact、またはセッション変更の可能性があります",de:"Anfragekörper wurde kleiner, möglicherweise durch /clear, /compact oder Sitzungswechsel",es:"El tamaño del cuerpo de la solicitud disminuyó, posiblemente debido a /clear, /compact o cambio de sesión",fr:"La taille du corps de la requête a diminué, possiblement dû à /clear, /compact ou un changement de session",it:"La dimensione del corpo della richiesta è diminuita, probabilmente a causa di /clear, /compact o cambio di sessione",da:"Anmodningens størrelse er reduceret, muligvis på grund af /clear, /compact eller sessionsændring",pl:"Rozmiar treści żądania zmniejszył się, prawdopodobnie z powodu /clear, /compact lub zmiany sesji",ru:"Размер тела запроса уменьшился, возможно из-за /clear, /compact или смены сессии",ar:"حجم نص الطلب انخفض، ربما بسبب /clear أو /compact أو تغيير الجلسة",no:"Forespørselens størrelse ble redusert, muligens på grunn av /clear, /compact eller sesjonsendring","pt-BR":"O tamanho do corpo da requisição diminuiu, possivelmente devido a /clear, /compact ou mudança de sessão",th:"ขนาดเนื้อหาคำขอลดลง อาจเกิดจาก /clear, /compact หรือการเปลี่ยนเซสชัน",tr:"İstek gövdesi boyutu küçüldü, muhtemelen /clear, /compact veya oturum değişikliği nedeniyle",uk:"Розмір тіла запиту зменшився, можливо через /clear, /compact або зміну сесії"},"ui.diffTooltip":{zh:"为了避免看冗长的全文,所以为大家简化展示了 MainAgent 的增量部分,通常只有 message 增加",en:"To avoid reading lengthy full text, only the incremental parts of MainAgent are shown — typically just new messages","zh-TW":"為了避免閱讀冗長的全文,簡化展示了 MainAgent 的增量部分,通常只有 message 增加",ko:"긴 전체 텍스트를 읽지 않도록 MainAgent의 증분 부분만 간략히 표시합니다. 일반적으로 message 추가만 있습니다",ja:"MainAgent の増分部分のみを簡略表示しています。長い全文を読む手間を省くため、通常は message の追加のみです",de:"Um das Lesen langer Volltexte zu vermeiden, werden nur die inkrementellen Teile des MainAgent angezeigt — in der Regel nur neue Nachrichten",es:"Para evitar leer textos completos extensos, solo se muestran las partes incrementales del MainAgent — normalmente solo mensajes nuevos",fr:"Pour éviter de lire de longs textes complets, seules les parties incrémentales du MainAgent sont affichées — généralement uniquement les nouveaux messages",it:"Per evitare di leggere lunghi testi completi, vengono mostrate solo le parti incrementali del MainAgent — di solito solo nuovi messaggi",da:"For at undgå at læse lange fuldtekster vises kun de inkrementelle dele af MainAgent — typisk kun nye beskeder",pl:"Aby uniknąć czytania długich pełnych tekstów, wyświetlane są tylko przyrostowe części MainAgent — zwykle tylko nowe wiadomości",ru:"Чтобы не читать длинный полный текст, отображаются только инкрементальные части MainAgent — обычно только новые сообщения",ar:"لتجنب قراءة النص الكامل الطويل، يتم عرض الأجزاء التزايدية فقط من MainAgent — عادةً فقط الرسائل الجديدة",no:"For å unngå å lese lange fulltekster vises kun de inkrementelle delene av MainAgent — vanligvis bare nye meldinger","pt-BR":"Para evitar ler textos completos longos, apenas as partes incrementais do MainAgent são exibidas — geralmente apenas novas mensagens",th:"เพื่อหลีกเลี่ยงการอ่านข้อความเต็มที่ยาว จึงแสดงเฉพาะส่วนที่เพิ่มขึ้นของ MainAgent เท่านั้น — โดยปกติจะมีเพียง message ใหม่",tr:"Uzun tam metinleri okumaktan kaçınmak için yalnızca MainAgent'ın artımlı kısımları gösterilir — genellikle yalnızca yeni mesajlar",uk:"Щоб не читати довгий повний текст, відображаються лише інкрементальні частини MainAgent — зазвичай лише нові повідомлення"},"cli.resume.prompt":{zh:"检测到1小时内的日志: {file}",en:"Recent log found (within 1 hour): {file}","zh-TW":"偵測到1小時內的日誌: {file}",ko:"1시간 이내 로그 감지: {file}",ja:"1時間以内のログを検出: {file}",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}",es:"Log reciente encontrado (dentro de 1 hora): {file}",fr:"Log récent trouvé (moins d'1 heure): {file}",it:"Log recente trovato (entro 1 ora): {file}",da:"Nylig log fundet (inden for 1 time): {file}",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}",ru:"Обнаружен недавний лог (менее 1 часа): {file}",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}",no:"Nylig logg funnet (innen 1 time): {file}","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file}",tr:"Son günlük bulundu (1 saat içinde): {file}",uk:"Знайдено нещодавній лог (менше 1 години): {file}"},"cli.resume.continue":{zh:"继续",en:"Continue","zh-TW":"繼續",ko:"계속",ja:"続行",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam",uk:"Продовжити"},"cli.resume.new":{zh:"新开",en:"New","zh-TW":"新開",ko:"새로 시작",ja:"新規",de:"Neu",es:"Nuevo",fr:"Nouveau",it:"Nuovo",da:"Ny",pl:"Nowy",ru:"Новый",ar:"جديد",no:"Ny","pt-BR":"Novo",th:"ใหม่",tr:"Yeni",uk:"Новий"},"ui.resume.title":{zh:"检测到近期日志",en:"Recent Log Detected","zh-TW":"偵測到近期日誌",ko:"최근 로그 감지됨",ja:"最近のログを検出",de:"Kürzliches Log erkannt",es:"Log reciente detectado",fr:"Log récent détecté",it:"Log recente rilevato",da:"Nylig log fundet",pl:"Wykryto ostatni log",ru:"Обнаружен недавний лог",ar:"تم اكتشاف سجل حديث",no:"Nylig logg oppdaget","pt-BR":"Log recente detectado",th:"ตรวจพบล็อกล่าสุด",tr:"Son günlük tespit edildi",uk:"Виявлено нещодавній лог"},"ui.resume.message":{zh:"检测到1小时内的日志: {file},是否继续?",en:"Recent log found (within 1 hour): {file}. Continue?","zh-TW":"偵測到1小時內的日誌: {file},是否繼續?",ko:"1시간 이내 로그 감지: {file}. 계속하시겠습니까?",ja:"1時間以内のログを検出: {file}。続行しますか?",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}. Fortsetzen?",es:"Log reciente encontrado (dentro de 1 hora): {file}. ¿Continuar?",fr:"Log récent trouvé (moins d'1 heure): {file}. Continuer ?",it:"Log recente trovato (entro 1 ora): {file}. Continuare?",da:"Nylig log fundet (inden for 1 time): {file}. Fortsæt?",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}. Kontynuować?",ru:"Обнаружен недавний лог (менее 1 часа): {file}. Продолжить?",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}. هل تريد المتابعة؟",no:"Nylig logg funnet (innen 1 time): {file}. Fortsette?","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}. Continuar?",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file} ต้องการดำเนินการต่อหรือไม่?",tr:"Son günlük bulundu (1 saat içinde): {file}. Devam edilsin mi?",uk:"Знайдено нещодавній лог (менше 1 години): {file}. Продовжити?"},"ui.resume.continue":{zh:"继续上次",en:"Continue","zh-TW":"繼續上次",ko:"이어서 계속",ja:"前回の続き",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam et",uk:"Продовжити"},"ui.resume.new":{zh:"新开日志",en:"Start New","zh-TW":"新開日誌",ko:"새 로그 시작",ja:"新規ログ",de:"Neues Log",es:"Nuevo log",fr:"Nouveau log",it:"Nuovo log",da:"Ny log",pl:"Nowy log",ru:"Новый лог",ar:"سجل جديد",no:"Ny logg","pt-BR":"Novo log",th:"ล็อกใหม่",tr:"Yeni günlük",uk:"Новий лог"},"ui.settings":{zh:"设置",en:"Settings","zh-TW":"設定",ko:"설정",ja:"設定",de:"Einstellungen",es:"Configuración",fr:"Paramètres",it:"Impostazioni",da:"Indstillinger",pl:"Ustawienia",ru:"Настройки",ar:"الإعدادات",no:"Innstillinger","pt-BR":"Configurações",th:"ตั้งค่า",tr:"Ayarlar",uk:"Налаштування"},"ui.collapseToolResults":{zh:"折叠工具返回内容",en:"Collapse tool results","zh-TW":"摺疊工具回傳內容",ko:"도구 결과 접기",ja:"ツール結果を折りたたむ",de:"Werkzeugergebnisse einklappen",es:"Contraer resultados de herramientas",fr:"Réduire les résultats des outils",it:"Comprimi risultati strumenti",da:"Skjul værktøjsresultater",pl:"Zwiń wyniki narzędzi",ru:"Свернуть результаты инструментов",ar:"طي نتائج الأدوات",no:"Skjul verktøyresultater","pt-BR":"Recolher resultados de ferramentas",th:"ย่อผลลัพธ์เครื่องมือ",tr:"Araç sonuçlarını daralt",uk:"Згорнути результати інструментів"},"ui.expandThinking":{zh:'展开"思考过程"',en:'Expand "Thinking"',"zh-TW":'展開"思考過程"',ko:'"사고 과정" 펼치기',ja:'"思考プロセス"を展開',de:'"Denkprozess" aufklappen',es:'Expandir "Proceso de pensamiento"',fr:'Développer "Processus de réflexion"',it:'Espandi "Processo di pensiero"',da:'Udvid "Tænkeproces"',pl:'Rozwiń "Proces myślenia"',ru:'Развернуть "Процесс мышления"',ar:'توسيع "عملية التفكير"',no:'Utvid "Tenkeprosess"',"pt-BR":'Expandir "Processo de pensamento"',th:'ขยาย "กระบวนการคิด"',tr:'"Düşünce süreci"ni genişlet',uk:'Розгорнути "Процес мислення"'},"ui.expandDiff":{zh:"默认展开 Body Diff JSON",en:"Expand Body Diff JSON by default","zh-TW":"預設展開 Body Diff JSON",ko:"Body Diff JSON 기본 펼치기",ja:"Body Diff JSON をデフォルトで展開",de:"Body Diff JSON standardmäßig aufklappen",es:"Expandir Body Diff JSON por defecto",fr:"Développer Body Diff JSON par défaut",it:"Espandi Body Diff JSON per impostazione predefinita",da:"Udvid Body Diff JSON som standard",pl:"Domyślnie rozwiń Body Diff JSON",ru:"Разворачивать Body Diff JSON по умолчанию",ar:"توسيع Body Diff JSON افتراضيًا",no:"Utvid Body Diff JSON som standard","pt-BR":"Expandir Body Diff JSON por padrão",th:"ขยาย Body Diff JSON เป็นค่าเริ่มต้น",tr:"Body Diff JSON'u varsayılan olarak genişlet",uk:"Розгортати Body Diff JSON за замовчуванням"},"ui.globalSettings":{zh:"全局设置",en:"Global Settings","zh-TW":"全域設定",ko:"전역 설정",ja:"グローバル設定",de:"Globale Einstellungen",es:"Configuración global",fr:"Paramètres globaux",it:"Impostazioni globali",da:"Globale indstillinger",pl:"Ustawienia globalne",ru:"Глобальные настройки",ar:"الإعدادات العامة",no:"Globale innstillinger","pt-BR":"Configurações globais",th:"ตั้งค่าทั่วไป",tr:"Genel ayarlar",uk:"Глобальні налаштування"},"ui.filterIrrelevant":{zh:"过滤无关请求",en:"Filter irrelevant requests","zh-TW":"過濾無關請求",ko:"무관한 요청 필터링",ja:"無関係なリクエストをフィルタ",de:"Irrelevante Anfragen filtern",es:"Filtrar solicitudes irrelevantes",fr:"Filtrer les requêtes non pertinentes",it:"Filtra richieste irrilevanti",da:"Filtrer irrelevante forespørgsler",pl:"Filtruj nieistotne żądania",ru:"Фильтровать нерелевантные запросы",ar:"تصفية الطلبات غير ذات الصلة",no:"Filtrer irrelevante forespørsler","pt-BR":"Filtrar solicitações irrelevantes",th:"กรองคำขอที่ไม่เกี่ยวข้อง",tr:"İlgisiz istekleri filtrele",uk:"Фільтрувати нерелевантні запити"},"ui.thinking":{zh:"思考过程",en:"Thinking","zh-TW":"思考過程",ko:"사고 과정",ja:"思考プロセス",de:"Denkprozess",es:"Proceso de pensamiento",fr:"Processus de réflexion",it:"Processo di pensiero",da:"Tænkeproces",pl:"Proces myślenia",ru:"Процесс мышления",ar:"عملية التفكير",no:"Tenkeprosess","pt-BR":"Processo de pensamento",th:"กระบวนการคิด",tr:"Düşünce süreci",uk:"Процес мислення"},"ui.translate":{zh:"翻译",en:"Translate","zh-TW":"翻譯",ko:"번역",ja:"翻訳",de:"Übersetzen",es:"Traducir",fr:"Traduire",it:"Traduci",da:"Oversæt",pl:"Tłumacz",ru:"Перевести",ar:"ترجمة",no:"Oversett","pt-BR":"Traduzir",th:"แปล",tr:"Çevir",uk:"Перекласти"},"ui.translating":{zh:"翻译中…",en:"Translating…","zh-TW":"翻譯中…",ko:"번역 중…",ja:"翻訳中…",de:"Übersetze…",es:"Traduciendo…",fr:"Traduction…",it:"Traduzione…",da:"Oversætter…",pl:"Tłumaczenie…",ru:"Перевод…",ar:"جارٍ الترجمة…",no:"Oversetter…","pt-BR":"Traduzindo…",th:"กำลังแปล…",tr:"Çevriliyor…",uk:"Переклад…"},"ui.skillLoaded":{zh:"Skill 已加载",en:"Skill Loaded","zh-TW":"Skill 已載入",ko:"Skill 로드됨",ja:"Skill 読み込み済み",de:"Skill geladen",es:"Skill cargado",fr:"Skill chargé",it:"Skill caricato",da:"Skill indlæst",pl:"Skill załadowany",ru:"Skill загружен",ar:"تم تحميل Skill",no:"Skill lastet","pt-BR":"Skill carregado",th:"โหลด Skill แล้ว",tr:"Skill yüklendi",uk:"Skill завантажено"},"ui.cacheLoss.ttl":{zh:"缓存丢失:距上次 MainAgent 请求超过 5 分钟,缓存已过期",en:"Cache miss: over 5 minutes since last MainAgent request, cache expired","zh-TW":"快取遺失:距上次 MainAgent 請求超過 5 分鐘,快取已過期",ko:"캐시 손실: 마지막 MainAgent 요청 후 5분 초과, 캐시 만료",ja:"キャッシュミス:前回の MainAgent リクエストから5分以上経過、キャッシュ期限切れ",de:"Cache-Verlust: Über 5 Minuten seit letzter MainAgent-Anfrage, Cache abgelaufen",es:"Pérdida de caché: más de 5 minutos desde la última solicitud MainAgent, caché expirada",fr:"Perte de cache : plus de 5 minutes depuis la dernière requête MainAgent, cache expiré",it:"Cache persa: oltre 5 minuti dall'ultima richiesta MainAgent, cache scaduta",da:"Cache-tab: over 5 minutter siden sidste MainAgent-forespørgsel, cache udløbet",pl:"Utrata cache: ponad 5 minut od ostatniego żądania MainAgent, cache wygasł",ru:"Потеря кэша: прошло более 5 минут с последнего запроса MainAgent, кэш истёк",ar:"فقدان التخزين المؤقت: مرور أكثر من 5 دقائق منذ آخر طلب MainAgent، انتهت صلاحية التخزين المؤقت",no:"Cache-tap: over 5 minutter siden siste MainAgent-forespørsel, cache utløpt","pt-BR":"Perda de cache: mais de 5 minutos desde a última requisição MainAgent, cache expirado",th:"แคชหาย: เกิน 5 นาทีจากคำขอ MainAgent ล่าสุด แคชหมดอายุ",tr:"Önbellek kaybı: Son MainAgent isteğinden 5 dakikadan fazla geçti, önbellek süresi doldu",uk:"Втрата кешу: минуло понад 5 хвилин з останнього запиту MainAgent, кеш закінчився"},"ui.cacheLoss.systemChange":{zh:"缓存重建:system prompt 发生变更",en:"Cache rebuild: system prompt changed","zh-TW":"快取重建:system prompt 發生變更",ko:"캐시 재생성: 시스템 프롬프트 변경",ja:"キャッシュ再構築:システムプロンプトが変更されました",de:"Cache-Neuaufbau: System-Prompt geändert",es:"Reconstrucción de caché: el prompt del sistema cambió",fr:"Reconstruction du cache : le prompt système a changé",it:"Ricostruzione cache: il prompt di sistema è cambiato",da:"Cache-genopbygning: systemprompt ændret",pl:"Odbudowa cache: prompt systemowy zmieniony",ru:"Перестройка кэша: системный промпт изменён",ar:"إعادة بناء التخزين المؤقت: تم تغيير موجه النظام",no:"Cache-gjenoppbygging: systemprompt endret","pt-BR":"Reconstrução de cache: prompt do sistema alterado",th:"สร้างแคชใหม่: system prompt เปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: sistem istemi değişti",uk:"Перебудова кешу: системний промпт змінено"},"ui.cacheLoss.toolsChange":{zh:"缓存重建:工具定义发生变更",en:"Cache rebuild: tool definitions changed","zh-TW":"快取重建:工具定義發生變更",ko:"캐시 재생성: 도구 정의 변경",ja:"キャッシュ再構築:ツール定義が変更されました",de:"Cache-Neuaufbau: Tool-Definitionen geändert",es:"Reconstrucción de caché: las definiciones de herramientas cambiaron",fr:"Reconstruction du cache : les définitions d'outils ont changé",it:"Ricostruzione cache: le definizioni degli strumenti sono cambiate",da:"Cache-genopbygning: værktøjsdefinitioner ændret",pl:"Odbudowa cache: definicje narzędzi zmienione",ru:"Перестройка кэша: определения инструментов изменены",ar:"إعادة بناء التخزين المؤقت: تم تغيير تعريفات الأدوات",no:"Cache-gjenoppbygging: verktøydefinisjoner endret","pt-BR":"Reconstrução de cache: definições de ferramentas alteradas",th:"สร้างแคชใหม่: คำจำกัดความเครื่องมือเปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: araç tanımları değişti",uk:"Перебудова кешу: визначення інструментів змінено"},"ui.cacheLoss.modelChange":{zh:"缓存重建:模型切换",en:"Cache rebuild: model switched","zh-TW":"快取重建:模型切換",ko:"캐시 재생성: 모델 전환",ja:"キャッシュ再構築:モデルが切り替わりました",de:"Cache-Neuaufbau: Modell gewechselt",es:"Reconstrucción de caché: modelo cambiado",fr:"Reconstruction du cache : modèle changé",it:"Ricostruzione cache: modello cambiato",da:"Cache-genopbygning: model skiftet",pl:"Odbudowa cache: model zmieniony",ru:"Перестройка кэша: модель переключена",ar:"إعادة بناء التخزين المؤقت: تم تبديل النموذج",no:"Cache-gjenoppbygging: modell byttet","pt-BR":"Reconstrução de cache: modelo alterado",th:"สร้างแคชใหม่: เปลี่ยนโมเดล",tr:"Önbellek yeniden oluşturma: model değiştirildi",uk:"Перебудова кешу: модель переключено"},"ui.cacheLoss.msgTruncated":{zh:"缓存重建:消息栈被截断(上下文窗口溢出)",en:"Cache rebuild: message stack truncated (context window overflow)","zh-TW":"快取重建:訊息堆疊被截斷(上下文視窗溢出)",ko:"캐시 재생성: 메시지 스택 잘림 (컨텍스트 윈도우 오버플로)",ja:"キャッシュ再構築:メッセージスタックが切り詰められました(コンテキストウィンドウオーバーフロー)",de:"Cache-Neuaufbau: Nachrichtenstapel gekürzt (Kontextfenster-Überlauf)",es:"Reconstrucción de caché: pila de mensajes truncada (desbordamiento de ventana de contexto)",fr:"Reconstruction du cache : pile de messages tronquée (dépassement de la fenêtre de contexte)",it:"Ricostruzione cache: stack messaggi troncato (overflow finestra di contesto)",da:"Cache-genopbygning: beskedstakken afkortet (kontekstvindue-overløb)",pl:"Odbudowa cache: stos wiadomości obcięty (przepełnienie okna kontekstu)",ru:"Перестройка кэша: стек сообщений усечён (переполнение контекстного окна)",ar:"إعادة بناء التخزين المؤقت: تم اقتطاع مكدس الرسائل (تجاوز نافذة السياق)",no:"Cache-gjenoppbygging: meldingsstakken avkortet (kontekstvindu-overflyt)","pt-BR":"Reconstrução de cache: pilha de mensagens truncada (estouro da janela de contexto)",th:"สร้างแคชใหม่: สแต็กข้อความถูกตัด (context window ล้น)",tr:"Önbellek yeniden oluşturma: mesaj yığını kesildi (bağlam penceresi taşması)",uk:"Перебудова кешу: стек повідомлень обрізано (переповнення контекстного вікна)"},"ui.cacheLoss.msgModified":{zh:"缓存重建:历史消息内容被修改",en:"Cache rebuild: historical message content modified","zh-TW":"快取重建:歷史訊息內容被修改",ko:"캐시 재생성: 이전 메시지 내용 수정됨",ja:"キャッシュ再構築:過去のメッセージ内容が変更されました",de:"Cache-Neuaufbau: Historische Nachrichteninhalte geändert",es:"Reconstrucción de caché: contenido de mensajes históricos modificado",fr:"Reconstruction du cache : contenu des messages historiques modifié",it:"Ricostruzione cache: contenuto dei messaggi storici modificato",da:"Cache-genopbygning: historisk beskedindhold ændret",pl:"Odbudowa cache: treść historycznych wiadomości zmodyfikowana",ru:"Перестройка кэша: содержимое исторических сообщений изменено",ar:"إعادة بناء التخزين المؤقت: تم تعديل محتوى الرسائل السابقة",no:"Cache-gjenoppbygging: historisk meldingsinnhold endret","pt-BR":"Reconstrução de cache: conteúdo de mensagens históricas modificado",th:"สร้างแคชใหม่: เนื้อหาข้อความในประวัติถูกแก้ไข",tr:"Önbellek yeniden oluşturma: geçmiş mesaj içeriği değiştirildi",uk:"Перебудова кешу: вміст історичних повідомлень змінено"},"ui.cacheLoss.keyChange":{zh:"缓存重建:缓存键变更(原因未知)",en:"Cache rebuild: cache key changed (unknown reason)","zh-TW":"快取重建:快取鍵變更(原因未知)",ko:"캐시 재생성: 캐시 키 변경 (원인 불명)",ja:"キャッシュ再構築:キャッシュキーが変更されました(原因不明)",de:"Cache-Neuaufbau: Cache-Schlüssel geändert (Grund unbekannt)",es:"Reconstrucción de caché: clave de caché cambiada (razón desconocida)",fr:"Reconstruction du cache : clé de cache modifiée (raison inconnue)",it:"Ricostruzione cache: chiave cache cambiata (motivo sconosciuto)",da:"Cache-genopbygning: cache-nøgle ændret (ukendt årsag)",pl:"Odbudowa cache: klucz cache zmieniony (nieznana przyczyna)",ru:"Перестройка кэша: ключ кэша изменён (причина неизвестна)",ar:"إعادة بناء التخزين المؤقت: تم تغيير مفتاح التخزين المؤقت (سبب غير معروف)",no:"Cache-gjenoppbygging: cache-nøkkel endret (ukjent årsak)","pt-BR":"Reconstrução de cache: chave de cache alterada (motivo desconhecido)",th:"สร้างแคชใหม่: คีย์แคชเปลี่ยนแปลง (ไม่ทราบสาเหตุ)",tr:"Önbellek yeniden oluşturma: önbellek anahtarı değişti (bilinmeyen neden)",uk:"Перебудова кешу: ключ кешу змінено (причина невідома)"},"ui.cacheRebuildStats":{zh:"缓存重建统计",en:"Cache Rebuild Stats","zh-TW":"快取重建統計",ko:"캐시 재구축 통계",ja:"キャッシュ再構築統計",de:"Cache-Neuaufbau-Statistik",es:"Estadísticas de reconstrucción de caché",fr:"Statistiques de reconstruction du cache",it:"Statistiche ricostruzione cache",da:"Cache-genopbygningsstatistik",pl:"Statystyki przebudowy cache",ru:"Статистика перестройки кеша",ar:"إحصائيات إعادة بناء ذاكرة التخزين المؤقت",no:"Cache-gjenoppbyggingsstatistikk","pt-BR":"Estatísticas de reconstrução de cache",th:"สถิติการสร้างแคชใหม่",tr:"Önbellek Yeniden Oluşturma İstatistikleri",uk:"Статистика перебудови кешу"},"ui.cacheRebuild.reason":{zh:"原因",en:"Reason","zh-TW":"原因",ko:"원인",ja:"原因",de:"Ursache",es:"Razón",fr:"Raison",it:"Motivo",da:"Årsag",pl:"Przyczyna",ru:"Причина",ar:"السبب",no:"Årsak","pt-BR":"Razão",th:"สาเหตุ",tr:"Neden",uk:"Причина"},"ui.cacheRebuild.count":{zh:"次数",en:"Count","zh-TW":"次數",ko:"횟수",ja:"回数",de:"Anzahl",es:"Veces",fr:"Nombre",it:"Volte",da:"Antal",pl:"Liczba",ru:"Кол-во",ar:"العدد",no:"Antall","pt-BR":"Vezes",th:"จำนวน",tr:"Sayı",uk:"Кількість"},"ui.cacheRebuild.cacheCreate":{zh:"重建缓存量",en:"Cache Created","zh-TW":"重建快取量",ko:"재구축 캐시량",ja:"再構築キャッシュ量",de:"Cache erstellt",es:"Caché creado",fr:"Cache créé",it:"Cache creata",da:"Cache oprettet",pl:"Utworzony cache",ru:"Создано кеша",ar:"الذاكرة المؤقتة المُنشأة",no:"Cache opprettet","pt-BR":"Cache criado",th:"แคชที่สร้าง",tr:"Oluşturulan önbellek",uk:"Створено кешу"},"ui.cacheRebuild.ttl":{zh:"缓存过期",en:"Cache Expired","zh-TW":"快取過期",ko:"캐시 만료",ja:"キャッシュ期限切れ",de:"Cache abgelaufen",es:"Caché expirado",fr:"Cache expiré",it:"Cache scaduta",da:"Cache udløbet",pl:"Cache wygasł",ru:"Кеш истёк",ar:"انتهاء صلاحية الذاكرة المؤقتة",no:"Cache utløpt","pt-BR":"Cache expirado",th:"แคชหมดอายุ",tr:"Önbellek süresi doldu",uk:"Кеш закінчився"},"ui.cacheRebuild.systemChange":{zh:"System Prompt 变更",en:"System Prompt Changed","zh-TW":"System Prompt 變更",ko:"System Prompt 변경",ja:"System Prompt 変更",de:"System Prompt geändert",es:"System Prompt cambiado",fr:"System Prompt modifié",it:"System Prompt modificato",da:"System Prompt ændret",pl:"System Prompt zmieniony",ru:"System Prompt изменён",ar:"تغيير System Prompt",no:"System Prompt endret","pt-BR":"System Prompt alterado",th:"System Prompt เปลี่ยนแปลง",tr:"System Prompt değişti",uk:"System Prompt змінено"},"ui.cacheRebuild.toolsChange":{zh:"工具定义变更",en:"Tools Changed","zh-TW":"工具定義變更",ko:"도구 정의 변경",ja:"ツール定義変更",de:"Tools geändert",es:"Herramientas cambiadas",fr:"Outils modifiés",it:"Strumenti modificati",da:"Værktøjer ændret",pl:"Narzędzia zmienione",ru:"Инструменты изменены",ar:"تغيير الأدوات",no:"Verktøy endret","pt-BR":"Ferramentas alteradas",th:"เครื่องมือเปลี่ยนแปลง",tr:"Araçlar değişti",uk:"Інструменти змінено"},"ui.cacheRebuild.modelChange":{zh:"模型切换",en:"Model Switched","zh-TW":"模型切換",ko:"모델 전환",ja:"モデル切替",de:"Modell gewechselt",es:"Modelo cambiado",fr:"Modèle changé",it:"Modello cambiato",da:"Model skiftet",pl:"Model zmieniony",ru:"Модель переключена",ar:"تبديل النموذج",no:"Modell byttet","pt-BR":"Modelo alterado",th:"เปลี่ยนโมเดล",tr:"Model değiştirildi",uk:"Модель переключено"},"ui.cacheRebuild.msgTruncated":{zh:"消息栈被截断",en:"Messages Truncated","zh-TW":"訊息堆疊被截斷",ko:"메시지 스택 잘림",ja:"メッセージスタック切り詰め",de:"Nachrichten abgeschnitten",es:"Mensajes truncados",fr:"Messages tronqués",it:"Messaggi troncati",da:"Beskeder afkortet",pl:"Wiadomości obcięte",ru:"Сообщения обрезаны",ar:"اقتطاع الرسائل",no:"Meldinger avkortet","pt-BR":"Mensagens truncadas",th:"ข้อความถูกตัด",tr:"Mesajlar kesildi",uk:"Повідомлення обрізано"},"ui.cacheRebuild.msgModified":{zh:"历史消息修改",en:"Messages Modified","zh-TW":"歷史訊息修改",ko:"기록 메시지 수정",ja:"履歴メッセージ変更",de:"Nachrichten geändert",es:"Mensajes modificados",fr:"Messages modifiés",it:"Messaggi modificati",da:"Beskeder ændret",pl:"Wiadomości zmodyfikowane",ru:"Сообщения изменены",ar:"تعديل الرسائل",no:"Meldinger endret","pt-BR":"Mensagens modificadas",th:"ข้อความถูกแก้ไข",tr:"Mesajlar değiştirildi",uk:"Повідомлення змінено"},"ui.cacheRebuild.keyChange":{zh:"未知键变更",en:"Unknown Key Change","zh-TW":"未知鍵變更",ko:"알 수 없는 키 변경",ja:"不明なキー変更",de:"Unbekannte Schlüsseländerung",es:"Cambio de clave desconocido",fr:"Changement de clé inconnu",it:"Modifica chiave sconosciuta",da:"Ukendt nøgleændring",pl:"Nieznana zmiana klucza",ru:"Неизвестное изменение ключа",ar:"تغيير مفتاح غير معروف",no:"Ukjent nøkkelendring","pt-BR":"Alteração de chave desconhecida",th:"การเปลี่ยนแปลงคีย์ที่ไม่ทราบ",tr:"Bilinmeyen anahtar değişikliği",uk:"Невідома зміна ключа"},"ui.skillUsageStats":{zh:"Skill 使用统计",en:"Skill Usage Stats","zh-TW":"Skill 使用統計",ko:"Skill 사용 통계",ja:"Skill 使用統計",de:"Skill-Nutzungsstatistik",es:"Estadísticas de uso de Skills",fr:"Statistiques d'utilisation des Skills",it:"Statistiche utilizzo Skill",da:"Skill-brugsstatistik",pl:"Statystyki użycia Skill",ru:"Статистика использования Skill",ar:"إحصائيات استخدام Skill",no:"Skill-bruksstatistikk","pt-BR":"Estatísticas de uso de Skills",th:"สถิติการใช้ Skill",tr:"Skill Kullanım İstatistikleri",uk:"Статистика використання Skill"},"ui.toolUsageStats":{zh:"工具使用统计",en:"Tool Usage Stats","zh-TW":"工具使用統計",ko:"도구 사용 통계",ja:"ツール使用統計",de:"Tool-Nutzungsstatistik",es:"Estadísticas de uso de herramientas",fr:"Statistiques d'utilisation des outils",it:"Statistiche utilizzo strumenti",da:"Værktøjsbrugsstatistik",pl:"Statystyki użycia narzędzi",ru:"Статистика использования инструментов",ar:"إحصائيات استخدام الأدوات",no:"Verktøybruksstatistikk","pt-BR":"Estatísticas de uso de ferramentas",th:"สถิติการใช้เครื่องมือ",tr:"Araç Kullanım İstatistikleri",uk:"Статистика використання інструментів"},"ui.mergeLogs":{zh:"合并日志",en:"Merge Logs","zh-TW":"合併日誌",ko:"로그 병합",ja:"ログを結合",de:"Logs zusammenführen",es:"Fusionar logs",fr:"Fusionner les logs",it:"Unisci log",da:"Flet logs",pl:"Scal logi",ru:"Объединить логи",ar:"دمج السجلات",no:"Slå sammen logger","pt-BR":"Mesclar logs",th:"รวมบันทึก",tr:"Logları birleştir",uk:"Об'єднати логи"},"ui.openLog":{zh:"打开",en:"Open","zh-TW":"開啟",ko:"열기",ja:"開く",de:"Öffnen",es:"Abrir",fr:"Ouvrir",it:"Apri",da:"Åbn",pl:"Otwórz",ru:"Открыть",ar:"فتح",no:"Åpne","pt-BR":"Abrir",th:"เปิด",tr:"Aç",uk:"Відкрити"},"ui.mergeNotConsecutive":{zh:"请选择连续的日志文件",en:"Please select consecutive log files","zh-TW":"請選擇連續的日誌檔案",ko:"연속된 로그 파일을 선택하세요",ja:"連続したログファイルを選択してください",de:"Bitte wählen Sie aufeinanderfolgende Log-Dateien",es:"Seleccione archivos de log consecutivos",fr:"Veuillez sélectionner des fichiers de log consécutifs",it:"Seleziona file di log consecutivi",da:"Vælg venligst sammenhængende logfiler",pl:"Wybierz kolejne pliki logów",ru:"Выберите последовательные файлы логов",ar:"يرجى اختيار ملفات سجلات متتالية",no:"Velg sammenhengende loggfiler","pt-BR":"Selecione arquivos de log consecutivos",th:"กรุณาเลือกไฟล์บันทึกที่ต่อเนื่องกัน",tr:"Lütfen ardışık log dosyalarını seçin",uk:"Виберіть послідовні файли логів"},"ui.mergeTooLarge":{zh:"选中的日志文件总大小超过 500MB",en:"Selected log files exceed 500MB","zh-TW":"選中的日誌檔案總大小超過 500MB",ko:"선택한 로그 파일의 총 크기가 500MB를 초과합니다",ja:"選択したログファイルの合計サイズが 500MB を超えています",de:"Ausgewählte Log-Dateien überschreiten 500MB",es:"Los archivos de log seleccionados superan los 500MB",fr:"Les fichiers de log sélectionnés dépassent 500 Mo",it:"I file di log selezionati superano i 500MB",da:"Valgte logfiler overstiger 500MB",pl:"Wybrane pliki logów przekraczają 500MB",ru:"Выбранные файлы логов превышают 500МБ",ar:"ملفات السجلات المحددة تتجاوز 500 ميجابايت",no:"Valgte loggfiler overstiger 500MB","pt-BR":"Arquivos de log selecionados excedem 500MB",th:"ไฟล์บันทึกที่เลือกมีขนาดรวมเกิน 500MB",tr:"Seçilen log dosyaları 500MB'ı aşıyor",uk:"Вибрані файли логів перевищують 500МБ"},"ui.mergeSuccess":{zh:"日志合并成功",en:"Logs merged successfully","zh-TW":"日誌合併成功",ko:"로그 병합 성공",ja:"ログの結合に成功しました",de:"Logs erfolgreich zusammengeführt",es:"Logs fusionados correctamente",fr:"Logs fusionnés avec succès",it:"Log uniti con successo",da:"Logs flettet",pl:"Logi scalone pomyślnie",ru:"Логи успешно объединены",ar:"تم دمج السجلات بنجاح",no:"Logger slått sammen","pt-BR":"Logs mesclados com sucesso",th:"รวมบันทึกสำเร็จ",tr:"Loglar başarıyla birleştirildi",uk:"Логи успішно об'єднано"},"ui.projectStats":{zh:"项目统计",en:"Project Stats","zh-TW":"專案統計",ko:"프로젝트 통계",ja:"プロジェクト統計",de:"Projektstatistik",es:"Estadísticas del proyecto",fr:"Statistiques du projet",it:"Statistiche progetto",da:"Projektstatistik",pl:"Statystyki projektu",ru:"Статистика проекта",ar:"إحصائيات المشروع",no:"Prosjektstatistikk","pt-BR":"Estatísticas do projeto",th:"สถิติโปรเจกต์",tr:"Proje İstatistikleri",uk:"Статистика проєкту"},"ui.projectStats.totalRequests":{zh:"总请求数",en:"Total Requests","zh-TW":"總請求數",ko:"총 요청 수",ja:"リクエスト総数",de:"Gesamtanfragen",es:"Total de solicitudes",fr:"Total des requêtes",it:"Richieste totali",da:"Samlede forespørgsler",pl:"Łączna liczba żądań",ru:"Всего запросов",ar:"إجمالي الطلبات",no:"Totale forespørsler","pt-BR":"Total de requisições",th:"คำขอทั้งหมด",tr:"Toplam İstekler",uk:"Всього запитів"},"ui.projectStats.sessionCount":{zh:"会话轮次",en:"Sessions","zh-TW":"會話輪次",ko:"세션 수",ja:"セッション数",de:"Sitzungen",es:"Sesiones",fr:"Sessions",it:"Sessioni",da:"Sessioner",pl:"Sesje",ru:"Сессий",ar:"الجلسات",no:"Sesjoner","pt-BR":"Sessões",th:"เซสชัน",tr:"Oturumlar",uk:"Сесії"},"ui.projectStats.totalFiles":{zh:"会话文件数",en:"Session Files","zh-TW":"會話檔案數",ko:"세션 파일 수",ja:"セッションファイル数",de:"Sitzungsdateien",es:"Archivos de sesión",fr:"Fichiers de session",it:"File di sessione",da:"Sessionsfiler",pl:"Pliki sesji",ru:"Файлов сессий",ar:"ملفات الجلسات",no:"Sesjonsfiler","pt-BR":"Arquivos de sessão",th:"ไฟล์เซสชัน",tr:"Oturum Dosyaları",uk:"Файли сесій"},"ui.projectStats.modelUsage":{zh:"模型使用统计",en:"Model Usage","zh-TW":"模型使用統計",ko:"모델 사용 통계",ja:"モデル使用統計",de:"Modellnutzung",es:"Uso de modelos",fr:"Utilisation des modèles",it:"Utilizzo modelli",da:"Modelbrug",pl:"Użycie modeli",ru:"Использование моделей",ar:"استخدام النماذج",no:"Modellbruk","pt-BR":"Uso de modelos",th:"การใช้โมเดล",tr:"Model Kullanımı",uk:"Використання моделей"},"ui.projectStats.noData":{zh:"暂无统计数据",en:"No stats available","zh-TW":"暫無統計資料",ko:"통계 데이터 없음",ja:"統計データなし",de:"Keine Statistiken verfügbar",es:"Sin estadísticas disponibles",fr:"Aucune statistique disponible",it:"Nessuna statistica disponibile",da:"Ingen statistik tilgængelig",pl:"Brak dostępnych statystyk",ru:"Статистика недоступна",ar:"لا توجد إحصائيات متاحة",no:"Ingen statistikk tilgjengelig","pt-BR":"Sem estatísticas disponíveis",th:"ไม่มีข้อมูลสถิติ",tr:"İstatistik mevcut değil",uk:"Статистика недоступна"},"ui.projectStats.updatedAt":{zh:"更新于 {time}",en:"Updated at {time}","zh-TW":"更新於 {time}",ko:"{time}에 업데이트됨",ja:"{time} に更新",de:"Aktualisiert um {time}",es:"Actualizado a las {time}",fr:"Mis à jour à {time}",it:"Aggiornato alle {time}",da:"Opdateret {time}",pl:"Zaktualizowano {time}",ru:"Обновлено в {time}",ar:"تم التحديث في {time}",no:"Oppdatert {time}","pt-BR":"Atualizado em {time}",th:"อัปเดตเมื่อ {time}",tr:"{time} tarihinde güncellendi",uk:"Оновлено о {time}"}},El={};for(const[e,t]of Object.entries(BL))for(const[n,r]of Object.entries(t))El[n]||(El[n]={}),El[n][e]=r;let ev="zh";const Tu={zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh-TW","zh-hk":"zh-TW","zh-hant":"zh-TW",en:"en",ko:"ko",de:"de",es:"es",fr:"fr",it:"it",da:"da",ja:"ja",pl:"pl",ru:"ru",ar:"ar",no:"no",nb:"no",nn:"no",pt:"pt-BR","pt-br":"pt-BR",th:"th",tr:"tr",uk:"uk"};function AL(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-");if(Tu[t])return Tu[t];const n=t.split("-")[0];return Tu[n]?Tu[n]:"en"}function DL(){return typeof navigator<"u"&&navigator.language?AL(navigator.language):"en"}function tv(e){ev=El[e]?e:"en"}function zl(){return ev}function Ie(e,t){var r;let n=((r=El[ev])==null?void 0:r[e])||El.en[e]||e;if(t)for(const[o,l]of Object.entries(t))n=n.replaceAll(`{${o}}`,l);return n}tv(DL());function nv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ki=nv();function e$(e){ki=e}var mi={exec:()=>null};function ln(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,l)=>{let s=typeof l=="string"?l:l.source;return s=s.replace(zr.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var FL=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),zr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},HL=/^(?:[ \t]*(?:\n|$))+/,VL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,WL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rv=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,t$=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,n$=ln(t$).replace(/bull/g,rv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),UL=ln(t$).replace(/bull/g,rv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ov=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GL=/^[^\n]+/,av=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,KL=ln(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",av).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XL=ln(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rv).getRegex(),sf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",iv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,QL=ln("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",iv).replace("tag",sf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),r$=ln(ov).replace("hr",yc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sf).getRegex(),YL=ln(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",r$).getRegex(),lv={blockquote:YL,code:VL,def:KL,fences:WL,heading:qL,hr:yc,html:QL,lheading:n$,list:XL,newline:HL,paragraph:r$,table:mi,text:GL},BC=ln("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sf).getRegex(),JL={...lv,lheading:UL,table:BC,paragraph:ln(ov).replace("hr",yc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",BC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sf).getRegex()},ZL={...lv,html:ln(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",iv).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ln(ov).replace("hr",yc).replace("heading",` *#{1,6} *[^
|
|
486
486
|
]`).replace("lheading",n$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},eB=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,o$=/^( {2,}|\\)\n(?!\s*$)/,nB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,cf=/[\p{P}\p{S}]/u,sv=/[\s\p{P}\p{S}]/u,a$=/[^\s\p{P}\p{S}]/u,rB=ln(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sv).getRegex(),i$=/(?!~)[\p{P}\p{S}]/u,oB=/(?!~)[\s\p{P}\p{S}]/u,aB=/(?:[^\s\p{P}\p{S}]|~)/u,l$=/(?![*_])[\p{P}\p{S}]/u,iB=/(?![*_])[\s\p{P}\p{S}]/u,lB=/(?:[^\s\p{P}\p{S}]|[*_])/u,sB=ln(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",FL?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),s$=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cB=ln(s$,"u").replace(/punct/g,cf).getRegex(),uB=ln(s$,"u").replace(/punct/g,i$).getRegex(),c$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dB=ln(c$,"gu").replace(/notPunctSpace/g,a$).replace(/punctSpace/g,sv).replace(/punct/g,cf).getRegex(),fB=ln(c$,"gu").replace(/notPunctSpace/g,aB).replace(/punctSpace/g,oB).replace(/punct/g,i$).getRegex(),mB=ln("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,a$).replace(/punctSpace/g,sv).replace(/punct/g,cf).getRegex(),pB=ln(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,l$).getRegex(),gB="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",hB=ln(gB,"gu").replace(/notPunctSpace/g,lB).replace(/punctSpace/g,iB).replace(/punct/g,l$).getRegex(),vB=ln(/\\(punct)/,"gu").replace(/punct/g,cf).getRegex(),yB=ln(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bB=ln(iv).replace("(?:-->|$)","-->").getRegex(),CB=ln("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,SB=ln(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",yd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),u$=ln(/^!?\[(label)\]\[(ref)\]/).replace("label",yd).replace("ref",av).getRegex(),d$=ln(/^!?\[(ref)\](?:\[\])?/).replace("ref",av).getRegex(),xB=ln("reflink|nolink(?!\\()","g").replace("reflink",u$).replace("nolink",d$).getRegex(),AC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,cv={_backpedal:mi,anyPunctuation:vB,autolink:yB,blockSkip:sB,br:o$,code:tB,del:mi,delLDelim:mi,delRDelim:mi,emStrongLDelim:cB,emStrongRDelimAst:dB,emStrongRDelimUnd:mB,escape:eB,link:SB,nolink:d$,punctuation:rB,reflink:u$,reflinkSearch:xB,tag:CB,text:nB,url:mi},wB={...cv,link:ln(/^!?\[(label)\]\((.*?)\)/).replace("label",yd).getRegex(),reflink:ln(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yd).getRegex()},Ug={...cv,emStrongRDelimAst:fB,emStrongLDelim:uB,delLDelim:pB,delRDelim:hB,url:ln(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",AC).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ln(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",AC).getRegex()},$B={...Ug,br:ln(o$).replace("{2,}","*").getRegex(),text:ln(Ug.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nu={normal:lv,gfm:JL,pedantic:ZL},ws={normal:cv,gfm:Ug,breaks:$B,pedantic:wB},EB={"&":"&","<":"<",">":">",'"':""","'":"'"},DC=e=>EB[e];function Uo(e,t){if(t){if(zr.escapeTest.test(e))return e.replace(zr.escapeReplace,DC)}else if(zr.escapeTestNoEncode.test(e))return e.replace(zr.escapeReplaceNoEncode,DC);return e}function FC(e){try{e=encodeURI(e).replace(zr.percentDecode,"%")}catch{return null}return e}function HC(e,t){var l;let n=e.replace(zr.findPipe,(s,c,d)=>{let m=!1,p=c;for(;--p>=0&&d[p]==="\\";)m=!m;return m?"|":" |"}),r=n.split(zr.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((l=r.at(-1))!=null&&l.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(zr.slashPipe,"|");return r}function $s(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function RB(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function OB(e,t=0){let n=t,r="";for(let o of e)if(o===" "){let l=4-n%4;r+=" ".repeat(l),n+=l}else r+=o,n++;return r}function VC(e,t,n,r,o){let l=t.href,s=t.title||null,c=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:s,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,d}function kB(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
|
|
487
487
|
`).map(l=>{let s=l.match(n.other.beginningSpace);if(s===null)return l;let[c]=s;return c.length>=o.length?l.slice(o.length):l}).join(`
|
|
488
488
|
`)}var bd=class{constructor(e){jt(this,"options");jt(this,"rules");jt(this,"lexer");this.options=e||ki}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:$s(n,`
|
|
@@ -553,13 +553,13 @@ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error
|
|
|
553
553
|
`))}return r.join(`
|
|
554
554
|
|
|
555
555
|
|
|
556
|
-
`)}renderProjectStatsContent(){const{projectStats:n,projectStatsLoading:r}=this.state;if(r)return k.jsx("div",{className:Se.projectStatsCenter,children:k.jsx(Vl,{})});if(!n)return k.jsx("div",{className:Se.projectStatsEmpty,children:Ie("ui.projectStats.noData")});const{summary:o,models:l,updatedAt:s}=n;l&&Object.entries(l).sort((m,p)=>p[1]-m[1]);const c={};if(n.files){for(const m of Object.values(n.files))if(m.models)for(const[p,g]of Object.entries(m.models))c[p]||(c[p]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),c[p].input+=g.input_tokens||0,c[p].output+=g.output_tokens||0,c[p].cacheRead+=g.cache_read_input_tokens||0,c[p].cacheCreation+=g.cache_creation_input_tokens||0,c[p].count+=g.count||0}const d=Object.entries(c).sort((m,p)=>p[1].count-m[1].count);return k.jsxs("div",{className:Se.projectStatsContent,children:[s&&k.jsx("div",{className:Se.projectStatsUpdated,children:Ie("ui.projectStats.updatedAt",{time:new Date(s).toLocaleString()})}),k.jsxs("div",{className:Se.projectStatsSummary,children:[k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:(o==null?void 0:o.requestCount)??0}),k.jsx("div",{className:Se.projectStatLabel,children:Ie("ui.projectStats.totalRequests")})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:(o==null?void 0:o.fileCount)??0}),k.jsx("div",{className:Se.projectStatLabel,children:Ie("ui.projectStats.totalFiles")})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:Gn(o==null?void 0:o.input_tokens)}),k.jsx("div",{className:Se.projectStatLabel,children:"Input Tokens"})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:Gn(o==null?void 0:o.output_tokens)}),k.jsx("div",{className:Se.projectStatLabel,children:"Output Tokens"})]})]}),d.length>0&&k.jsxs("div",{className:Se.projectStatsSection,children:[k.jsx("div",{className:Se.projectStatsSectionTitle,children:Ie("ui.projectStats.modelUsage")}),d.map(([m,p])=>{const g=p.input+p.cacheRead+p.cacheCreation,v=g>0?(p.cacheRead/g*100).toFixed(1):"0.0";return k.jsxs("div",{className:Se.projectStatsModelCard,children:[k.jsxs("div",{className:Se.projectStatsModelHeader,children:[k.jsx("span",{className:Se.projectStatsModelName,children:m}),k.jsxs("span",{className:Se.projectStatsModelCount,children:[p.count," reqs"]})]}),k.jsx("table",{className:Se.statsTable,children:k.jsxs("tbody",{children:[k.jsxs("tr",{children:[k.jsx("td",{className:Se.label,children:"Token"}),k.jsx("td",{className:Se.th,children:"input"}),k.jsx("td",{className:Se.th,children:"output"})]}),k.jsxs("tr",{className:Se.rowBorder,children:[k.jsx("td",{className:Se.label}),k.jsx("td",{className:Se.td,children:Gn(g)}),k.jsx("td",{className:Se.td,children:Gn(p.output)})]}),k.jsxs("tr",{children:[k.jsx("td",{className:Se.label,children:"Cache"}),k.jsx("td",{className:Se.th,children:"create"}),k.jsx("td",{className:Se.th,children:"read"})]}),k.jsxs("tr",{className:Se.rowBorder,children:[k.jsx("td",{className:Se.label}),k.jsx("td",{className:Se.td,children:Gn(p.cacheCreation)}),k.jsx("td",{className:Se.td,children:Gn(p.cacheRead)})]}),k.jsxs("tr",{children:[k.jsx("td",{className:Se.label,children:Ie("ui.hitRate")}),k.jsxs("td",{colSpan:2,className:Se.td,children:[v,"%"]})]})]})})]},m)})]})]})}render(){var _;const{requestCount:n,viewMode:r,cacheType:o,onToggleViewMode:l,onImportLocalLogs:s,onLangChange:c,isLocalLog:d,localLogFile:m,projectName:p,collapseToolResults:g,onCollapseToolResultsChange:v,expandThinking:y,onExpandThinkingChange:C,expandDiff:S,onExpandDiffChange:b,filterIrrelevant:$,onFilterIrrelevantChange:w}=this.props,{countdownText:R}=this.state,I=[{key:"import-local",icon:k.jsx(hL,{}),label:Ie("ui.importLocalLogs"),onClick:s},{key:"save-log",icon:k.jsx(xL,{}),label:Ie("ui.saveLog"),onClick:()=>{const O=document.createElement("a");O.href="/api/download-log",O.download="",O.click()}},{key:"export-prompts",icon:k.jsx(mL,{}),label:Ie("ui.exportPrompts"),onClick:this.handleShowPrompts},{type:"divider"},{key:"project-stats",icon:k.jsx(jC,{}),label:Ie("ui.projectStats"),onClick:this.handleShowProjectStats},{key:"global-settings",icon:k.jsx(PC,{}),label:Ie("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}];return k.jsxs("div",{className:Se.headerBar,children:[k.jsxs(pa,{size:"middle",children:[k.jsx(Wg,{menu:{items:I},trigger:["hover"],children:k.jsxs(NA,{strong:!0,className:Se.titleText,children:[k.jsx("img",{src:"/favicon.ico",alt:"Logo",className:Se.logoImage}),"CC-Viewer ",k.jsx(Cl,{className:Se.titleArrow})]})}),k.jsx(Qw,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:k.jsxs(So,{className:Se.tokenStatsTag,children:[k.jsx(uL,{className:Se.tokenStatsIcon}),Ie("ui.tokenStats")]})}),k.jsxs(So,{color:d?void 0:"green",className:`${Se.liveTag} ${d?Se.liveTagHistory:""}`,children:[!d&&k.jsx(Zw,{status:"processing",color:"green"}),k.jsx("span",{className:Se.liveTagText,children:d?Ie("ui.historyLog",{file:m}):Ie("ui.liveMonitoring")+(p?`:${p}`:"")})]})]}),k.jsxs(pa,{size:"middle",children:[R&&k.jsxs(So,{color:R===Ie("ui.cacheExpired")?"red":"green",children:[Ie("ui.cacheCountdown",{type:o?`(${o})`:""}),k.jsx("strong",{className:Se.countdownStrong,children:R})]}),r==="chat"&&k.jsxs("span",{className:Se.settingsBtn,onClick:()=>this.setState({settingsDrawerVisible:!0}),children:[k.jsx(PC,{})," ",Ie("ui.settings")]}),k.jsx(Wg,{trigger:["hover"],placement:"bottom",menu:{items:WC.map(O=>({key:O.value,label:O.label,style:O.value===zl()?{color:"#3b82f6"}:{}})),onClick:({key:O})=>{tv(O),c&&c()}},children:k.jsx("span",{className:Se.langSelector,children:((_=WC.find(O=>O.value===zl()))==null?void 0:_.short)||"zh"})}),k.jsx(Yn,{type:r==="raw"?"primary":"default",icon:r==="raw"?k.jsx(bL,{}):k.jsx(Ms,{}),onClick:l,children:Ie(r==="raw"?"ui.chatMode":"ui.rawMode")})]}),k.jsxs(Br,{title:`${Ie("ui.userPrompt")} (${this.state.promptData.length}${Ie("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[k.jsx("div",{className:Se.promptExportBar,children:k.jsx(Yn,{icon:k.jsx(rL,{}),onClick:this.handleExportPromptsTxt,children:Ie("ui.exportPromptsTxt")})}),k.jsx(Uh,{activeKey:this.state.promptViewMode,onChange:O=>this.setState({promptViewMode:O}),size:"small",items:[{key:"original",label:Ie("ui.promptModeOriginal")},{key:"context",label:Ie("ui.promptModeContext")},{key:"text",label:Ie("ui.promptModeText")}]}),this.state.promptViewMode==="text"?k.jsx("textarea",{readOnly:!0,className:Se.promptTextarea,value:this.buildTextModeContent()}):k.jsxs("div",{className:Se.promptScrollArea,children:[this.state.promptData.length===0&&k.jsx("div",{className:Se.promptEmpty,children:Ie("ui.noPrompt")}),this.state.promptData.map((O,T)=>{const N=O.timestamp?new Date(O.timestamp).toLocaleString():Ie("ui.unknownTime");return k.jsxs("div",{children:[k.jsxs("div",{className:Se.promptTimestamp,children:[N,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(O):this.renderTextPrompt(O)]},T)})]})]}),k.jsxs(Vg,{title:Ie("ui.settings"),placement:"right",width:320,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.collapseToolResults")}),k.jsx(Is,{checked:!!g,onChange:O=>v&&v(O)})]}),k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.expandThinking")}),k.jsx(Is,{checked:!!y,onChange:O=>C&&C(O)})]})]}),k.jsxs(Br,{title:Ie("ui.globalSettings"),open:this.state.globalSettingsVisible,onCancel:()=>this.setState({globalSettingsVisible:!1}),footer:null,width:400,children:[k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.filterIrrelevant")}),k.jsx(Is,{checked:!!$,onChange:O=>w&&w(O)})]}),k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.expandDiff")}),k.jsx(Is,{checked:!!S,onChange:O=>b&&b(O)})]})]}),k.jsx(Vg,{title:k.jsxs("span",{children:[k.jsx(jC,{style:{marginRight:8}}),Ie("ui.projectStats")]}),placement:"right",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()})]})}};jt(Sl,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Xg=Sl;function dv(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const n of t)if((n==null?void 0:n.type)==="text"&&n.text)return n.text}return""}function jA(e){const t=e.body||{},n=pd(t);if(/Extract any file paths/i.test(n)||/process Bash commands/i.test(n)||/command execution specialist/i.test(n))return"Bash";if(/file search specialist/i.test(n))return"Search";if(/planning specialist/i.test(n))return"Plan";if(/general-purpose agent/i.test(n))return"General";const r=t.messages||[];for(let o=r.length-1;o>=0;o--){if(r[o].role!=="user")continue;const l=dv(r[o]);if(/^Command:/m.test(l))return"Bash";break}return null}function PA(e){var r;const t=(r=e.body)==null?void 0:r.messages;if(!Array.isArray(t)||t.length!==1)return!1;const n=t[0];return n.role==="user"&&n.content==="count"}function zA(e,t){var d;const n=e.body||{},r=n.tools,o=n.messages||[];if(Array.isArray(r)&&r.length>0||o.length!==1||o[0].role!=="user")return!1;const l=dv(o[0]);if(!l||l.trim()==="count")return!1;const s=l.trim();if(/^Command:/m.test(l)||/^<policy_spec>/i.test(s)||/^<task-notification>/i.test(s))return!1;const c=pd(n);if(!c.includes("Claude Code")||/process Bash commands/i.test(c)||/Extract any file paths/i.test(c))return!1;if(t){const m=((d=t.body)==null?void 0:d.messages)||[],p=l.slice(0,80);if(m.some(v=>{const y=v==null?void 0:v.content;return typeof y=="string"?y.includes(p):Array.isArray(y)?y.some(C=>(C==null?void 0:C.type)==="text"&&C.text&&C.text.includes(p)):!1}))return!0}return!1}function f$(e,t){var r;if(vr(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||PA(e))return{type:"Count",subType:null};if(zA(e,t)){const o=dv((((r=e.body)==null?void 0:r.messages)||[])[0]);return/^Implement the following plan:/i.test(o.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:jA(e)}}function qC(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`Tools:${t}`:e}const MA="_centerEmpty_ckz8l_1",LA="_scrollContainer_ckz8l_8",BA="_listItem_ckz8l_13",AA="_listItemActive_ckz8l_25",DA="_itemContent_ckz8l_34",FA="_itemHeader_ckz8l_39",HA="_tagNoMargin_ckz8l_47",VA="_modelName_ckz8l_52",WA="_time_ckz8l_56",qA="_detailRow_ckz8l_62",UA="_urlText_ckz8l_69",GA="_duration_ckz8l_78",KA="_statusOk_ckz8l_83",XA="_statusErr_ckz8l_89",QA="_statusDefault_ckz8l_94",YA="_usageBox_ckz8l_99",JA="_cacheDot_ckz8l_109",ZA="_cacheDotLoss_ckz8l_118",eD="_cacheDotNormal_ckz8l_123",An={centerEmpty:MA,scrollContainer:LA,listItem:BA,listItemActive:AA,itemContent:DA,itemHeader:FA,tagNoMargin:HA,modelName:VA,time:WA,detailRow:qA,urlText:UA,duration:GA,statusOk:KA,statusErr:XA,statusDefault:QA,usageBox:YA,cacheDot:JA,cacheDotLoss:ZA,cacheDotNormal:eD};class tD extends J.Component{constructor(t){super(t),this.activeItemRef=J.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:n,onSelect:r}=this.props;return t.length===0?k.jsx("div",{className:An.centerEmpty,children:k.jsx(Lo,{description:Ie("ui.waitingRequests")})}):k.jsx("div",{className:An.scrollContainer,children:k.jsx(Js,{dataSource:t,size:"small",split:!1,renderItem:(o,l)=>{var I,_,O;const s=new Date(o.timestamp).toLocaleTimeString("zh-CN"),c=l===n,d=o.response&&o.response.status<400,m=o.response&&o.response.status>=400,p=ML((I=o.body)==null?void 0:I.model),g=l+1<t.length?t[l+1]:null,{type:v,subType:y}=f$(o,g),C=(O=(_=o.response)==null?void 0:_.body)==null?void 0:O.usage,S=C?(C.input_tokens||0)+(C.cache_read_input_tokens||0)+(C.cache_creation_input_tokens||0):null,b=(C==null?void 0:C.output_tokens)||null,$=(C==null?void 0:C.cache_read_input_tokens)||0,w=(C==null?void 0:C.cache_creation_input_tokens)||0;let R=o.url;try{const T=new URL(o.url);R=T.host+T.pathname}catch{}return k.jsx(Js.Item,{ref:c?this.activeItemRef:void 0,onClick:()=>r(l),className:`${An.listItem} ${c?An.listItemActive:""}`,children:k.jsxs("div",{className:An.itemContent,children:[k.jsxs("div",{className:An.itemHeader,children:[v==="MainAgent"?k.jsx(So,{color:"orange",className:An.tagNoMargin,children:"MainAgent"}):v==="Plan"?k.jsx(So,{className:An.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:qC(v,y)}):v==="Count"||v==="Preflight"?k.jsx(So,{className:An.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:v}):k.jsx(So,{className:An.tagNoMargin,children:qC(v,y)}),p&&k.jsx("span",{className:An.modelName,style:{color:v==="MainAgent"?"#d4822d":"#8c8c8c"},children:p}),k.jsx("span",{className:An.time,children:s})]}),k.jsxs("div",{className:An.detailRow,children:[k.jsx("span",{className:An.urlText,title:o.url,children:R}),o.duration&&k.jsxs("span",{className:An.duration,children:[o.duration,"ms"]}),o.response&&k.jsx("span",{className:d?An.statusOk:m?An.statusErr:An.statusDefault,children:o.response.status})]}),C&&k.jsxs("div",{className:An.usageBox,children:[k.jsxs("div",{children:["token: output:",Gn(b)||0,", input: ",Gn(S)||0]}),($>0||w>0)&&k.jsx("div",{children:(()=>{const T=Z2(t,l),N={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let j;if(T){const B=(T.reasons||[T.reason]).map(z=>Ie(N[z]||N.key_change)).join(`
|
|
556
|
+
`)}renderProjectStatsContent(){const{projectStats:n,projectStatsLoading:r}=this.state;if(r)return k.jsx("div",{className:Se.projectStatsCenter,children:k.jsx(Vl,{})});if(!n)return k.jsx("div",{className:Se.projectStatsEmpty,children:Ie("ui.projectStats.noData")});const{summary:o,models:l,updatedAt:s}=n;l&&Object.entries(l).sort((m,p)=>p[1]-m[1]);const c={};if(n.files){for(const m of Object.values(n.files))if(m.models)for(const[p,g]of Object.entries(m.models))c[p]||(c[p]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),c[p].input+=g.input_tokens||0,c[p].output+=g.output_tokens||0,c[p].cacheRead+=g.cache_read_input_tokens||0,c[p].cacheCreation+=g.cache_creation_input_tokens||0,c[p].count+=g.count||0}const d=Object.entries(c).sort((m,p)=>p[1].count-m[1].count);return k.jsxs("div",{className:Se.projectStatsContent,children:[s&&k.jsx("div",{className:Se.projectStatsUpdated,children:Ie("ui.projectStats.updatedAt",{time:new Date(s).toLocaleString()})}),k.jsxs("div",{className:Se.projectStatsSummary,children:[k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:(o==null?void 0:o.requestCount)??0}),k.jsx("div",{className:Se.projectStatLabel,children:Ie("ui.projectStats.totalRequests")})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:(o==null?void 0:o.sessionCount)??0}),k.jsx("div",{className:Se.projectStatLabel,children:Ie("ui.projectStats.sessionCount")})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:(o==null?void 0:o.fileCount)??0}),k.jsx("div",{className:Se.projectStatLabel,children:Ie("ui.projectStats.totalFiles")})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:Gn(o==null?void 0:o.input_tokens)}),k.jsx("div",{className:Se.projectStatLabel,children:"Input Tokens"})]}),k.jsxs("div",{className:Se.projectStatCard,children:[k.jsx("div",{className:Se.projectStatValue,children:Gn(o==null?void 0:o.output_tokens)}),k.jsx("div",{className:Se.projectStatLabel,children:"Output Tokens"})]})]}),d.length>0&&k.jsxs("div",{className:Se.projectStatsSection,children:[k.jsx("div",{className:Se.projectStatsSectionTitle,children:Ie("ui.projectStats.modelUsage")}),d.map(([m,p])=>{const g=p.input+p.cacheRead+p.cacheCreation,v=g>0?(p.cacheRead/g*100).toFixed(1):"0.0";return k.jsxs("div",{className:Se.projectStatsModelCard,children:[k.jsxs("div",{className:Se.projectStatsModelHeader,children:[k.jsx("span",{className:Se.projectStatsModelName,children:m}),k.jsxs("span",{className:Se.projectStatsModelCount,children:[p.count," reqs"]})]}),k.jsx("table",{className:Se.statsTable,children:k.jsxs("tbody",{children:[k.jsxs("tr",{children:[k.jsx("td",{className:Se.label,children:"Token"}),k.jsx("td",{className:Se.th,children:"input"}),k.jsx("td",{className:Se.th,children:"output"})]}),k.jsxs("tr",{className:Se.rowBorder,children:[k.jsx("td",{className:Se.label}),k.jsx("td",{className:Se.td,children:Gn(g)}),k.jsx("td",{className:Se.td,children:Gn(p.output)})]}),k.jsxs("tr",{children:[k.jsx("td",{className:Se.label,children:"Cache"}),k.jsx("td",{className:Se.th,children:"create"}),k.jsx("td",{className:Se.th,children:"read"})]}),k.jsxs("tr",{className:Se.rowBorder,children:[k.jsx("td",{className:Se.label}),k.jsx("td",{className:Se.td,children:Gn(p.cacheCreation)}),k.jsx("td",{className:Se.td,children:Gn(p.cacheRead)})]}),k.jsxs("tr",{children:[k.jsx("td",{className:Se.label,children:Ie("ui.hitRate")}),k.jsxs("td",{colSpan:2,className:Se.td,children:[v,"%"]})]})]})})]},m)})]})]})}render(){var _;const{requestCount:n,viewMode:r,cacheType:o,onToggleViewMode:l,onImportLocalLogs:s,onLangChange:c,isLocalLog:d,localLogFile:m,projectName:p,collapseToolResults:g,onCollapseToolResultsChange:v,expandThinking:y,onExpandThinkingChange:C,expandDiff:S,onExpandDiffChange:b,filterIrrelevant:$,onFilterIrrelevantChange:w}=this.props,{countdownText:R}=this.state,I=[{key:"import-local",icon:k.jsx(hL,{}),label:Ie("ui.importLocalLogs"),onClick:s},{key:"save-log",icon:k.jsx(xL,{}),label:Ie("ui.saveLog"),onClick:()=>{const O=document.createElement("a");O.href="/api/download-log",O.download="",O.click()}},{key:"export-prompts",icon:k.jsx(mL,{}),label:Ie("ui.exportPrompts"),onClick:this.handleShowPrompts},{type:"divider"},{key:"project-stats",icon:k.jsx(jC,{}),label:Ie("ui.projectStats"),onClick:this.handleShowProjectStats},{key:"global-settings",icon:k.jsx(PC,{}),label:Ie("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}];return k.jsxs("div",{className:Se.headerBar,children:[k.jsxs(pa,{size:"middle",children:[k.jsx(Wg,{menu:{items:I},trigger:["hover"],children:k.jsxs(NA,{strong:!0,className:Se.titleText,children:[k.jsx("img",{src:"/favicon.ico",alt:"Logo",className:Se.logoImage}),"CC-Viewer ",k.jsx(Cl,{className:Se.titleArrow})]})}),k.jsx(Qw,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:k.jsxs(So,{className:Se.tokenStatsTag,children:[k.jsx(uL,{className:Se.tokenStatsIcon}),Ie("ui.tokenStats")]})}),k.jsxs(So,{color:d?void 0:"green",className:`${Se.liveTag} ${d?Se.liveTagHistory:""}`,children:[!d&&k.jsx(Zw,{status:"processing",color:"green"}),k.jsx("span",{className:Se.liveTagText,children:d?Ie("ui.historyLog",{file:m}):Ie("ui.liveMonitoring")+(p?`:${p}`:"")})]})]}),k.jsxs(pa,{size:"middle",children:[R&&k.jsxs(So,{color:R===Ie("ui.cacheExpired")?"red":"green",children:[Ie("ui.cacheCountdown",{type:o?`(${o})`:""}),k.jsx("strong",{className:Se.countdownStrong,children:R})]}),r==="chat"&&k.jsxs("span",{className:Se.settingsBtn,onClick:()=>this.setState({settingsDrawerVisible:!0}),children:[k.jsx(PC,{})," ",Ie("ui.settings")]}),k.jsx(Wg,{trigger:["hover"],placement:"bottom",menu:{items:WC.map(O=>({key:O.value,label:O.label,style:O.value===zl()?{color:"#3b82f6"}:{}})),onClick:({key:O})=>{tv(O),c&&c()}},children:k.jsx("span",{className:Se.langSelector,children:((_=WC.find(O=>O.value===zl()))==null?void 0:_.short)||"zh"})}),k.jsx(Yn,{type:r==="raw"?"primary":"default",icon:r==="raw"?k.jsx(bL,{}):k.jsx(Ms,{}),onClick:l,children:Ie(r==="raw"?"ui.chatMode":"ui.rawMode")})]}),k.jsxs(Br,{title:`${Ie("ui.userPrompt")} (${this.state.promptData.length}${Ie("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[k.jsx("div",{className:Se.promptExportBar,children:k.jsx(Yn,{icon:k.jsx(rL,{}),onClick:this.handleExportPromptsTxt,children:Ie("ui.exportPromptsTxt")})}),k.jsx(Uh,{activeKey:this.state.promptViewMode,onChange:O=>this.setState({promptViewMode:O}),size:"small",items:[{key:"original",label:Ie("ui.promptModeOriginal")},{key:"context",label:Ie("ui.promptModeContext")},{key:"text",label:Ie("ui.promptModeText")}]}),this.state.promptViewMode==="text"?k.jsx("textarea",{readOnly:!0,className:Se.promptTextarea,value:this.buildTextModeContent()}):k.jsxs("div",{className:Se.promptScrollArea,children:[this.state.promptData.length===0&&k.jsx("div",{className:Se.promptEmpty,children:Ie("ui.noPrompt")}),this.state.promptData.map((O,T)=>{const N=O.timestamp?new Date(O.timestamp).toLocaleString():Ie("ui.unknownTime");return k.jsxs("div",{children:[k.jsxs("div",{className:Se.promptTimestamp,children:[N,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(O):this.renderTextPrompt(O)]},T)})]})]}),k.jsxs(Vg,{title:Ie("ui.settings"),placement:"right",width:320,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.collapseToolResults")}),k.jsx(Is,{checked:!!g,onChange:O=>v&&v(O)})]}),k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.expandThinking")}),k.jsx(Is,{checked:!!y,onChange:O=>C&&C(O)})]})]}),k.jsxs(Br,{title:Ie("ui.globalSettings"),open:this.state.globalSettingsVisible,onCancel:()=>this.setState({globalSettingsVisible:!1}),footer:null,width:400,children:[k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.filterIrrelevant")}),k.jsx(Is,{checked:!!$,onChange:O=>w&&w(O)})]}),k.jsxs("div",{className:Se.settingsItem,children:[k.jsx("span",{className:Se.settingsLabel,children:Ie("ui.expandDiff")}),k.jsx(Is,{checked:!!S,onChange:O=>b&&b(O)})]})]}),k.jsx(Vg,{title:k.jsxs("span",{children:[k.jsx(jC,{style:{marginRight:8}}),Ie("ui.projectStats")]}),placement:"right",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()})]})}};jt(Sl,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Xg=Sl;function dv(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const n of t)if((n==null?void 0:n.type)==="text"&&n.text)return n.text}return""}function jA(e){const t=e.body||{},n=pd(t);if(/Extract any file paths/i.test(n)||/process Bash commands/i.test(n)||/command execution specialist/i.test(n))return"Bash";if(/file search specialist/i.test(n))return"Search";if(/planning specialist/i.test(n))return"Plan";if(/general-purpose agent/i.test(n))return"General";const r=t.messages||[];for(let o=r.length-1;o>=0;o--){if(r[o].role!=="user")continue;const l=dv(r[o]);if(/^Command:/m.test(l))return"Bash";break}return null}function PA(e){var r;const t=(r=e.body)==null?void 0:r.messages;if(!Array.isArray(t)||t.length!==1)return!1;const n=t[0];return n.role==="user"&&n.content==="count"}function zA(e,t){var d;const n=e.body||{},r=n.tools,o=n.messages||[];if(Array.isArray(r)&&r.length>0||o.length!==1||o[0].role!=="user")return!1;const l=dv(o[0]);if(!l||l.trim()==="count")return!1;const s=l.trim();if(/^Command:/m.test(l)||/^<policy_spec>/i.test(s)||/^<task-notification>/i.test(s))return!1;const c=pd(n);if(!c.includes("Claude Code")||/process Bash commands/i.test(c)||/Extract any file paths/i.test(c))return!1;if(t){const m=((d=t.body)==null?void 0:d.messages)||[],p=l.slice(0,80);if(m.some(v=>{const y=v==null?void 0:v.content;return typeof y=="string"?y.includes(p):Array.isArray(y)?y.some(C=>(C==null?void 0:C.type)==="text"&&C.text&&C.text.includes(p)):!1}))return!0}return!1}function f$(e,t){var r;if(vr(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||PA(e))return{type:"Count",subType:null};if(zA(e,t)){const o=dv((((r=e.body)==null?void 0:r.messages)||[])[0]);return/^Implement the following plan:/i.test(o.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:jA(e)}}function qC(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`Tools:${t}`:e}const MA="_centerEmpty_ckz8l_1",LA="_scrollContainer_ckz8l_8",BA="_listItem_ckz8l_13",AA="_listItemActive_ckz8l_25",DA="_itemContent_ckz8l_34",FA="_itemHeader_ckz8l_39",HA="_tagNoMargin_ckz8l_47",VA="_modelName_ckz8l_52",WA="_time_ckz8l_56",qA="_detailRow_ckz8l_62",UA="_urlText_ckz8l_69",GA="_duration_ckz8l_78",KA="_statusOk_ckz8l_83",XA="_statusErr_ckz8l_89",QA="_statusDefault_ckz8l_94",YA="_usageBox_ckz8l_99",JA="_cacheDot_ckz8l_109",ZA="_cacheDotLoss_ckz8l_118",eD="_cacheDotNormal_ckz8l_123",An={centerEmpty:MA,scrollContainer:LA,listItem:BA,listItemActive:AA,itemContent:DA,itemHeader:FA,tagNoMargin:HA,modelName:VA,time:WA,detailRow:qA,urlText:UA,duration:GA,statusOk:KA,statusErr:XA,statusDefault:QA,usageBox:YA,cacheDot:JA,cacheDotLoss:ZA,cacheDotNormal:eD};class tD extends J.Component{constructor(t){super(t),this.activeItemRef=J.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:n,onSelect:r}=this.props;return t.length===0?k.jsx("div",{className:An.centerEmpty,children:k.jsx(Lo,{description:Ie("ui.waitingRequests")})}):k.jsx("div",{className:An.scrollContainer,children:k.jsx(Js,{dataSource:t,size:"small",split:!1,renderItem:(o,l)=>{var I,_,O;const s=new Date(o.timestamp).toLocaleTimeString("zh-CN"),c=l===n,d=o.response&&o.response.status<400,m=o.response&&o.response.status>=400,p=ML((I=o.body)==null?void 0:I.model),g=l+1<t.length?t[l+1]:null,{type:v,subType:y}=f$(o,g),C=(O=(_=o.response)==null?void 0:_.body)==null?void 0:O.usage,S=C?(C.input_tokens||0)+(C.cache_read_input_tokens||0)+(C.cache_creation_input_tokens||0):null,b=(C==null?void 0:C.output_tokens)||null,$=(C==null?void 0:C.cache_read_input_tokens)||0,w=(C==null?void 0:C.cache_creation_input_tokens)||0;let R=o.url;try{const T=new URL(o.url);R=T.host+T.pathname}catch{}return k.jsx(Js.Item,{ref:c?this.activeItemRef:void 0,onClick:()=>r(l),className:`${An.listItem} ${c?An.listItemActive:""}`,children:k.jsxs("div",{className:An.itemContent,children:[k.jsxs("div",{className:An.itemHeader,children:[v==="MainAgent"?k.jsx(So,{color:"orange",className:An.tagNoMargin,children:"MainAgent"}):v==="Plan"?k.jsx(So,{className:An.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:qC(v,y)}):v==="Count"||v==="Preflight"?k.jsx(So,{className:An.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:v}):k.jsx(So,{className:An.tagNoMargin,children:qC(v,y)}),p&&k.jsx("span",{className:An.modelName,style:{color:v==="MainAgent"?"#d4822d":"#8c8c8c"},children:p}),k.jsx("span",{className:An.time,children:s})]}),k.jsxs("div",{className:An.detailRow,children:[k.jsx("span",{className:An.urlText,title:o.url,children:R}),o.duration&&k.jsxs("span",{className:An.duration,children:[o.duration,"ms"]}),o.response&&k.jsx("span",{className:d?An.statusOk:m?An.statusErr:An.statusDefault,children:o.response.status})]}),C&&k.jsxs("div",{className:An.usageBox,children:[k.jsxs("div",{children:["token: output:",Gn(b)||0,", input: ",Gn(S)||0]}),($>0||w>0)&&k.jsx("div",{children:(()=>{const T=Z2(t,l),N={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let j;if(T){const B=(T.reasons||[T.reason]).map(z=>Ie(N[z]||N.key_change)).join(`
|
|
557
557
|
`);j=k.jsx(ha,{title:k.jsx("span",{style:{whiteSpace:"pre-line"},children:B}),children:k.jsx("span",{className:`${An.cacheDot} ${An.cacheDotLoss}`})})}else j=k.jsx("span",{className:`${An.cacheDot} ${An.cacheDotNormal}`});return k.jsxs(k.Fragment,{children:["cache",j,": ",$>0?`read:${Gn($)}`:"",$>0&&w>0?", ":"",w>0?`create:${Gn(w)}`:""]})})()})]})]})})}})})}}const nD=e=>typeof e=="boolean"||e instanceof Boolean,rD=e=>typeof e=="number"||e instanceof Number,oD=e=>typeof e=="bigint"||e instanceof BigInt,m$=e=>!!e&&e instanceof Date,aD=e=>typeof e=="string"||e instanceof String,iD=e=>Array.isArray(e),p$=e=>typeof e=="object"&&e!==null,g$=e=>!!e&&e instanceof Object&&typeof e=="function";function Sd(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function lD(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function h$(e){let{field:t,value:n,data:r,lastElement:o,openBracket:l,closeBracket:s,level:c,style:d,shouldExpandNode:m,clickToExpandNode:p,outerRef:g,beforeExpandChange:v}=e;const y=u.useRef(!1),[C,S]=u.useState(()=>m(c,n,t)),b=u.useRef(null);u.useEffect(()=>{y.current?S(m(c,n,t)):y.current=!0},[m]);const $=u.useId();if(r.length===0)return sD({field:t,openBracket:l,closeBracket:s,lastElement:o,style:d});const w=C?d.collapseIcon:d.expandIcon,R=C?d.ariaLables.collapseJson:d.ariaLables.expandJson,I=c+1,_=r.length-1,O=j=>{C!==j&&(!v||v({level:c,value:n,field:t,newExpandValue:j}))&&S(j)},T=j=>{if(j.key==="ArrowRight"||j.key==="ArrowLeft")j.preventDefault(),O(j.key==="ArrowRight");else if(j.key==="ArrowUp"||j.key==="ArrowDown"){j.preventDefault();const P=j.key==="ArrowUp"?-1:1;if(!g.current)return;const B=g.current.querySelectorAll("[role=button]");let z=-1;for(let A=0;A<B.length;A++)if(B[A].tabIndex===0){z=A;break}if(z<0)return;const D=(z+P+B.length)%B.length;B[z].tabIndex=-1,B[D].tabIndex=0,B[D].focus()}},N=()=>{var j;O(!C);const P=b.current;if(!P)return;const B=(j=g.current)===null||j===void 0?void 0:j.querySelector('[role=button][tabindex="0"]');B&&(B.tabIndex=-1),P.tabIndex=0,P.focus()};return u.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":C,"aria-selected":void 0},u.createElement("span",{className:w,onClick:N,onKeyDown:T,role:"button","aria-label":R,"aria-expanded":C,"aria-controls":C?$:void 0,ref:b,tabIndex:c===0?0:-1}),(t||t==="")&&(p?u.createElement("span",{className:d.clickableLabel,onClick:N,onKeyDown:T},Sd(t,d.quotesForFieldNames),":"):u.createElement("span",{className:d.label},Sd(t,d.quotesForFieldNames),":")),u.createElement("span",{className:d.punctuation},l),C?u.createElement("ul",{id:$,role:"group",className:d.childFieldsContainer},r.map((j,P)=>u.createElement(Qg,{key:j[0]||P,field:j[0],value:j[1],style:d,lastElement:P===_,level:I,shouldExpandNode:m,clickToExpandNode:p,beforeExpandChange:v,outerRef:g}))):u.createElement("span",{className:d.collapsedContent,onClick:N,onKeyDown:T}),u.createElement("span",{className:d.punctuation},s),!o&&u.createElement("span",{className:d.punctuation},","))}function sD(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:l}=e;return u.createElement("div",{className:l.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:l.label},Sd(t,l.quotesForFieldNames),":"),u.createElement("span",{className:l.punctuation},n),u.createElement("span",{className:l.punctuation},r),!o&&u.createElement("span",{className:l.punctuation},","))}function cD(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:l,clickToExpandNode:s,level:c,outerRef:d,beforeExpandChange:m}=e;return h$({field:t,value:n,lastElement:o||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:l,clickToExpandNode:s,data:Object.keys(n).map(p=>[p,n[p]]),outerRef:d,beforeExpandChange:m})}function uD(e){let{field:t,value:n,style:r,lastElement:o,level:l,shouldExpandNode:s,clickToExpandNode:c,outerRef:d,beforeExpandChange:m}=e;return h$({field:t,value:n,lastElement:o||!1,level:l,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:c,data:n.map(p=>[void 0,p]),outerRef:d,beforeExpandChange:m})}function dD(e){let{field:t,value:n,style:r,lastElement:o}=e,l,s=r.otherValue;return n===null?(l="null",s=r.nullValue):n===void 0?(l="undefined",s=r.undefinedValue):aD(n)?(l=lD(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):nD(n)?(l=n?"true":"false",s=r.booleanValue):rD(n)?(l=n.toString(),s=r.numberValue):oD(n)?(l=`${n.toString()}n`,s=r.numberValue):m$(n)?l=n.toISOString():g$(n)?l="function() { }":l=n.toString(),u.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:r.label},Sd(t,r.quotesForFieldNames),":"),u.createElement("span",{className:s},l),!o&&u.createElement("span",{className:r.punctuation},","))}function Qg(e){const t=e.value;return iD(t)?u.createElement(uD,Object.assign({},e)):p$(t)&&!m$(t)&&!g$(t)?u.createElement(cD,Object.assign({},e)):u.createElement(dD,Object.assign({},e))}var bn={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const v$={collapseJson:"collapse JSON",expandJson:"expand JSON"},Lp={container:bn["container-light"],basicChildStyle:bn["basic-element-style"],childFieldsContainer:bn["child-fields-container"],label:bn["label-light"],clickableLabel:bn["clickable-label-light"],nullValue:bn["value-null-light"],undefinedValue:bn["value-undefined-light"],stringValue:bn["value-string-light"],booleanValue:bn["value-boolean-light"],numberValue:bn["value-number-light"],otherValue:bn["value-other-light"],punctuation:bn["punctuation-light"],collapseIcon:bn["collapse-icon-light"],expandIcon:bn["expand-icon-light"],collapsedContent:bn["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:v$,stringifyStringValues:!1},fD={container:bn["container-dark"],basicChildStyle:bn["basic-element-style"],childFieldsContainer:bn["child-fields-container"],label:bn["label-dark"],clickableLabel:bn["clickable-label-dark"],nullValue:bn["value-null-dark"],undefinedValue:bn["value-undefined-dark"],stringValue:bn["value-string-dark"],booleanValue:bn["value-boolean-dark"],numberValue:bn["value-number-dark"],otherValue:bn["value-other-dark"],punctuation:bn["punctuation-dark"],collapseIcon:bn["collapse-icon-dark"],expandIcon:bn["expand-icon-dark"],collapsedContent:bn["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:v$,stringifyStringValues:!1},mD=()=>!0,pD=e=>{let{data:t,style:n=Lp,shouldExpandNode:r=mD,clickToExpandNode:o=!1,beforeExpandChange:l,compactTopLevel:s,...c}=e;const d=u.useRef(null);return u.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:d,role:"tree"}),s&&p$(t)?Object.entries(t).map(m=>{let[p,g]=m;return u.createElement(Qg,{key:p,field:p,value:g,style:{...Lp,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:o,beforeExpandChange:l,outerRef:d})}):u.createElement(Qg,{value:t,style:{...Lp,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:d,beforeExpandChange:l}))},gD="_container_1h2lr_1",hD={container:gD},vD={...fD,container:"rjv-container"};class UC extends J.Component{shouldComponentUpdate(t){return t.data!==this.props.data||t.defaultExpand!==this.props.defaultExpand||t.expandNode!==this.props.expandNode}render(){const{data:t,defaultExpand:n,expandNode:r}=this.props;if(t==null)return null;const o=typeof r=="function"?r:n==="all"?()=>!0:n==="root"?l=>l<2:l=>l<1;return k.jsx("div",{className:hD.container,children:k.jsx(pD,{data:t,shouldExpandNode:o,style:vD})})}}const yD="_container_y3z3z_1",bD="_emptyState_y3z3z_7",CD="_urlSection_y3z3z_14",SD="_urlLeft_y3z3z_21",xD="_tokenStatsBox_y3z3z_26",wD="_tokenGrid_y3z3z_33",$D="_tokenRows_y3z3z_43",ED="_tokenRow_y3z3z_43",RD="_tokenRowBorder_y3z3z_51",OD="_tokenLabel_y3z3z_55",kD="_tokenTd_y3z3z_62",_D="_tokenHitRate_y3z3z_71",ID="_tokenHitRateLabel_y3z3z_84",TD="_urlText_y3z3z_94",ND="_metaText_y3z3z_101",jD="_headersContainer_y3z3z_105",PD="_headerRow_y3z3z_109",zD="_headerKey_y3z3z_115",MD="_headerValue_y3z3z_120",LD="_streamingBox_y3z3z_125",BD="_rawTextPre_y3z3z_138",AD="_tabContent_y3z3z_151",DD="_bodyLabel_y3z3z_159",FD="_bodyHeader_y3z3z_163",HD="_diffSection_y3z3z_170",VD="_diffToggle_y3z3z_174",WD="_diffIcon_y3z3z_180",qD="_viewInChatBtn_y3z3z_185",UD="_reminderSelect_y3z3z_206",Tt={container:yD,emptyState:bD,urlSection:CD,urlLeft:SD,tokenStatsBox:xD,tokenGrid:wD,tokenRows:$D,tokenRow:ED,tokenRowBorder:RD,tokenLabel:OD,tokenTd:kD,tokenHitRate:_D,tokenHitRateLabel:ID,urlText:TD,metaText:ND,headersContainer:jD,headerRow:PD,headerKey:zD,headerValue:MD,streamingBox:LD,rawTextPre:BD,tabContent:AD,bodyLabel:DD,bodyHeader:FD,diffSection:HD,diffToggle:VD,diffIcon:WD,viewInChatBtn:qD,reminderSelect:UD},{Text:Kr,Paragraph:GD}=na;class KD extends J.Component{constructor(t){super(t),this.state={bodyViewMode:{request:"json",response:"json",diff:"json"},diffExpanded:!1,requestHeadersExpanded:!1,responseHeadersExpanded:!1,diffTooltipDismissed:!1,reminderFilters:null}}componentDidMount(){fetch("/api/preferences").then(t=>t.json()).then(t=>{t.diffTooltipDismissed&&this.setState({diffTooltipDismissed:!0})}).catch(()=>{})}dismissDiffTooltip(){this.setState({diffTooltipDismissed:!0}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({diffTooltipDismissed:!0})}).catch(()=>{})}shouldComponentUpdate(t,n){if(t.request!==this.props.request){const r=vr(t.request);this.setState({diffExpanded:r&&!!t.expandDiff,requestHeadersExpanded:!1,responseHeadersExpanded:!1,reminderFilters:null})}return t.request!==this.props.request||t.currentTab!==this.props.currentTab||t.onTabChange!==this.props.onTabChange||t.selectedIndex!==this.props.selectedIndex||t.expandDiff!==this.props.expandDiff||n.bodyViewMode!==this.state.bodyViewMode||n.diffExpanded!==this.state.diffExpanded||n.requestHeadersExpanded!==this.state.requestHeadersExpanded||n.responseHeadersExpanded!==this.state.responseHeadersExpanded||n.diffTooltipDismissed!==this.state.diffTooltipDismissed||n.reminderFilters!==this.state.reminderFilters}toggleBodyViewMode(t){this.setState(n=>({bodyViewMode:{...n.bodyViewMode,[t]:n.bodyViewMode[t]==="json"?"text":"json"}}))}copyBody(t){var s;const{request:n}=this.props;if(!n)return;let r;if(t==="diff"?r=this._lastDiffResult:r=t==="request"?n.body:(s=n.response)==null?void 0:s.body,r==null)return;const o=typeof r=="object"?bi(r):r,l=typeof o=="string"?o:JSON.stringify(o,null,2);navigator.clipboard.writeText(l).then(()=>bo.success(Ie("ui.copySuccess")))}renderHeaders(t){return!t||Object.keys(t).length===0?k.jsx(Kr,{type:"secondary",children:Ie("ui.noHeaders")}):k.jsx("div",{className:Tt.headersContainer,children:Object.entries(t).map(([n,r])=>k.jsxs("div",{className:Tt.headerRow,children:[k.jsx(Kr,{code:!0,className:Tt.headerKey,children:n}),n==="authorization"&&k.jsx(Rl,{doc:"TranslateContextPollution"}),k.jsx(Kr,{type:"secondary",className:Tt.headerValue,children:String(r)})]},n))})}getRequestExpandNode(t,n){if(n!=="request"||!t||typeof t!="object")return;const{request:r,requests:o,selectedIndex:l}=this.props;if(!r)return;const s=o&&l!=null?o[l+1]:null,{type:c}=f$(r,s);let d=null;if(this.state.reminderFilters==="claudeMd"&&Array.isArray(t.messages)){d=new Set,d.add(t.messages);for(const g of t.messages){if(!g||typeof g!="object")continue;const v=g.content;if(typeof v=="string")hd(v)&&d.add(g);else if(Array.isArray(v)){let y=!1;for(const C of v)C&&C.type==="text"&&hd(C.text)&&(d.add(C),y=!0);y&&(d.add(g),d.add(v))}}}let m=null;if(this.state.reminderFilters==="skills"&&Array.isArray(t.messages)){m=new Set,m.add(t.messages);for(const g of t.messages){if(!g||typeof g!="object")continue;const v=g.content;if(typeof v=="string")vd(v)&&m.add(g);else if(Array.isArray(v)){let y=!1;for(const C of v)C&&C.type==="text"&&vd(C.text)&&(m.add(C),y=!0);y&&(m.add(g),m.add(v))}}}const p=d||m;if(c==="Preflight"){const g=new Set,v=y=>{y&&typeof y=="object"&&(g.add(y),Array.isArray(y)?y.forEach(v):Object.values(y).forEach(v))};return Array.isArray(t.messages)&&v(t.messages),Array.isArray(t.system)&&t.system.length>=3&&v(t.system[2]),(y,C,S)=>!!(y<2||g.has(C)||p&&p.has(C)||y===1&&S==="system")}if(c==="MainAgent"&&Array.isArray(t.messages)&&t.messages.length===1){const g=t.messages[0],v=g&&Array.isArray(g.content)?g.content:null,y=v&&v.length>0?v[v.length-1]:null,C=new Set,S=b=>{b&&typeof b=="object"&&(C.add(b),Array.isArray(b)?b.forEach(S):Object.values(b).forEach(S))};return y&&S(y),C.add(t.messages),g&&typeof g=="object"&&C.add(g),v&&C.add(v),(b,$,w)=>!!(b<2||C.has($)||p&&p.has($))}if(p)return(g,v,y)=>!!(g<2||p.has(v))}renderBody(t,n){const{bodyViewMode:r}=this.state;if(t==null)return k.jsx(Kr,{type:"secondary",children:Ie("ui.noBody")});if(typeof t=="string"&&t.includes("Streaming Response"))return k.jsx("div",{className:Tt.streamingBox,children:k.jsx(Kr,{type:"secondary",children:Ie("ui.streamingResponse")})});const o=typeof t=="object"?bi(t):t,l=r[n]==="json",s=this.getRequestExpandNode(o,n);return k.jsx("div",{children:l?k.jsx(UC,{data:o,defaultExpand:n==="response"?"all":"root",expandNode:s}):k.jsx("pre",{className:Tt.rawTextPre,children:typeof o=="string"?o:JSON.stringify(o,null,2)})})}getPrevMainAgentRequest(){const{requests:t,selectedIndex:n}=this.props;if(!t||n==null)return null;for(let r=n-1;r>=0;r--)if(vr(t[r]))return t[r];return null}computeDiff(t,n){if(t==null||n==null||typeof t!="object"||typeof n!="object")return null;const r={},o=new Set([...Object.keys(t),...Object.keys(n)]);for(const l of o)if(!l.startsWith("_"))if(!(l in t))r[l]=n[l];else if(l in n){const s=JSON.stringify(t[l]),c=JSON.stringify(n[l]);s!==c&&(l==="messages"&&Array.isArray(t[l])&&Array.isArray(n[l])&&n[l].length>t[l].length?r[l]=n[l].slice(t[l].length):r[l]=n[l])}else continue;return Object.keys(r).length?r:null}render(){var v,y;const{request:t,currentTab:n,onTabChange:r}=this.props;if(!t)return k.jsx("div",{className:Tt.emptyState,children:k.jsx(Lo,{description:"选择一个请求查看详情"})});const o=new Date(t.timestamp).toLocaleString("zh-CN"),l=t.response&&t.response.status<400;let s=null;if(vr(t)){const C=this.getPrevMainAgentRequest();if(C){const S=JSON.stringify(t.body).length,b=JSON.stringify(C.body).length;if(S<b)s=k.jsxs("div",{className:Tt.diffSection,children:[k.jsxs(ha,{title:this.state.diffTooltipDismissed?null:k.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[k.jsx("span",{style:{flex:1},children:Ie("ui.diffTooltip")}),k.jsx(Xa,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:w=>{w.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",k.jsxs(Kr,{strong:!0,className:Tt.diffToggle,onClick:()=>this.setState(w=>({diffExpanded:!w.diffExpanded})),children:["Body Diff JSON ",k.jsx(Rl,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?k.jsx(Cl,{className:Tt.diffIcon}):k.jsx(Xo,{className:Tt.diffIcon})]})]}),this.state.diffExpanded&&k.jsx(Kr,{type:"secondary",children:Ie("ui.diffSessionChanged")})]});else{const w=bi(this.computeDiff(C.body,t.body));w&&(this._lastDiffResult=w,s=k.jsxs("div",{className:Tt.diffSection,children:[k.jsxs(ha,{title:this.state.diffTooltipDismissed?null:k.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[k.jsx("span",{style:{flex:1},children:Ie("ui.diffTooltip")}),k.jsx(Xa,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:R=>{R.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[k.jsxs(Kr,{strong:!0,className:Tt.diffToggle,onClick:()=>this.setState(R=>({diffExpanded:!R.diffExpanded})),children:["Body Diff JSON ",k.jsx(Rl,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?k.jsx(Cl,{className:Tt.diffIcon}):k.jsx(Xo,{className:Tt.diffIcon})]}),this.state.diffExpanded&&k.jsxs(pa,{size:"small",style:{marginLeft:"auto"},children:[k.jsx(Yn,{size:"small",icon:this.state.bodyViewMode.diff==="json"?k.jsx(Ms,{}):k.jsx(zp,{}),onClick:()=>this.toggleBodyViewMode("diff"),children:this.state.bodyViewMode.diff==="json"?"Text":"JSON"}),k.jsx(Yn,{size:"small",icon:k.jsx(Ku,{}),onClick:()=>this.copyBody("diff"),children:Ie("ui.copy")})]})]})]}),this.state.diffExpanded&&k.jsx(k.Fragment,{children:this.state.bodyViewMode.diff==="json"?k.jsx(UC,{data:w,defaultExpand:"all"}):k.jsx("pre",{className:Tt.rawTextPre,children:JSON.stringify(w,null,2)})})]}))}}}const c=PL(t.body),d=zL(t.body),m=[{key:"request",label:"Request",children:k.jsxs("div",{className:Tt.tabContent,children:[k.jsxs("div",{className:Tt.diffSection,children:[k.jsxs(Kr,{strong:!0,className:Tt.diffToggle,onClick:()=>this.setState(C=>({requestHeadersExpanded:!C.requestHeadersExpanded})),children:["Headers ",this.state.requestHeadersExpanded?k.jsx(Cl,{className:Tt.diffIcon}):k.jsx(Xo,{className:Tt.diffIcon})]}),this.state.requestHeadersExpanded&&this.renderHeaders(t.headers)]}),s,k.jsxs("div",{children:[k.jsxs("div",{className:Tt.bodyHeader,children:[k.jsx(Kr,{strong:!0,className:Tt.bodyLabel,children:"Body"}),k.jsxs(pa,{size:"small",children:[(c||d)&&k.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[k.jsx("span",{style:{color:"#888",fontSize:12,fontFamily:"monospace"},children:"system-reminder:"}),k.jsx(Oi,{size:"small",className:Tt.reminderSelect,placeholder:"filter",value:this.state.reminderFilters||void 0,onChange:C=>this.setState({reminderFilters:C||null}),options:[{label:"CLAUDE.md",value:"claudeMd",disabled:!c},{label:"Skills",value:"skills",disabled:!d}],popupMatchSelectWidth:!1,allowClear:!0})]}),k.jsx(Yn,{size:"small",icon:this.state.bodyViewMode.request==="json"?k.jsx(Ms,{}):k.jsx(zp,{}),onClick:()=>this.toggleBodyViewMode("request"),children:this.state.bodyViewMode.request==="json"?"Text":"JSON"}),k.jsx(Yn,{size:"small",icon:k.jsx(Ku,{}),onClick:()=>this.copyBody("request"),children:Ie("ui.copy")})]})]}),this.renderBody(t.body,"request")]})]})},{key:"response",label:"Response",children:k.jsx("div",{className:Tt.tabContent,children:t.response?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:Tt.diffSection,children:[k.jsxs(Kr,{strong:!0,className:Tt.diffToggle,onClick:()=>this.setState(C=>({responseHeadersExpanded:!C.responseHeadersExpanded})),children:["Headers ",this.state.responseHeadersExpanded?k.jsx(Cl,{className:Tt.diffIcon}):k.jsx(Xo,{className:Tt.diffIcon})]}),this.state.responseHeadersExpanded&&this.renderHeaders(t.response.headers)]}),k.jsxs("div",{children:[k.jsxs("div",{className:Tt.bodyHeader,children:[k.jsx(Kr,{strong:!0,className:Tt.bodyLabel,children:"Body"}),k.jsxs(pa,{size:"small",children:[k.jsx(Yn,{size:"small",icon:this.state.bodyViewMode.response==="json"?k.jsx(Ms,{}):k.jsx(zp,{}),onClick:()=>this.toggleBodyViewMode("response"),children:this.state.bodyViewMode.response==="json"?"Text":"JSON"}),k.jsx(Yn,{size:"small",icon:k.jsx(Ku,{}),onClick:()=>this.copyBody("response"),children:Ie("ui.copy")})]})]}),this.renderBody(t.response.body,"response")]})]}):k.jsx(Lo,{description:Ie("ui.responseNotCaptured")})})}],p=(y=(v=t.response)==null?void 0:v.body)==null?void 0:y.usage,g=p?(()=>{const C=p.input_tokens||0,S=p.output_tokens||0,b=p.cache_creation_input_tokens||0,$=p.cache_read_input_tokens||0,w=C+b+$,R=w>0?($/w*100).toFixed(1):"0.0";return{input:C,output:S,cacheCreate:b,cacheRead:$,hitRate:R}})():null;return k.jsxs("div",{className:Tt.container,children:[k.jsxs("div",{className:Tt.urlSection,children:[k.jsxs("div",{className:Tt.urlLeft,children:[k.jsx(GD,{className:Tt.urlText,ellipsis:{rows:2,expandable:!0},children:t.url}),k.jsxs(pa,{size:"small",wrap:!0,children:[k.jsx(So,{color:t.method==="POST"?"blue":"green",children:t.method}),k.jsxs(Kr,{type:"secondary",className:Tt.metaText,children:["🕐 ",o]}),t.duration&&k.jsxs(Kr,{type:"secondary",className:Tt.metaText,children:["⏱️ ",t.duration,"ms"]}),t.response&&k.jsxs(So,{color:l?"success":"error",children:["HTTP ",t.response.status]})]})]}),g&&k.jsx("div",{className:Tt.tokenStatsBox,children:k.jsxs("div",{className:Tt.tokenGrid,children:[k.jsxs("div",{className:Tt.tokenRows,children:[k.jsxs("div",{className:Tt.tokenRow,children:[k.jsx("span",{className:Tt.tokenLabel,children:"Token"}),k.jsxs("span",{className:Tt.tokenTd,children:["input: ",Gn(g.input)]}),k.jsxs("span",{className:Tt.tokenTd,children:["output: ",Gn(g.output)]})]}),k.jsxs("div",{className:`${Tt.tokenRow} ${Tt.tokenRowBorder}`,children:[k.jsx("span",{className:Tt.tokenLabel,children:"Cache"}),k.jsxs("span",{className:Tt.tokenTd,children:["create: ",Gn(g.cacheCreate)]}),k.jsxs("span",{className:Tt.tokenTd,children:["read: ",Gn(g.cacheRead)]})]})]}),k.jsxs("div",{className:Tt.tokenHitRate,children:[k.jsxs("div",{children:[g.hitRate,"%"]}),k.jsx("div",{className:Tt.tokenHitRateLabel,children:Ie("ui.hitRate")})]})]})})]}),k.jsx(Uh,{activeKey:n,onChange:r,items:m,size:"small",tabBarExtraContent:this.props.onViewInChat&&k.jsxs("button",{className:Tt.viewInChatBtn,onClick:this.props.onViewInChat,children:[Ie("ui.viewInChat"),k.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{marginLeft:4},children:k.jsx("path",{d:"M4.5 2.5L8 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})})]})}}const XD=["system-reminder","local-command-caveat","project-reminder","important-instruction-reminders","file-modified-reminder","todo-reminder","user-prompt-submit-hook","local-command-stdout","command-name","task-notification","environment_details","context"];function QD(e){if(!e)return{segments:[]};const t=new RegExp("<("+XD.join("|")+")\\b[^>]*>([\\s\\S]*?)</\\1>","gi"),n=[];let r=0,o;for(;(o=t.exec(e))!==null;){if(o.index>r){const l=e.slice(r,o.index).trim();l&&n.push({type:"text",content:l})}n.push({type:"system-tag",tag:o[1],content:o[2].trim()}),r=o.index+o[0].length}if(r<e.length){const l=e.slice(r).trim();l&&n.push({type:"text",content:l})}return{segments:n}}function YD(e){const{segments:t}=QD(e);return t.length===0?{segments:[]}:{segments:t}}const JD="_wrapper_1o255_1",ZD="_header_1o255_5",eF="_filePath_1o255_12",tF="_toggle_1o255_18",nF="_code_1o255_25",Es={wrapper:JD,header:ZD,filePath:eF,toggle:tF,code:nF},{Text:GC}=na;function rF({file_path:e,old_string:t,new_string:n}){const[r,o]=u.useState(!1),l=t.split(`
|
|
558
558
|
`),s=n.split(`
|
|
559
559
|
`),c=[];return l.forEach(d=>{c.push({type:"del",text:d})}),s.forEach(d=>{c.push({type:"add",text:d})}),k.jsxs("div",{className:`diff-view ${Es.wrapper}`,children:[k.jsxs("div",{className:Es.header,children:[k.jsxs(GC,{className:Es.filePath,children:["Edit: ",e]}),k.jsx(GC,{className:Es.toggle,onClick:()=>o(d=>!d),children:Ie(r?"ui.expand":"ui.collapse")})]}),!r&&k.jsx("pre",{className:Es.code,children:c.map((d,m)=>k.jsxs("div",{className:d.type==="del"?"diff-line-del":"diff-line-add",children:[d.type==="del"?"- ":"+ ",d.text]},m))})]})}const oF="_plainResult_1uh60_1",aF="_plainTitle_1uh60_7",iF="_plainPre_1uh60_11",lF="_codeResult_1uh60_20",sF="_codeHeader_1uh60_27",cF="_codeTitle_1uh60_36",uF="_codeToggle_1uh60_41",dF="_codePre_1uh60_48",fF="_markdownBody_1uh60_57",Pr={plainResult:oF,plainTitle:aF,plainPre:iF,codeResult:lF,codeHeader:sF,codeTitle:cF,codeToggle:uF,codePre:dF,markdownBody:fF},{Text:ml}=na,pl={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",css:"css",scss:"css",less:"css",html:"html",htm:"html",xml:"xml",svg:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",sh:"shell",bash:"shell",zsh:"shell",md:"markdown",sql:"sql"},mF=["Read","Grep","Glob","Bash","Write","Edit"];function pF(e,t,n){if(!t)return null;const r=t.file_path||"";if(r){const o=r.split(".").pop().toLowerCase();if(pl[o])return pl[o]}if(e==="Bash")return"shell-output";if(e==="Glob")return"file-list";if(e==="Grep"){const o=t.glob||"";if(o){const l=o.replace(/[{}*]/g,",").split(",").filter(Boolean);for(const s of l){const c=s.replace(/^\./,"").toLowerCase();if(pl[c])return pl[c]}}if(t.output_mode==="files_with_matches"||!t.output_mode)return"file-list";if(t.output_mode==="content"&&n){const l=n.match(/^[\w/.~-]+\.([\w]+):\d+/m);if(l&&pl[l[1].toLowerCase()])return pl[l[1].toLowerCase()]}return"shell-output"}return n?gF(n):null}function gF(e){const t=e.substring(0,2e3);return/^\s*[\[{]/.test(t)&&/[}\]]\s*$/.test(t.trimEnd())?"json":/^\s*<!DOCTYPE|^\s*<html|^\s*<\?xml/i.test(t)?"html":/^#!.*python/m.test(t)||/\bdef\s+\w+\s*\(.*\)\s*:/m.test(t)||/\bclass\s+\w+.*:/m.test(t)||/^\s*(from\s+\w+\s+import|import\s+\w+)/m.test(t)&&/:$/.test(t)?"python":/\bfn\s+\w+\s*\(/.test(t)&&/\blet\s+(mut\s+)?\w+/.test(t)?"rust":/^package\s+\w+/m.test(t)&&/\bfunc\s+/.test(t)?"go":/\bpublic\s+(class|interface|static)\b/.test(t)?"java":/\bdef\s+\w+/.test(t)&&/\bend\b/.test(t)&&!/;/.test(t)?"ruby":/^#!.*\b(bash|sh|zsh)\b/m.test(t)?"shell":/\b(const|let|var)\s+\w+\s*=/.test(t)&&(/=>/.test(t)||/\brequire\s*\(/.test(t))||/^\s*import\s+.*\s+from\s+['"]/.test(t)||/^\s*export\s+(default\s+)?(function|class|const)\b/m.test(t)?"javascript":/[.#][\w-]+\s*\{[\s\S]*?:\s*[\w#]/.test(t)?"css":/^[\w-]+\s*:(\s+\S|$)/m.test(t)&&!/[{;]/.test(t)?"yaml":/\b(SELECT|INSERT|UPDATE|DELETE|CREATE\s+TABLE)\b/i.test(t)?"sql":null}const hF={javascript:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(const|let|var|function|return|if|else|for|while|class|import|export|from|default|new|this|async|await|try|catch|throw|switch|case|break|continue|typeof|instanceof|in|of|null|undefined|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],typescript:null,python:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('''[\s\S]*?'''|"""[\s\S]*?"""|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|yield|lambda|pass|break|continue|and|or|not|in|is|None|True|False|self|async|await)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],go:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`[^`]*`)/g,cls:"hl-string"},{pattern:/\b(func|return|if|else|for|range|switch|case|default|break|continue|go|defer|select|chan|map|struct|interface|package|import|var|const|type|nil|true|false|make|new|append|len|cap)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],rust:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(fn|let|mut|return|if|else|for|while|loop|match|struct|enum|impl|trait|pub|use|mod|crate|self|super|where|async|await|move|ref|true|false|Some|None|Ok|Err)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],java:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(public|private|protected|class|interface|extends|implements|return|if|else|for|while|switch|case|break|continue|new|this|super|static|final|void|int|long|double|float|boolean|char|String|import|package|try|catch|throw|throws|null|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*[fFdDlL]?)\b/g,cls:"hl-number"}],ruby:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|end|class|module|return|if|elsif|else|unless|for|while|do|begin|rescue|ensure|raise|yield|block_given\?|nil|true|false|self|require|include|attr_accessor|attr_reader)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],css:[{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/([.#][\w-]+)/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*(px|em|rem|%|vh|vw|s|ms)?)\b/g,cls:"hl-number"}],json:[{pattern:/("(?:[^"\\]|\\.)*")\s*:/g,cls:"hl-keyword"},{pattern:/:\s*("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(true|false|null)\b/g,cls:"hl-keyword"},{pattern:/\b(-?\d+\.?\d*([eE][+-]?\d+)?)\b/g,cls:"hl-number"}],shell:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(if|then|else|elif|fi|for|while|do|done|case|esac|function|return|exit|export|source|alias|cd|ls|grep|find|echo|cat|mkdir|rm|cp|mv|chmod|sudo|apt|npm|pip|git)\b/g,cls:"hl-keyword"}],sql:[{pattern:/(--.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/\b(SELECT|FROM|WHERE|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER|TABLE|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|SET|VALUES|INTO|DISTINCT|COUNT|SUM|AVG|MAX|MIN|LIKE|BETWEEN|EXISTS|CASE|WHEN|THEN|ELSE|END)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],html:[{pattern:/(<!--[\s\S]*?-->)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/(<\/?[\w-]+|\/?>)/g,cls:"hl-keyword"}],xml:null,yaml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*:/gm,cls:"hl-keyword"},{pattern:/\b(true|false|null|yes|no)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],markdown:[{pattern:/^(#{1,6}\s.*$)/gm,cls:"hl-keyword"},{pattern:/(`[^`]+`)/g,cls:"hl-string"},{pattern:/(\*\*[^*]+\*\*|__[^_]+__)/g,cls:"hl-keyword"},{pattern:/(\[[^\]]+\]\([^)]+\))/g,cls:"hl-string"}],toml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*=/gm,cls:"hl-keyword"},{pattern:/(\[[\w.-]+\])/g,cls:"hl-keyword"},{pattern:/\b(true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}]},vF=[{pattern:/(\/\/.*$|#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],yF=[{pattern:/^([\w/.~-]+:\d+[:-])/gm,cls:"hl-keyword"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],bF=[{pattern:/^(.*\.(jsx?|tsx?|mjs|cjs))$/gm,cls:"hl-string"},{pattern:/^(.*\.(py|rb|go|rs|java|c|cpp|h))$/gm,cls:"hl-keyword"},{pattern:/^(.*\.(json|ya?ml|toml|xml|html?|css|scss|less|md))$/gm,cls:"hl-number"},{pattern:/^(.*\.(log|txt|csv|jsonl))$/gm,cls:"hl-comment"}];function CF(e,t){let n=t;n==="typescript"&&(n="javascript"),n==="xml"&&(n="html"),(n==="c"||n==="cpp")&&(n="javascript");let r;n==="shell-output"?r=yF:n==="file-list"?r=bF:r=hF[n]||vF;const o=/^(\s*\d+→)/gm,l=[];let s=e.replace(o,p=>{const g=l.length;return l.push(p),`L${g}`});const c=gd(s),d=[];let m=c;for(const p of r)p.pattern.lastIndex=0,m=m.replace(p.pattern,g=>{const v=d.length;return d.push(`<span class="${p.cls}">${g}</span>`),`P${v}`});return m=m.replace(/\x02P(\d+)\x02/g,(p,g)=>d[parseInt(g)]),m=m.replace(/\x01L(\d+)\x01/g,(p,g)=>`<span class="hl-linenum">${gd(l[parseInt(g)])}</span>`),m}function KC({toolName:e,toolInput:t,resultText:n,defaultCollapsed:r}){const[o,l]=u.useState(r??!1);u.useEffect(()=>{l(r??!1)},[r]);const s=mF.includes(e),c=s?pF(e,t,n):null,d=n.length>5e3?n.substring(0,5e3)+`
|
|
560
560
|
... (truncated)`:n;let m=e?Ie("ui.toolReturnNamed",{name:e}):"Result";if(t){const g=t.file_path||t.path||"";if(g){const v=g.split("/");m=`${e}: ${v[v.length-1]}`}}if(!s)return e==="Task"?k.jsxs("div",{className:Pr.plainResult,children:[k.jsxs("div",{className:Pr.codeHeader,children:[k.jsx(ml,{type:"secondary",className:Pr.plainTitle,children:m}),k.jsx(ml,{className:Pr.codeToggle,onClick:()=>l(g=>!g),children:Ie(o?"ui.expand":"ui.collapse")})]}),!o&&k.jsx("div",{className:`chat-md ${Pr.markdownBody}`,dangerouslySetInnerHTML:{__html:pi(d)}})]}):k.jsxs("div",{className:Pr.plainResult,children:[k.jsxs("div",{className:Pr.codeHeader,children:[k.jsx(ml,{type:"secondary",className:Pr.plainTitle,children:m}),k.jsx(ml,{className:Pr.codeToggle,onClick:()=>l(g=>!g),children:Ie(o?"ui.expand":"ui.collapse")})]}),!o&&k.jsx("pre",{className:Pr.plainPre,children:d})]});const p=CF(d,c||"fallback");return k.jsxs("div",{className:`tool-result-code ${Pr.codeResult}`,children:[k.jsxs("div",{className:Pr.codeHeader,children:[k.jsxs(ml,{className:Pr.codeTitle,children:[m,c?` (${c})`:""]}),k.jsx(ml,{className:Pr.codeToggle,onClick:()=>l(g=>!g),children:Ie(o?"ui.expand":"ui.collapse")})]}),!o&&k.jsx("pre",{className:`code-highlight ${Pr.codePre}`,dangerouslySetInnerHTML:{__html:p}})]})}const SF="_tag_17wfp_1",xF="_tagActive_17wfp_22",wF="_tagLoading_17wfp_27",$F="_spinner_17wfp_32",ju={tag:SF,tagActive:xF,tagLoading:wF,spinner:$F};function EF({text:e,onTranslated:t}){const[n,r]=u.useState("idle"),o=u.useRef(null),l=u.useCallback(c=>{if(c.stopPropagation(),n==="loading")return;if(n==="done"){r("idle"),t==null||t(null);return}if(o.current){r("done"),t==null||t(o.current);return}r("loading");const d=window.location.port||"7008",m=`${window.location.protocol}//${window.location.hostname}:${d}`;fetch(`${m}/api/translate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,to:zl()})}).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{const g=p.text||"";o.current=g,r("done"),t==null||t(g)}).catch(()=>{r("idle")})},[n,e,t]),s=Ie(n==="loading"?"ui.translating":"ui.translate");return k.jsxs("span",{className:`${ju.tag} ${n==="done"?ju.tagActive:""} ${n==="loading"?ju.tagLoading:""}`,onClick:l,children:[n==="loading"&&k.jsx("span",{className:ju.spinner}),s]})}const RF="_avatar_1od17_3",OF="_avatarImg_1od17_13",kF="_messageRow_1od17_32",_F="_messageRowEnd_1od17_38",IF="_contentCol_1od17_47",TF="_contentColLimited_1od17_52",NF="_labelRow_1od17_60",jF="_labelRight_1od17_67",PF="_labelText_1od17_75",zF="_timeText_1od17_79",MF="_timeTextNoMargin_1od17_85",LF="_labelTextRight_1od17_91",BF="_bubbleUser_1od17_98 _bubble_1od17_21",AF="_bubbleAssistant_1od17_104 _bubble_1od17_21",DF="_bubbleHighlight_1od17_112",FF="_bubbleHighlightFading_1od17_116",HF="_borderSvg_1od17_121",VF="_borderSvgFading_1od17_130",WF="_borderRect_1od17_135",qF="_bubblePlan_1od17_144 _bubble_1od17_21",UF="_bubbleSubAgent_1od17_152 _bubble_1od17_21",GF="_bubbleSelection_1od17_158 _bubble_1od17_21",KF="_systemTagLabel_1od17_166",XF="_skillLabel_1od17_170",QF="_systemTagPre_1od17_175",YF="_collapseMargin_1od17_183",JF="_collapseNoMargin_1od17_187",ZF="_thinkingLabel_1od17_193",eH="_toolBox_1od17_199",tH="_toolLabel_1od17_208",nH="_codePre_1od17_214",rH="_pathTag_1od17_226",oH="_descSpan_1od17_233",aH="_secondarySpan_1od17_238",iH="_patternSpan_1od17_242",lH="_kvContainer_1od17_248",sH="_kvItem_1od17_253",cH="_kvKey_1od17_257",uH="_kvValue_1od17_261",dH="_toolResult_1od17_267",fH="_toolResultLabel_1od17_276",mH="_compactLabel_1od17_282",pH="_compactPre_1od17_287",gH="_viewRequestBtn_1od17_297",hH="_optionList_1od17_311",vH="_optionDesc_1od17_315",yH="_questionText_1od17_323",bH="_questionSpacing_1od17_329",CH="_option_1od17_311",et={avatar:RF,avatarImg:OF,messageRow:kF,messageRowEnd:_F,contentCol:IF,contentColLimited:TF,labelRow:NF,labelRight:jF,labelText:PF,timeText:zF,timeTextNoMargin:MF,labelTextRight:LF,bubbleUser:BF,bubbleAssistant:AF,bubbleHighlight:DF,bubbleHighlightFading:FF,borderSvg:HF,borderSvgFading:VF,borderRect:WF,bubblePlan:qF,bubbleSubAgent:UF,bubbleSelection:GF,systemTagLabel:KF,skillLabel:XF,systemTagPre:QF,collapseMargin:YF,collapseNoMargin:JF,thinkingLabel:ZF,toolBox:eH,toolLabel:tH,codePre:nH,pathTag:rH,descSpan:oH,secondarySpan:aH,patternSpan:iH,kvContainer:lH,kvItem:sH,kvKey:cH,kvValue:uH,toolResult:dH,toolResultLabel:fH,compactLabel:mH,compactPre:pH,viewRequestBtn:gH,optionList:hH,optionDesc:vH,questionText:yH,questionSpacing:bH,option:CH},{Text:yo}=na;class Ba extends J.Component{constructor(n){super(n);jt(this,"handleThinkingTranslated",(n,r)=>{this.setState(o=>({thinkingTranslated:{...o.thinkingTranslated,[n]:r?pi(r):null}}))});this.state={thinkingTranslated:{}}}formatTime(n){if(!n)return null;try{const r=new Date(n),o=l=>String(l).padStart(2,"0");return`${o(r.getMonth()+1)}-${o(r.getDate())} ${o(r.getHours())}:${o(r.getMinutes())}:${o(r.getSeconds())}`}catch{return null}}renderViewRequestBtn(){const{requestIndex:n,onViewRequest:r}=this.props;return n==null||!r?null:k.jsx("span",{className:et.viewRequestBtn,onClick:o=>{o.stopPropagation(),r(n)},children:Ie("ui.viewRequest")})}renderLabel(n,r){const{timestamp:o}=this.props,l=this.formatTime(o);return k.jsxs("div",{className:et.labelRow,children:[k.jsxs(yo,{type:"secondary",className:et.labelText,children:[n,r||""]}),k.jsxs("span",{className:et.labelRight,children:[this.renderViewRequestBtn(),l&&k.jsx(yo,{className:et.timeText,children:l})]})]})}renderUserAvatar(n){const{userProfile:r}=this.props;return r!=null&&r.avatar?k.jsx("img",{src:r.avatar,className:et.avatarImg,alt:r.name||"User"}):k.jsx("div",{className:et.avatar,style:{background:n},dangerouslySetInnerHTML:{__html:Ts("user")}})}getUserName(){const{userProfile:n}=this.props;return(n==null?void 0:n.name)||"User"}renderSegments(n){return n.map((r,o)=>r.type==="system-tag"?k.jsx(yl,{ghost:!0,size:"small",items:[{key:"1",label:k.jsx(yo,{type:"secondary",className:et.systemTagLabel,children:r.tag}),children:k.jsx("pre",{className:et.systemTagPre,children:r.content})}],className:et.collapseMargin},o):k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:pi(r.content)}},o))}renderToolCall(n){if(typeof n.input=="string")try{const p=n.input.replace(/^\[object Object\]/,"");n={...n,input:JSON.parse(p)}}catch{}if(n.name==="Edit"&&n.input&&n.input.old_string!=null&&n.input.new_string!=null)return k.jsx(rF,{file_path:n.input.file_path||"",old_string:n.input.old_string,new_string:n.input.new_string},n.id);const r=n.input&&typeof n.input=="object"?n.input:{},o=(p,g)=>k.jsxs("div",{className:et.toolBox,children:[k.jsx(yo,{strong:!0,className:et.toolLabel,children:p}),g]},n.id),l=(p,g)=>k.jsx("pre",{className:et.codePre,style:{color:g},children:p}),s=p=>k.jsx("span",{className:et.pathTag,children:p});if(n.name==="Bash"){const p=r.command||"",g=r.description||"";return o(k.jsxs(k.Fragment,{children:["Bash",g?k.jsxs("span",{className:et.descSpan,children:[" — ",g]}):""]}),l(p,"#c9d1d9"))}if(n.name==="Read"){const p=r.file_path||"",g=[];r.offset&&g.push(`offset: ${r.offset}`),r.limit&&g.push(`limit: ${r.limit}`);const v=g.length?` (${g.join(", ")})`:"";return o(k.jsxs(k.Fragment,{children:["Read: ",s(p),k.jsx("span",{className:et.secondarySpan,children:v})]}),null)}if(n.name==="Write"){const p=r.file_path||"",g=r.content||"",v=g.split(`
|
|
561
561
|
`),y=v.length>20?v.slice(0,20).join(`
|
|
562
562
|
`)+`
|
|
563
|
-
... (${v.length} lines total)`:g;return o(k.jsxs(k.Fragment,{children:["Write: ",s(p)," ",k.jsxs("span",{className:et.secondarySpan,children:["(",v.length," lines)"]})]}),l(y,"#c9d1d9"))}if(n.name==="Glob"){const p=r.pattern||"",g=r.path||"";return o(k.jsxs(k.Fragment,{children:["Glob: ",k.jsx("span",{className:et.patternSpan,children:p}),g?k.jsxs("span",{className:et.secondarySpan,children:[" in ",g]}):""]}),null)}if(n.name==="Grep"){const p=r.pattern||"",g=r.path||"",v=[];r.glob&&v.push(`glob: ${r.glob}`),r.output_mode&&v.push(`mode: ${r.output_mode}`),r.head_limit&&v.push(`limit: ${r.head_limit}`);const y=v.length?` (${v.join(", ")})`:"";return o(k.jsxs(k.Fragment,{children:["Grep: ",k.jsxs("span",{className:et.patternSpan,children:["/",p,"/"]}),g?k.jsxs("span",{className:et.secondarySpan,children:[" in ",g]}):"",k.jsx("span",{className:et.secondarySpan,children:y})]}),null)}if(n.name==="Task"){const p=r.subagent_type||"",g=r.description||"";return o(k.jsxs(k.Fragment,{children:["Task(",p,g?": "+g:"",")"]}),null)}let c=n.name;const d=Object.keys(r);if(d.length===0)return o(c,null);const m=d.map(p=>{const g=r[p],v=typeof g=="string"?g:JSON.stringify(g),y=v.length>200?v.substring(0,200)+"...":v;return k.jsxs("div",{className:et.kvItem,children:[k.jsxs("span",{className:et.kvKey,children:[p,": "]}),k.jsx("span",{className:et.kvValue,children:y})]},p)});return o(c,k.jsx("div",{className:et.kvContainer,children:m}))}renderUserMessage(){const{text:n,timestamp:r}=this.props,o=this.formatTime(r),l=this.getUserName();return n&&n.includes("This session is being continued from a previous conversation that ran out of context")?k.jsxs("div",{className:et.messageRowEnd,children:[k.jsxs("div",{className:et.contentColLimited,children:[k.jsxs("div",{className:et.labelRow,children:[o&&k.jsx(yo,{className:et.timeTextNoMargin,children:o}),this.renderViewRequestBtn(),k.jsxs(yo,{type:"secondary",className:et.labelTextRight,children:[l," — /compact"]})]}),k.jsx("div",{className:et.bubbleUser,children:k.jsx(yl,{ghost:!0,size:"small",items:[{key:"1",label:k.jsx(yo,{className:et.compactLabel,children:"Compact Summary"}),children:k.jsx("pre",{className:et.compactPre,children:n})}],className:et.collapseNoMargin})})]}),this.renderUserAvatar("#1e40af")]}):k.jsxs("div",{className:et.messageRowEnd,children:[k.jsxs("div",{className:et.contentColLimited,children:[k.jsxs("div",{className:et.labelRow,children:[o&&k.jsx(yo,{className:et.timeTextNoMargin,children:o}),this.renderViewRequestBtn(),k.jsx(yo,{type:"secondary",className:et.labelTextRight,children:l})]}),k.jsx("div",{className:et.bubbleUser,children:gd(n)})]}),this.renderUserAvatar("#1e40af")]})}renderToolResult(n){return n?k.jsxs("div",{className:et.toolResult,children:[k.jsx(yo,{type:"secondary",className:et.toolResultLabel,children:n.label}),k.jsx(KC,{toolName:n.toolName,toolInput:n.toolInput,resultText:n.resultText,defaultCollapsed:this.props.collapseToolResults})]}):null}renderAssistantMessage(){const{content:n,toolResultMap:r={},modelInfo:o}=this.props,l=n.filter(m=>m.type==="thinking"),s=n.filter(m=>m.type==="text"),c=n.filter(m=>m.type==="tool_use");let d=[];return l.forEach((m,p)=>{const v=this.state.thinkingTranslated[p]||pi(m.thinking||"");d.push(k.jsx(yl,{ghost:!0,size:"small",defaultActiveKey:this.props.expandThinking?["1"]:[],items:[{key:"1",label:k.jsxs("span",{children:[k.jsx(yo,{type:"secondary",className:et.thinkingLabel,children:Ie("ui.thinking")}),k.jsx(EF,{text:m.thinking||"",onTranslated:y=>this.handleThinkingTranslated(p,y)})]}),children:k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:v}})}],className:et.collapseMargin},`think-${p}-${this.props.expandThinking?"e":"c"}`))}),s.forEach((m,p)=>{if(m.text){const{segments:g}=YD(m.text);d.push(k.jsx("div",{children:this.renderSegments(g)},`text-${p}`))}}),c.forEach(m=>{d.push(this.renderToolCall(m));const p=r[m.id];p&&d.push(k.jsx(J.Fragment,{children:this.renderToolResult(p)},`tr-${m.id}`))}),d.length===0?null:k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{className:et.avatar,style:{background:(o==null?void 0:o.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(o==null?void 0:o.svg)||Ts("agent")}}),k.jsxs("div",{className:et.contentCol,children:[this.renderLabel((o==null?void 0:o.name)||"MainAgent"),k.jsxs("div",{className:`${et.bubbleAssistant}${this.props.highlight==="active"?" "+et.bubbleHighlight:""}${this.props.highlight==="fading"?" "+et.bubbleHighlightFading:""}`,children:[(this.props.highlight==="active"||this.props.highlight==="fading")&&k.jsx("svg",{className:`${et.borderSvg}${this.props.highlight==="fading"?" "+et.borderSvgFading:""}`,preserveAspectRatio:"none",children:k.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"8",ry:"8",fill:"none",stroke:"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",className:et.borderRect})}),d]})]})]})}renderSubAgentMessage(){const{label:n,resultText:r,toolName:o,toolInput:l}=this.props;return k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{className:et.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Ts("sub")}}),k.jsxs("div",{className:et.contentCol,children:[this.renderLabel(n),k.jsx("div",{className:et.bubbleSubAgent,children:k.jsx(KC,{toolName:o,toolInput:l,resultText:r})})]})]})}renderUserSelectionMessage(){const{questions:n,answers:r}=this.props,o=this.getUserName();return k.jsxs("div",{className:et.messageRowEnd,children:[k.jsxs("div",{className:et.contentColLimited,children:[this.renderLabel(o," — 选择"),k.jsx("div",{className:et.bubbleSelection,children:n&&n.map((l,s)=>{const c=(r==null?void 0:r[l.question])||"未选择";return k.jsxs("div",{className:s<n.length-1?et.questionSpacing:void 0,children:[k.jsx("div",{className:et.questionText,children:l.question}),k.jsx("div",{className:et.optionList,children:l.options&&l.options.map((d,m)=>{const p=c===d.label;return k.jsxs("div",{className:et.option,style:{color:p?"#e5e5e5":"#666",fontWeight:p?600:"normal"},children:[p?"● ":"○ ",d.label,d.description&&k.jsxs("span",{className:et.optionDesc,children:["— ",d.description]})]},m)})})]},s)})})]}),this.renderUserAvatar("#2ea043")]})}renderPlanPromptMessage(){const{text:n,timestamp:r,modelInfo:o}=this.props;this.formatTime(r);const l=(n||"").replace(/^Implement the following plan:\s*/i,"");return k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{className:et.avatar,style:{background:(o==null?void 0:o.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(o==null?void 0:o.svg)||Ts("agent")}}),k.jsxs("div",{className:et.contentColLimited,children:[this.renderLabel((o==null?void 0:o.name)||"MainAgent"," (Plan)"),k.jsx("div",{className:et.bubblePlan,children:k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:pi(l)}})})]})]})}renderSkillLoadedMessage(){const{text:n,skillName:r,timestamp:o}=this.props,l=this.formatTime(o);return k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{style:{width:32,flexShrink:0}}),k.jsx("div",{className:et.contentCol,children:k.jsx(yl,{ghost:!0,size:"small",items:[{key:"1",label:k.jsxs("span",{className:et.skillLabel,children:["📦 ",Ie("ui.skillLoaded"),": ",r,l&&k.jsx(yo,{className:et.timeTextNoMargin,style:{marginLeft:8},children:l})]}),children:k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:pi(n)}})}],className:et.collapseNoMargin})})]})}render(){const{role:n}=this.props;return n==="user"?this.renderUserMessage():n==="skill-loaded"?this.renderSkillLoadedMessage():n==="plan-prompt"?this.renderPlanPromptMessage():n==="user-selection"?this.renderUserSelectionMessage():n==="assistant"?this.renderAssistantMessage():n==="sub-agent"?this.renderSubAgentMessage():null}}const SH="_centerEmpty_1j3v3_1",xH="_container_1j3v3_8",wH="_sessionDividerText_1j3v3_16",$H="_lastResponseLabel_1j3v3_21",Rs={centerEmpty:SH,container:xH,sessionDividerText:wH,lastResponseLabel:$H},{Text:XC}=na,EH=20;function RH(){return 100+Math.random()*50}class OH extends J.Component{constructor(t){super(t),this.containerRef=J.createRef(),this.state={visibleCount:0,loading:!1,allItems:[],highlightTs:null,highlightFading:!1},this._queueTimer=null,this._prevItemsLen=0,this._scrollTargetIdx=null,this._scrollTargetRef=J.createRef(),this._scrollFadeTimer=null}componentDidMount(){this.startRender()}componentDidUpdate(t){if(t.mainAgentSessions!==this.props.mainAgentSessions)this.startRender();else if(t.collapseToolResults!==this.props.collapseToolResults||t.expandThinking!==this.props.expandThinking){const n=this.buildAllItems();this.setState({allItems:n,visibleCount:n.length})}}componentWillUnmount(){this._queueTimer&&clearTimeout(this._queueTimer),this._fadeClearTimer&&clearTimeout(this._fadeClearTimer),this._unbindScrollFade()}startRender(){this._queueTimer&&clearTimeout(this._queueTimer);const t=this.buildAllItems(),n=this._prevItemsLen;this._prevItemsLen=t.length;const r=t.length-n;if(r<=0||n>0&&r<=3){this.setState({allItems:t,visibleCount:t.length,loading:!1},()=>this.scrollToBottom());return}if(t.length>EH)this.setState({allItems:t,visibleCount:0,loading:!0}),this._queueTimer=setTimeout(()=>{this.setState({visibleCount:t.length,loading:!1},()=>this.scrollToBottom())},300);else{const o=Math.max(0,n);this.setState({allItems:t,visibleCount:o,loading:!1}),this.queueNext(o,t.length)}}queueNext(t,n){t>=n||(this._queueTimer=setTimeout(()=>{this.setState({visibleCount:t+1},()=>{this.scrollToBottom(),this.queueNext(t+1,n)})},RH()))}_isNearBottom(){const t=this.containerRef.current;return t?t.scrollHeight-t.scrollTop-t.clientHeight<=5:!0}scrollToBottom(){if(this._scrollTargetRef.current){const t=this._scrollTargetRef.current,n=this.containerRef.current;n&&t.offsetHeight>n.clientHeight?t.scrollIntoView({block:"start",behavior:"instant"}):t.scrollIntoView({block:"center",behavior:"instant"});const r=this.props.scrollToTimestamp;this._scrollTargetRef=J.createRef(),r&&(this.setState({highlightTs:r,highlightFading:!1}),this._bindScrollFade()),this.props.onScrollTsDone&&this.props.onScrollTsDone();return}if(this._isNearBottom()){const t=this.containerRef.current;t&&(t.scrollTop=t.scrollHeight)}}_bindScrollFade(){this._unbindScrollFade();const t=this.containerRef.current;t&&(this._scrollFadeIgnoreFirst=!0,this._onScrollFade=()=>{if(this._scrollFadeIgnoreFirst){this._scrollFadeIgnoreFirst=!1;return}this.setState({highlightFading:!0}),this._fadeClearTimer=setTimeout(()=>{this.setState({highlightTs:null,highlightFading:!1})},2e3),this._unbindScrollFade()},t.addEventListener("scroll",this._onScrollFade))}_unbindScrollFade(){this._onScrollFade&&this.containerRef.current&&(this.containerRef.current.removeEventListener("scroll",this._onScrollFade),this._onScrollFade=null)}renderSessionMessages(t,n,r,o){var v;const{userProfile:l,collapseToolResults:s,expandThinking:c,onViewRequest:d}=this.props,m={};for(const y of t)if(y.role==="assistant"&&Array.isArray(y.content))for(const C of y.content)C.type==="tool_use"&&(m[C.id]=C);const p={};for(const y of t)if(y.role==="user"&&Array.isArray(y.content)){for(const C of y.content)if(C.type==="tool_result"){const S=m[C.tool_use_id];let b=Ie("ui.toolReturn"),$=null,w=null;if(S)if($=S.name,w=S.input,S.name==="Task"&&S.input){const R=S.input.subagent_type||"",I=S.input.description||"";b=`SubAgent: ${R}${I?" — "+I:""}`}else b=Ie("ui.toolReturnNamed",{name:S.name});p[C.tool_use_id]={label:b,toolName:$,toolInput:w,resultText:MC(C)}}}const g=[];for(let y=0;y<t.length;y++){const C=t[y],S=C.content,b=C._timestamp||null,$=b?o[b]:void 0,w=$!=null&&d?{requestIndex:$,onViewRequest:d}:{};if(C.role==="user"){if(Array.isArray(S)){const R=S.find(_=>_.type==="text"&&/^\[SUGGESTION MODE:/i.test((_.text||"").trim())),I=S.filter(_=>_.type==="tool_result");if(R&&I.length>0){let _=null,O={};for(const T of I){const N=m[T.tool_use_id];if(N&&N.name==="AskUserQuestion"&&((v=N.input)!=null&&v.questions)){_=N.input.questions;const j=MC(T);try{O=JSON.parse(j).answers||{}}catch{}break}}_&&g.push(k.jsx(Ba,{role:"user-selection",questions:_,answers:O,timestamp:b,userProfile:l,...w},`${n}-selection-${y}`))}else{const{commands:_,textBlocks:O,skillBlocks:T}=J2(S);for(let N=0;N<_.length;N++)g.push(k.jsx(Ba,{role:"user",text:_[N],timestamp:b,userProfile:l,modelInfo:r,...w},`${n}-cmd-${y}-${N}`));for(const N of T){const j=N.text.match(/^#\s+(.+)$/m),P=j?j[1]:"Skill";g.push(k.jsx(Ba,{role:"skill-loaded",text:N.text,skillName:P,timestamp:b,...w},`${n}-skill-${y}`))}for(let N=0;N<O.length;N++){const j=/^Implement the following plan:/i.test((O[N].text||"").trim());g.push(k.jsx(Ba,{role:j?"plan-prompt":"user",text:O[N].text,timestamp:b,userProfile:l,modelInfo:r,...w},`${n}-user-${y}-${N}`))}}}else if(typeof S=="string"&&!Zh(S)){const R=/^Implement the following plan:/i.test(S.trim());g.push(k.jsx(Ba,{role:R?"plan-prompt":"user",text:S,timestamp:b,userProfile:l,modelInfo:r,...w},`${n}-user-${y}`))}}else C.role==="assistant"&&(Array.isArray(S)?g.push(k.jsx(Ba,{role:"assistant",content:S,toolResultMap:p,timestamp:b,modelInfo:r,collapseToolResults:s,expandThinking:c,...w},`${n}-asst-${y}`)):typeof S=="string"&&g.push(k.jsx(Ba,{role:"assistant",content:[{type:"text",text:S}],toolResultMap:p,timestamp:b,modelInfo:r,collapseToolResults:s,expandThinking:c,...w},`${n}-asst-${y}`)))}return g}buildAllItems(){var v;const{mainAgentSessions:t,requests:n,collapseToolResults:r,expandThinking:o,onViewRequest:l}=this.props;if(!t||t.length===0)return[];const s={};if(n)for(let y=0;y<n.length;y++)vr(n[y])&&n[y].timestamp&&(s[n[y].timestamp]=y);let c=null;if(n){for(let y=n.length-1;y>=0;y--)if(vr(n[y])&&((v=n[y].body)!=null&&v.model)){c=n[y].body.model;break}}const d=_L(c),m=[],p={};t.forEach((y,C)=>{var b,$;C>0&&m.push(k.jsx(uC,{style:{borderColor:"#333",margin:"16px 0"},children:k.jsx(XC,{className:Rs.sessionDividerText,children:"Session"})},`session-div-${C}`));const S=this.renderSessionMessages(y.messages,`s${C}`,d,s);for(const w of S)w.props.timestamp&&(p[w.props.timestamp]=m.length),m.push(w);if(C===t.length-1&&(($=(b=y.response)==null?void 0:b.body)!=null&&$.content)){const w=y.response.body.content;Array.isArray(w)&&(m.push(k.jsx(J.Fragment,{children:k.jsx(uC,{style:{borderColor:"#2a2a2a",margin:"8px 0"},children:k.jsx(XC,{type:"secondary",className:Rs.lastResponseLabel,children:Ie("ui.lastResponse")})})},"resp-divider")),m.push(k.jsx(Ba,{role:"assistant",content:w,modelInfo:d,collapseToolResults:r,expandThinking:o,toolResultMap:{}},"resp-asst")))}});const{scrollToTimestamp:g}=this.props;return this._scrollTargetIdx=g&&p[g]!=null?p[g]:null,this._tsItemMap=p,m}render(){const{mainAgentSessions:t}=this.props,{allItems:n,visibleCount:r,loading:o}=this.state;if(!t||t.length===0)return k.jsx("div",{className:Rs.centerEmpty,children:k.jsx(Lo,{description:Ie("ui.noChat")})});if(o)return k.jsx("div",{className:Rs.centerEmpty,children:k.jsx(Vl,{size:"large"})});const l=this._scrollTargetIdx,{highlightTs:s,highlightFading:c}=this.state,d=s&&this._tsItemMap&&this._tsItemMap[s]!=null?this._tsItemMap[s]:null,m=n.slice(0,r);return k.jsx("div",{ref:this.containerRef,className:Rs.container,children:m.map((p,g)=>{const v=g===l,y=g===d;let C=p;return y&&C.props.role==="assistant"&&(C=J.cloneElement(C,{highlight:c?"fading":"active"})),v?k.jsx("div",{ref:this._scrollTargetRef,children:C},p.key+"-anchor"):C})})}}const kH="_resizer_yamj2_1",_H={resizer:kH};class IH extends J.Component{constructor(t){super(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(t){t.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(t){this.props.onResize&&this.props.onResize(t.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return k.jsx("div",{onMouseDown:this.handleMouseDown,className:_H.resizer})}}const TH="_layout_1drw4_1",NH="_header_1drw4_6",jH="_content_1drw4_14",PH="_mainContainer_1drw4_19",zH="_leftPanel_1drw4_24",MH="_leftPanelHeader_1drw4_32",LH="_leftPanelCount_1drw4_43",BH="_leftPanelBody_1drw4_49",AH="_rightPanel_1drw4_54",DH="_modalActions_1drw4_60",FH="_spinCenter_1drw4_64",HH="_emptyCenter_1drw4_69",VH="_logCheckbox_1drw4_75",WH="_logListItem_1drw4_79",qH="_logItemRow_1drw4_84",UH="_logFileName_1drw4_101",GH="_logFileIcon_1drw4_114",KH="_folderIcon_1drw4_120",XH="_logTag_1drw4_124",QH="_loadingOverlay_1drw4_128",YH="_loadingText_1drw4_141",JH="_footer_1drw4_147",ZH="_footerRight_1drw4_157",eV="_footerLink_1drw4_165",tV="_footerIcon_1drw4_177",nV="_footerDivider_1drw4_182",rV="_guideContainer_1drw4_190",oV="_guideContent_1drw4_198",aV="_guideIcon_1drw4_203",iV="_guideTitle_1drw4_208",lV="_guideStep_1drw4_215",sV="_guideStepNum_1drw4_221",cV="_guideStepBody_1drw4_236",uV="_guideText_1drw4_241",dV="_guideCode_1drw4_248",Dt={layout:TH,header:NH,content:jH,mainContainer:PH,leftPanel:zH,leftPanelHeader:MH,leftPanelCount:LH,leftPanelBody:BH,rightPanel:AH,modalActions:DH,spinCenter:FH,emptyCenter:HH,logCheckbox:VH,logListItem:WH,logItemRow:qH,logFileName:UH,logFileIcon:GH,folderIcon:KH,logTag:XH,loadingOverlay:QH,loadingText:YH,footer:JH,footerRight:ZH,footerLink:eV,footerIcon:tV,footerDivider:nV,guideContainer:rV,guideContent:oV,guideIcon:aV,guideTitle:iV,guideStep:lV,guideStepNum:sV,guideStepBody:cV,guideText:uV,guideCode:dV};class fV extends J.Component{constructor(n){super(n);jt(this,"handleSelectRequest",n=>{this.setState({selectedIndex:n,scrollCenter:!1})});jt(this,"handleViewRequest",n=>{this.setState({viewMode:"raw",selectedIndex:n,scrollCenter:!0})});jt(this,"handleViewInChat",()=>{this.setState(n=>{const o=(n.showAll?n.requests:ma(n.requests))[n.selectedIndex];if(!o)return null;let l=null;if(vr(o)&&o.timestamp)l=o.timestamp;else{const s=n.requests.indexOf(o);s>=0&&(l=LC(n.requests,s)),l||bo.info(Ie("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:l}})});jt(this,"handleToggleViewMode",()=>{this.setState(n=>{const r=n.viewMode==="raw"?"chat":"raw";if(r==="raw"){if(n.selectedIndex===null){const s=n.showAll?n.requests:ma(n.requests);return{viewMode:r,selectedIndex:s.length>0?s.length-1:null,scrollCenter:!0}}return{viewMode:r,scrollCenter:!0}}const o=n.showAll?n.requests:ma(n.requests),l=n.selectedIndex!=null?o[n.selectedIndex]:null;if(l){let s=null;if(vr(l)&&l.timestamp)s=l.timestamp;else{const c=n.requests.indexOf(l);c>=0&&(s=LC(n.requests,c)),s||bo.info(Ie("ui.cannotMap"))}return{viewMode:r,chatScrollToTs:s}}return{viewMode:r,chatScrollToTs:null}})});jt(this,"handleLangChange",()=>{const n=zl();this.setState({lang:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:n})}).catch(()=>{})});jt(this,"handleCollapseToolResultsChange",n=>{this.setState({collapseToolResults:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collapseToolResults:n})}).catch(()=>{})});jt(this,"handleExpandThinkingChange",n=>{this.setState({expandThinking:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandThinking:n})}).catch(()=>{})});jt(this,"handleExpandDiffChange",n=>{this.setState({expandDiff:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandDiff:n})}).catch(()=>{})});jt(this,"handleFilterIrrelevantChange",n=>{this.setState(r=>{const o=!n,l=o?r.requests:ma(r.requests);return{showAll:o,selectedIndex:l.length>0?l.length-1:null}}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filterIrrelevant:n})}).catch(()=>{})});jt(this,"handleTabChange",n=>{this.setState({currentTab:n})});jt(this,"handleResize",n=>{const r=this.mainContainerRef.current;if(!r)return;const o=r.getBoundingClientRect(),l=n-o.left;l>=250&&l<=800&&this.setState({leftPanelWidth:l})});jt(this,"handleImportLocalLogs",()=>{this.setState({importModalVisible:!0,localLogsLoading:!0}),fetch("/api/local-logs").then(n=>n.json()).then(n=>{const{_currentProject:r,...o}=n;this.setState({localLogs:o,currentProject:r||"",localLogsLoading:!1})}).catch(()=>{this.setState({localLogs:{},localLogsLoading:!1})})});jt(this,"handleCloseImportModal",()=>{this.setState({importModalVisible:!1,selectedLogs:{}})});jt(this,"handleToggleLogSelect",(n,r,o)=>{this.setState(l=>{const s={...l.selectedLogs},c=new Set(s[n]||[]);return o?c.add(r):c.delete(r),c.size===0?delete s[n]:s[n]=c,{selectedLogs:s}})});jt(this,"handleMergeLogs",n=>{const{selectedLogs:r,localLogs:o}=this.state,l=r[n];if(!l||l.size<2)return;const s=o[n],c=[];s.forEach((p,g)=>{l.has(p.file)&&c.push(g)}),c.sort((p,g)=>p-g);for(let p=1;p<c.length;p++)if(c[p]-c[p-1]!==1){bo.warning(Ie("ui.mergeNotConsecutive"));return}if(c.reduce((p,g)=>p+s[g].size,0)>500*1024*1024){bo.warning(Ie("ui.mergeTooLarge"));return}const m=c.map(p=>s[p].file).reverse();fetch("/api/merge-logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:m})}).then(p=>p.json()).then(p=>{p.ok?(bo.success(Ie("ui.mergeSuccess")),this.setState({selectedLogs:{}}),this.handleImportLocalLogs()):bo.error(p.error||"Merge failed")}).catch(()=>bo.error("Merge failed"))});jt(this,"handleOpenLogFile",n=>{const r=window.location.port||window.location.host.split(":")[1]||"7008";window.open(`${window.location.protocol}//${window.location.hostname}:${r}?logfile=${encodeURIComponent(n)}`,"_blank"),this.setState({importModalVisible:!1})});jt(this,"handleResumeChoice",n=>{fetch("/api/resume-choice",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({choice:n})}).catch(r=>console.error("resume-choice failed:",r))});jt(this,"handleLoadLocalJsonlFile",()=>{const n=document.createElement("input");n.type="file",n.accept=".jsonl",n.onchange=r=>{const o=r.target.files[0];if(!o)return;if(o.size>500*1024*1024){bo.error(Ie("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});const l=new FileReader;l.onload=s=>{try{const d=s.target.result.split(`
|
|
563
|
+
... (${v.length} lines total)`:g;return o(k.jsxs(k.Fragment,{children:["Write: ",s(p)," ",k.jsxs("span",{className:et.secondarySpan,children:["(",v.length," lines)"]})]}),l(y,"#c9d1d9"))}if(n.name==="Glob"){const p=r.pattern||"",g=r.path||"";return o(k.jsxs(k.Fragment,{children:["Glob: ",k.jsx("span",{className:et.patternSpan,children:p}),g?k.jsxs("span",{className:et.secondarySpan,children:[" in ",g]}):""]}),null)}if(n.name==="Grep"){const p=r.pattern||"",g=r.path||"",v=[];r.glob&&v.push(`glob: ${r.glob}`),r.output_mode&&v.push(`mode: ${r.output_mode}`),r.head_limit&&v.push(`limit: ${r.head_limit}`);const y=v.length?` (${v.join(", ")})`:"";return o(k.jsxs(k.Fragment,{children:["Grep: ",k.jsxs("span",{className:et.patternSpan,children:["/",p,"/"]}),g?k.jsxs("span",{className:et.secondarySpan,children:[" in ",g]}):"",k.jsx("span",{className:et.secondarySpan,children:y})]}),null)}if(n.name==="Task"){const p=r.subagent_type||"",g=r.description||"";return o(k.jsxs(k.Fragment,{children:["Task(",p,g?": "+g:"",")"]}),null)}let c=n.name;const d=Object.keys(r);if(d.length===0)return o(c,null);const m=d.map(p=>{const g=r[p],v=typeof g=="string"?g:JSON.stringify(g),y=v.length>200?v.substring(0,200)+"...":v;return k.jsxs("div",{className:et.kvItem,children:[k.jsxs("span",{className:et.kvKey,children:[p,": "]}),k.jsx("span",{className:et.kvValue,children:y})]},p)});return o(c,k.jsx("div",{className:et.kvContainer,children:m}))}renderUserMessage(){const{text:n,timestamp:r}=this.props,o=this.formatTime(r),l=this.getUserName();return n&&n.includes("This session is being continued from a previous conversation that ran out of context")?k.jsxs("div",{className:et.messageRowEnd,children:[k.jsxs("div",{className:et.contentColLimited,children:[k.jsxs("div",{className:et.labelRow,children:[o&&k.jsx(yo,{className:et.timeTextNoMargin,children:o}),this.renderViewRequestBtn(),k.jsxs(yo,{type:"secondary",className:et.labelTextRight,children:[l," — /compact"]})]}),k.jsx("div",{className:et.bubbleUser,children:k.jsx(yl,{ghost:!0,size:"small",items:[{key:"1",label:k.jsx(yo,{className:et.compactLabel,children:"Compact Summary"}),children:k.jsx("pre",{className:et.compactPre,children:n})}],className:et.collapseNoMargin})})]}),this.renderUserAvatar("#1e40af")]}):k.jsxs("div",{className:et.messageRowEnd,children:[k.jsxs("div",{className:et.contentColLimited,children:[k.jsxs("div",{className:et.labelRow,children:[o&&k.jsx(yo,{className:et.timeTextNoMargin,children:o}),this.renderViewRequestBtn(),k.jsx(yo,{type:"secondary",className:et.labelTextRight,children:l})]}),k.jsx("div",{className:et.bubbleUser,children:gd(n)})]}),this.renderUserAvatar("#1e40af")]})}renderToolResult(n){return n?k.jsxs("div",{className:et.toolResult,children:[k.jsx(yo,{type:"secondary",className:et.toolResultLabel,children:n.label}),k.jsx(KC,{toolName:n.toolName,toolInput:n.toolInput,resultText:n.resultText,defaultCollapsed:this.props.collapseToolResults})]}):null}renderAssistantMessage(){const{content:n,toolResultMap:r={},modelInfo:o}=this.props,l=n.filter(m=>m.type==="thinking"),s=n.filter(m=>m.type==="text"),c=n.filter(m=>m.type==="tool_use");let d=[];return l.forEach((m,p)=>{const v=this.state.thinkingTranslated[p]||pi(m.thinking||"");d.push(k.jsx(yl,{ghost:!0,size:"small",defaultActiveKey:this.props.expandThinking?["1"]:[],items:[{key:"1",label:k.jsxs("span",{children:[k.jsx(yo,{type:"secondary",className:et.thinkingLabel,children:Ie("ui.thinking")}),k.jsx(EF,{text:m.thinking||"",onTranslated:y=>this.handleThinkingTranslated(p,y)})]}),children:k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:v}})}],className:et.collapseMargin},`think-${p}-${this.props.expandThinking?"e":"c"}`))}),s.forEach((m,p)=>{if(m.text){const{segments:g}=YD(m.text);d.push(k.jsx("div",{children:this.renderSegments(g)},`text-${p}`))}}),c.forEach(m=>{d.push(this.renderToolCall(m));const p=r[m.id];p&&d.push(k.jsx(J.Fragment,{children:this.renderToolResult(p)},`tr-${m.id}`))}),d.length===0?null:k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{className:et.avatar,style:{background:(o==null?void 0:o.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(o==null?void 0:o.svg)||Ts("agent")}}),k.jsxs("div",{className:et.contentCol,children:[this.renderLabel((o==null?void 0:o.name)||"MainAgent"),k.jsxs("div",{className:`${et.bubbleAssistant}${this.props.highlight==="active"?" "+et.bubbleHighlight:""}${this.props.highlight==="fading"?" "+et.bubbleHighlightFading:""}`,children:[(this.props.highlight==="active"||this.props.highlight==="fading")&&k.jsx("svg",{className:`${et.borderSvg}${this.props.highlight==="fading"?" "+et.borderSvgFading:""}`,preserveAspectRatio:"none",children:k.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"8",ry:"8",fill:"none",stroke:"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",className:et.borderRect})}),d]})]})]})}renderSubAgentMessage(){const{label:n,resultText:r,toolName:o,toolInput:l}=this.props;return k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{className:et.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Ts("sub")}}),k.jsxs("div",{className:et.contentCol,children:[this.renderLabel(n),k.jsx("div",{className:et.bubbleSubAgent,children:k.jsx(KC,{toolName:o,toolInput:l,resultText:r})})]})]})}renderUserSelectionMessage(){const{questions:n,answers:r}=this.props,o=this.getUserName();return k.jsxs("div",{className:et.messageRowEnd,children:[k.jsxs("div",{className:et.contentColLimited,children:[this.renderLabel(o," — 选择"),k.jsx("div",{className:et.bubbleSelection,children:n&&n.map((l,s)=>{const c=(r==null?void 0:r[l.question])||"未选择";return k.jsxs("div",{className:s<n.length-1?et.questionSpacing:void 0,children:[k.jsx("div",{className:et.questionText,children:l.question}),k.jsx("div",{className:et.optionList,children:l.options&&l.options.map((d,m)=>{const p=c===d.label;return k.jsxs("div",{className:et.option,style:{color:p?"#e5e5e5":"#666",fontWeight:p?600:"normal"},children:[p?"● ":"○ ",d.label,d.description&&k.jsxs("span",{className:et.optionDesc,children:["— ",d.description]})]},m)})})]},s)})})]}),this.renderUserAvatar("#2ea043")]})}renderPlanPromptMessage(){const{text:n,timestamp:r,modelInfo:o}=this.props;this.formatTime(r);const l=(n||"").replace(/^Implement the following plan:\s*/i,"");return k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{className:et.avatar,style:{background:(o==null?void 0:o.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(o==null?void 0:o.svg)||Ts("agent")}}),k.jsxs("div",{className:et.contentColLimited,children:[this.renderLabel((o==null?void 0:o.name)||"MainAgent"," (Plan)"),k.jsx("div",{className:et.bubblePlan,children:k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:pi(l)}})})]})]})}renderSkillLoadedMessage(){const{text:n,skillName:r,timestamp:o}=this.props,l=this.formatTime(o);return k.jsxs("div",{className:et.messageRow,children:[k.jsx("div",{style:{width:32,flexShrink:0}}),k.jsx("div",{className:et.contentCol,children:k.jsx(yl,{ghost:!0,size:"small",items:[{key:"1",label:k.jsxs("span",{className:et.skillLabel,children:["📦 ",Ie("ui.skillLoaded"),": ",r,l&&k.jsx(yo,{className:et.timeTextNoMargin,style:{marginLeft:8},children:l})]}),children:k.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:pi(n)}})}],className:et.collapseNoMargin})})]})}render(){const{role:n}=this.props;return n==="user"?this.renderUserMessage():n==="skill-loaded"?this.renderSkillLoadedMessage():n==="plan-prompt"?this.renderPlanPromptMessage():n==="user-selection"?this.renderUserSelectionMessage():n==="assistant"?this.renderAssistantMessage():n==="sub-agent"?this.renderSubAgentMessage():null}}const SH="_centerEmpty_1j3v3_1",xH="_container_1j3v3_8",wH="_sessionDividerText_1j3v3_16",$H="_lastResponseLabel_1j3v3_21",Rs={centerEmpty:SH,container:xH,sessionDividerText:wH,lastResponseLabel:$H},{Text:XC}=na,EH=20;function RH(){return 100+Math.random()*50}class OH extends J.Component{constructor(t){super(t),this.containerRef=J.createRef(),this.state={visibleCount:0,loading:!1,allItems:[],highlightTs:null,highlightFading:!1},this._queueTimer=null,this._prevItemsLen=0,this._scrollTargetIdx=null,this._scrollTargetRef=J.createRef(),this._scrollFadeTimer=null}componentDidMount(){this.startRender()}componentDidUpdate(t){if(t.mainAgentSessions!==this.props.mainAgentSessions)this.startRender();else if(t.collapseToolResults!==this.props.collapseToolResults||t.expandThinking!==this.props.expandThinking){const n=this.buildAllItems();this.setState({allItems:n,visibleCount:n.length})}}componentWillUnmount(){this._queueTimer&&clearTimeout(this._queueTimer),this._fadeClearTimer&&clearTimeout(this._fadeClearTimer),this._unbindScrollFade()}startRender(){this._queueTimer&&clearTimeout(this._queueTimer);const t=this.buildAllItems(),n=this._prevItemsLen;this._prevItemsLen=t.length;const r=t.length-n;if(r<=0||n>0&&r<=3){this.setState({allItems:t,visibleCount:t.length,loading:!1},()=>this.scrollToBottom());return}if(t.length>EH)this.setState({allItems:t,visibleCount:0,loading:!0}),this._queueTimer=setTimeout(()=>{this.setState({visibleCount:t.length,loading:!1},()=>this.scrollToBottom())},300);else{const o=Math.max(0,n);this.setState({allItems:t,visibleCount:o,loading:!1}),this.queueNext(o,t.length)}}queueNext(t,n){t>=n||(this._queueTimer=setTimeout(()=>{this.setState({visibleCount:t+1},()=>{this.scrollToBottom(),this.queueNext(t+1,n)})},RH()))}_isNearBottom(){const t=this.containerRef.current;return t?t.scrollHeight-t.scrollTop-t.clientHeight<=5:!0}scrollToBottom(){if(this._scrollTargetRef.current){const t=this._scrollTargetRef.current,n=this.containerRef.current;n&&t.offsetHeight>n.clientHeight?t.scrollIntoView({block:"start",behavior:"instant"}):t.scrollIntoView({block:"center",behavior:"instant"});const r=this.props.scrollToTimestamp;this._scrollTargetRef=J.createRef(),r&&(this.setState({highlightTs:r,highlightFading:!1}),this._bindScrollFade()),this.props.onScrollTsDone&&this.props.onScrollTsDone();return}if(this._isNearBottom()){const t=this.containerRef.current;t&&(t.scrollTop=t.scrollHeight)}}_bindScrollFade(){this._unbindScrollFade();const t=this.containerRef.current;t&&(this._scrollFadeIgnoreFirst=!0,this._onScrollFade=()=>{if(this._scrollFadeIgnoreFirst){this._scrollFadeIgnoreFirst=!1;return}this.setState({highlightFading:!0}),this._fadeClearTimer=setTimeout(()=>{this.setState({highlightTs:null,highlightFading:!1})},2e3),this._unbindScrollFade()},t.addEventListener("scroll",this._onScrollFade))}_unbindScrollFade(){this._onScrollFade&&this.containerRef.current&&(this.containerRef.current.removeEventListener("scroll",this._onScrollFade),this._onScrollFade=null)}renderSessionMessages(t,n,r,o){var v;const{userProfile:l,collapseToolResults:s,expandThinking:c,onViewRequest:d}=this.props,m={};for(const y of t)if(y.role==="assistant"&&Array.isArray(y.content))for(const C of y.content)C.type==="tool_use"&&(m[C.id]=C);const p={};for(const y of t)if(y.role==="user"&&Array.isArray(y.content)){for(const C of y.content)if(C.type==="tool_result"){const S=m[C.tool_use_id];let b=Ie("ui.toolReturn"),$=null,w=null;if(S)if($=S.name,w=S.input,S.name==="Task"&&S.input){const R=S.input.subagent_type||"",I=S.input.description||"";b=`SubAgent: ${R}${I?" — "+I:""}`}else b=Ie("ui.toolReturnNamed",{name:S.name});p[C.tool_use_id]={label:b,toolName:$,toolInput:w,resultText:MC(C)}}}const g=[];for(let y=0;y<t.length;y++){const C=t[y],S=C.content,b=C._timestamp||null,$=b?o[b]:void 0,w=$!=null&&d?{requestIndex:$,onViewRequest:d}:{};if(C.role==="user"){if(Array.isArray(S)){const R=S.find(_=>_.type==="text"&&/^\[SUGGESTION MODE:/i.test((_.text||"").trim())),I=S.filter(_=>_.type==="tool_result");if(R&&I.length>0){let _=null,O={};for(const T of I){const N=m[T.tool_use_id];if(N&&N.name==="AskUserQuestion"&&((v=N.input)!=null&&v.questions)){_=N.input.questions;const j=MC(T);try{O=JSON.parse(j).answers||{}}catch{}break}}_&&g.push(k.jsx(Ba,{role:"user-selection",questions:_,answers:O,timestamp:b,userProfile:l,...w},`${n}-selection-${y}`))}else{const{commands:_,textBlocks:O,skillBlocks:T}=J2(S);for(let N=0;N<_.length;N++)g.push(k.jsx(Ba,{role:"user",text:_[N],timestamp:b,userProfile:l,modelInfo:r,...w},`${n}-cmd-${y}-${N}`));for(const N of T){const j=N.text.match(/^#\s+(.+)$/m),P=j?j[1]:"Skill";g.push(k.jsx(Ba,{role:"skill-loaded",text:N.text,skillName:P,timestamp:b,...w},`${n}-skill-${y}`))}for(let N=0;N<O.length;N++){const j=/^Implement the following plan:/i.test((O[N].text||"").trim());g.push(k.jsx(Ba,{role:j?"plan-prompt":"user",text:O[N].text,timestamp:b,userProfile:l,modelInfo:r,...w},`${n}-user-${y}-${N}`))}}}else if(typeof S=="string"&&!Zh(S)){const R=/^Implement the following plan:/i.test(S.trim());g.push(k.jsx(Ba,{role:R?"plan-prompt":"user",text:S,timestamp:b,userProfile:l,modelInfo:r,...w},`${n}-user-${y}`))}}else C.role==="assistant"&&(Array.isArray(S)?g.push(k.jsx(Ba,{role:"assistant",content:S,toolResultMap:p,timestamp:b,modelInfo:r,collapseToolResults:s,expandThinking:c,...w},`${n}-asst-${y}`)):typeof S=="string"&&g.push(k.jsx(Ba,{role:"assistant",content:[{type:"text",text:S}],toolResultMap:p,timestamp:b,modelInfo:r,collapseToolResults:s,expandThinking:c,...w},`${n}-asst-${y}`)))}return g}buildAllItems(){var v;const{mainAgentSessions:t,requests:n,collapseToolResults:r,expandThinking:o,onViewRequest:l}=this.props;if(!t||t.length===0)return[];const s={};if(n)for(let y=0;y<n.length;y++)vr(n[y])&&n[y].timestamp&&(s[n[y].timestamp]=y);let c=null;if(n){for(let y=n.length-1;y>=0;y--)if(vr(n[y])&&((v=n[y].body)!=null&&v.model)){c=n[y].body.model;break}}const d=_L(c),m=[],p={};t.forEach((y,C)=>{var b,$;C>0&&m.push(k.jsx(uC,{style:{borderColor:"#333",margin:"16px 0"},children:k.jsx(XC,{className:Rs.sessionDividerText,children:"Session"})},`session-div-${C}`));const S=this.renderSessionMessages(y.messages,`s${C}`,d,s);for(const w of S)w.props.timestamp&&(p[w.props.timestamp]=m.length),m.push(w);if(C===t.length-1&&(($=(b=y.response)==null?void 0:b.body)!=null&&$.content)){const w=y.response.body.content;Array.isArray(w)&&(m.push(k.jsx(J.Fragment,{children:k.jsx(uC,{style:{borderColor:"#2a2a2a",margin:"8px 0"},children:k.jsx(XC,{type:"secondary",className:Rs.lastResponseLabel,children:Ie("ui.lastResponse")})})},"resp-divider")),y.entryTimestamp&&(p[y.entryTimestamp]=m.length),m.push(k.jsx(Ba,{role:"assistant",content:w,timestamp:y.entryTimestamp,modelInfo:d,collapseToolResults:r,expandThinking:o,toolResultMap:{}},"resp-asst")))}});const{scrollToTimestamp:g}=this.props;return this._scrollTargetIdx=g&&p[g]!=null?p[g]:null,this._tsItemMap=p,m}render(){const{mainAgentSessions:t}=this.props,{allItems:n,visibleCount:r,loading:o}=this.state;if(!t||t.length===0)return k.jsx("div",{className:Rs.centerEmpty,children:k.jsx(Lo,{description:Ie("ui.noChat")})});if(o)return k.jsx("div",{className:Rs.centerEmpty,children:k.jsx(Vl,{size:"large"})});const l=this._scrollTargetIdx,{highlightTs:s,highlightFading:c}=this.state,d=s&&this._tsItemMap&&this._tsItemMap[s]!=null?this._tsItemMap[s]:null,m=n.slice(0,r);return k.jsx("div",{ref:this.containerRef,className:Rs.container,children:m.map((p,g)=>{const v=g===l,y=g===d;let C=p;return y&&C.props.role==="assistant"&&(C=J.cloneElement(C,{highlight:c?"fading":"active"})),v?k.jsx("div",{ref:this._scrollTargetRef,children:C},p.key+"-anchor"):C})})}}const kH="_resizer_yamj2_1",_H={resizer:kH};class IH extends J.Component{constructor(t){super(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(t){t.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(t){this.props.onResize&&this.props.onResize(t.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return k.jsx("div",{onMouseDown:this.handleMouseDown,className:_H.resizer})}}const TH="_layout_1drw4_1",NH="_header_1drw4_6",jH="_content_1drw4_14",PH="_mainContainer_1drw4_19",zH="_leftPanel_1drw4_24",MH="_leftPanelHeader_1drw4_32",LH="_leftPanelCount_1drw4_43",BH="_leftPanelBody_1drw4_49",AH="_rightPanel_1drw4_54",DH="_modalActions_1drw4_60",FH="_spinCenter_1drw4_64",HH="_emptyCenter_1drw4_69",VH="_logCheckbox_1drw4_75",WH="_logListItem_1drw4_79",qH="_logItemRow_1drw4_84",UH="_logFileName_1drw4_101",GH="_logFileIcon_1drw4_114",KH="_folderIcon_1drw4_120",XH="_logTag_1drw4_124",QH="_loadingOverlay_1drw4_128",YH="_loadingText_1drw4_141",JH="_footer_1drw4_147",ZH="_footerRight_1drw4_157",eV="_footerLink_1drw4_165",tV="_footerIcon_1drw4_177",nV="_footerDivider_1drw4_182",rV="_guideContainer_1drw4_190",oV="_guideContent_1drw4_198",aV="_guideIcon_1drw4_203",iV="_guideTitle_1drw4_208",lV="_guideStep_1drw4_215",sV="_guideStepNum_1drw4_221",cV="_guideStepBody_1drw4_236",uV="_guideText_1drw4_241",dV="_guideCode_1drw4_248",Dt={layout:TH,header:NH,content:jH,mainContainer:PH,leftPanel:zH,leftPanelHeader:MH,leftPanelCount:LH,leftPanelBody:BH,rightPanel:AH,modalActions:DH,spinCenter:FH,emptyCenter:HH,logCheckbox:VH,logListItem:WH,logItemRow:qH,logFileName:UH,logFileIcon:GH,folderIcon:KH,logTag:XH,loadingOverlay:QH,loadingText:YH,footer:JH,footerRight:ZH,footerLink:eV,footerIcon:tV,footerDivider:nV,guideContainer:rV,guideContent:oV,guideIcon:aV,guideTitle:iV,guideStep:lV,guideStepNum:sV,guideStepBody:cV,guideText:uV,guideCode:dV};class fV extends J.Component{constructor(n){super(n);jt(this,"handleSelectRequest",n=>{this.setState({selectedIndex:n,scrollCenter:!1})});jt(this,"handleViewRequest",n=>{this.setState({viewMode:"raw",selectedIndex:n,scrollCenter:!0})});jt(this,"handleViewInChat",()=>{this.setState(n=>{const o=(n.showAll?n.requests:ma(n.requests))[n.selectedIndex];if(!o)return null;let l=null;if(vr(o)&&o.timestamp)l=o.timestamp;else{const s=n.requests.indexOf(o);s>=0&&(l=LC(n.requests,s)),l||bo.info(Ie("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:l}})});jt(this,"handleToggleViewMode",()=>{this.setState(n=>{const r=n.viewMode==="raw"?"chat":"raw";if(r==="raw"){if(n.selectedIndex===null){const s=n.showAll?n.requests:ma(n.requests);return{viewMode:r,selectedIndex:s.length>0?s.length-1:null,scrollCenter:!0}}return{viewMode:r,scrollCenter:!0}}const o=n.showAll?n.requests:ma(n.requests),l=n.selectedIndex!=null?o[n.selectedIndex]:null;if(l){let s=null;if(vr(l)&&l.timestamp)s=l.timestamp;else{const c=n.requests.indexOf(l);c>=0&&(s=LC(n.requests,c)),s||bo.info(Ie("ui.cannotMap"))}return{viewMode:r,chatScrollToTs:s}}return{viewMode:r,chatScrollToTs:null}})});jt(this,"handleLangChange",()=>{const n=zl();this.setState({lang:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:n})}).catch(()=>{})});jt(this,"handleCollapseToolResultsChange",n=>{this.setState({collapseToolResults:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collapseToolResults:n})}).catch(()=>{})});jt(this,"handleExpandThinkingChange",n=>{this.setState({expandThinking:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandThinking:n})}).catch(()=>{})});jt(this,"handleExpandDiffChange",n=>{this.setState({expandDiff:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandDiff:n})}).catch(()=>{})});jt(this,"handleFilterIrrelevantChange",n=>{this.setState(r=>{const o=!n,l=o?r.requests:ma(r.requests);return{showAll:o,selectedIndex:l.length>0?l.length-1:null}}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filterIrrelevant:n})}).catch(()=>{})});jt(this,"handleTabChange",n=>{this.setState({currentTab:n})});jt(this,"handleResize",n=>{const r=this.mainContainerRef.current;if(!r)return;const o=r.getBoundingClientRect(),l=n-o.left;l>=250&&l<=800&&this.setState({leftPanelWidth:l})});jt(this,"handleImportLocalLogs",()=>{this.setState({importModalVisible:!0,localLogsLoading:!0}),fetch("/api/local-logs").then(n=>n.json()).then(n=>{const{_currentProject:r,...o}=n;this.setState({localLogs:o,currentProject:r||"",localLogsLoading:!1})}).catch(()=>{this.setState({localLogs:{},localLogsLoading:!1})})});jt(this,"handleCloseImportModal",()=>{this.setState({importModalVisible:!1,selectedLogs:{}})});jt(this,"handleToggleLogSelect",(n,r,o)=>{this.setState(l=>{const s={...l.selectedLogs},c=new Set(s[n]||[]);return o?c.add(r):c.delete(r),c.size===0?delete s[n]:s[n]=c,{selectedLogs:s}})});jt(this,"handleMergeLogs",n=>{const{selectedLogs:r,localLogs:o}=this.state,l=r[n];if(!l||l.size<2)return;const s=o[n],c=[];s.forEach((p,g)=>{l.has(p.file)&&c.push(g)}),c.sort((p,g)=>p-g);for(let p=1;p<c.length;p++)if(c[p]-c[p-1]!==1){bo.warning(Ie("ui.mergeNotConsecutive"));return}if(c.reduce((p,g)=>p+s[g].size,0)>500*1024*1024){bo.warning(Ie("ui.mergeTooLarge"));return}const m=c.map(p=>s[p].file).reverse();fetch("/api/merge-logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:m})}).then(p=>p.json()).then(p=>{p.ok?(bo.success(Ie("ui.mergeSuccess")),this.setState({selectedLogs:{}}),this.handleImportLocalLogs()):bo.error(p.error||"Merge failed")}).catch(()=>bo.error("Merge failed"))});jt(this,"handleOpenLogFile",n=>{const r=window.location.port||window.location.host.split(":")[1]||"7008";window.open(`${window.location.protocol}//${window.location.hostname}:${r}?logfile=${encodeURIComponent(n)}`,"_blank"),this.setState({importModalVisible:!1})});jt(this,"handleResumeChoice",n=>{fetch("/api/resume-choice",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({choice:n})}).catch(r=>console.error("resume-choice failed:",r))});jt(this,"handleLoadLocalJsonlFile",()=>{const n=document.createElement("input");n.type="file",n.accept=".jsonl",n.onchange=r=>{const o=r.target.files[0];if(!o)return;if(o.size>500*1024*1024){bo.error(Ie("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});const l=new FileReader;l.onload=s=>{try{const d=s.target.result.split(`
|
|
564
564
|
---
|
|
565
|
-
`).filter(m=>m.trim()).map(m=>{try{return JSON.parse(m)}catch{return null}}).filter(Boolean);if(d.length===0){bo.error(Ie("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0});return}this.animateLoadingCount(d.length,()=>{let m=[];for(const g of d)vr(g)&&g.body&&Array.isArray(g.body.messages)&&(m=this.mergeMainAgentSessions(m,g));const p=ma(d);this._isLocalLog=!0,this._localLogFile=o.name,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.setState({requests:d,selectedIndex:p.length>0?p.length-1:null,mainAgentSessions:m,importModalVisible:!1,fileLoading:!1,fileLoadingCount:0})})}catch{bo.error(Ie("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0})}},l.readAsText(o)},n.click()});const r=parseInt(localStorage.getItem("ccv_cacheExpireAt"),10)||null,o=localStorage.getItem("ccv_cacheType")||null,l=Date.now(),s=r&&r>l?r:null,c=s?o:null;this.state={requests:[],selectedIndex:null,viewMode:"raw",currentTab:"request",cacheExpireAt:s,cacheType:c,leftPanelWidth:380,mainAgentSessions:[],importModalVisible:!1,localLogs:{},localLogsLoading:!1,showAll:!1,lang:zl(),userProfile:null,projectName:"",resumeModalVisible:!1,resumeFileName:"",collapseToolResults:!0,expandThinking:!0,expandDiff:!1,fileLoading:!1,fileLoadingCount:0,selectedLogs:{}},this.eventSource=null,this._autoSelectTimer=null,this.mainContainerRef=J.createRef()}componentDidMount(){fetch("/api/preferences").then(o=>o.json()).then(o=>{o.lang&&(tv(o.lang),this.setState({lang:o.lang})),o.collapseToolResults!==void 0&&this.setState({collapseToolResults:!!o.collapseToolResults}),o.expandThinking!==void 0&&this.setState({expandThinking:!!o.expandThinking}),o.expandDiff!==void 0&&this.setState({expandDiff:!!o.expandDiff});const l=o.filterIrrelevant!==void 0?!!o.filterIrrelevant:!0;this.setState({showAll:!l})}).catch(()=>{}),fetch("/api/user-profile").then(o=>o.json()).then(o=>this.setState({userProfile:o})).catch(()=>{}),fetch("/api/project-name").then(o=>o.json()).then(o=>this.setState({projectName:o.projectName||""})).catch(()=>{});const r=new URLSearchParams(window.location.search).get("logfile");r?this.loadLocalLogFile(r):this.initSSE()}componentWillUnmount(){this.eventSource&&this.eventSource.close(),this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._loadingCountTimer&&cancelAnimationFrame(this._loadingCountTimer)}animateLoadingCount(n,r){const o=Math.min(800,Math.max(300,n*.5)),l=performance.now(),s=c=>{const d=Math.min((c-l)/o,1),m=Math.round(d*n);this.setState({fileLoadingCount:m}),d<1?this._loadingCountTimer=requestAnimationFrame(s):(this._loadingCountTimer=null,r())};this._loadingCountTimer=requestAnimationFrame(s)}initSSE(){this.setState({fileLoading:!0,fileLoadingCount:0});try{this.eventSource=new EventSource("/events"),this.eventSource.onmessage=n=>this.handleEventMessage(n),this.eventSource.addEventListener("resume_prompt",n=>{try{const r=JSON.parse(n.data);this.setState({resumeModalVisible:!0,resumeFileName:r.recentFileName||""})}catch{}}),this.eventSource.addEventListener("resume_resolved",()=>{this.setState({resumeModalVisible:!1,resumeFileName:""})}),this.eventSource.addEventListener("full_reload",n=>{try{const r=JSON.parse(n.data);if(Array.isArray(r)){this.assignMessageTimestamps(r);const o=this.buildSessionsFromEntries(r),l=ma(r);r.length>0?this.animateLoadingCount(r.length,()=>{this.setState({requests:r,selectedIndex:l.length>0?l.length-1:null,mainAgentSessions:o,fileLoading:!1,fileLoadingCount:0})}):this.setState({requests:r,selectedIndex:null,mainAgentSessions:o,fileLoading:!1,fileLoadingCount:0})}else this.setState({fileLoading:!1,fileLoadingCount:0})}catch{this.setState({fileLoading:!1,fileLoadingCount:0})}}),this.eventSource.onerror=()=>console.error("SSE连接错误")}catch(n){console.error("EventSource初始化失败:",n),this.setState({fileLoading:!1,fileLoadingCount:0})}}loadLocalLogFile(n){this._isLocalLog=!0,this._localLogFile=n,this.setState({fileLoading:!0,fileLoadingCount:0}),fetch(`/api/local-log?file=${encodeURIComponent(n)}`).then(r=>r.json()).then(r=>{Array.isArray(r)?this.animateLoadingCount(r.length,()=>{this.assignMessageTimestamps(r);const o=this.buildSessionsFromEntries(r),l=ma(r);this.setState({requests:r,selectedIndex:l.length>0?l.length-1:null,mainAgentSessions:o,fileLoading:!1,fileLoadingCount:0})}):this.setState({fileLoading:!1,fileLoadingCount:0})}).catch(r=>{console.error("加载日志文件失败:",r),this.setState({fileLoading:!1,fileLoadingCount:0})})}handleEventMessage(n){try{const r=JSON.parse(n.data);this.setState(o=>{var g,v;const l=[...o.requests],s=l.findIndex(y=>y.timestamp===r.timestamp&&y.url===r.url);s>=0?l[s]=r:l.push(r);let c=o.cacheExpireAt,d=o.cacheType;if(vr(r)){const y=(v=(g=r.response)==null?void 0:g.body)==null?void 0:v.usage;if(y!=null&&y.cache_creation){const C=y.cache_creation,S=r.timestamp?new Date(r.timestamp).getTime():Date.now();let b=null,$=null;if(C.ephemeral_1h_input_tokens>0?(b=S+3600*1e3,$="1h"):C.ephemeral_5m_input_tokens>0&&(b=S+300*1e3,$="5m"),b&&b>Date.now()){c=b;const w=(y.cache_read_input_tokens||0)+(y.cache_creation_input_tokens||0);d=w>0?Gn(w):$,localStorage.setItem("ccv_cacheExpireAt",String(c)),localStorage.setItem("ccv_cacheType",d)}}}let m=o.mainAgentSessions;if(vr(r)&&r.body&&Array.isArray(r.body.messages)){const y=r.timestamp||new Date().toISOString(),C=m.length>0?m[m.length-1]:null,S=(C==null?void 0:C.messages)||[],b=r.body.messages,$=S.length,w=$>0&&b.length<$*.5&&$-b.length>4;for(let R=0;R<b.length;R++)!w&&R<$&&S[R]._timestamp?b[R]._timestamp=S[R]._timestamp:b[R]._timestamp||(b[R]._timestamp=y);m=this.mergeMainAgentSessions(o.mainAgentSessions,r)}return o.selectedIndex===null&&l.length>0&&(this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._autoSelectTimer=setTimeout(()=>{this.setState(y=>{if(y.selectedIndex===null&&y.requests.length>0){const C=y.showAll?y.requests:ma(y.requests);return C.length>0?{selectedIndex:C.length-1}:null}return null})},200)),{requests:l,cacheExpireAt:c,cacheType:d,mainAgentSessions:m}})}catch(r){console.error("处理事件消息失败:",r)}}assignMessageTimestamps(n){var l;let r=[],o=null;for(const s of n){if(!vr(s)||!s.body||!Array.isArray(s.body.messages))continue;const c=s.body.messages,d=c.length,m=((l=s.body.metadata)==null?void 0:l.user_id)||null,p=s.timestamp||new Date().toISOString(),g=r.length;g>0&&(d<g*.5&&g-d>4||o&&m&&m!==o)&&(r=[]);for(let y=r.length;y<d;y++)r.push(p);for(let y=0;y<d;y++)c[y]._timestamp=r[y];o=m}}buildSessionsFromEntries(n){let r=[];for(const o of n)vr(o)&&o.body&&Array.isArray(o.body.messages)&&(r=this.mergeMainAgentSessions(r,o));return r}mergeMainAgentSessions(n,r){var p;const o=r.body.messages,l=r.response,s=((p=r.body.metadata)==null?void 0:p.user_id)||null;if(n.length===0)return[{userId:s,messages:o,response:l}];const c=n[n.length-1],d=c.messages?c.messages.length:0,m=d>0&&o.length<d*.5&&d-o.length>4;if(s&&s===c.userId&&!m){const g=[...n];return g[g.length-1]={userId:s,messages:o,response:l},g}else return[...n,{userId:s,messages:o,response:l}]}formatTimestamp(n){return!n||n.length<15?n:`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)} ${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}`}formatSize(n){return n<1024?n+" B":n<1024*1024?(n/1024).toFixed(1)+" KB":(n/(1024*1024)).toFixed(1)+" MB"}render(){const{requests:n,selectedIndex:r,viewMode:o,currentTab:l,cacheExpireAt:s,cacheType:c,leftPanelWidth:d,mainAgentSessions:m,showAll:p,fileLoading:g,fileLoadingCount:v}=this.state,y=p?n:ma(n),C=r!==null?y[r]:null;return k.jsxs(ea,{theme:{algorithm:c9.darkAlgorithm,token:{colorBgContainer:"#111",colorBgLayout:"#0a0a0a",colorBgElevated:"#1a1a1a",colorBorder:"#2a2a2a"}},children:[g&&k.jsx("div",{className:Dt.loadingOverlay,children:k.jsxs("div",{className:Dt.loadingText,children:["Loading...(",v,")"]})}),k.jsxs(Wa,{className:Dt.layout,children:[k.jsx(Wa.Header,{className:Dt.header,children:k.jsx(Xg,{requestCount:y.length,requests:y,viewMode:o,cacheExpireAt:s,cacheType:c,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange})}),k.jsx(Wa.Content,{className:Dt.content,children:o==="raw"?y.length===0?k.jsx("div",{className:Dt.guideContainer,children:k.jsxs("div",{className:Dt.guideContent,children:[k.jsx("div",{className:Dt.guideIcon,children:k.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[k.jsx("circle",{cx:"24",cy:"24",r:"23",stroke:"#333",strokeWidth:"2",strokeDasharray:"4 4"}),k.jsx("path",{d:"M16 24h16M24 16v16",stroke:"#555",strokeWidth:"2",strokeLinecap:"round"})]})}),k.jsx("h2",{className:Dt.guideTitle,children:Ie("ui.guide.title")}),k.jsxs("div",{className:Dt.guideStep,children:[k.jsx("div",{className:Dt.guideStepNum,children:"1"}),k.jsxs("div",{className:Dt.guideStepBody,children:[k.jsx("p",{className:Dt.guideText,children:Ie("ui.guide.step1")}),k.jsx("code",{className:Dt.guideCode,children:Ie("ui.guide.exampleQuestion")})]})]}),k.jsxs("div",{className:Dt.guideStep,children:[k.jsx("div",{className:Dt.guideStepNum,children:"2"}),k.jsxs("div",{className:Dt.guideStepBody,children:[k.jsx("p",{className:Dt.guideText,children:Ie("ui.guide.step2")}),k.jsx("code",{className:Dt.guideCode,children:Ie("ui.guide.troubleshootCmd")})]})]}),k.jsxs("div",{className:Dt.guideStep,children:[k.jsx("div",{className:Dt.guideStepNum,children:"3"}),k.jsxs("div",{className:Dt.guideStepBody,children:[k.jsx("p",{className:Dt.guideText,children:Ie("ui.guide.step3")}),k.jsx("code",{className:Dt.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):k.jsxs("div",{ref:this.mainContainerRef,className:Dt.mainContainer,children:[k.jsxs("div",{className:Dt.leftPanel,style:{width:d},children:[k.jsxs("div",{className:Dt.leftPanelHeader,children:[k.jsx("span",{children:Ie("ui.requestList")}),k.jsx("span",{className:Dt.leftPanelCount,children:Ie("ui.totalRequests",{count:y.length})})]}),k.jsx("div",{className:Dt.leftPanelBody,children:k.jsx(tD,{requests:y,selectedIndex:r,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:()=>this.setState({scrollCenter:!1})})})]}),k.jsx(IH,{onResize:this.handleResize}),k.jsx("div",{className:Dt.rightPanel,children:k.jsx(KD,{request:C,requests:y,selectedIndex:r,currentTab:l,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff})})]}):k.jsx(OH,{requests:y,mainAgentSessions:m,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:()=>this.setState({chatScrollToTs:null})})}),k.jsx("div",{className:Dt.footer,children:k.jsxs("div",{className:Dt.footerRight,children:[k.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:Dt.footerLink,children:[k.jsx("svg",{className:Dt.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:k.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub"]}),k.jsx("span",{className:Dt.footerDivider,children:"|"}),k.jsx("a",{href:"dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=sthk5es",className:Dt.footerLink,children:Ie("ui.footer.contact")})]})})]}),k.jsx(Br,{title:Ie("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:[k.jsx(Yn,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),children:Ie("ui.resume.continue")},"continue"),k.jsx(Yn,{onClick:()=>this.handleResumeChoice("new"),children:Ie("ui.resume.new")},"new")],children:k.jsx("p",{children:Ie("ui.resume.message",{file:this.state.resumeFileName})})}),k.jsxs(Br,{title:Ie("ui.importLocalLogs"),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:600,styles:{body:{maxHeight:"60vh",overflow:"auto"}},children:[k.jsx("div",{className:Dt.modalActions,children:k.jsx(Yn,{icon:k.jsx(OL,{}),onClick:this.handleLoadLocalJsonlFile,children:Ie("ui.loadLocalJsonl")})}),this.state.localLogsLoading?k.jsx("div",{className:Dt.spinCenter,children:k.jsx(Vl,{})}):Object.keys(this.state.localLogs).length===0?k.jsx("div",{className:Dt.emptyCenter,children:Ie("ui.noLogs")}):k.jsx(yl,{defaultActiveKey:Object.keys(this.state.localLogs),items:Object.entries(this.state.localLogs).sort(([S],[b])=>{const $=this.state.currentProject;return S===$?-1:b===$?1:0}).map(([S,b])=>{var $;return{key:S,label:k.jsxs("span",{children:[k.jsx(Q7,{className:Dt.folderIcon}),S,k.jsx(So,{className:Dt.logTag,children:Ie("ui.logCount",{count:b.length})}),(($=this.state.selectedLogs[S])==null?void 0:$.size)>1&&k.jsx(Yn,{size:"small",type:"primary",onClick:w=>{w.stopPropagation(),this.handleMergeLogs(S)},children:Ie("ui.mergeLogs")})]}),children:k.jsx(Js,{size:"small",dataSource:b,renderItem:w=>{var R;return k.jsx(Js.Item,{className:Dt.logListItem,onClick:()=>{var _;const I=!((_=this.state.selectedLogs[S])!=null&&_.has(w.file));this.handleToggleLogSelect(S,w.file,I)},children:k.jsxs("div",{className:Dt.logItemRow,children:[k.jsxs("span",{children:[k.jsx(Gh,{className:Dt.logCheckbox,checked:((R=this.state.selectedLogs[S])==null?void 0:R.has(w.file))||!1,onClick:I=>I.stopPropagation(),onChange:I=>{I.stopPropagation(),this.handleToggleLogSelect(S,w.file,I.target.checked)}}),k.jsx(Ms,{className:Dt.logFileIcon}),k.jsx("span",{className:Dt.logFileName,children:this.formatTimestamp(w.timestamp)})]}),k.jsxs("span",{children:[k.jsx(So,{color:"blue",children:this.formatSize(w.size)}),k.jsx(Yn,{size:"small",type:"primary",onClick:I=>{I.stopPropagation(),this.handleOpenLogFile(w.file)},children:Ie("ui.openLog")})]})]})})}})}})})]})]})}}const mV=r4.createRoot(document.getElementById("root"));mV.render(k.jsx(fV,{}));
|
|
565
|
+
`).filter(m=>m.trim()).map(m=>{try{return JSON.parse(m)}catch{return null}}).filter(Boolean);if(d.length===0){bo.error(Ie("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0});return}this.animateLoadingCount(d.length,()=>{let m=[];for(const g of d)vr(g)&&g.body&&Array.isArray(g.body.messages)&&(m=this.mergeMainAgentSessions(m,g));const p=ma(d);this._isLocalLog=!0,this._localLogFile=o.name,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.setState({requests:d,selectedIndex:p.length>0?p.length-1:null,mainAgentSessions:m,importModalVisible:!1,fileLoading:!1,fileLoadingCount:0})})}catch{bo.error(Ie("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0})}},l.readAsText(o)},n.click()});const r=parseInt(localStorage.getItem("ccv_cacheExpireAt"),10)||null,o=localStorage.getItem("ccv_cacheType")||null,l=Date.now(),s=r&&r>l?r:null,c=s?o:null;this.state={requests:[],selectedIndex:null,viewMode:"raw",currentTab:"request",cacheExpireAt:s,cacheType:c,leftPanelWidth:380,mainAgentSessions:[],importModalVisible:!1,localLogs:{},localLogsLoading:!1,showAll:!1,lang:zl(),userProfile:null,projectName:"",resumeModalVisible:!1,resumeFileName:"",collapseToolResults:!0,expandThinking:!0,expandDiff:!1,fileLoading:!1,fileLoadingCount:0,selectedLogs:{}},this.eventSource=null,this._autoSelectTimer=null,this.mainContainerRef=J.createRef()}componentDidMount(){fetch("/api/preferences").then(o=>o.json()).then(o=>{o.lang&&(tv(o.lang),this.setState({lang:o.lang})),o.collapseToolResults!==void 0&&this.setState({collapseToolResults:!!o.collapseToolResults}),o.expandThinking!==void 0&&this.setState({expandThinking:!!o.expandThinking}),o.expandDiff!==void 0&&this.setState({expandDiff:!!o.expandDiff});const l=o.filterIrrelevant!==void 0?!!o.filterIrrelevant:!0;this.setState({showAll:!l})}).catch(()=>{}),fetch("/api/user-profile").then(o=>o.json()).then(o=>this.setState({userProfile:o})).catch(()=>{}),fetch("/api/project-name").then(o=>o.json()).then(o=>this.setState({projectName:o.projectName||""})).catch(()=>{});const r=new URLSearchParams(window.location.search).get("logfile");r?this.loadLocalLogFile(r):this.initSSE()}componentWillUnmount(){this.eventSource&&this.eventSource.close(),this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._loadingCountTimer&&cancelAnimationFrame(this._loadingCountTimer)}animateLoadingCount(n,r){const o=Math.min(800,Math.max(300,n*.5)),l=performance.now(),s=c=>{const d=Math.min((c-l)/o,1),m=Math.round(d*n);this.setState({fileLoadingCount:m}),d<1?this._loadingCountTimer=requestAnimationFrame(s):(this._loadingCountTimer=null,r())};this._loadingCountTimer=requestAnimationFrame(s)}initSSE(){this.setState({fileLoading:!0,fileLoadingCount:0});try{this.eventSource=new EventSource("/events"),this.eventSource.onmessage=n=>this.handleEventMessage(n),this.eventSource.addEventListener("resume_prompt",n=>{try{const r=JSON.parse(n.data);this.setState({resumeModalVisible:!0,resumeFileName:r.recentFileName||""})}catch{}}),this.eventSource.addEventListener("resume_resolved",()=>{this.setState({resumeModalVisible:!1,resumeFileName:""})}),this.eventSource.addEventListener("full_reload",n=>{try{const r=JSON.parse(n.data);if(Array.isArray(r)){this.assignMessageTimestamps(r);const o=this.buildSessionsFromEntries(r),l=ma(r);r.length>0?this.animateLoadingCount(r.length,()=>{this.setState({requests:r,selectedIndex:l.length>0?l.length-1:null,mainAgentSessions:o,fileLoading:!1,fileLoadingCount:0})}):this.setState({requests:r,selectedIndex:null,mainAgentSessions:o,fileLoading:!1,fileLoadingCount:0})}else this.setState({fileLoading:!1,fileLoadingCount:0})}catch{this.setState({fileLoading:!1,fileLoadingCount:0})}}),this.eventSource.onerror=()=>console.error("SSE连接错误")}catch(n){console.error("EventSource初始化失败:",n),this.setState({fileLoading:!1,fileLoadingCount:0})}}loadLocalLogFile(n){this._isLocalLog=!0,this._localLogFile=n,this.setState({fileLoading:!0,fileLoadingCount:0}),fetch(`/api/local-log?file=${encodeURIComponent(n)}`).then(r=>r.json()).then(r=>{Array.isArray(r)?this.animateLoadingCount(r.length,()=>{this.assignMessageTimestamps(r);const o=this.buildSessionsFromEntries(r),l=ma(r);this.setState({requests:r,selectedIndex:l.length>0?l.length-1:null,mainAgentSessions:o,fileLoading:!1,fileLoadingCount:0})}):this.setState({fileLoading:!1,fileLoadingCount:0})}).catch(r=>{console.error("加载日志文件失败:",r),this.setState({fileLoading:!1,fileLoadingCount:0})})}handleEventMessage(n){try{const r=JSON.parse(n.data);this.setState(o=>{var g,v;const l=[...o.requests],s=l.findIndex(y=>y.timestamp===r.timestamp&&y.url===r.url);s>=0?l[s]=r:l.push(r);let c=o.cacheExpireAt,d=o.cacheType;if(vr(r)){const y=(v=(g=r.response)==null?void 0:g.body)==null?void 0:v.usage;if(y!=null&&y.cache_creation){const C=y.cache_creation,S=r.timestamp?new Date(r.timestamp).getTime():Date.now();let b=null,$=null;if(C.ephemeral_1h_input_tokens>0?(b=S+3600*1e3,$="1h"):C.ephemeral_5m_input_tokens>0&&(b=S+300*1e3,$="5m"),b&&b>Date.now()){c=b;const w=(y.cache_read_input_tokens||0)+(y.cache_creation_input_tokens||0);d=w>0?Gn(w):$,localStorage.setItem("ccv_cacheExpireAt",String(c)),localStorage.setItem("ccv_cacheType",d)}}}let m=o.mainAgentSessions;if(vr(r)&&r.body&&Array.isArray(r.body.messages)){const y=r.timestamp||new Date().toISOString(),C=m.length>0?m[m.length-1]:null,S=(C==null?void 0:C.messages)||[],b=r.body.messages,$=S.length,w=$>0&&b.length<$*.5&&$-b.length>4;for(let R=0;R<b.length;R++)!w&&R<$&&S[R]._timestamp?b[R]._timestamp=S[R]._timestamp:b[R]._timestamp||(b[R]._timestamp=y);m=this.mergeMainAgentSessions(o.mainAgentSessions,r)}return o.selectedIndex===null&&l.length>0&&(this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._autoSelectTimer=setTimeout(()=>{this.setState(y=>{if(y.selectedIndex===null&&y.requests.length>0){const C=y.showAll?y.requests:ma(y.requests);return C.length>0?{selectedIndex:C.length-1}:null}return null})},200)),{requests:l,cacheExpireAt:c,cacheType:d,mainAgentSessions:m}})}catch(r){console.error("处理事件消息失败:",r)}}assignMessageTimestamps(n){var l;let r=[],o=null;for(const s of n){if(!vr(s)||!s.body||!Array.isArray(s.body.messages))continue;const c=s.body.messages,d=c.length,m=((l=s.body.metadata)==null?void 0:l.user_id)||null,p=s.timestamp||new Date().toISOString(),g=r.length;g>0&&(d<g*.5&&g-d>4||o&&m&&m!==o)&&(r=[]);for(let y=r.length;y<d;y++)r.push(p);for(let y=0;y<d;y++)c[y]._timestamp=r[y];o=m}}buildSessionsFromEntries(n){let r=[];for(const o of n)vr(o)&&o.body&&Array.isArray(o.body.messages)&&(r=this.mergeMainAgentSessions(r,o));return r}mergeMainAgentSessions(n,r){var g;const o=r.body.messages,l=r.response,s=((g=r.body.metadata)==null?void 0:g.user_id)||null,c=r.timestamp||null;if(n.length===0)return[{userId:s,messages:o,response:l,entryTimestamp:c}];const d=n[n.length-1],m=d.messages?d.messages.length:0,p=m>0&&o.length<m*.5&&m-o.length>4;if(s&&s===d.userId&&!p){const v=[...n];return v[v.length-1]={userId:s,messages:o,response:l,entryTimestamp:c},v}else return[...n,{userId:s,messages:o,response:l,entryTimestamp:c}]}formatTimestamp(n){return!n||n.length<15?n:`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)} ${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}`}formatSize(n){return n<1024?n+" B":n<1024*1024?(n/1024).toFixed(1)+" KB":(n/(1024*1024)).toFixed(1)+" MB"}render(){const{requests:n,selectedIndex:r,viewMode:o,currentTab:l,cacheExpireAt:s,cacheType:c,leftPanelWidth:d,mainAgentSessions:m,showAll:p,fileLoading:g,fileLoadingCount:v}=this.state,y=p?n:ma(n),C=r!==null?y[r]:null;return k.jsxs(ea,{theme:{algorithm:c9.darkAlgorithm,token:{colorBgContainer:"#111",colorBgLayout:"#0a0a0a",colorBgElevated:"#1a1a1a",colorBorder:"#2a2a2a"}},children:[g&&k.jsx("div",{className:Dt.loadingOverlay,children:k.jsxs("div",{className:Dt.loadingText,children:["Loading...(",v,")"]})}),k.jsxs(Wa,{className:Dt.layout,children:[k.jsx(Wa.Header,{className:Dt.header,children:k.jsx(Xg,{requestCount:y.length,requests:y,viewMode:o,cacheExpireAt:s,cacheType:c,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange})}),k.jsx(Wa.Content,{className:Dt.content,children:o==="raw"?y.length===0?k.jsx("div",{className:Dt.guideContainer,children:k.jsxs("div",{className:Dt.guideContent,children:[k.jsx("div",{className:Dt.guideIcon,children:k.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[k.jsx("circle",{cx:"24",cy:"24",r:"23",stroke:"#333",strokeWidth:"2",strokeDasharray:"4 4"}),k.jsx("path",{d:"M16 24h16M24 16v16",stroke:"#555",strokeWidth:"2",strokeLinecap:"round"})]})}),k.jsx("h2",{className:Dt.guideTitle,children:Ie("ui.guide.title")}),k.jsxs("div",{className:Dt.guideStep,children:[k.jsx("div",{className:Dt.guideStepNum,children:"1"}),k.jsxs("div",{className:Dt.guideStepBody,children:[k.jsx("p",{className:Dt.guideText,children:Ie("ui.guide.step1")}),k.jsx("code",{className:Dt.guideCode,children:Ie("ui.guide.exampleQuestion")})]})]}),k.jsxs("div",{className:Dt.guideStep,children:[k.jsx("div",{className:Dt.guideStepNum,children:"2"}),k.jsxs("div",{className:Dt.guideStepBody,children:[k.jsx("p",{className:Dt.guideText,children:Ie("ui.guide.step2")}),k.jsx("code",{className:Dt.guideCode,children:Ie("ui.guide.troubleshootCmd")})]})]}),k.jsxs("div",{className:Dt.guideStep,children:[k.jsx("div",{className:Dt.guideStepNum,children:"3"}),k.jsxs("div",{className:Dt.guideStepBody,children:[k.jsx("p",{className:Dt.guideText,children:Ie("ui.guide.step3")}),k.jsx("code",{className:Dt.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):k.jsxs("div",{ref:this.mainContainerRef,className:Dt.mainContainer,children:[k.jsxs("div",{className:Dt.leftPanel,style:{width:d},children:[k.jsxs("div",{className:Dt.leftPanelHeader,children:[k.jsx("span",{children:Ie("ui.requestList")}),k.jsx("span",{className:Dt.leftPanelCount,children:Ie("ui.totalRequests",{count:y.length})})]}),k.jsx("div",{className:Dt.leftPanelBody,children:k.jsx(tD,{requests:y,selectedIndex:r,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:()=>this.setState({scrollCenter:!1})})})]}),k.jsx(IH,{onResize:this.handleResize}),k.jsx("div",{className:Dt.rightPanel,children:k.jsx(KD,{request:C,requests:y,selectedIndex:r,currentTab:l,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff})})]}):k.jsx(OH,{requests:y,mainAgentSessions:m,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:()=>this.setState({chatScrollToTs:null})})}),k.jsx("div",{className:Dt.footer,children:k.jsxs("div",{className:Dt.footerRight,children:[k.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:Dt.footerLink,children:[k.jsx("svg",{className:Dt.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:k.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub"]}),k.jsx("span",{className:Dt.footerDivider,children:"|"}),k.jsx("a",{href:"dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=sthk5es",className:Dt.footerLink,children:Ie("ui.footer.contact")})]})})]}),k.jsx(Br,{title:Ie("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:[k.jsx(Yn,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),children:Ie("ui.resume.continue")},"continue"),k.jsx(Yn,{onClick:()=>this.handleResumeChoice("new"),children:Ie("ui.resume.new")},"new")],children:k.jsx("p",{children:Ie("ui.resume.message",{file:this.state.resumeFileName})})}),k.jsxs(Br,{title:Ie("ui.importLocalLogs"),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:600,styles:{body:{maxHeight:"60vh",overflow:"auto"}},children:[k.jsx("div",{className:Dt.modalActions,children:k.jsx(Yn,{icon:k.jsx(OL,{}),onClick:this.handleLoadLocalJsonlFile,children:Ie("ui.loadLocalJsonl")})}),this.state.localLogsLoading?k.jsx("div",{className:Dt.spinCenter,children:k.jsx(Vl,{})}):Object.keys(this.state.localLogs).length===0?k.jsx("div",{className:Dt.emptyCenter,children:Ie("ui.noLogs")}):k.jsx(yl,{defaultActiveKey:Object.keys(this.state.localLogs),items:Object.entries(this.state.localLogs).sort(([S],[b])=>{const $=this.state.currentProject;return S===$?-1:b===$?1:0}).map(([S,b])=>{var $;return{key:S,label:k.jsxs("span",{children:[k.jsx(Q7,{className:Dt.folderIcon}),S,k.jsx(So,{className:Dt.logTag,children:Ie("ui.logCount",{count:b.length})}),(($=this.state.selectedLogs[S])==null?void 0:$.size)>1&&k.jsx(Yn,{size:"small",type:"primary",onClick:w=>{w.stopPropagation(),this.handleMergeLogs(S)},children:Ie("ui.mergeLogs")})]}),children:k.jsx(Js,{size:"small",dataSource:b,renderItem:w=>{var R;return k.jsx(Js.Item,{className:Dt.logListItem,onClick:()=>{var _;const I=!((_=this.state.selectedLogs[S])!=null&&_.has(w.file));this.handleToggleLogSelect(S,w.file,I)},children:k.jsxs("div",{className:Dt.logItemRow,children:[k.jsxs("span",{children:[k.jsx(Gh,{className:Dt.logCheckbox,checked:((R=this.state.selectedLogs[S])==null?void 0:R.has(w.file))||!1,onClick:I=>I.stopPropagation(),onChange:I=>{I.stopPropagation(),this.handleToggleLogSelect(S,w.file,I.target.checked)}}),k.jsx(Ms,{className:Dt.logFileIcon}),k.jsx("span",{className:Dt.logFileName,children:this.formatTimestamp(w.timestamp)})]}),k.jsxs("span",{children:[k.jsx(So,{color:"blue",children:this.formatSize(w.size)}),k.jsx(Yn,{size:"small",type:"primary",onClick:I=>{I.stopPropagation(),this.handleOpenLogFile(w.file)},children:Ie("ui.openLog")})]})]})})}})}})})]})]})}}const mV=r4.createRoot(document.getElementById("root"));mV.render(k.jsx(fV,{}));
|
package/dist/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>Claude Code Viewer</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico?v=1">
|
|
8
8
|
<link rel="shortcut icon" href="/favicon.ico?v=1">
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-YZa65fAJ.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-Dsn6K9v-.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/package.json
CHANGED
package/stats-worker.js
CHANGED
|
@@ -3,6 +3,9 @@ import { parentPort } from 'node:worker_threads';
|
|
|
3
3
|
import { readFileSync, writeFileSync, existsSync, readdirSync, statSync } from 'node:fs';
|
|
4
4
|
import { join, basename } from 'node:path';
|
|
5
5
|
|
|
6
|
+
// 统计 schema 版本号,新增统计字段时递增,强制旧缓存失效重新解析
|
|
7
|
+
const STATS_VERSION = 2;
|
|
8
|
+
|
|
6
9
|
/**
|
|
7
10
|
* 解析单个 JSONL 文件,提取模型使用次数和 token 统计
|
|
8
11
|
* @param {string} filePath JSONL 文件绝对路径
|
|
@@ -11,6 +14,7 @@ import { join, basename } from 'node:path';
|
|
|
11
14
|
function parseJsonlFile(filePath) {
|
|
12
15
|
const models = {};
|
|
13
16
|
let requestCount = 0;
|
|
17
|
+
let sessionCount = 0;
|
|
14
18
|
let totalInput = 0;
|
|
15
19
|
let totalOutput = 0;
|
|
16
20
|
let totalCacheRead = 0;
|
|
@@ -18,7 +22,7 @@ function parseJsonlFile(filePath) {
|
|
|
18
22
|
|
|
19
23
|
try {
|
|
20
24
|
const content = readFileSync(filePath, 'utf-8');
|
|
21
|
-
if (!content.trim()) return { models, summary: { requestCount: 0, input_tokens: 0, output_tokens: 0, cache_read_input_tokens: 0, cache_creation_input_tokens: 0 } };
|
|
25
|
+
if (!content.trim()) return { models, summary: { requestCount: 0, sessionCount: 0, input_tokens: 0, output_tokens: 0, cache_read_input_tokens: 0, cache_creation_input_tokens: 0 } };
|
|
22
26
|
|
|
23
27
|
const entries = content.split('\n---\n').filter(p => p.trim());
|
|
24
28
|
for (const raw of entries) {
|
|
@@ -26,6 +30,11 @@ function parseJsonlFile(filePath) {
|
|
|
26
30
|
const entry = JSON.parse(raw);
|
|
27
31
|
requestCount++;
|
|
28
32
|
|
|
33
|
+
// 会话轮次:MainAgent 且 messages.length === 1 表示一次新会话开始
|
|
34
|
+
if (entry.mainAgent && Array.isArray(entry.body?.messages) && entry.body.messages.length === 1) {
|
|
35
|
+
sessionCount++;
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
// 提取模型名:优先 body.model,其次 response.body.model
|
|
30
39
|
const model = entry.body?.model || entry.response?.body?.model;
|
|
31
40
|
if (!model) continue;
|
|
@@ -65,6 +74,7 @@ function parseJsonlFile(filePath) {
|
|
|
65
74
|
models,
|
|
66
75
|
summary: {
|
|
67
76
|
requestCount,
|
|
77
|
+
sessionCount,
|
|
68
78
|
input_tokens: totalInput,
|
|
69
79
|
output_tokens: totalOutput,
|
|
70
80
|
cache_read_input_tokens: totalCacheRead,
|
|
@@ -119,8 +129,9 @@ function generateProjectStats(projectDir, projectName, onlyFile) {
|
|
|
119
129
|
const size = stat.size;
|
|
120
130
|
const lastModified = stat.mtime.toISOString();
|
|
121
131
|
|
|
122
|
-
//
|
|
123
|
-
if (existing?.
|
|
132
|
+
// 增量优化:如果有已有统计且文件未变化且 schema 版本一致,直接复用
|
|
133
|
+
if (existing?._v === STATS_VERSION
|
|
134
|
+
&& existing?.files?.[f] && existing.files[f].size === size && existing.files[f].lastModified === lastModified) {
|
|
124
135
|
// 如果指定了 onlyFile 且不是此文件,跳过重新解析
|
|
125
136
|
if (!onlyFile || onlyFile !== f) {
|
|
126
137
|
filesStats[f] = existing.files[f];
|
|
@@ -153,6 +164,7 @@ function generateProjectStats(projectDir, projectName, onlyFile) {
|
|
|
153
164
|
|
|
154
165
|
// 计算全局汇总
|
|
155
166
|
let totalRequests = 0;
|
|
167
|
+
let totalSessions = 0;
|
|
156
168
|
let totalInput = 0;
|
|
157
169
|
let totalOutput = 0;
|
|
158
170
|
let totalCacheRead = 0;
|
|
@@ -160,6 +172,7 @@ function generateProjectStats(projectDir, projectName, onlyFile) {
|
|
|
160
172
|
|
|
161
173
|
for (const f of Object.values(filesStats)) {
|
|
162
174
|
totalRequests += f.summary.requestCount;
|
|
175
|
+
totalSessions += f.summary.sessionCount || 0;
|
|
163
176
|
totalInput += f.summary.input_tokens;
|
|
164
177
|
totalOutput += f.summary.output_tokens;
|
|
165
178
|
totalCacheRead += f.summary.cache_read_input_tokens;
|
|
@@ -167,12 +180,14 @@ function generateProjectStats(projectDir, projectName, onlyFile) {
|
|
|
167
180
|
}
|
|
168
181
|
|
|
169
182
|
const stats = {
|
|
183
|
+
_v: STATS_VERSION,
|
|
170
184
|
project: projectName,
|
|
171
185
|
updatedAt: new Date().toISOString(),
|
|
172
186
|
models: topModels,
|
|
173
187
|
files: filesStats,
|
|
174
188
|
summary: {
|
|
175
189
|
requestCount: totalRequests,
|
|
190
|
+
sessionCount: totalSessions,
|
|
176
191
|
fileCount: jsonlFiles.length,
|
|
177
192
|
input_tokens: totalInput,
|
|
178
193
|
output_tokens: totalOutput,
|