FABLESLIP commited on
Commit
e2001ec
·
verified ·
1 Parent(s): fa09e9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -963,10 +963,22 @@ async function refreshWarmupUI(){
963
 
964
 
965
 
966
-
967
-
 
 
 
 
 
 
 
 
 
 
 
968
  const logsTxt = Array.isArray(s.logs) ? s.logs.join('\n') : '';
969
- if (warmupLogs) warmupLogs.textContent = (warmupPreface ? (warmupPreface + '\n') : '') + logsTxt;
 
970
 
971
 
972
 
@@ -1008,6 +1020,9 @@ if (warmupStartBtn){
1008
  models = DEFAULT_MODELS;
1009
  }
1010
 
 
 
 
1011
 
1012
  // Préface (audit du cache serveur, pour afficher le cumul)
1013
  try {
 
963
 
964
 
965
 
966
+ // Préambule construit dynamiquement à partir de /warmup/status
967
+ let prefaceNow = '';
968
+ if (Array.isArray(s.audit_cached)) {
969
+ const n = Number.isFinite(s.audit_count) ? s.audit_count : s.audit_cached.length;
970
+ prefaceNow =
971
+ 'Déjà en cache (' + n + '):\n' +
972
+ s.audit_cached.map(m => ' • ' + m).join('\n');
973
+ }
974
+ if (Array.isArray(window.lastRequestedModels) && window.lastRequestedModels.length) {
975
+ prefaceNow += (prefaceNow ? '\n\n' : '') +
976
+ 'Demandé dans cette exécution (' + window.lastRequestedModels.length + '):\n' +
977
+ window.lastRequestedModels.map(m => ' • ' + m).join('\n');
978
+ }
979
  const logsTxt = Array.isArray(s.logs) ? s.logs.join('\n') : '';
980
+ if (warmupLogs) warmupLogs.textContent = (prefaceNow ? (prefaceNow + '\n\n') : '') + logsTxt;
981
+
982
 
983
 
984
 
 
1020
  models = DEFAULT_MODELS;
1021
  }
1022
 
1023
+ // Mémorise la demande en cours pour l’affichage des logs
1024
+ window.lastRequestedModels = models;
1025
+
1026
 
1027
  // Préface (audit du cache serveur, pour afficher le cumul)
1028
  try {