refactor: remove verified unused internals (#6460)

* refactor: remove verified unused internals

* test(linear): synchronize webhook shutdown with writer join
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-26 21:45:36 +08:00
1 parent 3230013963
commit f23a6d1485
105 files changed
+207 -1282

No files matched your search

-2
View File
@@ -3033,7 +3033,6 @@ function Shell({
!activeKey ? onTemporaryChatEnabledChange : undefined
}
onToggleSidebar={toggleSidebar}
onNewChat={onNewChat}
onCreateChat={
temporaryChatEnabled ? onCreateTemporaryChat : onCreateChat
}
@@ -3079,7 +3078,6 @@ function Shell({
filePreviewStore={filePreviewStore}
draftStore={draftStore}
onToggleSidebar={toggleSidebar}
onNewChat={onNewChat}
onCreateChat={onCreateChat}
pendingFirstMessage={pendingAutomationMessage}
onPendingFirstMessageConsumed={onPendingAutomationMessageConsumed}
@@ -41,7 +41,6 @@ export function ChannelQrConnectFlow({
renderActions,
renderView,
}: {
token: string;
channelName: string;
startParams?: Readonly<Record<string, string | boolean>>;
idleLabel?: string;
@@ -156,11 +156,6 @@ export function useSettingsController({
const runtimeConfigState = useRuntimeConfigSettings(settings, client, applyPayload);
const markUpdateInstalled = useCallback(() => {
setPendingRestartSections((current) => ({ ...current, runtime: true }));
setSettings((current) => current ? { ...current, requires_restart: true } : current);
}, []);
const closeProviderOAuthFlow = useCallback((cancelPending = true) => {
const flow = providerOAuthFlowRef.current;
providerOAuthFlowRef.current = null;
@@ -479,7 +474,6 @@ export function useSettingsController({
systemState,
systemActions,
activeSection,
markUpdateInstalled,
runtimeConfigState,
closeProviderOAuthFlow,
error,
@@ -229,8 +229,6 @@ interface ThreadShellProps {
temporaryChatEnabled?: boolean;
onTemporaryChatEnabledChange?: (enabled: boolean) => void;
onToggleSidebar: () => void;
onGoHome?: () => void;
onNewChat?: () => void;
onCreateChat?: (
workspaceScope?: WorkspaceScopePayload | null,
initialMessage?: string,
+1 -3
View File
@@ -37,11 +37,9 @@
.gallery-code { overflow: auto; border-radius: var(--radius-control); padding: 1rem; background: hsl(var(--muted)); font-size: 12px; line-height: 1.6; tab-size: 2; }
.gallery-startup-preview .startup-shell { position: relative; height: 100%; }
.gallery-startup-preview .startup-header { display: flex; justify-content: space-between; padding: 5px 13px; }
.gallery-startup-preview .startup-control-shadow { width: 28px; height: 28px; border-radius: 8px; background: rgba(0, 0, 0, .025); }
.gallery-startup-preview .startup-composer { position: absolute; inset-inline: 16px; bottom: max(24px, env(safe-area-inset-bottom)); box-sizing: border-box; max-width: 768px; margin-inline: auto; height: 96px; border-radius: 24px; background: rgba(0, 0, 0, .025); }
.gallery-startup-preview .startup-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.dark .gallery-startup-preview :is(.startup-control-shadow, .startup-composer) { background: rgba(255, 255, 255, .035); }
html.dark .gallery-startup-preview .startup-composer { background: rgba(255, 255, 255, .035); }
@media (max-width: 700px) {
.gallery-header { padding: 0.75rem 1rem; }
-41
View File
@@ -608,9 +608,6 @@
animation: none;
content: "";
}
.streaming-text-fallback::after {
animation: none;
}
}
/**
@@ -753,18 +750,6 @@
transform: translateY(0) scale(1);
}
}
@keyframes composer-status-strip-exit {
0% {
max-height: var(--composer-strip-max-height, 46px);
opacity: 1;
transform: translateY(0) scale(1);
}
100% {
max-height: 0;
opacity: 0;
transform: translateY(8px) scale(0.99);
}
}
.composer-status-strip {
transform-origin: bottom center;
will-change: max-height, opacity, transform;
@@ -772,9 +757,6 @@
.composer-status-strip[data-state="enter"] {
animation: composer-status-strip-enter 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.composer-status-strip[data-state="exit"] {
animation: composer-status-strip-exit 180ms ease-in both;
}
.composer-status-drawer {
--composer-status-drawer-duration: 220ms;
--composer-status-drawer-easing: ease-out;
@@ -847,19 +829,6 @@
transform: translateY(0);
}
}
@keyframes queued-prompt-row-enter {
0% {
opacity: 0;
transform: translateY(6px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.queued-prompt-row {
animation: queued-prompt-row-enter 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
.composer-status-strip {
will-change: auto;
@@ -877,9 +846,6 @@
.thread-layout {
transition-duration: 0.01ms;
}
.queued-prompt-row {
animation: none;
}
}
.thread-workspace {
@@ -1001,13 +967,6 @@
container-type: inline-size;
}
@supports (content-visibility: auto) {
.thread-render-unit {
content-visibility: auto;
contain-intrinsic-size: auto 12rem;
}
}
.thread-prompt-rail {
display: none;
left: 1.75rem;
+1 -56
View File
@@ -814,19 +814,12 @@
"catalogStale": "Cached list may be out of date.",
"catalogFallback": "Built-in list may be out of date.",
"selectModel": "Select model",
"addConfiguration": "Add configuration",
"newConfiguration": "New model configuration",
"newConfigurationHelp": "Save a provider, model, and generation settings as a reusable preset.",
"configurationName": "Configuration name",
"configurationNameHelp": "Rename this saved model configuration.",
"configurationNamePlaceholder": "Fast writing",
"callOrder": "Model order",
"primary": "Primary",
"addToOrder": "Enable preset",
"newPreset": "New preset",
"newPresetHelp": "Save a model and settings for reuse.",
"presets": "Model presets",
"editPreset": "Edit preset",
"presetName": "Preset name",
"presetNameHelp": "Names must be unique; also used by /model.",
"presetNameDuplicate": "A preset with this name already exists.",
@@ -851,25 +844,18 @@
"converting": "Converting...",
"convertAction": "Convert to presets",
"dragToReorder": "Drag to reorder",
"moveUp": "Move up",
"moveDown": "Move down",
"removeFromOrder": "Disable preset",
"inCallOrder": "In call order",
"disabled": "Disabled",
"noPresets": "No model presets yet",
"noPresetsHelp": "Create a preset, then add it to the call order.",
"removeBeforeDelete": "Cannot delete the primary model",
"providerSetupRequired": "Provider setup required",
"configureProviderBeforeSaving": "Configure this provider before saving the preset.",
"deletePresetTitle": "Delete model preset?",
"deletePresetHelp": "Delete “{{name}}” and remove it from the fallback list. Provider credentials will be kept.",
"searchModels": "Choose model",
"useCustomModel": "Use",
"loadingModels": "Loading models...",
"searchCatalog": "Search this provider’s model catalog.",
"modelsAvailable": "available",
"noModelResults": "No matching models.",
"loadFailed": "Model list unavailable.",
"unsupportedModelList": "Type a model ID manually.",
"providerNotConfigured": "Configure this provider before loading models.",
"autoProviderCustomOnly": "Enter a model ID manually when using automatic provider selection.",
@@ -1031,39 +1017,17 @@
"empty": "No matching timezones."
},
"cliApps": {
"allCategories": "All categories",
"availableCount": "{{count}} apps",
"installedCount": "{{count}} CLIs installed",
"summary": "{{installed}} of {{total}} CLIs installed",
"filterAll": "All",
"filterInstalled": "Installed CLIs",
"filterNotInstalled": "Not installed",
"searchPlaceholder": "Search CLIs",
"loading": "Loading CLI apps…",
"empty": "No CLI apps match this filter.",
"statusInstalled": "App ready",
"statusMissing": "Missing",
"statusAvailable": "Available",
"statusUnsupported": "Unsupported",
"statusNotInstalled": "App not installed",
"requires": "Requires",
"test": "Test app",
"update": "Update app",
"uninstall": "Uninstall app",
"install": "Install app",
"readyTitle": "@{{name}} is ready",
"readyStatus": "Ready",
"readyTry": "Try @{{name}}",
"readyCopied": "Copied",
"readyPrompt": "Ask nanobot to use @{{name}} for this task.",
"openChat": "Open chat",
"unsupported": "Unsupported",
"unavailable": "Unavailable",
"noDescription": "No description available.",
"availableCount_one": "{{count}} app",
"availableCount_other": "{{count}} apps",
"installedCount_one": "{{count}} CLI installed",
"installedCount_other": "{{count}} CLIs installed"
"unavailable": "Unavailable"
},
"about": {
"updateNotice": "Update available",
@@ -1314,20 +1278,12 @@
"workspace": "Working directory"
},
"usage": {
"title": "Token usage",
"shortTitle": "Token usage",
"last30Days": "Last 30 days",
"viewDetails": "View details",
"previousPage": "Previous page",
"nextPage": "Next page",
"dailyAverage": "Daily average",
"inputTokens": "Input tokens",
"cacheHitRate": "Cache hit rate",
"requestTrend": "Daily requests",
"cacheRateHelp": "Cache hit rate excludes input with unknown cache status.",
"dailyTrend": "Daily tokens",
"bySource": "Usage by source",
"byModel": "Usage by model",
"modelTrend": "Model trends",
"modelsUnavailable": "No model breakdown available.",
"otherModels": "Other / unattributed",
@@ -1339,19 +1295,8 @@
"cacheUnknown": "Unknown status",
"outputTokens": "Output",
"otherTokens": "Other tokens",
"subtitle": "Provider-reported usage over the last 12 months.",
"empty": "Token activity will appear after new model replies.",
"totalTokens": "Total tokens",
"peakTokens": "Peak tokens",
"thirtyDayTokens": "30-day tokens",
"currentStreak": "Current streak",
"longestStreak": "Longest streak",
"daysValue": "{{count}}d",
"last30": "30 days",
"activeDays": "Active days",
"requests": "Requests",
"estimated": "estimated",
"includesEstimates": "includes estimates",
"cellTitle": "{{date}}: {{tokens}} tokens, {{requests}} requests",
"sources": {
"user": "Chat",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "Directorio de trabajo"
},
"usage": {
"title": "Actividad de tokens",
"shortTitle": "Uso de tokens",
"last30Days": "Últimos 30 días",
"viewDetails": "Ver detalles",
"previousPage": "Página anterior",
"nextPage": "Página siguiente",
"dailyAverage": "Promedio diario",
"inputTokens": "Tokens de entrada",
"cacheHitRate": "Tasa de aciertos de caché",
"requestTrend": "Solicitudes diarias",
"cacheRateHelp": "La tasa excluye las entradas cuyo estado de caché se desconoce.",
"dailyTrend": "Tokens diarios",
"systemHelp": "Incluye tareas internas y llamadas sin origen registrado.",
"bySource": "Uso por origen",
"byModel": "Uso por modelo",
"modelTrend": "Tendencias por modelo",
"modelsUnavailable": "Sin desglose por modelo.",
"otherModels": "Otros / sin atribuir",
@@ -904,19 +896,8 @@
"cacheUnknown": "Estado desconocido",
"outputTokens": "Salida",
"otherTokens": "Otros tokens",
"subtitle": "Uso reportado por el proveedor durante los últimos 12 meses.",
"empty": "La actividad de tokens aparecerá después de nuevas respuestas del modelo.",
"totalTokens": "Tokens totales",
"peakTokens": "Pico de tokens",
"thirtyDayTokens": "Tokens de 30 días",
"currentStreak": "Racha actual",
"longestStreak": "Racha más larga",
"daysValue": "{{count}} d",
"last30": "30 días",
"activeDays": "Días activos",
"requests": "Solicitudes",
"estimated": "estimado",
"includesEstimates": "incluye estimaciones",
"cellTitle": "{{date}}: {{tokens}} tokens, {{requests}} solicitudes",
"sources": {
"user": "Chat",
@@ -998,19 +979,12 @@
"catalogStale": "La lista en caché puede estar desactualizada.",
"catalogFallback": "La lista integrada puede estar desactualizada.",
"selectModel": "Seleccionar modelo",
"addConfiguration": "Agregar configuración",
"newConfiguration": "Nueva configuración de modelo",
"newConfigurationHelp": "Guarda un proveedor y un modelo para seleccionarlos rápidamente.",
"configurationName": "Nombre de configuración",
"configurationNameHelp": "Renombra esta configuración de modelo guardada.",
"configurationNamePlaceholder": "Escritura rápida",
"callOrder": "Orden de modelos",
"primary": "Principal",
"addToOrder": "Activar preajuste",
"newPreset": "Nuevo preajuste",
"newPresetHelp": "Guarda un modelo y sus ajustes para reutilizarlos.",
"presets": "Preajustes de modelo",
"editPreset": "Editar preajuste",
"presetName": "Nombre del preajuste",
"presetNameHelp": "Los nombres deben ser únicos; también se usan en /model.",
"presetNameDuplicate": "Ya existe un preajuste con este nombre.",
@@ -1035,16 +1009,11 @@
"converting": "Convirtiendo...",
"convertAction": "Convertir en preajustes",
"dragToReorder": "Arrastrar para reordenar",
"moveUp": "Subir",
"moveDown": "Bajar",
"removeFromOrder": "Desactivar preajuste",
"inCallOrder": "En el orden de llamada",
"disabled": "Desactivado",
"noPresets": "Aún no hay preajustes de modelo",
"noPresetsHelp": "Crea un preajuste y añádelo al orden de llamada.",
"removeBeforeDelete": "No se puede eliminar el modelo principal",
"providerSetupRequired": "El proveedor requiere configuración",
"configureProviderBeforeSaving": "Configura este proveedor antes de guardar el preajuste.",
"deletePresetTitle": "¿Eliminar el preajuste de modelo?",
"deletePresetHelp": "Se eliminará el preajuste «{{name}}» y se quitará del orden de llamada. Las credenciales del proveedor se conservarán.",
"searchModels": "Elegir modelo",
@@ -1052,9 +1021,7 @@
"loadingModels": "Cargando modelos...",
"searchCatalog": "Busca un modelo en el catálogo del proveedor.",
"availableCount": "Modelos disponibles: {{count}}",
"modelsAvailable": "disponibles",
"noModelResults": "No hay modelos coincidentes.",
"loadFailed": "Lista de modelos no disponible.",
"unsupportedModelList": "Escribe un ID de modelo manualmente.",
"providerNotConfigured": "Configura este proveedor antes de cargar modelos.",
"autoProviderCustomOnly": "Introduce un ID de modelo para usar la selección automática del proveedor."
@@ -1065,39 +1032,17 @@
"empty": "No hay zonas horarias coincidentes."
},
"cliApps": {
"allCategories": "Todas las categorías",
"availableCount_one": "{{count}} aplicación",
"availableCount_other": "{{count}} aplicaciones",
"availableCount": "{{count}} aplicaciones",
"installedCount_one": "{{count}} herramienta CLI instalada",
"installedCount_other": "{{count}} herramientas CLI instaladas",
"installedCount": "{{count}} instaladas",
"summary": "{{installed}} de {{total}} herramientas CLI instaladas",
"filterAll": "Todas",
"filterInstalled": "Herramientas CLI instaladas",
"filterNotInstalled": "No instaladas",
"searchPlaceholder": "Buscar herramientas CLI",
"statusInstalled": "Instalada",
"statusAvailable": "Disponible",
"statusMissing": "Falta dependencia",
"statusUnsupported": "No compatible",
"statusNotInstalled": "No instalada",
"unsupported": "No compatible",
"loading": "Cargando aplicaciones CLI...",
"empty": "Ninguna aplicación CLI coincide con este filtro.",
"readyTitle": "@{{name}} está listo",
"readyStatus": "Listo",
"readyPrompt": "Usa @{{name}} para descubrir qué puedes hacer con esta herramienta.",
"readyTry": "Probar @{{name}}",
"readyCopied": "Copiado",
"openChat": "Abrir chat",
"requires": "Requiere",
"test": "Probar CLI",
"update": "Actualizar CLI",
"uninstall": "Desinstalar CLI",
"install": "Instalar CLI",
"unavailable": "No disponible",
"noDescription": "Sin descripción disponible."
"unavailable": "No disponible"
},
"about": {
"updateNotice": "Actualización disponible",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "Dossier de travail"
},
"usage": {
"title": "Activité des tokens",
"shortTitle": "Utilisation des tokens",
"last30Days": "30 derniers jours",
"viewDetails": "Voir les détails",
"previousPage": "Page précédente",
"nextPage": "Page suivante",
"dailyAverage": "Moyenne quotidienne",
"inputTokens": "Tokens d’entrée",
"cacheHitRate": "Taux de réussite du cache",
"requestTrend": "Requêtes quotidiennes",
"cacheRateHelp": "Le taux exclut les entrées dont l’état du cache est inconnu.",
"dailyTrend": "Tokens quotidiens",
"systemHelp": "Inclut les tâches internes et les appels sans source enregistrée.",
"bySource": "Utilisation par source",
"byModel": "Utilisation par modèle",
"modelTrend": "Tendances des modèles",
"modelsUnavailable": "Aucune ventilation par modèle disponible.",
"otherModels": "Autres / non attribués",
@@ -904,19 +896,8 @@
"cacheUnknown": "État inconnu",
"outputTokens": "Sortie",
"otherTokens": "Autres tokens",
"subtitle": "Usage signalé par le fournisseur sur les 12 derniers mois.",
"empty": "L’activité des tokens apparaîtra après les nouvelles réponses du modèle.",
"totalTokens": "Tokens cumulés",
"peakTokens": "Pic de tokens",
"thirtyDayTokens": "Tokens sur 30 jours",
"currentStreak": "Série actuelle",
"longestStreak": "Plus longue série",
"daysValue": "{{count}} j",
"last30": "30 jours",
"activeDays": "Jours actifs",
"requests": "Requêtes",
"estimated": "estimé",
"includesEstimates": "inclut des estimations",
"cellTitle": "{{date}} : {{tokens}} tokens, {{requests}} requêtes",
"sources": {
"user": "Chat",
@@ -998,19 +979,12 @@
"catalogStale": "La liste en cache peut être obsolète.",
"catalogFallback": "La liste intégrée peut être obsolète.",
"selectModel": "Choisir un modèle",
"addConfiguration": "Ajouter une configuration",
"newConfiguration": "Nouvelle configuration de modèle",
"newConfigurationHelp": "Enregistrez un fournisseur et un modèle pour les sélectionner rapidement.",
"configurationName": "Nom de la configuration",
"configurationNameHelp": "Renomme cette configuration de modèle enregistrée.",
"configurationNamePlaceholder": "Rédaction rapide",
"callOrder": "Ordre des modèles",
"primary": "Principal",
"addToOrder": "Activer le préréglage",
"newPreset": "Nouveau préréglage",
"newPresetHelp": "Enregistrez un modèle et ses réglages pour les réutiliser.",
"presets": "Préréglages de modèle",
"editPreset": "Modifier le préréglage",
"presetName": "Nom du préréglage",
"presetNameHelp": "Les noms doivent être uniques ; ils servent aussi à /model.",
"presetNameDuplicate": "Un préréglage portant ce nom existe déjà.",
@@ -1035,16 +1009,11 @@
"converting": "Conversion...",
"convertAction": "Convertir en préréglages",
"dragToReorder": "Faire glisser pour réorganiser",
"moveUp": "Monter",
"moveDown": "Descendre",
"removeFromOrder": "Désactiver le préréglage",
"inCallOrder": "Dans l’ordre d’appel",
"disabled": "Désactivé",
"noPresets": "Aucun préréglage de modèle",
"noPresetsHelp": "Créez un préréglage, puis ajoutez-le à l’ordre d’appel.",
"removeBeforeDelete": "Impossible de supprimer le modèle principal",
"providerSetupRequired": "Configuration du fournisseur requise",
"configureProviderBeforeSaving": "Configurez ce fournisseur avant d’enregistrer le préréglage.",
"deletePresetTitle": "Supprimer le préréglage de modèle ?",
"deletePresetHelp": "Le préréglage « {{name}} » sera supprimé et retiré de l’ordre d’appel. Les identifiants du fournisseur seront conservés.",
"searchModels": "Choisir le modèle",
@@ -1052,9 +1021,7 @@
"loadingModels": "Chargement des modèles...",
"searchCatalog": "Rechercher dans le catalogue du fournisseur pour choisir un modèle.",
"availableCount": "Modèles disponibles : {{count}}",
"modelsAvailable": "disponibles",
"noModelResults": "Aucun modèle correspondant.",
"loadFailed": "Liste des modèles indisponible.",
"unsupportedModelList": "Saisissez manuellement un ID de modèle.",
"providerNotConfigured": "Configurez ce fournisseur avant de charger les modèles.",
"autoProviderCustomOnly": "Saisissez un ID de modèle pour utiliser la sélection automatique du fournisseur."
@@ -1065,39 +1032,17 @@
"empty": "Aucun fuseau horaire correspondant."
},
"cliApps": {
"allCategories": "Toutes les catégories",
"availableCount_one": "{{count}} application",
"availableCount_other": "{{count}} applications",
"availableCount": "{{count}} applications",
"installedCount_one": "{{count}} outil CLI installé",
"installedCount_other": "{{count}} outils CLI installés",
"installedCount": "{{count}} installées",
"summary": "{{installed}} outils CLI installés sur {{total}}",
"filterAll": "Tout",
"filterInstalled": "Outils CLI installés",
"filterNotInstalled": "Non installées",
"searchPlaceholder": "Rechercher des outils CLI",
"statusInstalled": "Installée",
"statusAvailable": "Disponible",
"statusMissing": "Dépendance manquante",
"statusUnsupported": "Non compatible",
"statusNotInstalled": "Non installée",
"unsupported": "Non compatible",
"loading": "Chargement des applications CLI...",
"empty": "Aucune application CLI ne correspond à ce filtre.",
"readyTitle": "@{{name}} est prêt",
"readyStatus": "Prêt",
"readyPrompt": "Utilisez @{{name}} pour découvrir les fonctions de cet outil.",
"readyTry": "Essayer @{{name}}",
"readyCopied": "Copié",
"openChat": "Ouvrir le chat",
"requires": "Requiert",
"test": "Tester l’outil CLI",
"update": "Mettre à jour l’outil CLI",
"uninstall": "Désinstaller l’outil CLI",
"install": "Installer l’outil CLI",
"unavailable": "Indisponible",
"noDescription": "Aucune description disponible."
"unavailable": "Indisponible"
},
"about": {
"updateNotice": "Mise à jour disponible",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "Direktori kerja"
},
"usage": {
"title": "Aktivitas token",
"shortTitle": "Penggunaan token",
"last30Days": "30 hari terakhir",
"viewDetails": "Lihat detail",
"previousPage": "Halaman sebelumnya",
"nextPage": "Halaman berikutnya",
"dailyAverage": "Rata-rata harian",
"inputTokens": "Token input",
"cacheHitRate": "Rasio cache hit",
"requestTrend": "Permintaan harian",
"cacheRateHelp": "Rasio tidak mencakup input dengan status cache yang tidak diketahui.",
"dailyTrend": "Token harian",
"systemHelp": "Termasuk tugas internal dan panggilan tanpa sumber tercatat.",
"bySource": "Penggunaan berdasarkan sumber",
"byModel": "Penggunaan per model",
"modelTrend": "Tren model",
"modelsUnavailable": "Rincian per model tidak tersedia.",
"otherModels": "Lainnya / belum dikategorikan",
@@ -904,19 +896,8 @@
"cacheUnknown": "Status tidak diketahui",
"outputTokens": "Output",
"otherTokens": "Token lainnya",
"subtitle": "Penggunaan yang dilaporkan penyedia selama 12 bulan terakhir.",
"empty": "Aktivitas token akan muncul setelah balasan model baru.",
"totalTokens": "Total token",
"peakTokens": "Penggunaan token tertinggi",
"thirtyDayTokens": "Token 30 hari",
"currentStreak": "Rentetan saat ini",
"longestStreak": "Rentetan terpanjang",
"daysValue": "{{count}} hari",
"last30": "30 hari",
"activeDays": "Hari aktif",
"requests": "Permintaan",
"estimated": "perkiraan",
"includesEstimates": "termasuk perkiraan",
"cellTitle": "{{date}}: {{tokens}} token, {{requests}} permintaan",
"sources": {
"user": "Chat",
@@ -998,19 +979,12 @@
"catalogStale": "Daftar dalam cache mungkin sudah usang.",
"catalogFallback": "Daftar bawaan mungkin sudah usang.",
"selectModel": "Pilih model",
"addConfiguration": "Tambah konfigurasi",
"newConfiguration": "Konfigurasi model baru",
"newConfigurationHelp": "Simpan penyedia dan model agar mudah dipilih kembali.",
"configurationName": "Nama konfigurasi",
"configurationNameHelp": "Ganti nama konfigurasi model tersimpan ini.",
"configurationNamePlaceholder": "Menulis cepat",
"callOrder": "Urutan model",
"primary": "Utama",
"addToOrder": "Aktifkan prasetel",
"newPreset": "Preset baru",
"newPresetHelp": "Simpan model dan pengaturan untuk digunakan kembali.",
"presets": "Prasetel model",
"editPreset": "Ubah prasetel",
"presetName": "Nama prasetel",
"presetNameHelp": "Nama harus unik; juga digunakan oleh /model.",
"presetNameDuplicate": "Prasetel dengan nama ini sudah ada.",
@@ -1035,16 +1009,11 @@
"converting": "Mengonversi...",
"convertAction": "Ubah ke preset",
"dragToReorder": "Seret untuk mengurutkan ulang",
"moveUp": "Naikkan",
"moveDown": "Turunkan",
"removeFromOrder": "Nonaktifkan prasetel",
"inCallOrder": "Dalam urutan pemanggilan",
"disabled": "Nonaktif",
"noPresets": "Belum ada prasetel model",
"noPresetsHelp": "Buat prasetel, lalu tambahkan ke urutan pemanggilan.",
"removeBeforeDelete": "Model utama tidak dapat dihapus",
"providerSetupRequired": "Penyedia perlu dikonfigurasi",
"configureProviderBeforeSaving": "Konfigurasikan penyedia ini sebelum menyimpan prasetel.",
"deletePresetTitle": "Hapus prasetel model?",
"deletePresetHelp": "Prasetel “{{name}}” akan dihapus, termasuk dari urutan pemanggilan. Kredensial penyedia tetap disimpan.",
"searchModels": "Pilih model",
@@ -1052,9 +1021,7 @@
"loadingModels": "Memuat model...",
"searchCatalog": "Cari model di katalog penyedia.",
"availableCount": "Model tersedia: {{count}}",
"modelsAvailable": "tersedia",
"noModelResults": "Tidak ada model yang cocok.",
"loadFailed": "Daftar model tidak tersedia.",
"unsupportedModelList": "Ketik ID model secara manual.",
"providerNotConfigured": "Konfigurasikan penyedia ini sebelum memuat model.",
"autoProviderCustomOnly": "Masukkan ID model untuk memilih penyedia secara otomatis."
@@ -1065,39 +1032,17 @@
"empty": "Tidak ada zona waktu yang cocok."
},
"cliApps": {
"allCategories": "Semua kategori",
"availableCount_one": "{{count}} aplikasi",
"availableCount_other": "{{count}} aplikasi",
"availableCount": "{{count}} aplikasi",
"installedCount_one": "{{count}} alat CLI terpasang",
"installedCount_other": "{{count}} alat CLI terpasang",
"installedCount": "{{count}} terpasang",
"summary": "{{installed}} dari {{total}} CLI terpasang",
"filterAll": "Semua",
"filterInstalled": "CLI terpasang",
"filterNotInstalled": "Belum terpasang",
"searchPlaceholder": "Cari CLI",
"statusInstalled": "Terpasang",
"statusAvailable": "Tersedia",
"statusMissing": "Dependensi belum terpasang",
"statusUnsupported": "Tidak didukung",
"statusNotInstalled": "Belum terpasang",
"unsupported": "Tidak didukung",
"loading": "Memuat aplikasi CLI...",
"empty": "Tidak ada aplikasi CLI yang cocok dengan filter ini.",
"readyTitle": "@{{name}} siap",
"readyStatus": "Siap",
"readyPrompt": "Gunakan @{{name}} untuk melihat kemampuan CLI ini.",
"readyTry": "Coba @{{name}}",
"readyCopied": "Disalin",
"openChat": "Buka chat",
"requires": "Membutuhkan",
"test": "Uji CLI",
"update": "Perbarui CLI",
"uninstall": "Copot CLI",
"install": "Pasang CLI",
"unavailable": "Tidak tersedia",
"noDescription": "Tidak ada deskripsi."
"unavailable": "Tidak tersedia"
},
"about": {
"updateNotice": "Pembaruan tersedia",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "作業ディレクトリ"
},
"usage": {
"title": "トークンアクティビティ",
"shortTitle": "トークン使用量",
"last30Days": "過去30日間",
"viewDetails": "詳細を見る",
"previousPage": "前のページ",
"nextPage": "次のページ",
"dailyAverage": "1日平均",
"inputTokens": "入力トークン",
"cacheHitRate": "キャッシュヒット率",
"requestTrend": "毎日の要求",
"cacheRateHelp": "キャッシュ状態が不明な入力はヒット率の計算から除外します。",
"dailyTrend": "毎日の Token",
"systemHelp": "内部タスクと記録された送信元がない呼び出しを含みます。",
"bySource": "利用元別の使用量",
"byModel": "モデル別使用量",
"modelTrend": "モデルの推移",
"modelsUnavailable": "モデル別の内訳はありません。",
"otherModels": "その他 / 未分類",
@@ -904,19 +896,8 @@
"cacheUnknown": "状態不明",
"outputTokens": "出力",
"otherTokens": "その他のトークン",
"subtitle": "直近 12 か月にプロバイダーが報告したトークン使用量。",
"empty": "新しいモデル返信の後にトークンアクティビティが表示されます。",
"totalTokens": "累計トークン数",
"peakTokens": "ピークトークン数",
"thirtyDayTokens": "30日間の Token",
"currentStreak": "現在の連続日数",
"longestStreak": "最長の連続日数",
"daysValue": "{{count}} 日",
"last30": "30 日",
"activeDays": "アクティブ日数",
"requests": "リクエスト",
"estimated": "推定",
"includesEstimates": "推定を含む",
"cellTitle": "{{date}}: {{tokens}} トークン、{{requests}} 件のリクエスト",
"sources": {
"user": "チャット",
@@ -998,19 +979,12 @@
"catalogStale": "キャッシュ済みの一覧は古い可能性があります。",
"catalogFallback": "組み込みの一覧は古い可能性があります。",
"selectModel": "モデルを選択",
"addConfiguration": "設定を追加",
"newConfiguration": "新しいモデル設定",
"newConfigurationHelp": "プロバイダーとモデルの組み合わせを保存し、すぐに切り替えられるようにします。",
"configurationName": "設定名",
"configurationNameHelp": "保存済みのモデル設定の名前を変更します。",
"configurationNamePlaceholder": "文章作成用",
"callOrder": "モデルの順序",
"primary": "プライマリ",
"addToOrder": "プリセットを有効化",
"newPreset": "プリセット作成",
"newPresetHelp": "モデルと設定を保存して再利用します。",
"presets": "モデルプリセット",
"editPreset": "プリセットを編集",
"presetName": "プリセット名",
"presetNameHelp": "名前は重複できません。/model でも使用します。",
"presetNameDuplicate": "同じ名前のプリセットがすでに存在します。",
@@ -1035,16 +1009,11 @@
"converting": "変換中...",
"convertAction": "プリセットに変換",
"dragToReorder": "ドラッグして並べ替え",
"moveUp": "上へ移動",
"moveDown": "下へ移動",
"removeFromOrder": "プリセットを無効化",
"inCallOrder": "呼び出し順序に追加済み",
"disabled": "無効",
"noPresets": "モデルプリセットはまだありません",
"noPresetsHelp": "プリセットを作成してから呼び出し順序に追加してください。",
"removeBeforeDelete": "メインモデルは削除できません",
"providerSetupRequired": "プロバイダーの設定が必要です",
"configureProviderBeforeSaving": "プリセットを保存する前に、このプロバイダーを設定してください。",
"deletePresetTitle": "モデルプリセットを削除しますか?",
"deletePresetHelp": "プリセット「{{name}}」を削除し、呼び出し順序からも除外します。プロバイダーの認証情報は保持されます。",
"searchModels": "モデルを選択",
@@ -1052,9 +1021,7 @@
"loadingModels": "モデルを読み込んでいます...",
"searchCatalog": "プロバイダーのカタログからモデルを選択します。",
"availableCount": "利用可能なモデル:{{count}}",
"modelsAvailable": "利用可能",
"noModelResults": "一致するモデルはありません。",
"loadFailed": "モデル一覧を利用できません。",
"unsupportedModelList": "モデル ID を手動で入力してください。",
"providerNotConfigured": "モデルを読み込む前にこのプロバイダーを設定してください。",
"autoProviderCustomOnly": "プロバイダーを自動で選ぶ場合は、モデル ID を直接入力してください。"
@@ -1065,39 +1032,17 @@
"empty": "一致するタイムゾーンはありません。"
},
"cliApps": {
"allCategories": "すべてのカテゴリ",
"availableCount_one": "アプリ {{count}} 件",
"availableCount_other": "アプリ {{count}} 件",
"availableCount": "{{count}} 個のアプリ",
"installedCount_one": "インストール済み CLI:{{count}} 件",
"installedCount_other": "インストール済み CLI:{{count}} 件",
"installedCount": "{{count}} 個インストール済み",
"summary": "{{total}} 個中 {{installed}} 個の CLI がインストール済み",
"filterAll": "すべて",
"filterInstalled": "インストール済み CLI",
"filterNotInstalled": "未インストール",
"searchPlaceholder": "CLI を検索",
"statusInstalled": "インストール済み",
"statusAvailable": "利用可能",
"statusMissing": "依存関係が不足",
"statusUnsupported": "未対応",
"statusNotInstalled": "未インストール",
"unsupported": "未対応",
"loading": "CLI アプリを読み込み中...",
"empty": "この条件に一致する CLI アプリはありません。",
"readyTitle": "@{{name}} の準備ができました",
"readyStatus": "準備完了",
"readyPrompt": "@{{name}} を使って、この CLI でできることを確認します。",
"readyTry": "@{{name}} を試す",
"readyCopied": "コピーしました",
"openChat": "チャットを開く",
"requires": "必要条件",
"test": "CLI をテスト",
"update": "CLI を更新",
"uninstall": "CLI をアンインストール",
"install": "CLI をインストール",
"unavailable": "利用不可",
"noDescription": "説明はありません。"
"unavailable": "利用不可"
},
"about": {
"updateNotice": "アップデートがあります",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "작업 디렉터리"
},
"usage": {
"title": "토큰 활동",
"shortTitle": "토큰 사용량",
"last30Days": "최근 30일",
"viewDetails": "자세히 보기",
"previousPage": "이전 페이지",
"nextPage": "다음 페이지",
"dailyAverage": "일평균 사용량",
"inputTokens": "입력 토큰",
"cacheHitRate": "캐시 적중률",
"requestTrend": "일일 요청",
"cacheRateHelp": "캐시 상태가 알려진 입력만 적중률 계산에 포함됩니다.",
"dailyTrend": "일일 Token",
"systemHelp": "내부 작업과 출처가 기록되지 않은 호출을 포함합니다.",
"bySource": "출처별 사용량",
"byModel": "모델별 사용량",
"modelTrend": "모델 추이",
"modelsUnavailable": "모델별 내역이 없습니다.",
"otherModels": "기타 / 미분류",
@@ -904,19 +896,8 @@
"cacheUnknown": "상태 알 수 없음",
"outputTokens": "출력",
"otherTokens": "기타 토큰",
"subtitle": "최근 12개월 동안 제공업체가 보고한 사용량입니다.",
"empty": "새 모델 응답 이후 토큰 활동이 표시됩니다.",
"totalTokens": "누적 토큰 수",
"peakTokens": "최고 토큰 수",
"thirtyDayTokens": "30일 Token",
"currentStreak": "현재 연속 일수",
"longestStreak": "최장 연속 일수",
"daysValue": "{{count}}일",
"last30": "30일",
"activeDays": "활성 일수",
"requests": "요청",
"estimated": "추정",
"includesEstimates": "추정 포함",
"cellTitle": "{{date}}: {{tokens}} 토큰, 요청 {{requests}}회",
"sources": {
"user": "채팅",
@@ -998,19 +979,12 @@
"catalogStale": "캐시된 목록이 최신이 아닐 수 있습니다.",
"catalogFallback": "기본 제공 목록이 최신이 아닐 수 있습니다.",
"selectModel": "모델 선택",
"addConfiguration": "설정 추가",
"newConfiguration": "새 모델 설정",
"newConfigurationHelp": "제공업체와 모델의 조합을 저장해 빠르게 선택할 수 있습니다.",
"configurationName": "설정 이름",
"configurationNameHelp": "저장된 모델 설정의 이름을 변경합니다.",
"configurationNamePlaceholder": "빠른 작성",
"callOrder": "모델 순서",
"primary": "기본",
"addToOrder": "프리셋 활성화",
"newPreset": "프리셋 만들기",
"newPresetHelp": "모델과 설정을 저장해 다시 사용하세요.",
"presets": "모델 프리셋",
"editPreset": "프리셋 편집",
"presetName": "프리셋 이름",
"presetNameHelp": "이름은 고유해야 하며 /model에서도 사용됩니다.",
"presetNameDuplicate": "같은 이름의 프리셋이 이미 있습니다.",
@@ -1035,16 +1009,11 @@
"converting": "변환 중...",
"convertAction": "프리셋으로 변환",
"dragToReorder": "드래그하여 순서 변경",
"moveUp": "위로 이동",
"moveDown": "아래로 이동",
"removeFromOrder": "프리셋 비활성화",
"inCallOrder": "호출 순서에 포함됨",
"disabled": "비활성화됨",
"noPresets": "아직 모델 프리셋이 없습니다",
"noPresetsHelp": "프리셋을 만든 다음 호출 순서에 추가하세요.",
"removeBeforeDelete": "기본 모델은 삭제할 수 없습니다",
"providerSetupRequired": "제공업체 설정 필요",
"configureProviderBeforeSaving": "프리셋을 저장하기 전에 이 제공업체를 설정하세요.",
"deletePresetTitle": "모델 프리셋을 삭제할까요?",
"deletePresetHelp": "프리셋 ‘{{name}}’을 삭제하고 호출 순서에서도 제거합니다. 제공업체 인증 정보는 유지됩니다.",
"searchModels": "모델 선택",
@@ -1052,9 +1021,7 @@
"loadingModels": "모델 불러오는 중...",
"searchCatalog": "제공업체 카탈로그에서 모델을 선택합니다.",
"availableCount": "사용 가능한 모델: {{count}}개",
"modelsAvailable": "사용 가능",
"noModelResults": "일치하는 모델이 없습니다.",
"loadFailed": "모델 목록을 사용할 수 없습니다.",
"unsupportedModelList": "모델 ID를 직접 입력하세요.",
"providerNotConfigured": "모델을 불러오기 전에 이 제공업체를 설정하세요.",
"autoProviderCustomOnly": "제공업체를 자동으로 선택하려면 모델 ID를 직접 입력하세요."
@@ -1065,39 +1032,17 @@
"empty": "일치하는 시간대가 없습니다."
},
"cliApps": {
"allCategories": "모든 카테고리",
"availableCount_one": "앱 {{count}}개",
"availableCount_other": "앱 {{count}}개",
"availableCount": "앱 {{count}}개",
"installedCount_one": "설치된 CLI 도구 {{count}}개",
"installedCount_other": "설치된 CLI 도구 {{count}}개",
"installedCount": "{{count}}개 설치됨",
"summary": "CLI {{total}}개 중 {{installed}}개 설치됨",
"filterAll": "전체",
"filterInstalled": "설치된 CLI",
"filterNotInstalled": "미설치",
"searchPlaceholder": "CLI 검색",
"statusInstalled": "설치됨",
"statusAvailable": "사용 가능",
"statusMissing": "의존성 필요",
"statusUnsupported": "지원 안 함",
"statusNotInstalled": "미설치",
"unsupported": "지원 안 함",
"loading": "CLI 앱 로드 중...",
"empty": "이 필터와 일치하는 CLI 앱이 없습니다.",
"readyTitle": "@{{name}} 준비됨",
"readyStatus": "준비됨",
"readyPrompt": "채팅에서 @{{name}} 명령으로 이 도구의 기능을 확인하세요.",
"readyTry": "@{{name}} 사용해 보기",
"readyCopied": "복사됨",
"openChat": "채팅 열기",
"requires": "필요 항목",
"test": "CLI 테스트",
"update": "CLI 업데이트",
"uninstall": "CLI 제거",
"install": "CLI 설치",
"unavailable": "사용 불가",
"noDescription": "설명이 없습니다."
"unavailable": "사용 불가"
},
"about": {
"updateNotice": "업데이트가 있습니다",
+1 -56
View File
@@ -622,19 +622,12 @@
"catalogStale": "A lista em cache pode estar desatualizada.",
"catalogFallback": "A lista integrada pode estar desatualizada.",
"selectModel": "Selecionar modelo",
"addConfiguration": "Adicionar configuração",
"newConfiguration": "Nova configuração de modelo",
"newConfigurationHelp": "Salve um provedor e um modelo para selecioná-los rapidamente.",
"configurationName": "Nome da configuração",
"configurationNameHelp": "Renomeie esta configuração de modelo.",
"configurationNamePlaceholder": "Escrita rápida",
"callOrder": "Ordem dos modelos",
"primary": "Principal",
"addToOrder": "Ativar predefinição",
"newPreset": "Novo preset",
"newPresetHelp": "Salve um modelo e seus ajustes para reutilizar.",
"presets": "Predefinições de modelo",
"editPreset": "Editar predefinição",
"presetName": "Nome da predefinição",
"presetNameHelp": "Os nomes devem ser únicos; também são usados por /model.",
"presetNameDuplicate": "Já existe uma predefinição com este nome.",
@@ -659,16 +652,11 @@
"converting": "Convertendo...",
"convertAction": "Converter em presets",
"dragToReorder": "Arraste para reordenar",
"moveUp": "Mover para cima",
"moveDown": "Mover para baixo",
"removeFromOrder": "Desativar predefinição",
"inCallOrder": "Na ordem de chamada",
"disabled": "Desabilitado",
"noPresets": "Ainda não há predefinições de modelo",
"noPresetsHelp": "Crie uma predefinição e adicione-a à ordem de chamada.",
"removeBeforeDelete": "Não é possível excluir o modelo principal",
"providerSetupRequired": "Configuração do provedor necessária",
"configureProviderBeforeSaving": "Configure este provedor antes de salvar a predefinição.",
"deletePresetTitle": "Excluir predefinição de modelo?",
"deletePresetHelp": "A predefinição “{{name}}” será excluída e removida da ordem de chamada. As credenciais do provedor serão mantidas.",
"searchModels": "Escolher modelo",
@@ -676,9 +664,7 @@
"loadingModels": "Carregando modelos...",
"searchCatalog": "Pesquise o catálogo do provedor para escolher um modelo.",
"availableCount": "Modelos disponíveis: {{count}}",
"modelsAvailable": "disponíveis",
"noModelResults": "Nenhum modelo correspondente.",
"loadFailed": "Lista de modelos indisponível.",
"unsupportedModelList": "Digite o ID do modelo manualmente.",
"providerNotConfigured": "Configure este provedor antes de carregar modelos.",
"autoProviderCustomOnly": "Digite um ID de modelo para usar a seleção automática de provedor."
@@ -839,39 +825,17 @@
"empty": "Nenhum fuso horário correspondente."
},
"cliApps": {
"allCategories": "Todas as categorias",
"availableCount_one": "{{count}} aplicativo",
"availableCount_other": "{{count}} aplicativos",
"availableCount": "{{count}} aplicativos",
"installedCount_one": "{{count}} ferramenta CLI instalada",
"installedCount_other": "{{count}} ferramentas CLI instaladas",
"installedCount": "{{count}} ferramentas CLI instaladas",
"summary": "{{installed}} de {{total}} ferramentas CLI instaladas",
"filterAll": "Todos",
"filterInstalled": "Ferramentas CLI instaladas",
"filterNotInstalled": "Não instaladas",
"searchPlaceholder": "Buscar ferramentas CLI",
"loading": "Carregando aplicativos CLI...",
"empty": "Nenhum aplicativo CLI corresponde a este filtro.",
"statusInstalled": "Instalado",
"statusMissing": "Dependência ausente",
"statusAvailable": "Disponível",
"statusUnsupported": "Não compatível",
"statusNotInstalled": "Não instalado",
"requires": "Requer",
"test": "Testar ferramenta CLI",
"update": "Atualizar ferramenta CLI",
"uninstall": "Desinstalar ferramenta CLI",
"install": "Instalar ferramenta CLI",
"readyTitle": "@{{name}} está pronto",
"readyStatus": "Pronto",
"readyTry": "Experimentar @{{name}}",
"readyCopied": "Copiado",
"readyPrompt": "Peça ao nanobot para usar @{{name}} nesta tarefa.",
"openChat": "Abrir conversa",
"unsupported": "Não compatível",
"unavailable": "Indisponível",
"noDescription": "Nenhuma descrição disponível."
"unavailable": "Indisponível"
},
"about": {
"updateNotice": "Atualização disponível",
@@ -1122,21 +1086,13 @@
"workspace": "Diretório de trabalho"
},
"usage": {
"title": "Atividade de tokens",
"shortTitle": "Uso de tokens",
"last30Days": "Últimos 30 dias",
"viewDetails": "Ver detalhes",
"previousPage": "Página anterior",
"nextPage": "Próxima página",
"dailyAverage": "Média diária",
"inputTokens": "Tokens de entrada",
"cacheHitRate": "Taxa de acertos de cache",
"requestTrend": "Solicitações diárias",
"cacheRateHelp": "A taxa exclui entradas com estado de cache desconhecido.",
"dailyTrend": "Tokens diários",
"systemHelp": "Inclui tarefas internas e chamadas sem origem registrada.",
"bySource": "Uso por origem",
"byModel": "Uso por modelo",
"modelTrend": "Tendências dos modelos",
"modelsUnavailable": "Sem detalhamento por modelo.",
"otherModels": "Outros / não atribuídos",
@@ -1148,19 +1104,8 @@
"cacheUnknown": "Status desconhecido",
"outputTokens": "Saída",
"otherTokens": "Outros tokens",
"subtitle": "Uso reportado pelo provedor nos últimos 12 meses.",
"empty": "A atividade de tokens aparecerá após novas respostas do modelo.",
"totalTokens": "Total de tokens",
"peakTokens": "Pico de tokens",
"thirtyDayTokens": "Tokens de 30 dias",
"currentStreak": "Sequência atual",
"longestStreak": "Maior sequência",
"daysValue": "{{count}}d",
"last30": "30 dias",
"activeDays": "Dias ativos",
"requests": "Requisições",
"estimated": "estimado",
"includesEstimates": "inclui estimativas",
"cellTitle": "{{date}}: {{tokens}} tokens, {{requests}} requisições",
"sources": {
"user": "Chat",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "Thư mục làm việc"
},
"usage": {
"title": "Hoạt động token",
"shortTitle": "Mức dùng token",
"last30Days": "30 ngày qua",
"viewDetails": "Xem chi tiết",
"previousPage": "Trang trước",
"nextPage": "Trang sau",
"dailyAverage": "Trung bình mỗi ngày",
"inputTokens": "Token đầu vào",
"cacheHitRate": "Tỷ lệ trúng bộ nhớ đệm",
"requestTrend": "Yêu cầu mỗi ngày",
"cacheRateHelp": "Tỷ lệ không tính đầu vào có trạng thái bộ nhớ đệm không rõ.",
"dailyTrend": "Token mỗi ngày",
"systemHelp": "Gồm tác vụ nội bộ và lệnh gọi chưa ghi nguồn.",
"bySource": "Mức dùng theo nguồn",
"byModel": "Mức dùng theo mô hình",
"modelTrend": "Xu hướng mô hình",
"modelsUnavailable": "Chưa có chi tiết theo mô hình.",
"otherModels": "Khác / chưa phân loại",
@@ -904,19 +896,8 @@
"cacheUnknown": "Trạng thái chưa rõ",
"outputTokens": "Đầu ra",
"otherTokens": "Token khác",
"subtitle": "Mức dùng do nhà cung cấp báo cáo trong 12 tháng gần nhất.",
"empty": "Hoạt động token sẽ xuất hiện sau các phản hồi mô hình mới.",
"totalTokens": "Tổng token",
"peakTokens": "Mức dùng token cao nhất",
"thirtyDayTokens": "Token trong 30 ngày",
"currentStreak": "Chuỗi ngày hiện tại",
"longestStreak": "Chuỗi ngày dài nhất",
"daysValue": "{{count}} ngày",
"last30": "30 ngày",
"activeDays": "Ngày hoạt động",
"requests": "Yêu cầu",
"estimated": "ước tính",
"includesEstimates": "bao gồm ước tính",
"cellTitle": "{{date}}: {{tokens}} tokens, {{requests}} yêu cầu",
"sources": {
"user": "Trò chuyện",
@@ -998,19 +979,12 @@
"catalogStale": "Danh sách đã lưu đệm có thể đã cũ.",
"catalogFallback": "Danh sách có sẵn có thể đã cũ.",
"selectModel": "Chọn mô hình",
"addConfiguration": "Thêm cấu hình",
"newConfiguration": "Cấu hình mô hình mới",
"newConfigurationHelp": "Lưu nhà cung cấp và mô hình thành một lựa chọn nhanh.",
"configurationName": "Tên cấu hình",
"configurationNameHelp": "Đổi tên cấu hình mô hình đã lưu này.",
"configurationNamePlaceholder": "Viết nhanh",
"callOrder": "Thứ tự mô hình",
"primary": "Chính",
"addToOrder": "Bật cấu hình đặt trước",
"newPreset": "Tạo bộ thiết lập",
"newPresetHelp": "Lưu mô hình và thiết lập để dùng lại.",
"presets": "Cấu hình mô hình đặt trước",
"editPreset": "Sửa cấu hình đặt trước",
"presetName": "Tên cấu hình đặt trước",
"presetNameHelp": "Tên phải duy nhất; cũng dùng trong /model.",
"presetNameDuplicate": "Đã có cấu hình đặt trước mang tên này.",
@@ -1035,16 +1009,11 @@
"converting": "Đang chuyển đổi...",
"convertAction": "Chuyển thành bộ thiết lập",
"dragToReorder": "Kéo để sắp xếp lại",
"moveUp": "Di chuyển lên",
"moveDown": "Di chuyển xuống",
"removeFromOrder": "Tắt cấu hình đặt trước",
"inCallOrder": "Trong thứ tự gọi",
"disabled": "Đã tắt",
"noPresets": "Chưa có cấu hình mô hình đặt trước",
"noPresetsHelp": "Tạo cấu hình đặt trước rồi thêm vào thứ tự gọi.",
"removeBeforeDelete": "Không thể xóa mô hình chính",
"providerSetupRequired": "Cần cấu hình nhà cung cấp",
"configureProviderBeforeSaving": "Hãy cấu hình nhà cung cấp này trước khi lưu cấu hình đặt trước.",
"deletePresetTitle": "Xóa cấu hình mô hình đặt trước?",
"deletePresetHelp": "Cấu hình đặt trước “{{name}}” sẽ bị xóa và loại khỏi thứ tự gọi. Thông tin xác thực của nhà cung cấp vẫn được giữ lại.",
"searchModels": "Chọn mô hình",
@@ -1052,9 +1021,7 @@
"loadingModels": "Đang tải mô hình...",
"searchCatalog": "Tìm trong danh mục nhà cung cấp để chọn mô hình.",
"availableCount": "Mô hình khả dụng: {{count}}",
"modelsAvailable": "khả dụng",
"noModelResults": "Không có mô hình phù hợp.",
"loadFailed": "Không tải được danh sách mô hình.",
"unsupportedModelList": "Nhập ID mô hình thủ công.",
"providerNotConfigured": "Hãy cấu hình nhà cung cấp này trước khi tải mô hình.",
"autoProviderCustomOnly": "Nhập ID mô hình để dùng chế độ tự động chọn nhà cung cấp."
@@ -1065,39 +1032,17 @@
"empty": "Không có múi giờ phù hợp."
},
"cliApps": {
"allCategories": "Tất cả danh mục",
"availableCount_one": "{{count}} ứng dụng",
"availableCount_other": "{{count}} ứng dụng",
"availableCount": "{{count}} ứng dụng",
"installedCount_one": "Đã cài đặt {{count}} công cụ CLI",
"installedCount_other": "Đã cài đặt {{count}} công cụ CLI",
"installedCount": "Đã cài {{count}}",
"summary": "Đã cài {{installed}} / {{total}} CLI",
"filterAll": "Tất cả",
"filterInstalled": "CLI đã cài",
"filterNotInstalled": "Chưa cài",
"searchPlaceholder": "Tìm CLI",
"statusInstalled": "Đã cài",
"statusAvailable": "Có sẵn",
"statusMissing": "Thiếu gói cần thiết",
"statusUnsupported": "Không hỗ trợ",
"statusNotInstalled": "Chưa cài",
"unsupported": "Không hỗ trợ",
"loading": "Đang tải ứng dụng CLI...",
"empty": "Không có ứng dụng CLI nào khớp bộ lọc này.",
"readyTitle": "@{{name}} đã sẵn sàng",
"readyStatus": "Sẵn sàng",
"readyPrompt": "Dùng @{{name}} để xem CLI này làm được gì.",
"readyTry": "Thử @{{name}}",
"readyCopied": "Đã sao chép",
"openChat": "Mở chat",
"requires": "Yêu cầu",
"test": "Kiểm tra CLI",
"update": "Cập nhật CLI",
"uninstall": "Gỡ CLI",
"install": "Cài CLI",
"unavailable": "Không khả dụng",
"noDescription": "Không có mô tả."
"unavailable": "Không khả dụng"
},
"about": {
"updateNotice": "Có bản cập nhật",
+1 -56
View File
@@ -814,19 +814,12 @@
"catalogStale": "缓存列表可能已过时。",
"catalogFallback": "内置列表可能已过时。",
"selectModel": "选择模型",
"addConfiguration": "添加配置",
"newConfiguration": "新建模型配置",
"newConfigurationHelp": "将提供商、模型和参数保存为预设,方便下次选用。",
"configurationName": "配置名称",
"configurationNameHelp": "重命名这个已保存的模型配置。",
"configurationNamePlaceholder": "快速写作",
"callOrder": "使用顺序",
"primary": "主模型",
"addToOrder": "启用预设",
"newPreset": "新建预设",
"newPresetHelp": "保存模型和参数,方便下次选用",
"presets": "模型预设",
"editPreset": "编辑预设",
"presetName": "预设名称",
"presetNameHelp": "名称不可重复,也用于 /model",
"presetNameDuplicate": "已存在同名预设。",
@@ -851,25 +844,18 @@
"converting": "正在转换...",
"convertAction": "转为预设",
"dragToReorder": "拖动调整顺序",
"moveUp": "上移",
"moveDown": "下移",
"removeFromOrder": "停用预设",
"inCallOrder": "已加入调用顺序",
"disabled": "未启用",
"noPresets": "还没有模型预设",
"noPresetsHelp": "先创建预设,再将它加入调用顺序。",
"removeBeforeDelete": "无法删除主模型",
"providerSetupRequired": "请先配置提供商",
"configureProviderBeforeSaving": "请先配置此提供商,再保存预设。",
"deletePresetTitle": "删除模型预设?",
"deletePresetHelp": "删除预设“{{name}}”,同时将它从备用模型列表中移除。提供商凭据会保留。",
"searchModels": "选择模型",
"useCustomModel": "使用",
"loadingModels": "正在加载模型...",
"searchCatalog": "搜索此提供商的模型列表。",
"modelsAvailable": "可用",
"noModelResults": "没有匹配的模型。",
"loadFailed": "暂时无法加载模型列表。",
"unsupportedModelList": "手动输入模型 ID。",
"providerNotConfigured": "加载模型前请先配置此提供商。",
"autoProviderCustomOnly": "自动选择提供商时,请手动输入模型 ID。",
@@ -1031,39 +1017,17 @@
"empty": "没有匹配的时区。"
},
"cliApps": {
"allCategories": "全部分类",
"availableCount_one": "{{count}} 个应用",
"availableCount_other": "{{count}} 个应用",
"availableCount": "{{count}} 个应用",
"installedCount_one": "已安装 {{count}} 个命令行应用",
"installedCount_other": "已安装 {{count}} 个命令行应用",
"installedCount": "已安装 {{count}} 个命令行应用",
"summary": "已安装 {{installed}} / {{total}} 个命令行应用",
"filterAll": "全部",
"filterInstalled": "已安装",
"filterNotInstalled": "未安装",
"searchPlaceholder": "搜索命令行应用",
"loading": "正在加载命令行应用…",
"empty": "没有匹配的命令行应用。",
"statusInstalled": "应用已就绪",
"statusMissing": "未安装",
"statusAvailable": "可用",
"statusUnsupported": "暂不支持",
"statusNotInstalled": "应用未安装",
"requires": "依赖",
"test": "测试应用",
"update": "更新应用",
"uninstall": "卸载应用",
"install": "安装应用",
"readyTitle": "@{{name}} 已就绪",
"readyStatus": "就绪",
"readyTry": "试试 @{{name}}",
"readyCopied": "已复制",
"readyPrompt": "让 nanobot 在这个任务中使用 @{{name}}。",
"openChat": "返回聊天",
"unsupported": "暂不支持",
"unavailable": "不可用",
"noDescription": "暂无描述。"
"unavailable": "不可用"
},
"about": {
"updateNotice": "有可用更新",
@@ -1314,20 +1278,12 @@
"workspace": "工作目录"
},
"usage": {
"title": "Token 用量",
"shortTitle": "Token 用量",
"last30Days": "近 30 天",
"viewDetails": "查看详情",
"previousPage": "上一页",
"nextPage": "下一页",
"dailyAverage": "日均用量",
"inputTokens": "输入 Token",
"cacheHitRate": "缓存命中率",
"requestTrend": "每日请求",
"cacheRateHelp": "缓存命中率仅统计缓存状态已知的输入。",
"dailyTrend": "每日 Token",
"bySource": "用量来源",
"byModel": "模型用量",
"modelTrend": "模型趋势",
"modelsUnavailable": "暂无模型用量明细。",
"otherModels": "其他模型 / 未分类",
@@ -1339,19 +1295,8 @@
"cacheUnknown": "状态未知",
"outputTokens": "输出",
"otherTokens": "其他 Token",
"subtitle": "最近 12 个月由提供商上报的 Token 用量。",
"empty": "模型产生新的回复后,这里会显示 Token 用量。",
"totalTokens": "Token 总数",
"peakTokens": "Token 峰值",
"thirtyDayTokens": "30 天 Token",
"currentStreak": "连续天数",
"longestStreak": "最长连续",
"daysValue": "{{count}} 天",
"last30": "30 天",
"activeDays": "活跃天数",
"requests": "请求数",
"estimated": "估算",
"includesEstimates": "包含估算",
"cellTitle": "{{date}}:{{tokens}} Token,{{requests}} 次请求",
"sources": {
"user": "对话",
+1 -56
View File
@@ -878,21 +878,13 @@
"workspace": "工作目錄"
},
"usage": {
"title": "Token 用量",
"shortTitle": "Token 用量",
"last30Days": "近 30 天",
"viewDetails": "查看詳情",
"previousPage": "上一頁",
"nextPage": "下一頁",
"dailyAverage": "日均用量",
"inputTokens": "輸入 Token",
"cacheHitRate": "快取命中率",
"requestTrend": "每日請求",
"cacheRateHelp": "快取命中率僅統計快取狀態已知的輸入。",
"dailyTrend": "每日 Token",
"systemHelp": "包括內部任務和未標註來源的呼叫",
"bySource": "用量來源",
"byModel": "模型用量",
"modelTrend": "模型趨勢",
"modelsUnavailable": "暫無模型用量明細。",
"otherModels": "其他模型 / 未歸類",
@@ -904,19 +896,8 @@
"cacheUnknown": "狀態未知",
"outputTokens": "輸出",
"otherTokens": "其他 Token",
"subtitle": "最近 12 個月由供應商回報的 Token 用量。",
"empty": "模型產生新回覆後,此處會顯示 Token 用量。",
"totalTokens": "Token 總數",
"peakTokens": "Token 峰值",
"thirtyDayTokens": "30 天 Token",
"currentStreak": "連續天數",
"longestStreak": "最長連續",
"daysValue": "{{count}} 天",
"last30": "30 天",
"activeDays": "使用天數",
"requests": "請求數",
"estimated": "估算",
"includesEstimates": "包含估算",
"cellTitle": "{{date}}:{{tokens}} 個 Token,{{requests}} 次請求",
"sources": {
"user": "對話",
@@ -998,19 +979,12 @@
"catalogStale": "快取清單可能已過時。",
"catalogFallback": "內建清單可能已過時。",
"selectModel": "選擇模型",
"addConfiguration": "新增設定",
"newConfiguration": "新增模型設定",
"newConfigurationHelp": "將供應商、模型及生成參數儲存為預設,方便下次選用。",
"configurationName": "設定名稱",
"configurationNameHelp": "重新命名這個已儲存的模型設定。",
"configurationNamePlaceholder": "快速寫作",
"callOrder": "使用順序",
"primary": "主要模型",
"addToOrder": "啟用預設",
"newPreset": "新建預設",
"newPresetHelp": "儲存模型和引數,方便下次選用",
"presets": "模型預設",
"editPreset": "編輯預設",
"presetName": "預設名稱",
"presetNameHelp": "名稱不可重複,也用於 /model",
"presetNameDuplicate": "已有同名預設。",
@@ -1035,16 +1009,11 @@
"converting": "正在轉換…",
"convertAction": "轉為預設",
"dragToReorder": "拖曳調整順序",
"moveUp": "上移",
"moveDown": "下移",
"removeFromOrder": "停用預設",
"inCallOrder": "已加入呼叫順序",
"disabled": "未啟用",
"noPresets": "尚無模型預設",
"noPresetsHelp": "先建立預設,再將它加入呼叫順序。",
"removeBeforeDelete": "無法刪除主要模型",
"providerSetupRequired": "供應商需要設定",
"configureProviderBeforeSaving": "請先設定此供應商,再儲存預設。",
"deletePresetTitle": "刪除模型預設?",
"deletePresetHelp": "刪除預設「{{name}}」,並將它從備用模型清單移除。供應商憑證會保留。",
"searchModels": "選擇模型",
@@ -1052,9 +1021,7 @@
"loadingModels": "正在載入模型…",
"searchCatalog": "搜尋此供應商的模型清單。",
"availableCount": "可用模型:{{count}} 個",
"modelsAvailable": "可用",
"noModelResults": "沒有符合的模型。",
"loadFailed": "無法取得模型清單。",
"unsupportedModelList": "手動輸入模型 ID。",
"providerNotConfigured": "載入模型前請先設定此供應商。",
"autoProviderCustomOnly": "自動選擇供應商時,請手動輸入模型 ID。"
@@ -1065,39 +1032,17 @@
"empty": "沒有符合的時區。"
},
"cliApps": {
"allCategories": "全部分類",
"availableCount_one": "{{count}} 個應用程式",
"availableCount_other": "{{count}} 個應用程式",
"availableCount": "{{count}} 個應用程式",
"installedCount_one": "已安裝 {{count}} 個命令列工具",
"installedCount_other": "已安裝 {{count}} 個命令列工具",
"installedCount": "已安裝 {{count}} 個命令列工具",
"summary": "已安裝 {{installed}} / {{total}} 個命令列工具",
"filterAll": "全部",
"filterInstalled": "已安裝的 CLI",
"filterNotInstalled": "未安裝",
"searchPlaceholder": "搜尋 CLI",
"statusInstalled": "應用程式已就緒",
"statusAvailable": "可用",
"statusMissing": "缺少相依項",
"statusUnsupported": "不支援",
"statusNotInstalled": "未安裝",
"unsupported": "不支援",
"loading": "正在載入 CLI 應用程式…",
"empty": "沒有符合此篩選條件的 CLI 應用程式。",
"readyTitle": "@{{name}} 已就緒",
"readyStatus": "就緒",
"readyPrompt": "請 nanobot 使用 @{{name}} 完成這項任務。",
"readyTry": "試用 @{{name}}",
"readyCopied": "已複製",
"openChat": "開啟聊天",
"requires": "需要",
"test": "測試 CLI",
"update": "更新 CLI",
"uninstall": "解除安裝 CLI",
"install": "安裝 CLI",
"unavailable": "不可用",
"noDescription": "目前沒有描述。"
"unavailable": "不可用"
},
"about": {
"updateNotice": "有可用更新",
+3 -4
View File
@@ -92,7 +92,7 @@ describe("channel QR connect parameters", () => {
requestMutation.mockResolvedValueOnce({
session_id: "qr-session", status: "pending", qr_url: "https://example.com/connect",
});
render(<ChannelQrConnectFlow token="tok" channelName="plugin-chat" labels={labels}
render(<ChannelQrConnectFlow channelName="plugin-chat" labels={labels}
minimalPending={minimalPending} onFeaturesUpdate={vi.fn()} />);
fireEvent.click(screen.getByRole("button", { name: "Connect" }));
expect(await screen.findByRole("img", { name: "Connection QR code" })).toHaveAttribute("src", "data:image/png;base64,preview");
@@ -104,7 +104,7 @@ describe("channel QR connect parameters", () => {
requestMutation
.mockResolvedValueOnce({ session_id: "browser-session", status: "pending", qr_url: "https://example.com/authorize" })
.mockResolvedValueOnce({ session_id: "browser-session", status: "cancelled" });
render(<ChannelQrConnectFlow token="tok" channelName="plugin-chat" showQrCode={false}
render(<ChannelQrConnectFlow channelName="plugin-chat" showQrCode={false}
labels={{ ...labels, scanTitle: "Authorize in browser", scanDescription: "Continue in the browser." }}
onFeaturesUpdate={vi.fn()} />);
fireEvent.click(screen.getByRole("button", { name: "Connect" }));
@@ -128,7 +128,7 @@ describe("channel QR connect parameters", () => {
requestMutation
.mockResolvedValueOnce({ session_id: "browser-session", status: "pending", qr_url: "https://example.com/authorize" })
.mockResolvedValueOnce({ session_id: "browser-session", status: "succeeded", nanobot_features: features });
render(<ChannelQrConnectFlow token="tok" channelName="plugin-chat" showQrCode={false}
render(<ChannelQrConnectFlow channelName="plugin-chat" showQrCode={false}
labels={labels} onFeaturesUpdate={onFeaturesUpdate} />);
fireEvent.click(screen.getByRole("button", { name: "Connect" }));
expect(await screen.findByText("Connected", {}, { timeout: 2000 })).toBeVisible();
@@ -141,7 +141,6 @@ describe("channel QR connect parameters", () => {
it("forwards current channel parameters without restarting on rerender and preserves forced retries", async () => {
const props = {
token: "tok",
channelName: "plugin-chat",
autoStart: true,
forceOnRepeat: true,
@@ -41,9 +41,7 @@ function resolveReady(file: File): Extract<EncodeResponse, { ok: true }> {
id: "stub",
ok: true,
dataUrl: `data:image/png;base64,${btoa(file.name)}`,
mime: "image/png",
bytes: file.size,
origBytes: file.size,
normalized: false,
};
}
+9 -104
View File
@@ -1221,22 +1221,19 @@ describe("ThreadShell", () => {
it("does not navigate away when clicking the chat title", async () => {
const client = makeClient();
const onGoHome = vi.fn();
render(wrap(
client,
<ThreadShell
session={session("chat-title")}
title="Important conversation"
onToggleSidebar={() => {}}
onGoHome={onGoHome}
onNewChat={() => {}}
/>,
));
await waitFor(() => expect(screen.getByText("Important conversation")).toBeInTheDocument());
fireEvent.click(screen.getByText("Important conversation"));
expect(onGoHome).not.toHaveBeenCalled();
expect(screen.getByText("Important conversation")).toBeVisible();
});
it.each([true, false])("waits for parent settings and retries only on failure (success: %s)", async (success) => {
@@ -1768,7 +1765,6 @@ describe("ThreadShell", () => {
it("restores in-memory messages when switching away and back to a session", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-a");
const { rerender } = render(
wrap(
@@ -1777,8 +1773,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -1801,8 +1795,6 @@ describe("ThreadShell", () => {
session={session("chat-b")}
title="Chat chat-b"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -1816,8 +1808,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -1988,7 +1978,6 @@ describe("ThreadShell", () => {
it("clears the old thread when the active session is removed", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-a");
const { rerender } = render(
wrap(
@@ -1997,8 +1986,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2021,8 +2008,6 @@ describe("ThreadShell", () => {
session={null}
title="nanobot"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2036,7 +2021,6 @@ describe("ThreadShell", () => {
it("creates a chat only when the blank landing sends a first message", async () => {
const client = makeClient();
const onNewChat = vi.fn();
const onCreateChat = vi.fn().mockResolvedValue("chat-new");
render(
@@ -2046,8 +2030,6 @@ describe("ThreadShell", () => {
session={null}
title="nanobot"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
onCreateChat={onCreateChat}
/>,
),
@@ -2060,7 +2042,6 @@ describe("ThreadShell", () => {
await waitFor(() => expect(onCreateChat).toHaveBeenCalledTimes(1));
expect(onCreateChat).toHaveBeenCalledWith(null, "start for real", null);
expect(onNewChat).not.toHaveBeenCalled();
});
it("applies the selected landing preset before sending the first prompt", async () => {
@@ -2377,8 +2358,6 @@ describe("ThreadShell", () => {
session={null}
title="nanobot"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -2394,7 +2373,6 @@ describe("ThreadShell", () => {
it("does not leak the previous thread when opening a brand-new chat", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-new");
vi.stubGlobal(
"fetch",
vi.fn(async (input: RequestInfo | URL) => {
@@ -2422,8 +2400,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2438,8 +2414,6 @@ describe("ThreadShell", () => {
session={session("chat-new")}
title="Chat chat-new"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2507,7 +2481,6 @@ describe("ThreadShell", () => {
it("does not cache optimistic messages under the next chat during a session switch", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-b");
const { rerender } = render(
wrap(
@@ -2516,8 +2489,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2540,8 +2511,6 @@ describe("ThreadShell", () => {
session={session("chat-b")}
title="Chat chat-b"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2559,8 +2528,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2576,8 +2543,6 @@ describe("ThreadShell", () => {
session={session("chat-b")}
title="Chat chat-b"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -2612,7 +2577,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -2635,7 +2599,6 @@ describe("ThreadShell", () => {
session={null}
title="nanobot"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -2652,7 +2615,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -2669,7 +2631,6 @@ describe("ThreadShell", () => {
session={session(chatId)}
title={`Chat ${chatId}`}
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
);
const { rerender } = render(view("chat-a"));
@@ -2731,7 +2692,6 @@ describe("ThreadShell", () => {
session={session("chat-fork")}
title="Chat chat-fork"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -2808,7 +2768,6 @@ describe("ThreadShell", () => {
session={session("resume-chat")}
title="Resume chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -2861,7 +2820,7 @@ describe("ThreadShell", () => {
}));
render(wrap(client, <ThreadShell
session={session(chatId)} title="Cached completion"
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
await screen.findByText("question");
act(() => {
@@ -2913,7 +2872,7 @@ describe("ThreadShell", () => {
}));
render(wrap(client, <ThreadShell
session={session(chatId)} title="Published completion"
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
await screen.findByText("question");
act(() => {
@@ -2989,7 +2948,6 @@ describe("ThreadShell", () => {
session={session("mount-during-reconnect")}
title="Mount during reconnect"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -3055,7 +3013,6 @@ describe("ThreadShell", () => {
session={session("window-reset-chat")}
title="Window reset"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -3119,7 +3076,6 @@ describe("ThreadShell", () => {
session={session(chatId)}
title={`Chat ${chatId}`}
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
);
const { rerender } = render(view("lineage-chat-a"));
@@ -3175,7 +3131,6 @@ describe("ThreadShell", () => {
session={session("reset-tail-race")}
title="Reset tail race"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -3237,7 +3192,6 @@ describe("ThreadShell", () => {
session={session("empty-reset-chat")}
title="Empty reset"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -3316,7 +3270,6 @@ describe("ThreadShell", () => {
session={session("strict-canonical")}
title="Strict canonical"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>
</StrictMode>,
),
@@ -3383,7 +3336,7 @@ describe("ThreadShell", () => {
return Promise.resolve(httpJson(completedBody(true)));
}));
render(wrap(client, <ThreadShell session={session(chatId)} title="Layout recheck"
onToggleSidebar={() => {}} onNewChat={() => {}} />));
onToggleSidebar={() => {}} />));
await screen.findByText("layout question");
act(() => {
client._emitChat(chatId, {
@@ -3473,7 +3426,6 @@ describe("ThreadShell", () => {
session={session(chatId)}
title={`Chat ${chatId}`}
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
);
const { rerender } = render(view("chat-version-a"));
@@ -3559,7 +3511,6 @@ describe("ThreadShell", () => {
session={session("run-generation-chat")}
title="Run generation chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -3623,7 +3574,7 @@ describe("ThreadShell", () => {
}));
render(wrap(client, <ThreadShell
session={session(chatId)} title="Guided turn"
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
await screen.findByText("guided question");
act(() => {
@@ -3752,7 +3703,7 @@ describe("ThreadShell", () => {
}));
render(wrap(client, <ThreadShell
session={session(chatId)} title="Completed latest window" messageCache={messageCache}
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
const completed = await screen.findByText("completed reply");
const older = screen.getByText("older paginated answer");
@@ -3817,7 +3768,7 @@ describe("ThreadShell", () => {
}));
render(wrap(client, <ThreadShell
session={session(chatId)} title="Completed paged guidance" messageCache={messageCache}
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
await screen.findByText("completed last");
const messages = [
@@ -3859,7 +3810,6 @@ describe("ThreadShell", () => {
session={session("initial-completion")}
title="Initial completion"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>));
await screen.findByText("previous question");
act(() => client._emitChat("initial-completion", {
@@ -3912,7 +3862,6 @@ describe("ThreadShell", () => {
session={session("late-frame-chat")}
title="Late frame chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4003,7 +3952,6 @@ describe("ThreadShell", () => {
session={session(chatId)}
title={`Chat ${chatId}`}
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
);
const { rerender } = render(view("visibility-complete-a"));
@@ -4063,7 +4011,6 @@ describe("ThreadShell", () => {
session={session("empty-answer")}
title="Empty answer"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4123,7 +4070,7 @@ describe("ThreadShell", () => {
render(wrap(client, <ThreadShell
session={session(chatId)} title="Running history"
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
await screen.findByText("previous answer");
@@ -4277,7 +4224,7 @@ describe("ThreadShell", () => {
}));
const { container } = render(wrap(client, <ThreadShell
session={session(chatId)} title="Running paged history"
onToggleSidebar={() => {}} onNewChat={() => {}}
onToggleSidebar={() => {}}
/>));
await screen.findByText("current question");
act(() => client._emitChat(chatId, {
@@ -4345,8 +4292,6 @@ describe("ThreadShell", () => {
session={session("before-delta-chat")}
title="Before delta chat"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4445,7 +4390,6 @@ describe("ThreadShell", () => {
session={session("active-resume-chat")}
title="Active resume chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4532,7 +4476,6 @@ describe("ThreadShell", () => {
session={session("timing-chat")}
title="Timing chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4618,7 +4561,6 @@ describe("ThreadShell", () => {
session={session("visible-chat")}
title="Visible chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4682,7 +4624,6 @@ describe("ThreadShell", () => {
session={session("idle-visible-chat")}
title="Idle visible chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4739,7 +4680,6 @@ describe("ThreadShell", () => {
session={session("retry-visible-chat")}
title="Retry visible chat"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4795,7 +4735,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4855,7 +4794,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -4906,7 +4844,6 @@ describe("ThreadShell", () => {
session={session("token-media")}
title="Token media"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
null,
token,
@@ -4960,7 +4897,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5023,7 +4959,6 @@ describe("ThreadShell", () => {
session={session("chat-follow")}
title="Chat follow"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5119,7 +5054,6 @@ describe("ThreadShell", () => {
session={null}
title="nanobot"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5142,7 +5076,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5188,7 +5121,6 @@ describe("ThreadShell", () => {
session={null}
title="nanobot"
onToggleSidebar={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5210,7 +5142,6 @@ describe("ThreadShell", () => {
it("surfaces a dismissible banner for an uncorrelated message_too_big error", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-a");
render(
wrap(
@@ -5219,8 +5150,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -5256,8 +5185,6 @@ describe("ThreadShell", () => {
session={session("chat-model-failure")}
title="Chat model failure"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5347,8 +5274,6 @@ describe("ThreadShell", () => {
session={session("chat-inline-error")}
title="Chat inline error"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
),
);
@@ -5385,7 +5310,6 @@ describe("ThreadShell", () => {
it("clears the stream error banner when the user switches to another chat", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-a");
const { rerender } = render(
wrap(
@@ -5394,8 +5318,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -5416,8 +5338,6 @@ describe("ThreadShell", () => {
session={session("chat-b")}
title="Chat chat-b"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -5430,7 +5350,6 @@ describe("ThreadShell", () => {
it("clears the previous thread immediately while the next session loads", async () => {
const client = makeClient();
const onNewChat = vi.fn().mockResolvedValue("chat-b");
let resolveChatB:
| ((value: { ok: boolean; status: number; json: () => Promise<unknown> }) => void)
| null = null;
@@ -5465,8 +5384,6 @@ describe("ThreadShell", () => {
session={session("chat-a")}
title="Chat chat-a"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -5481,8 +5398,6 @@ describe("ThreadShell", () => {
session={session("chat-b")}
title="Chat chat-b"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={onNewChat}
/>,
),
);
@@ -5556,8 +5471,6 @@ describe("ThreadShell", () => {
session={session("lazy-mentions")}
title="Lazy mentions"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>));
const input = await screen.findByLabelText("Message input");
const catalogCalls = () => vi.mocked(fetch).mock.calls.filter(([url]) =>
@@ -5580,8 +5493,6 @@ describe("ThreadShell", () => {
session={session("retry-mentions")}
title="Retry mentions"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>));
const input = await screen.findByLabelText("Message input");
const catalogCalls = () => vi.mocked(fetch).mock.calls.filter(([url]) =>
@@ -5605,8 +5516,6 @@ describe("ThreadShell", () => {
session={session("chat-cli-apps")}
title="Chat chat-cli-apps"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
));
@@ -5665,8 +5574,6 @@ describe("ThreadShell", () => {
session={session("chat-cli-race")}
title="Chat chat-cli-race"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
));
@@ -5745,8 +5652,6 @@ describe("ThreadShell", () => {
session={session("chat-cli-refresh")}
title="Chat chat-cli-refresh"
onToggleSidebar={() => {}}
onGoHome={() => {}}
onNewChat={() => {}}
/>,
));
+3 -13
View File
@@ -8,7 +8,7 @@
* full decode/resize/re-encode cycle never blocks the UI thread.
*
* Output contract:
* ``{ok: true, dataUrl, mime, bytes, origBytes, normalized}`` on success, or
* ``{ok: true, dataUrl, bytes, normalized}`` on success, or
* ``{ok: false, reason}`` for every recoverable failure — magic-bytes
* mismatch, unsupported MIME, decode error, or a post-normalization payload
* that *still* exceeds the budget (extreme aspect ratios).
@@ -27,9 +27,7 @@ type EncodeSuccess = {
id: string;
ok: true;
dataUrl: string;
mime: string;
bytes: number;
origBytes: number;
/** True iff the Worker re-encoded the image to hit the size budget. */
normalized: boolean;
};
@@ -151,7 +149,7 @@ function computeScaledDims(
async function normalize(
file: File,
sourceMime: string,
): Promise<{ dataUrl: string; mime: string; bytes: number } | { error: EncodeFailure["reason"] }> {
): Promise<{ dataUrl: string; bytes: number } | { error: EncodeFailure["reason"] }> {
// Re-encode paths: JPEG/WebP → WebP q=0.85; PNG/GIF → PNG (keep crisp).
const targetMime = NORMALIZE_LOSSY_MIMES.has(sourceMime)
? "image/webp"
@@ -181,7 +179,7 @@ async function normalize(
}
const buf = await blob.arrayBuffer();
const dataUrl = `data:${targetMime};base64,${bufferToBase64(buf)}`;
return { dataUrl, mime: targetMime, bytes: blob.size };
return { dataUrl, bytes: blob.size };
} catch {
try {
bitmap.close();
@@ -211,10 +209,6 @@ export async function encodeImageInWorker(
if (!SUPPORTED_MIMES.has(sniffed)) {
return { id, ok: false, reason: "invalid_mime" };
}
// Defend against MIME spoofing: the declared ``file.type`` can lie.
if (file.type && SUPPORTED_MIMES.has(file.type) && file.type !== sniffed) {
// Trust the magic bytes; proceed with the sniffed MIME.
}
if (origBytes <= TARGET_MAX_BYTES) {
const dataUrl = `data:${sniffed};base64,${bufferToBase64(buffer)}`;
@@ -222,9 +216,7 @@ export async function encodeImageInWorker(
id,
ok: true,
dataUrl,
mime: sniffed,
bytes: origBytes,
origBytes,
normalized: false,
};
}
@@ -237,9 +229,7 @@ export async function encodeImageInWorker(
id,
ok: true,
dataUrl: result.dataUrl,
mime: result.mime,
bytes: result.bytes,
origBytes,
normalized: true,
};
}