mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-19 13:08:15 +02:00
Jauge de contexte, espace disque sur partage agrégé, panneau Fichiers
Trois défauts sans rapport entre eux, tous visibles à l'écran. Jauge de contexte bloquée à « 0 / N (0 %) » : le comptage exact vient de usage.prompt_tokens (include_usage), qu'un llama-server récent a cessé de renvoyer. On note désormais si l'usage est arrivé ; sinon la fin de tour publie l'estimation qui pilote déjà la compaction — approximative, mais jamais absente. Et la souscription envoie la valeur courante juste après le rattrapage : une page rechargée affichait zéro sur une discussion pourtant pleine, faute d'événement ctx_used dans la fenêtre rejouée. Espace disque : « il ne reste que 11,9 Go » sur un partage Unraid qui en a des centaines. /mnt/user est servi par shfs, un FUSE qui agrège plusieurs disques — statfs y renvoie l'espace d'un seul, et ce chiffre REFUSAIT l'installation du modèle. Les systèmes de fichiers qui approximent (FUSE, overlay, NFS, CIFS, Ceph, Gluster) sont reconnus par leur magie : leur chiffre reste affiché, précédé d'un « ~ », mais ne bloque plus rien. Panneau Fichiers : le panneau entier défilait, emportant vers le haut l'en-tête, le fil d'Ariane et le pied (occupation disque, bouton .zip) dès qu'il y avait quelques fichiers. Seule la liste défile maintenant ; le pied reste en bas et l'état vide se centre. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
895ff92ed8
commit
b405adea6c
5118 files changed
+1264007
-23
No files matched your search
+86
@@ -0,0 +1,86 @@
|
||||
var has = Object.prototype.hasOwnProperty;
|
||||
|
||||
function find(iter, tar, key) {
|
||||
for (key of iter.keys()) {
|
||||
if (dequal(key, tar)) return key;
|
||||
}
|
||||
}
|
||||
|
||||
function dequal(foo, bar) {
|
||||
var ctor, len, tmp;
|
||||
if (foo === bar) return true;
|
||||
|
||||
if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
|
||||
if (ctor === Date) return foo.getTime() === bar.getTime();
|
||||
if (ctor === RegExp) return foo.toString() === bar.toString();
|
||||
|
||||
if (ctor === Array) {
|
||||
if ((len=foo.length) === bar.length) {
|
||||
while (len-- && dequal(foo[len], bar[len]));
|
||||
}
|
||||
return len === -1;
|
||||
}
|
||||
|
||||
if (ctor === Set) {
|
||||
if (foo.size !== bar.size) {
|
||||
return false;
|
||||
}
|
||||
for (len of foo) {
|
||||
tmp = len;
|
||||
if (tmp && typeof tmp === 'object') {
|
||||
tmp = find(bar, tmp);
|
||||
if (!tmp) return false;
|
||||
}
|
||||
if (!bar.has(tmp)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ctor === Map) {
|
||||
if (foo.size !== bar.size) {
|
||||
return false;
|
||||
}
|
||||
for (len of foo) {
|
||||
tmp = len[0];
|
||||
if (tmp && typeof tmp === 'object') {
|
||||
tmp = find(bar, tmp);
|
||||
if (!tmp) return false;
|
||||
}
|
||||
if (!dequal(len[1], bar.get(tmp))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ctor === ArrayBuffer) {
|
||||
foo = new Uint8Array(foo);
|
||||
bar = new Uint8Array(bar);
|
||||
} else if (ctor === DataView) {
|
||||
if ((len=foo.byteLength) === bar.byteLength) {
|
||||
while (len-- && foo.getInt8(len) === bar.getInt8(len));
|
||||
}
|
||||
return len === -1;
|
||||
}
|
||||
|
||||
if (ArrayBuffer.isView(foo)) {
|
||||
if ((len=foo.byteLength) === bar.byteLength) {
|
||||
while (len-- && foo[len] === bar[len]);
|
||||
}
|
||||
return len === -1;
|
||||
}
|
||||
|
||||
if (!ctor || typeof foo === 'object') {
|
||||
len = 0;
|
||||
for (ctor in foo) {
|
||||
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
||||
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
||||
}
|
||||
return Object.keys(bar).length === len;
|
||||
}
|
||||
}
|
||||
|
||||
return foo !== foo && bar !== bar;
|
||||
}
|
||||
|
||||
exports.dequal = dequal;
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.dequal={})}(this,(function(e){var t=Object.prototype.hasOwnProperty;function r(e,t,r){for(r of e.keys())if(n(r,t))return r}function n(e,f){var i,o,u;if(e===f)return!0;if(e&&f&&(i=e.constructor)===f.constructor){if(i===Date)return e.getTime()===f.getTime();if(i===RegExp)return e.toString()===f.toString();if(i===Array){if((o=e.length)===f.length)for(;o--&&n(e[o],f[o]););return-1===o}if(i===Set){if(e.size!==f.size)return!1;for(o of e){if((u=o)&&"object"==typeof u&&!(u=r(f,u)))return!1;if(!f.has(u))return!1}return!0}if(i===Map){if(e.size!==f.size)return!1;for(o of e){if((u=o[0])&&"object"==typeof u&&!(u=r(f,u)))return!1;if(!n(o[1],f.get(u)))return!1}return!0}if(i===ArrayBuffer)e=new Uint8Array(e),f=new Uint8Array(f);else if(i===DataView){if((o=e.byteLength)===f.byteLength)for(;o--&&e.getInt8(o)===f.getInt8(o););return-1===o}if(ArrayBuffer.isView(e)){if((o=e.byteLength)===f.byteLength)for(;o--&&e[o]===f[o];);return-1===o}if(!i||"object"==typeof e){for(i in o=0,e){if(t.call(e,i)&&++o&&!t.call(f,i))return!1;if(!(i in f)||!n(e[i],f[i]))return!1}return Object.keys(f).length===o}}return e!=e&&f!=f}e.dequal=n}));
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
var has = Object.prototype.hasOwnProperty;
|
||||
|
||||
function find(iter, tar, key) {
|
||||
for (key of iter.keys()) {
|
||||
if (dequal(key, tar)) return key;
|
||||
}
|
||||
}
|
||||
|
||||
export function dequal(foo, bar) {
|
||||
var ctor, len, tmp;
|
||||
if (foo === bar) return true;
|
||||
|
||||
if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
|
||||
if (ctor === Date) return foo.getTime() === bar.getTime();
|
||||
if (ctor === RegExp) return foo.toString() === bar.toString();
|
||||
|
||||
if (ctor === Array) {
|
||||
if ((len=foo.length) === bar.length) {
|
||||
while (len-- && dequal(foo[len], bar[len]));
|
||||
}
|
||||
return len === -1;
|
||||
}
|
||||
|
||||
if (ctor === Set) {
|
||||
if (foo.size !== bar.size) {
|
||||
return false;
|
||||
}
|
||||
for (len of foo) {
|
||||
tmp = len;
|
||||
if (tmp && typeof tmp === 'object') {
|
||||
tmp = find(bar, tmp);
|
||||
if (!tmp) return false;
|
||||
}
|
||||
if (!bar.has(tmp)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ctor === Map) {
|
||||
if (foo.size !== bar.size) {
|
||||
return false;
|
||||
}
|
||||
for (len of foo) {
|
||||
tmp = len[0];
|
||||
if (tmp && typeof tmp === 'object') {
|
||||
tmp = find(bar, tmp);
|
||||
if (!tmp) return false;
|
||||
}
|
||||
if (!dequal(len[1], bar.get(tmp))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ctor === ArrayBuffer) {
|
||||
foo = new Uint8Array(foo);
|
||||
bar = new Uint8Array(bar);
|
||||
} else if (ctor === DataView) {
|
||||
if ((len=foo.byteLength) === bar.byteLength) {
|
||||
while (len-- && foo.getInt8(len) === bar.getInt8(len));
|
||||
}
|
||||
return len === -1;
|
||||
}
|
||||
|
||||
if (ArrayBuffer.isView(foo)) {
|
||||
if ((len=foo.byteLength) === bar.byteLength) {
|
||||
while (len-- && foo[len] === bar[len]);
|
||||
}
|
||||
return len === -1;
|
||||
}
|
||||
|
||||
if (!ctor || typeof foo === 'object') {
|
||||
len = 0;
|
||||
for (ctor in foo) {
|
||||
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
||||
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
||||
}
|
||||
return Object.keys(bar).length === len;
|
||||
}
|
||||
}
|
||||
|
||||
return foo !== foo && bar !== bar;
|
||||
}
|
||||
Reference in new issue
Block a user