mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-13 02:08:07 +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
+178
@@ -0,0 +1,178 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
var _parser = _interopRequireDefault(require("./parser"));
|
||||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
||||
var Processor = exports["default"] = /*#__PURE__*/function () {
|
||||
function Processor(func, options) {
|
||||
this.func = func || function noop() {};
|
||||
this.funcRes = null;
|
||||
this.options = options;
|
||||
}
|
||||
var _proto = Processor.prototype;
|
||||
_proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
var merged = Object.assign({}, this.options, options);
|
||||
if (merged.updateSelector === false) {
|
||||
return false;
|
||||
} else {
|
||||
return typeof rule !== "string";
|
||||
}
|
||||
};
|
||||
_proto._isLossy = function _isLossy(options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
var merged = Object.assign({}, this.options, options);
|
||||
if (merged.lossless === false) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
_proto._root = function _root(rule, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
var parser = new _parser["default"](rule, this._parseOptions(options));
|
||||
return parser.root;
|
||||
};
|
||||
_proto._parseOptions = function _parseOptions(options) {
|
||||
var merged = Object.assign({}, this.options, options);
|
||||
return {
|
||||
lossy: this._isLossy(merged),
|
||||
maxNestingDepth: merged.maxNestingDepth
|
||||
};
|
||||
};
|
||||
_proto._stringifyOptions = function _stringifyOptions(options) {
|
||||
var merged = Object.assign({}, this.options, options);
|
||||
return {
|
||||
maxNestingDepth: merged.maxNestingDepth
|
||||
};
|
||||
};
|
||||
_proto._run = function _run(rule, options) {
|
||||
var _this = this;
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
try {
|
||||
var root = _this._root(rule, options);
|
||||
Promise.resolve(_this.func(root)).then(function (transform) {
|
||||
var string = undefined;
|
||||
if (_this._shouldUpdateSelector(rule, options)) {
|
||||
string = root.toString(_this._stringifyOptions(options));
|
||||
rule.selector = string;
|
||||
}
|
||||
return {
|
||||
transform: transform,
|
||||
root: root,
|
||||
string: string
|
||||
};
|
||||
}).then(resolve, reject);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
return;
|
||||
}
|
||||
});
|
||||
};
|
||||
_proto._runSync = function _runSync(rule, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
var root = this._root(rule, options);
|
||||
var transform = this.func(root);
|
||||
if (transform && typeof transform.then === "function") {
|
||||
throw new Error("Selector processor returned a promise to a synchronous call.");
|
||||
}
|
||||
var string = undefined;
|
||||
if (options.updateSelector && typeof rule !== "string") {
|
||||
string = root.toString(this._stringifyOptions(options));
|
||||
rule.selector = string;
|
||||
}
|
||||
return {
|
||||
transform: transform,
|
||||
root: root,
|
||||
string: string
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Process rule into a selector AST.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {Promise<parser.Root>} The AST of the selector after processing it.
|
||||
*/;
|
||||
_proto.ast = function ast(rule, options) {
|
||||
return this._run(rule, options).then(function (result) {
|
||||
return result.root;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Process rule into a selector AST synchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {parser.Root} The AST of the selector after processing it.
|
||||
*/;
|
||||
_proto.astSync = function astSync(rule, options) {
|
||||
return this._runSync(rule, options).root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a selector into a transformed value asynchronously
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {Promise<any>} The value returned by the processor.
|
||||
*/;
|
||||
_proto.transform = function transform(rule, options) {
|
||||
return this._run(rule, options).then(function (result) {
|
||||
return result.transform;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a selector into a transformed value synchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {any} The value returned by the processor.
|
||||
*/;
|
||||
_proto.transformSync = function transformSync(rule, options) {
|
||||
return this._runSync(rule, options).transform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a selector into a new selector string asynchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {string} the selector after processing.
|
||||
*/;
|
||||
_proto.process = function process(rule, options) {
|
||||
var _this2 = this;
|
||||
return this._run(rule, options).then(function (result) {
|
||||
return result.string || result.root.toString(_this2._stringifyOptions(options));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a selector into a new selector string synchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {string} the selector after processing.
|
||||
*/;
|
||||
_proto.processSync = function processSync(rule, options) {
|
||||
var result = this._runSync(rule, options);
|
||||
return result.string || result.root.toString(this._stringifyOptions(options));
|
||||
};
|
||||
return Processor;
|
||||
}();
|
||||
module.exports = exports.default;
|
||||
Reference in new issue
Block a user